Preserve no-AST adapter bindings
This commit is contained in:
parent
bb13258861
commit
6c05607b14
7 changed files with 209 additions and 13 deletions
|
|
@ -162,3 +162,32 @@ does not expose canonical application.
|
|||
|
||||
DocForge pins the official stable Python MCP SDK to the compatible `mcp>=1.28,<2` release line.
|
||||
Migration to a later major release requires a separate contract and protocol compatibility review.
|
||||
|
||||
## Preserved no-AST bindings
|
||||
|
||||
An owner may start the generic MCP server with `--no-ast`:
|
||||
|
||||
```bash
|
||||
docforge-mcp --project-root /absolute/project --no-ast
|
||||
```
|
||||
|
||||
Project-owned integrations select the same immutable process policy with
|
||||
`create_project_server(..., no_ast=True)` or `create_read_only_server(..., no_ast=True)`.
|
||||
|
||||
The policy preserves the current adapter extraction strategy. It does not require an adapter API
|
||||
migration and does not disable complete-projection loading or non-AST incremental fingerprinting,
|
||||
invalidation, and caching.
|
||||
|
||||
Both `docforge_bootstrap` and `docforge_get_contract` report the exact policy. MCP server
|
||||
instructions tell clients not to add Python AST, Tree-sitter, compiler-AST, or function-Logic
|
||||
extraction. Under this binding:
|
||||
|
||||
- `docforge_get_logic` returns `adapter_policy_forbids_logic`;
|
||||
- a nonempty Logic projection is rejected before index publication;
|
||||
- `adapter_ast_upgrade` and `function_logic_extraction` appear as excluded operations; and
|
||||
- changing the policy requires changing the process configuration and starting a new MCP process.
|
||||
|
||||
The policy governs the DocForge binding and conforming MCP clients. DocForge still exposes no
|
||||
filesystem sandbox and cannot prevent an unrelated process with direct repository write access
|
||||
from editing adapter files. Repository permissions and project instructions remain responsible for
|
||||
that broader boundary.
|
||||
|
|
|
|||
|
|
@ -656,6 +656,25 @@ traversal.
|
|||
See [Incremental Adapter Indexing](INCREMENTAL_INDEXING.md) for the complete contract, cache
|
||||
invalidation rules, manual-application lifecycle, and lazy Logic boundary.
|
||||
|
||||
### Preserving an older non-AST adapter
|
||||
|
||||
Use `--no-ast` on the MCP binding when the project owner wants the existing adapter preserved
|
||||
without AST, Tree-sitter, compiler-AST, or function-Logic upgrades:
|
||||
|
||||
```bash
|
||||
docforge-mcp --project-root /absolute/project --no-ast
|
||||
```
|
||||
|
||||
For a project-owned server, pass `no_ast=True` to `create_project_server()` or
|
||||
`create_read_only_server()`. Bootstrap and contract responses then expose
|
||||
`mode=preserve-no-ast`. The Logic tool is blocked, and DocForge refuses to publish nonempty Logic
|
||||
projections.
|
||||
|
||||
This policy does not disable the Release 1 `load_projection()` path. It also permits incremental
|
||||
fingerprinting and caching when those mechanisms do not add AST analysis. The adapter can
|
||||
therefore benefit from current synchronization, proposals, application, rendering, and graph tools
|
||||
without a source-analysis rewrite.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `stale_index` or `visualization_stale`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue