ai-docs-toolkit 0.4.2__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ai_docs_toolkit-0.4.2/src/ai_docs_toolkit.egg-info → ai_docs_toolkit-0.5.1}/PKG-INFO +51 -6
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/README.md +12 -6
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/packaging/pypi/README.md +50 -5
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/pyproject.toml +2 -1
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/__init__.py +1 -1
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/cli/__init__.py +6 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/cli/workspace.py +58 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/context/markdown_output.py +41 -7
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/changed_files.py +55 -9
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/init.py +30 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/docs/agent-installation.md +148 -1
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/impact/json_output.py +6 -42
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/mcp/server.py +24 -3
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/init-command-contract.md +16 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/templates/project/.ai-docs/reference/workspace-analysis.md +102 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/workspace/manifest-v1.schema.yaml +35 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/workspace/repository-v1.schema.yaml +102 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/workspace/request-v1.schema.yaml +90 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/workspace/result-v1.schema.yaml +586 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/ai-docs.config.yaml +3 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/workspace/__init__.py +6 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/workspace/analysis.py +277 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/workspace/config.py +261 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/workspace/result.py +44 -0
- ai_docs_toolkit-0.5.1/src/ai_docs_toolkit/workspace/schemas.py +32 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1/src/ai_docs_toolkit.egg-info}/PKG-INFO +51 -6
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit.egg-info/SOURCES.txt +20 -1
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_bootstrap_templates.py +5 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_cli_baseline.py +2 -2
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_context_cli_json.py +3 -3
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_context_cli_markdown.py +3 -3
- ai_docs_toolkit-0.5.1/tests/test_ham_workspace_evaluation.py +83 -0
- ai_docs_toolkit-0.5.1/tests/test_ham_workspace_reverification.py +180 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_impact_cli_human.py +1 -1
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_impact_cli_json.py +3 -3
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_init_cli.py +5 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_mcp_server.py +2 -2
- ai_docs_toolkit-0.5.1/tests/test_mixed_roots.py +132 -0
- ai_docs_toolkit-0.5.1/tests/test_multi_repository_pilot.py +297 -0
- ai_docs_toolkit-0.5.1/tests/test_workspace.py +303 -0
- ai_docs_toolkit-0.5.1/tests/test_workspace_adapters.py +179 -0
- ai_docs_toolkit-0.5.1/tests/test_workspace_bootstrap.py +72 -0
- ai_docs_toolkit-0.5.1/tests/test_workspace_schemas.py +120 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/LICENSE +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/setup.cfg +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/__main__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/context/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/azure_devops_provider.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/code_links.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/config.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/context.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/doctor.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/file_lookup.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/frontmatter.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/graph.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/impact.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/planning_operations.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/planning_scaffold.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/registry.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/requirement_capture.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/scanner.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/schema_validation.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/section_fix.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/structure_validation.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/core/task_export.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/graph/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/graph/json_output.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/impact/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/mcp/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/mcp/__main__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/mcp/setup.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/review/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/review/check.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/review/record.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/examples/skills/release-publication/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/documentation-cascade-authoring-skill.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/documentation-change-review-skill.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/incoming-request-model.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/incoming-request-triage-skill.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/planning-document-model.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/reference/toolkit-maintenance-context-routing.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/acceptance.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/architecture-decision.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/asset.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/business-rule.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/contract.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/guide.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/implementation-task.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/index.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/inventory.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/module.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/operation.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/plan-stage.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/plan.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/runbook.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/scenario.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/standalone-task.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/task-registry.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/document-types/test-case.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/schemas/frontmatter.schema.yaml +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/documentation-cascade-authoring/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/documentation-change-review/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/incoming-request-triage/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/index.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/planning-record-generation/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/planning-task-execution/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/toolkit-consumer-policy/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/skills/update-ai-docs-toolkit/SKILL.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/agent-context-architecture-beta-18.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/archive-validation-beta-12.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/cascade-impact-beta-14.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/consumer-migration-hardening.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/decision-visibility-beta-13.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/doctor-filesystem-traversal-beta-19.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/doctor-json-provenance-beta-20.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/documentation-cascade-authoring-beta-23.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/documentation-change-review-beta-21.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/incoming-request-storage-beta-17.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/incoming-request-triage-beta-22.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/migration-note.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/post-publication-checks.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/release-task.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/routing-restoration-beta-15.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/task-retirement-beta-16.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/validation-evidence.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/templates/release/version-change-checklist.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/workflows/documentation-cascade-adoption.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/workflows/plan-stage-workflow.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/.ai-docs/workflows/toolkit-migration-workflow.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/AGENTS.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/templates/project/ai-docs-index.md +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/validation/__init__.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/validation/human.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit.egg-info/dependency_links.txt +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit.egg-info/entry_points.txt +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit.egg-info/requires.txt +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit.egg-info/top_level.txt +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_azure_devops_provider.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_code_links.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_config_loader_and_scanner.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_consumer_matrix.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_context_depth.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_context_policy.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_context_selector.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_document_graph.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_document_registry.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_execution_evals.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_frontmatter_parser.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_graph_cli_json.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_impact_analysis.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_review_check.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_schema_validation.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_skill_eval_harness.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_structure_validation.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_task_export.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_validate_cli_human.py +0 -0
- {ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/tests/test_validate_cli_json.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-docs-toolkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: AI-oriented documentation toolkit.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.14
|
|
@@ -33,7 +33,7 @@ The core idea is that documentation should not be a secondary artifact created a
|
|
|
33
33
|
|
|
34
34
|
## Current Status
|
|
35
35
|
|
|
36
|
-
Version 0.
|
|
36
|
+
Version 0.5.1 includes:
|
|
37
37
|
|
|
38
38
|
- schema and structure validation for Markdown documents with YAML front matter;
|
|
39
39
|
- document graph output;
|
|
@@ -45,32 +45,77 @@ Version 0.4.2 includes:
|
|
|
45
45
|
- context bundle output;
|
|
46
46
|
- an executable `ai-docs` CLI;
|
|
47
47
|
- optional local MCP runtime entrypoint.
|
|
48
|
+
- opt-in workspace impact analysis through CLI and MCP, with explicit manifests,
|
|
49
|
+
repository-scoped IDs, public event interfaces and visible partial results.
|
|
48
50
|
|
|
49
51
|
## Installation
|
|
50
52
|
|
|
51
|
-
Install version 0.
|
|
53
|
+
Install version 0.5.1 with Python 3.14 or newer:
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
|
-
python -m pip install ai-docs-toolkit==0.
|
|
56
|
+
python -m pip install ai-docs-toolkit==0.5.1
|
|
55
57
|
ai-docs --version
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
For ephemeral execution with `uvx`:
|
|
59
61
|
|
|
60
62
|
```bash
|
|
61
|
-
uvx --python 3.14 --from ai-docs-toolkit==0.
|
|
63
|
+
uvx --python 3.14 --from ai-docs-toolkit==0.5.1 ai-docs --version
|
|
62
64
|
```
|
|
63
65
|
|
|
64
66
|
For the optional local MCP runtime:
|
|
65
67
|
|
|
66
68
|
```bash
|
|
67
|
-
python -m pip install "ai-docs-toolkit[mcp]==0.
|
|
69
|
+
python -m pip install "ai-docs-toolkit[mcp]==0.5.1"
|
|
68
70
|
ai-docs-mcp --project-root .
|
|
69
71
|
```
|
|
70
72
|
|
|
71
73
|
For the latest stable release, use `python -m pip install --upgrade ai-docs-toolkit`
|
|
72
74
|
without an exact version pin.
|
|
73
75
|
|
|
76
|
+
## Release 0.5.1
|
|
77
|
+
|
|
78
|
+
Changed-path routing treats only Markdown (`.md`, case insensitive) inside
|
|
79
|
+
configured roots as document candidates. Other files use explicit module
|
|
80
|
+
ownership even within those roots. Local changed context now uses the same
|
|
81
|
+
ownership declarations, preserving every matching module and changed path.
|
|
82
|
+
Broken or deleted Markdown retains diagnostics; it cannot fall back to an owner.
|
|
83
|
+
Unmapped paths remain visible. CLI names, config and JSON shapes are unchanged.
|
|
84
|
+
|
|
85
|
+
Upgrade the pinned package to `0.5.1`, review `ai-docs init --dry-run` and refresh
|
|
86
|
+
known unchanged managed references using ordinary `ai-docs init`. Preserve local
|
|
87
|
+
policies, IDs, links and historical review evidence; do not use blanket force.
|
|
88
|
+
Run validation and repeat the actual changed-path review, including mixed roots.
|
|
89
|
+
Detailed commands and rollback: “Migration 0.5.0 To 0.5.1” in packaged agent docs.
|
|
90
|
+
|
|
91
|
+
## Release 0.5.0
|
|
92
|
+
|
|
93
|
+
`ai-docs workspace impact --workspace ./ai-docs.workspace.yaml --input ./change.yaml --format json`
|
|
94
|
+
analyzes explicitly connected independent repositories. Stable repository IDs
|
|
95
|
+
namespace document IDs; a system repository owns public event contracts and
|
|
96
|
+
producer/consumer roles, while local bindings select implementation modules.
|
|
97
|
+
Modules may be nested within a repository. Cross-repository `related.*` links
|
|
98
|
+
and inferred dependency discovery are not required.
|
|
99
|
+
|
|
100
|
+
The MCP tool is registered only when the server starts with `--workspace`;
|
|
101
|
+
ordinary local commands retain their scope. JSON v1 preserves candidates,
|
|
102
|
+
provenance and diagnostics when a checkout, binding or interface version is
|
|
103
|
+
missing. A partial result is not a clean review, and resolved routing does not
|
|
104
|
+
prove sufficient context or implementation compatibility.
|
|
105
|
+
|
|
106
|
+
Upgrading from 0.4.2 refreshes four managed workspace schemas and the consumer
|
|
107
|
+
reference in both `minimal` and `agent` profiles. Review `init --dry-run` and
|
|
108
|
+
`init --check` with the existing profile, reconcile local modifications, then
|
|
109
|
+
run ordinary `init` without blanket `--force`. Project documents, IDs, local
|
|
110
|
+
policy and configuration remain project-owned. Repository IDs, manifests and
|
|
111
|
+
bindings require manual opt-in; init does not discover neighboring repositories.
|
|
112
|
+
Exact commands and rollback are in “Migration 0.4.2 To 0.5.0” in the packaged
|
|
113
|
+
`ai_docs_toolkit/docs/agent-installation.md`.
|
|
114
|
+
|
|
115
|
+
Verification includes installed CLI/MCP and upgrade matrices plus a bounded
|
|
116
|
+
HAM documentation evaluation. Its accepted result retains native-format
|
|
117
|
+
validation findings; it is not a full HAM migration or service runtime check.
|
|
118
|
+
|
|
74
119
|
## Release 0.4.2
|
|
75
120
|
|
|
76
121
|
The package now declares the MIT license in its metadata and includes the full
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
AI Docs Toolkit is a documentation toolkit for AI-assisted software development.
|
|
4
4
|
|
|
5
|
-
It treats documentation as an engineering interface between humans, AI agents, code, tests and change management.
|
|
5
|
+
It treats documentation as an engineering interface between humans, AI agents, code, tests and change management. Version 0.5.1 fixes changed-path routing in mixed documentation roots across local CLI and workspace CLI/MCP. The package uses the MIT license and requires Python 3.14 or newer.
|
|
6
6
|
|
|
7
7
|
## Purpose
|
|
8
8
|
|
|
@@ -34,6 +34,7 @@ The stable package provides:
|
|
|
34
34
|
- impact analysis;
|
|
35
35
|
- context selection with history filtering, optional body budgets and configurable depth;
|
|
36
36
|
- proportionate agent workflows and optional MCP integration;
|
|
37
|
+
- explicit workspace manifests, repository-scoped document IDs and public event interface routing;
|
|
37
38
|
- CI, pre-commit and agent workflow examples.
|
|
38
39
|
|
|
39
40
|
At this stage the repository contains:
|
|
@@ -83,10 +84,15 @@ pipx install ai-docs-toolkit
|
|
|
83
84
|
uvx --from ai-docs-toolkit ai-docs validate
|
|
84
85
|
```
|
|
85
86
|
|
|
86
|
-
[
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
[Release 0.5.1](ai-docs/reference/releases/0-5-1.md) fixes mixed-root routing and adds explicit module ownership to changed context. See the [0.5.0 → 0.5.1 upgrade guide](src/ai_docs_toolkit/docs/agent-installation.md#migration-050-to-051).
|
|
88
|
+
|
|
89
|
+
[Release 0.5.0](ai-docs/reference/releases/0-5-0.md) adds `ai-docs workspace impact`
|
|
90
|
+
and the explicitly enabled MCP workspace tool. Existing repository-local commands
|
|
91
|
+
keep their scope. See the [0.4.2 → 0.5.0 migration guide](src/ai_docs_toolkit/docs/agent-installation.md#migration-042-to-050)
|
|
92
|
+
for the managed schema/reference refresh in both init profiles and manual opt-in.
|
|
93
|
+
Registry availability is shown on [Public PyPI](https://pypi.org/project/ai-docs-toolkit/).
|
|
94
|
+
If upgrading from 0.4.1, also read the
|
|
95
|
+
[0.4.1 → 0.4.2 upgrade note](src/ai_docs_toolkit/docs/agent-installation.md#migration-041-to-042).
|
|
90
96
|
If upgrading from 0.4.0, also follow the
|
|
91
97
|
[0.4.0 → 0.4.1 migration guide](src/ai_docs_toolkit/docs/agent-installation.md#migration-040-to-041).
|
|
92
98
|
That patch required no schema, configuration or managed-template content migration;
|
|
@@ -270,7 +276,7 @@ The MVP does not aim to provide:
|
|
|
270
276
|
- full IDE plugins;
|
|
271
277
|
- hosted services;
|
|
272
278
|
- database-backed graph storage;
|
|
273
|
-
- cross-repository dependency graphs.
|
|
279
|
+
- inferred or transitive cross-repository dependency graphs beyond explicit public interface bindings.
|
|
274
280
|
|
|
275
281
|
## License
|
|
276
282
|
|
|
@@ -16,7 +16,7 @@ The core idea is that documentation should not be a secondary artifact created a
|
|
|
16
16
|
|
|
17
17
|
## Current Status
|
|
18
18
|
|
|
19
|
-
Version 0.
|
|
19
|
+
Version 0.5.1 includes:
|
|
20
20
|
|
|
21
21
|
- schema and structure validation for Markdown documents with YAML front matter;
|
|
22
22
|
- document graph output;
|
|
@@ -28,32 +28,77 @@ Version 0.4.2 includes:
|
|
|
28
28
|
- context bundle output;
|
|
29
29
|
- an executable `ai-docs` CLI;
|
|
30
30
|
- optional local MCP runtime entrypoint.
|
|
31
|
+
- opt-in workspace impact analysis through CLI and MCP, with explicit manifests,
|
|
32
|
+
repository-scoped IDs, public event interfaces and visible partial results.
|
|
31
33
|
|
|
32
34
|
## Installation
|
|
33
35
|
|
|
34
|
-
Install version 0.
|
|
36
|
+
Install version 0.5.1 with Python 3.14 or newer:
|
|
35
37
|
|
|
36
38
|
```bash
|
|
37
|
-
python -m pip install ai-docs-toolkit==0.
|
|
39
|
+
python -m pip install ai-docs-toolkit==0.5.1
|
|
38
40
|
ai-docs --version
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
For ephemeral execution with `uvx`:
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
|
-
uvx --python 3.14 --from ai-docs-toolkit==0.
|
|
46
|
+
uvx --python 3.14 --from ai-docs-toolkit==0.5.1 ai-docs --version
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
For the optional local MCP runtime:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
|
-
python -m pip install "ai-docs-toolkit[mcp]==0.
|
|
52
|
+
python -m pip install "ai-docs-toolkit[mcp]==0.5.1"
|
|
51
53
|
ai-docs-mcp --project-root .
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
For the latest stable release, use `python -m pip install --upgrade ai-docs-toolkit`
|
|
55
57
|
without an exact version pin.
|
|
56
58
|
|
|
59
|
+
## Release 0.5.1
|
|
60
|
+
|
|
61
|
+
Changed-path routing treats only Markdown (`.md`, case insensitive) inside
|
|
62
|
+
configured roots as document candidates. Other files use explicit module
|
|
63
|
+
ownership even within those roots. Local changed context now uses the same
|
|
64
|
+
ownership declarations, preserving every matching module and changed path.
|
|
65
|
+
Broken or deleted Markdown retains diagnostics; it cannot fall back to an owner.
|
|
66
|
+
Unmapped paths remain visible. CLI names, config and JSON shapes are unchanged.
|
|
67
|
+
|
|
68
|
+
Upgrade the pinned package to `0.5.1`, review `ai-docs init --dry-run` and refresh
|
|
69
|
+
known unchanged managed references using ordinary `ai-docs init`. Preserve local
|
|
70
|
+
policies, IDs, links and historical review evidence; do not use blanket force.
|
|
71
|
+
Run validation and repeat the actual changed-path review, including mixed roots.
|
|
72
|
+
Detailed commands and rollback: “Migration 0.5.0 To 0.5.1” in packaged agent docs.
|
|
73
|
+
|
|
74
|
+
## Release 0.5.0
|
|
75
|
+
|
|
76
|
+
`ai-docs workspace impact --workspace ./ai-docs.workspace.yaml --input ./change.yaml --format json`
|
|
77
|
+
analyzes explicitly connected independent repositories. Stable repository IDs
|
|
78
|
+
namespace document IDs; a system repository owns public event contracts and
|
|
79
|
+
producer/consumer roles, while local bindings select implementation modules.
|
|
80
|
+
Modules may be nested within a repository. Cross-repository `related.*` links
|
|
81
|
+
and inferred dependency discovery are not required.
|
|
82
|
+
|
|
83
|
+
The MCP tool is registered only when the server starts with `--workspace`;
|
|
84
|
+
ordinary local commands retain their scope. JSON v1 preserves candidates,
|
|
85
|
+
provenance and diagnostics when a checkout, binding or interface version is
|
|
86
|
+
missing. A partial result is not a clean review, and resolved routing does not
|
|
87
|
+
prove sufficient context or implementation compatibility.
|
|
88
|
+
|
|
89
|
+
Upgrading from 0.4.2 refreshes four managed workspace schemas and the consumer
|
|
90
|
+
reference in both `minimal` and `agent` profiles. Review `init --dry-run` and
|
|
91
|
+
`init --check` with the existing profile, reconcile local modifications, then
|
|
92
|
+
run ordinary `init` without blanket `--force`. Project documents, IDs, local
|
|
93
|
+
policy and configuration remain project-owned. Repository IDs, manifests and
|
|
94
|
+
bindings require manual opt-in; init does not discover neighboring repositories.
|
|
95
|
+
Exact commands and rollback are in “Migration 0.4.2 To 0.5.0” in the packaged
|
|
96
|
+
`ai_docs_toolkit/docs/agent-installation.md`.
|
|
97
|
+
|
|
98
|
+
Verification includes installed CLI/MCP and upgrade matrices plus a bounded
|
|
99
|
+
HAM documentation evaluation. Its accepted result retains native-format
|
|
100
|
+
validation findings; it is not a full HAM migration or service runtime check.
|
|
101
|
+
|
|
57
102
|
## Release 0.4.2
|
|
58
103
|
|
|
59
104
|
The package now declares the MIT license in its metadata and includes the full
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ai-docs-toolkit"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.1"
|
|
8
8
|
description = "AI-oriented documentation toolkit."
|
|
9
9
|
readme = "packaging/pypi/README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
@@ -41,6 +41,7 @@ ai_docs_toolkit = [
|
|
|
41
41
|
"templates/project/.ai-docs/reference/*.md",
|
|
42
42
|
"templates/project/.ai-docs/schemas/*.schema.yaml",
|
|
43
43
|
"templates/project/.ai-docs/schemas/document-types/*.schema.yaml",
|
|
44
|
+
"templates/project/.ai-docs/schemas/workspace/*-v1.schema.yaml",
|
|
44
45
|
"templates/project/.ai-docs/templates/release/*.md",
|
|
45
46
|
"templates/project/.ai-docs/workflows/*.md",
|
|
46
47
|
]
|
|
@@ -91,6 +91,7 @@ def _help_text() -> str:
|
|
|
91
91
|
" ai-docs tasks push --provider azure-devops (--task TASK-ID | --stage STAGE-ID | --plan PLAN-ID) --organization ORG --project PROJECT [--dry-run] [--write-back] [--format json]",
|
|
92
92
|
" ai-docs graph --format json [--type TYPE] [--module MODULE] [--id ID]",
|
|
93
93
|
" ai-docs impact (--id ID | --changed [--base REF]) [--format json]",
|
|
94
|
+
" ai-docs workspace impact --workspace FILE --input FILE [--format human|json]",
|
|
94
95
|
" ai-docs code-links-check FILE... [--format human|json|--json]",
|
|
95
96
|
" ai-docs review-check RECORD [--record N] [--format json|--json]",
|
|
96
97
|
" ai-docs context (--id ID | --module MODULE | --feature FEATURE | --changed) [--format json] [--history exclude|include|legacy] [--body-budget-bytes N] [--depth N]",
|
|
@@ -110,6 +111,11 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
110
111
|
|
|
111
112
|
args = sys.argv[1:]
|
|
112
113
|
|
|
114
|
+
if args and args[0] == "workspace":
|
|
115
|
+
from .workspace import main as workspace_main
|
|
116
|
+
|
|
117
|
+
return workspace_main(args[1:])
|
|
118
|
+
|
|
113
119
|
if not args or "--help" in args or "-h" in args:
|
|
114
120
|
print(_help_text())
|
|
115
121
|
return 0
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Explicit workspace CLI adapter; domain results come from the shared service."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from ai_docs_toolkit.workspace import analyze_workspace_file, format_workspace_json
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class UsageError(ValueError):
|
|
10
|
+
pass
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WorkspaceParser(argparse.ArgumentParser):
|
|
14
|
+
def error(self, message):
|
|
15
|
+
raise UsageError(message)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def main(argv: list[str]) -> int:
|
|
19
|
+
parser = WorkspaceParser(prog="ai-docs workspace impact", allow_abbrev=False)
|
|
20
|
+
parser.add_argument("--workspace", required=True, help="Explicit workspace manifest path.")
|
|
21
|
+
parser.add_argument("--input", required=True, help="Saved JSON/YAML request v1 path.")
|
|
22
|
+
parser.add_argument("--format", choices=("human", "json"), default="human")
|
|
23
|
+
try:
|
|
24
|
+
if not argv or argv[0] != "impact":
|
|
25
|
+
raise UsageError("expected 'workspace impact'")
|
|
26
|
+
# Duplicate selectors are ambiguous even if argparse would accept the last value.
|
|
27
|
+
options = [arg.split("=", 1)[0] for arg in argv[1:] if arg.startswith("--")]
|
|
28
|
+
if len(options) != len(set(options)):
|
|
29
|
+
raise UsageError("duplicate option")
|
|
30
|
+
args = parser.parse_args(argv[1:])
|
|
31
|
+
except UsageError as exc:
|
|
32
|
+
parser.print_usage(sys.stderr)
|
|
33
|
+
print(f"{parser.prog}: error: {exc}", file=sys.stderr)
|
|
34
|
+
return 3
|
|
35
|
+
except SystemExit as exc:
|
|
36
|
+
return int(exc.code)
|
|
37
|
+
result = analyze_workspace_file(args.workspace, args.input)
|
|
38
|
+
print(format_workspace_json(result) if args.format == "json" else format_human(result), end="")
|
|
39
|
+
return result["exit_code"]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def format_human(result: dict) -> str:
|
|
43
|
+
lines = [f"Workspace routing: {result['routing_status']} (exit {result['exit_code']})",
|
|
44
|
+
f"Sources: {len(result['sources'])}; candidates: {len(result['candidates'])}"]
|
|
45
|
+
for kind in ("sources", "candidates"):
|
|
46
|
+
for document in result[kind]:
|
|
47
|
+
lines.append(f"{kind}: {document['repository_id']}:{document['document_id']}")
|
|
48
|
+
for gap in result["gaps"]:
|
|
49
|
+
lines.append(f"Gap {gap['code']} [{gap['repository_id']}]: {gap['message']}")
|
|
50
|
+
for review in result["reviews"]:
|
|
51
|
+
if review["system_review_required"]:
|
|
52
|
+
lines.append(f"System review required: {review['repository_id']} ({review['interface_impact']})")
|
|
53
|
+
for context in result["context"]:
|
|
54
|
+
for field in ("warnings", "gaps", "excluded", "historical"):
|
|
55
|
+
if context.get(field):
|
|
56
|
+
lines.append(f"Context {context['repository_id']} {field}: {len(context[field])}")
|
|
57
|
+
lines.append("Routing completion does not mean review completion or sufficient context. Use --format json for evidence.")
|
|
58
|
+
return "\n".join(lines) + "\n"
|
{ai_docs_toolkit-0.4.2 → ai_docs_toolkit-0.5.1}/src/ai_docs_toolkit/context/markdown_output.py
RENAMED
|
@@ -2,7 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import hashlib
|
|
4
4
|
import json
|
|
5
|
-
from dataclasses import asdict, dataclass
|
|
5
|
+
from dataclasses import asdict, dataclass, replace
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
8
|
from ai_docs_toolkit.core import (
|
|
@@ -23,8 +23,11 @@ from ai_docs_toolkit.core import (
|
|
|
23
23
|
)
|
|
24
24
|
from ai_docs_toolkit.core.changed_files import (
|
|
25
25
|
ChangedFileIssue,
|
|
26
|
+
cascade_module_issues,
|
|
27
|
+
is_documentation_candidate,
|
|
26
28
|
read_git_changed_files,
|
|
27
29
|
resolve_changed_document_sources,
|
|
30
|
+
resolve_changed_module_sources,
|
|
28
31
|
)
|
|
29
32
|
from ai_docs_toolkit.core.config import context_settings_error
|
|
30
33
|
from ai_docs_toolkit.core.context import ContextPolicy
|
|
@@ -108,26 +111,57 @@ def context_project(
|
|
|
108
111
|
elif mode == "changed":
|
|
109
112
|
changed = _git_changed_files(context_result.root)
|
|
110
113
|
source_result = resolve_changed_document_sources(
|
|
111
|
-
|
|
114
|
+
tuple(
|
|
115
|
+
path for path in changed.changed_files
|
|
116
|
+
if is_documentation_candidate((context_result.root / path).resolve(), config)
|
|
117
|
+
),
|
|
112
118
|
config=config,
|
|
113
119
|
registry=registry,
|
|
114
120
|
root=context_result.root,
|
|
115
121
|
outside_docs_rule_id=RULE_CHANGED_FILE_OUTSIDE_DOCS,
|
|
116
122
|
not_document_rule_id=RULE_CHANGED_FILE_NOT_DOCUMENT,
|
|
117
123
|
)
|
|
124
|
+
modules = resolve_changed_module_sources(
|
|
125
|
+
changed.changed_files,
|
|
126
|
+
config=config,
|
|
127
|
+
outside_docs_rule_id=RULE_CHANGED_FILE_OUTSIDE_DOCS,
|
|
128
|
+
)
|
|
129
|
+
valid_modules = tuple(
|
|
130
|
+
source for source in modules.sources
|
|
131
|
+
if (document := registry.get_by_id(source.document_id)) is not None
|
|
132
|
+
and document.frontmatter.get("type") == "module"
|
|
133
|
+
)
|
|
134
|
+
changed_by_id = dict(source_result.changed_files_by_id)
|
|
135
|
+
for source in valid_modules:
|
|
136
|
+
changed_by_id.setdefault(source.document_id, source.changed_file)
|
|
118
137
|
errors.extend(_changed_file_errors(changed.issues))
|
|
138
|
+
errors.extend(_changed_file_errors(
|
|
139
|
+
cascade_module_issues(config, registry, rule_prefix="document.context")
|
|
140
|
+
))
|
|
119
141
|
warnings.extend(
|
|
120
|
-
_changed_file_warnings((*changed.issues, *source_result.issues))
|
|
142
|
+
_changed_file_warnings((*changed.issues, *source_result.issues, *modules.issues))
|
|
121
143
|
)
|
|
122
144
|
selection = select_context_by_changed_ids(
|
|
123
145
|
graph,
|
|
124
146
|
registry,
|
|
125
|
-
|
|
126
|
-
id: source_result.changed_files_by_id[id]
|
|
127
|
-
for id in source_result.source_ids
|
|
128
|
-
},
|
|
147
|
+
changed_by_id,
|
|
129
148
|
policy=policy,
|
|
130
149
|
)
|
|
150
|
+
# Retain every origin without traversing the same module body repeatedly.
|
|
151
|
+
origins = []
|
|
152
|
+
for source in selection.sources:
|
|
153
|
+
if source.document_id in source_result.changed_files_by_id:
|
|
154
|
+
origins.append(replace(
|
|
155
|
+
source, changed_file=source_result.changed_files_by_id[source.document_id]
|
|
156
|
+
))
|
|
157
|
+
origins.extend(
|
|
158
|
+
replace(source, source="module_ownership", changed_file=match.changed_file)
|
|
159
|
+
for match in valid_modules if match.document_id == source.document_id
|
|
160
|
+
)
|
|
161
|
+
selection = replace(selection, sources=tuple(sorted(
|
|
162
|
+
origins,
|
|
163
|
+
key=lambda source: (source.source, source.document_id, source.path, source.changed_file or ""),
|
|
164
|
+
)))
|
|
131
165
|
else:
|
|
132
166
|
raise ValueError(f"Unsupported context mode: {mode}")
|
|
133
167
|
errors.extend(_selection_errors(selection))
|
|
@@ -49,9 +49,15 @@ def read_git_changed_files(
|
|
|
49
49
|
*,
|
|
50
50
|
unavailable_rule_id: str,
|
|
51
51
|
base_ref: str | None = None,
|
|
52
|
+
git_config: tuple[str, ...] = (),
|
|
52
53
|
) -> GitChangedFilesResult:
|
|
54
|
+
"""Discover local paths; optional process config lets isolated callers disable hooks.
|
|
55
|
+
|
|
56
|
+
Workspace analysis passes `-c core.fsmonitor=false` so reading a checkout
|
|
57
|
+
cannot execute its monitor program. Existing callers retain their defaults.
|
|
58
|
+
"""
|
|
53
59
|
process = subprocess.run(
|
|
54
|
-
["git", "status", "--porcelain", "-z", "--untracked-files=all"],
|
|
60
|
+
["git", *git_config, "status", "--porcelain", "-z", "--untracked-files=all"],
|
|
55
61
|
cwd=root,
|
|
56
62
|
capture_output=True,
|
|
57
63
|
text=True,
|
|
@@ -76,6 +82,7 @@ def read_git_changed_files(
|
|
|
76
82
|
diff_process = subprocess.run(
|
|
77
83
|
[
|
|
78
84
|
"git",
|
|
85
|
+
*git_config,
|
|
79
86
|
"diff",
|
|
80
87
|
"--name-only",
|
|
81
88
|
"-z",
|
|
@@ -200,6 +207,50 @@ def is_inside_documentation_roots(path: Path, config: ToolkitConfig) -> bool:
|
|
|
200
207
|
return False
|
|
201
208
|
|
|
202
209
|
|
|
210
|
+
def is_documentation_candidate(path: Path, config: ToolkitConfig) -> bool:
|
|
211
|
+
"""Classify Markdown by path, even when it is missing or cannot be parsed.
|
|
212
|
+
|
|
213
|
+
Other assets may share documentation roots and retain explicit ownership.
|
|
214
|
+
Parsing success must never turn broken/deleted Markdown into a code source.
|
|
215
|
+
"""
|
|
216
|
+
return path.suffix.lower() == ".md" and is_inside_documentation_roots(path, config)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def cascade_module_issues(
|
|
220
|
+
config: ToolkitConfig,
|
|
221
|
+
registry: DocumentRegistry,
|
|
222
|
+
*,
|
|
223
|
+
rule_prefix: str,
|
|
224
|
+
) -> tuple[ChangedFileIssue, ...]:
|
|
225
|
+
"""Validate explicit root/owner identities before accepting module sources."""
|
|
226
|
+
configured = (
|
|
227
|
+
[(config.cascade.root_module, "root")] if config.cascade.root_module else []
|
|
228
|
+
)
|
|
229
|
+
configured.extend((owner.module_id, "owner") for owner in config.cascade.module_ownership)
|
|
230
|
+
issues = []
|
|
231
|
+
for document_id, role in configured:
|
|
232
|
+
document = registry.get_by_id(document_id)
|
|
233
|
+
if document is None:
|
|
234
|
+
issues.append(
|
|
235
|
+
ChangedFileIssue(
|
|
236
|
+
rule_id=f"{rule_prefix}.cascade_{role}_unknown",
|
|
237
|
+
message=f"Cascade configuration references unknown module document id `{document_id}`.",
|
|
238
|
+
document_id=document_id,
|
|
239
|
+
severity="error",
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
elif document.frontmatter.get("type") != "module":
|
|
243
|
+
issues.append(
|
|
244
|
+
ChangedFileIssue(
|
|
245
|
+
rule_id=f"{rule_prefix}.cascade_{role}_not_module",
|
|
246
|
+
message=f"Cascade configuration document `{document_id}` must have type `module`.",
|
|
247
|
+
document_id=document_id,
|
|
248
|
+
severity="error",
|
|
249
|
+
)
|
|
250
|
+
)
|
|
251
|
+
return tuple(issues)
|
|
252
|
+
|
|
253
|
+
|
|
203
254
|
def resolve_changed_module_sources(
|
|
204
255
|
changed_files: tuple[str, ...],
|
|
205
256
|
*,
|
|
@@ -211,7 +262,7 @@ def resolve_changed_module_sources(
|
|
|
211
262
|
|
|
212
263
|
for changed_file in changed_files:
|
|
213
264
|
changed_path = (config.project_root / changed_file).resolve()
|
|
214
|
-
if
|
|
265
|
+
if is_documentation_candidate(changed_path, config):
|
|
215
266
|
continue
|
|
216
267
|
|
|
217
268
|
matched = False
|
|
@@ -226,17 +277,12 @@ def resolve_changed_module_sources(
|
|
|
226
277
|
)
|
|
227
278
|
|
|
228
279
|
if not matched:
|
|
229
|
-
ownership_suffix = (
|
|
230
|
-
" and module ownership paths"
|
|
231
|
-
if config.cascade.module_ownership
|
|
232
|
-
else ""
|
|
233
|
-
)
|
|
234
280
|
issues.append(
|
|
235
281
|
ChangedFileIssue(
|
|
236
282
|
rule_id=outside_docs_rule_id,
|
|
237
283
|
message=(
|
|
238
|
-
f"Changed file `{changed_file}` is
|
|
239
|
-
|
|
284
|
+
f"Changed file `{changed_file}` is not a documentation candidate "
|
|
285
|
+
"and matches no configured module ownership paths."
|
|
240
286
|
),
|
|
241
287
|
path=changed_file,
|
|
242
288
|
severity="warning",
|
|
@@ -440,6 +440,36 @@ BOOTSTRAP_TEMPLATES = (
|
|
|
440
440
|
profiles=frozenset({"agent"}),
|
|
441
441
|
overwrite_existing=True,
|
|
442
442
|
),
|
|
443
|
+
BootstrapTemplate(
|
|
444
|
+
source_name=".ai-docs/schemas/workspace/manifest-v1.schema.yaml",
|
|
445
|
+
target_path=".ai-docs/schemas/workspace/manifest-v1.schema.yaml",
|
|
446
|
+
profiles=frozenset({"minimal", "agent"}),
|
|
447
|
+
overwrite_existing=True,
|
|
448
|
+
),
|
|
449
|
+
BootstrapTemplate(
|
|
450
|
+
source_name=".ai-docs/schemas/workspace/request-v1.schema.yaml",
|
|
451
|
+
target_path=".ai-docs/schemas/workspace/request-v1.schema.yaml",
|
|
452
|
+
profiles=frozenset({"minimal", "agent"}),
|
|
453
|
+
overwrite_existing=True,
|
|
454
|
+
),
|
|
455
|
+
BootstrapTemplate(
|
|
456
|
+
source_name=".ai-docs/schemas/workspace/repository-v1.schema.yaml",
|
|
457
|
+
target_path=".ai-docs/schemas/workspace/repository-v1.schema.yaml",
|
|
458
|
+
profiles=frozenset({"minimal", "agent"}),
|
|
459
|
+
overwrite_existing=True,
|
|
460
|
+
),
|
|
461
|
+
BootstrapTemplate(
|
|
462
|
+
source_name=".ai-docs/schemas/workspace/result-v1.schema.yaml",
|
|
463
|
+
target_path=".ai-docs/schemas/workspace/result-v1.schema.yaml",
|
|
464
|
+
profiles=frozenset({"minimal", "agent"}),
|
|
465
|
+
overwrite_existing=True,
|
|
466
|
+
),
|
|
467
|
+
BootstrapTemplate(
|
|
468
|
+
source_name=".ai-docs/reference/workspace-analysis.md",
|
|
469
|
+
target_path=".ai-docs/reference/workspace-analysis.md",
|
|
470
|
+
profiles=frozenset({"minimal", "agent"}),
|
|
471
|
+
overwrite_existing=True,
|
|
472
|
+
),
|
|
443
473
|
)
|
|
444
474
|
|
|
445
475
|
|