ai-spector 0.9.21 → 0.9.24
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.
- package/contracts/bootstrap/config/prototype-screen-map.json +25 -0
- package/contracts/bootstrap/config/prototype.config.json +17 -0
- package/contracts/bootstrap/config/review-queue-pending.json +4 -0
- package/contracts/bootstrap/config/review-queue-registry.json +4 -0
- package/contracts/bootstrap/config/review.config.json +5 -0
- package/contracts/bootstrap/docs/ENTITY_REGISTRY_MIGRATION.md +192 -0
- package/contracts/bootstrap/docs/MIGRATION.md +463 -0
- package/contracts/bootstrap/docs/README.md +48 -0
- package/contracts/bootstrap/docs/adapters/README.md +32 -0
- package/contracts/bootstrap/docs/guides/COMMENTS_ENTITY_MIGRATION.md +195 -0
- package/contracts/bootstrap/docs/guides/DOCOPS_MANUAL_FALLBACK.md +177 -0
- package/contracts/bootstrap/docs/guides/PROJECT_LAYOUT.md +84 -0
- package/contracts/bootstrap/docs/modules/comments.md +77 -0
- package/contracts/bootstrap/docs/modules/generate.md +25 -0
- package/contracts/bootstrap/docs/modules/graph.md +31 -0
- package/contracts/bootstrap/docs/modules/prototype.md +26 -0
- package/contracts/bootstrap/docs/modules/review.md +25 -0
- package/contracts/bootstrap/docs/modules/translate.md +26 -0
- package/contracts/bootstrap/scripts/migrate-entity-registry.sh +55 -0
- package/contracts/bootstrap/templates/basic-design/db-design-template.md +177 -0
- package/contracts/bootstrap/templates/basic-design/detail-api-template.md +278 -0
- package/contracts/bootstrap/templates/basic-design/detail-screen-template.md +281 -0
- package/contracts/bootstrap/templates/basic-design/list-api-template.md +130 -0
- package/contracts/bootstrap/templates/basic-design/list-screen-template.md +242 -0
- package/contracts/bootstrap/templates/detail-design/common/architecture-overview-template.md +302 -0
- package/contracts/bootstrap/templates/detail-design/common/deployment-infrastructure-template.md +461 -0
- package/contracts/bootstrap/templates/detail-design/common/error-handling-patterns-template.md +460 -0
- package/contracts/bootstrap/templates/detail-design/common/integration-patterns-template.md +410 -0
- package/contracts/bootstrap/templates/detail-design/common/performance-standards-template.md +406 -0
- package/contracts/bootstrap/templates/detail-design/common/security-patterns-template.md +395 -0
- package/contracts/bootstrap/templates/detail-design/feature-detail-design-template.md +773 -0
- package/contracts/bootstrap/templates/detail-design/feature-list-template.md +39 -0
- package/contracts/bootstrap/templates/srs/1-introduction.md +58 -0
- package/contracts/bootstrap/templates/srs/2-overall-description.md +91 -0
- package/contracts/bootstrap/templates/srs/3-use-case-detail-template.md +142 -0
- package/contracts/bootstrap/templates/srs/3-use-cases.md +53 -0
- package/contracts/bootstrap/templates/srs/4-system-feature-detail-template.md +131 -0
- package/contracts/bootstrap/templates/srs/4-system-features-list-template.md +39 -0
- package/contracts/bootstrap/templates/srs/5-data-requirements.md +59 -0
- package/contracts/bootstrap/templates/srs/6-external-interfaces.md +56 -0
- package/contracts/bootstrap/templates/srs/7-quality-attributes.md +74 -0
- package/contracts/bootstrap/templates/srs/8-internationalization.md +36 -0
- package/contracts/bootstrap/templates/srs/9-other-requirements.md +46 -0
- package/contracts/examples/full-docops.config.json +54 -0
- package/contracts/examples/migrate-lifecycle.json +18 -0
- package/contracts/examples/minimal-comment-thread/comment-root.json +10 -0
- package/contracts/examples/minimal-comment-thread/meta_data.json +22 -0
- package/contracts/examples/minimal-docops.config.json +33 -0
- package/contracts/examples/minimal-lifecycle.json +17 -0
- package/contracts/examples/minimal-prototype.config.json +18 -0
- package/contracts/examples/minimal-screen-map.json +25 -0
- package/contracts/examples/registry/minimal-document.entity.json +15 -0
- package/contracts/examples/registry/minimal-manifest.json +7 -0
- package/contracts/examples/registry/minimal-screen.entity.json +11 -0
- package/contracts/examples/review/minimal-pending.json +14 -0
- package/contracts/examples/review/minimal-registry.json +31 -0
- package/contracts/examples/review/minimal-review.config.json +7 -0
- package/contracts/schemas/comments/comment_body.schema.json +19 -0
- package/contracts/schemas/comments/meta_data.schema.json +59 -0
- package/contracts/schemas/docops.config.schema.json +97 -0
- package/contracts/schemas/lifecycle.schema.json +43 -0
- package/contracts/schemas/prototype/config.schema.json +56 -0
- package/contracts/schemas/prototype/screen-map.schema.json +51 -0
- package/contracts/schemas/registry/document.entity.schema.json +38 -0
- package/contracts/schemas/registry/manifest.schema.json +18 -0
- package/contracts/schemas/registry/screen.entity.schema.json +28 -0
- package/contracts/schemas/review/registry.schema.json +72 -0
- package/contracts/schemas/review/review.config.schema.json +42 -0
- package/dist/cli.js +26 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/docops/bootstrap.d.ts +4 -1
- package/dist/core/docops/bootstrap.d.ts.map +1 -1
- package/dist/core/docops/bootstrap.js +16 -9
- package/dist/core/docops/bootstrap.js.map +1 -1
- package/dist/core/docops/guide.d.ts +78 -0
- package/dist/core/docops/guide.d.ts.map +1 -0
- package/dist/core/docops/guide.js +554 -0
- package/dist/core/docops/guide.js.map +1 -0
- package/dist/core/docops/migrate.d.ts.map +1 -1
- package/dist/core/docops/migrate.js +40 -6
- package/dist/core/docops/migrate.js.map +1 -1
- package/dist/core/graph/doc-extract.d.ts.map +1 -1
- package/dist/core/graph/doc-extract.js +12 -0
- package/dist/core/graph/doc-extract.js.map +1 -1
- package/dist/core/graph/impact.d.ts.map +1 -1
- package/dist/core/graph/impact.js +2 -1
- package/dist/core/graph/impact.js.map +1 -1
- package/dist/core/graph/link-testcases.d.ts +14 -0
- package/dist/core/graph/link-testcases.d.ts.map +1 -0
- package/dist/core/graph/link-testcases.js +46 -0
- package/dist/core/graph/link-testcases.js.map +1 -0
- package/dist/core/operations/docops.d.ts +8 -0
- package/dist/core/operations/docops.d.ts.map +1 -1
- package/dist/core/operations/docops.js +40 -0
- package/dist/core/operations/docops.js.map +1 -1
- package/dist/core/operations/index.d.ts.map +1 -1
- package/dist/core/operations/index.js +25 -0
- package/dist/core/operations/index.js.map +1 -1
- package/dist/core/operations/task-gates.d.ts +8 -1
- package/dist/core/operations/task-gates.d.ts.map +1 -1
- package/dist/core/operations/task-gates.js +14 -0
- package/dist/core/operations/task-gates.js.map +1 -1
- package/dist/core/operations/task.d.ts +2 -0
- package/dist/core/operations/task.d.ts.map +1 -1
- package/dist/core/operations/task.js +40 -2
- package/dist/core/operations/task.js.map +1 -1
- package/dist/core/sync/audit.d.ts.map +1 -1
- package/dist/core/sync/audit.js +14 -6
- package/dist/core/sync/audit.js.map +1 -1
- package/dist/core/sync/baseline.d.ts.map +1 -1
- package/dist/core/sync/baseline.js +5 -2
- package/dist/core/sync/baseline.js.map +1 -1
- package/dist/core/sync/constants.d.ts.map +1 -1
- package/dist/core/sync/constants.js +2 -1
- package/dist/core/sync/constants.js.map +1 -1
- package/dist/core/sync/gaps.d.ts.map +1 -1
- package/dist/core/sync/gaps.js +23 -2
- package/dist/core/sync/gaps.js.map +1 -1
- package/dist/core/sync/git-diff.d.ts +1 -0
- package/dist/core/sync/git-diff.d.ts.map +1 -1
- package/dist/core/sync/git-diff.js +14 -0
- package/dist/core/sync/git-diff.js.map +1 -1
- package/dist/core/sync/repo-context.d.ts +23 -0
- package/dist/core/sync/repo-context.d.ts.map +1 -0
- package/dist/core/sync/repo-context.js +28 -0
- package/dist/core/sync/repo-context.js.map +1 -0
- package/dist/core/sync/snapshot.d.ts.map +1 -1
- package/dist/core/sync/snapshot.js +24 -18
- package/dist/core/sync/snapshot.js.map +1 -1
- package/dist/core/sync/types.d.ts +7 -2
- package/dist/core/sync/types.d.ts.map +1 -1
- package/dist/core/upgrade/checklist.json +2 -2
- package/dist/interfaces/mcp/schemas.d.ts +2 -0
- package/dist/interfaces/mcp/schemas.d.ts.map +1 -1
- package/dist/interfaces/mcp/schemas.js +4 -0
- package/dist/interfaces/mcp/schemas.js.map +1 -1
- package/dist/interfaces/mcp/server.js +0 -0
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/scaffold/claude/.claude/skills/_skill-router.md +11 -8
- package/scaffold/claude/.claude/skills/ai-spector/references/cli-failures.md +3 -3
- package/scaffold/claude/.claude/skills/ai-spector/references/docops-migrate.md +112 -0
- package/scaffold/claude/.claude/skills/ai-spector/references/help.md +1 -1
- package/scaffold/claude/.claude/skills/ai-spector/references/runbook.md +49 -26
- package/scaffold/claude/.claude/skills/ai-spector/skill.md +3 -2
- package/scaffold/cursor/skills/_skill-router.md +11 -8
- package/scaffold/cursor/skills/ai-spector/SKILL.md +3 -2
- package/scaffold/cursor/skills/ai-spector/references/cli-failures.md +3 -3
- package/scaffold/cursor/skills/ai-spector/references/docops-migrate.md +112 -0
- package/scaffold/cursor/skills/ai-spector/references/help.md +1 -1
- package/scaffold/cursor/skills/ai-spector/references/runbook.md +49 -26
- package/schemas/rules.impact.json +3 -2
- package/schemas/schema.graph.json +4 -2
- package/dist/commands/analyze.d.ts +0 -12
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js +0 -53
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/bootstrap.d.ts +0 -4
- package/dist/commands/bootstrap.d.ts.map +0 -1
- package/dist/commands/bootstrap.js +0 -58
- package/dist/commands/bootstrap.js.map +0 -1
- package/dist/commands/comments.d.ts +0 -44
- package/dist/commands/comments.d.ts.map +0 -1
- package/dist/commands/comments.js +0 -79
- package/dist/commands/comments.js.map +0 -1
- package/dist/commands/graph-impact.d.ts +0 -28
- package/dist/commands/graph-impact.d.ts.map +0 -1
- package/dist/commands/graph-impact.js +0 -174
- package/dist/commands/graph-impact.js.map +0 -1
- package/dist/commands/graph-merge.d.ts +0 -32
- package/dist/commands/graph-merge.d.ts.map +0 -1
- package/dist/commands/graph-merge.js +0 -101
- package/dist/commands/graph-merge.js.map +0 -1
- package/dist/commands/graph-query.d.ts +0 -10
- package/dist/commands/graph-query.d.ts.map +0 -1
- package/dist/commands/graph-query.js +0 -24
- package/dist/commands/graph-query.js.map +0 -1
- package/dist/commands/graph-report.d.ts +0 -9
- package/dist/commands/graph-report.d.ts.map +0 -1
- package/dist/commands/graph-report.js +0 -10
- package/dist/commands/graph-report.js.map +0 -1
- package/dist/commands/graph-visualize.d.ts +0 -17
- package/dist/commands/graph-visualize.d.ts.map +0 -1
- package/dist/commands/graph-visualize.js +0 -44
- package/dist/commands/graph-visualize.js.map +0 -1
- package/dist/commands/hooks-constants.d.ts +0 -2
- package/dist/commands/hooks-constants.d.ts.map +0 -1
- package/dist/commands/hooks-constants.js +0 -2
- package/dist/commands/hooks-constants.js.map +0 -1
- package/dist/commands/hooks.d.ts +0 -28
- package/dist/commands/hooks.d.ts.map +0 -1
- package/dist/commands/hooks.js +0 -187
- package/dist/commands/hooks.js.map +0 -1
- package/dist/commands/index.d.ts +0 -22
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -472
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -19
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -210
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/lang-queue.d.ts +0 -28
- package/dist/commands/lang-queue.d.ts.map +0 -1
- package/dist/commands/lang-queue.js +0 -49
- package/dist/commands/lang-queue.js.map +0 -1
- package/dist/commands/lang.d.ts +0 -16
- package/dist/commands/lang.d.ts.map +0 -1
- package/dist/commands/lang.js +0 -69
- package/dist/commands/lang.js.map +0 -1
- package/dist/commands/prototype.d.ts +0 -66
- package/dist/commands/prototype.d.ts.map +0 -1
- package/dist/commands/prototype.js +0 -370
- package/dist/commands/prototype.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -26
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -259
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/sync-cursor.d.ts +0 -10
- package/dist/commands/sync-cursor.d.ts.map +0 -1
- package/dist/commands/sync-cursor.js +0 -18
- package/dist/commands/sync-cursor.js.map +0 -1
- package/dist/commands/template-regen.d.ts +0 -24
- package/dist/commands/template-regen.d.ts.map +0 -1
- package/dist/commands/template-regen.js +0 -240
- package/dist/commands/template-regen.js.map +0 -1
- package/dist/commands/template.d.ts +0 -3
- package/dist/commands/template.d.ts.map +0 -1
- package/dist/commands/template.js +0 -1285
- package/dist/commands/template.js.map +0 -1
- package/dist/commands/validate.d.ts +0 -10
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/validate.js +0 -89
- package/dist/commands/validate.js.map +0 -1
- package/dist/comments/anchor.d.ts +0 -16
- package/dist/comments/anchor.d.ts.map +0 -1
- package/dist/comments/anchor.js +0 -59
- package/dist/comments/anchor.js.map +0 -1
- package/dist/comments/inbox.d.ts +0 -82
- package/dist/comments/inbox.d.ts.map +0 -1
- package/dist/comments/inbox.js +0 -179
- package/dist/comments/inbox.js.map +0 -1
- package/dist/comments/paths.d.ts +0 -12
- package/dist/comments/paths.d.ts.map +0 -1
- package/dist/comments/paths.js +0 -54
- package/dist/comments/paths.js.map +0 -1
- package/dist/comments/plan.d.ts +0 -20
- package/dist/comments/plan.d.ts.map +0 -1
- package/dist/comments/plan.js +0 -62
- package/dist/comments/plan.js.map +0 -1
- package/dist/comments/storage.d.ts +0 -30
- package/dist/comments/storage.d.ts.map +0 -1
- package/dist/comments/storage.js +0 -272
- package/dist/comments/storage.js.map +0 -1
- package/dist/comments/types.d.ts +0 -54
- package/dist/comments/types.d.ts.map +0 -1
- package/dist/comments/types.js +0 -2
- package/dist/comments/types.js.map +0 -1
- package/dist/config/load.d.ts +0 -47
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -148
- package/dist/config/load.js.map +0 -1
- package/dist/config/types.d.ts +0 -56
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js +0 -2
- package/dist/config/types.js.map +0 -1
- package/dist/core/adopt/apply.d.ts +0 -15
- package/dist/core/adopt/apply.d.ts.map +0 -1
- package/dist/core/adopt/apply.js +0 -127
- package/dist/core/adopt/apply.js.map +0 -1
- package/dist/core/adopt/bootstrap.d.ts +0 -16
- package/dist/core/adopt/bootstrap.d.ts.map +0 -1
- package/dist/core/adopt/bootstrap.js +0 -195
- package/dist/core/adopt/bootstrap.js.map +0 -1
- package/dist/core/adopt/classify.d.ts +0 -22
- package/dist/core/adopt/classify.d.ts.map +0 -1
- package/dist/core/adopt/classify.js +0 -295
- package/dist/core/adopt/classify.js.map +0 -1
- package/dist/core/adopt/paths.d.ts +0 -10
- package/dist/core/adopt/paths.d.ts.map +0 -1
- package/dist/core/adopt/paths.js +0 -16
- package/dist/core/adopt/paths.js.map +0 -1
- package/dist/core/adopt/plan.d.ts +0 -10
- package/dist/core/adopt/plan.d.ts.map +0 -1
- package/dist/core/adopt/plan.js +0 -269
- package/dist/core/adopt/plan.js.map +0 -1
- package/dist/core/adopt/scan.d.ts +0 -5
- package/dist/core/adopt/scan.d.ts.map +0 -1
- package/dist/core/adopt/scan.js +0 -169
- package/dist/core/adopt/scan.js.map +0 -1
- package/dist/core/adopt/setup.d.ts +0 -7
- package/dist/core/adopt/setup.d.ts.map +0 -1
- package/dist/core/adopt/setup.js +0 -64
- package/dist/core/adopt/setup.js.map +0 -1
- package/dist/core/adopt/tasks.d.ts +0 -9
- package/dist/core/adopt/tasks.d.ts.map +0 -1
- package/dist/core/adopt/tasks.js +0 -153
- package/dist/core/adopt/tasks.js.map +0 -1
- package/dist/core/adopt/types.d.ts +0 -75
- package/dist/core/adopt/types.d.ts.map +0 -1
- package/dist/core/adopt/types.js +0 -2
- package/dist/core/adopt/types.js.map +0 -1
- package/dist/core/adopt/validate.d.ts +0 -20
- package/dist/core/adopt/validate.d.ts.map +0 -1
- package/dist/core/adopt/validate.js +0 -129
- package/dist/core/adopt/validate.js.map +0 -1
- package/dist/core/docops/dual-write.d.ts +0 -12
- package/dist/core/docops/dual-write.d.ts.map +0 -1
- package/dist/core/docops/dual-write.js +0 -44
- package/dist/core/docops/dual-write.js.map +0 -1
- package/dist/core/engine/local-adapter.d.ts +0 -3
- package/dist/core/engine/local-adapter.d.ts.map +0 -1
- package/dist/core/engine/local-adapter.js +0 -18
- package/dist/core/engine/local-adapter.js.map +0 -1
- package/dist/core/graph/rules/default-impact.json +0 -24
- package/dist/core/operations/adopt-gates.d.ts +0 -19
- package/dist/core/operations/adopt-gates.d.ts.map +0 -1
- package/dist/core/operations/adopt-gates.js +0 -71
- package/dist/core/operations/adopt-gates.js.map +0 -1
- package/dist/core/operations/adopt-plan.d.ts +0 -15
- package/dist/core/operations/adopt-plan.d.ts.map +0 -1
- package/dist/core/operations/adopt-plan.js +0 -24
- package/dist/core/operations/adopt-plan.js.map +0 -1
- package/dist/core/operations/adopt.d.ts +0 -11
- package/dist/core/operations/adopt.d.ts.map +0 -1
- package/dist/core/operations/adopt.js +0 -150
- package/dist/core/operations/adopt.js.map +0 -1
- package/dist/core/operations/analyze.d.ts +0 -12
- package/dist/core/operations/analyze.d.ts.map +0 -1
- package/dist/core/operations/analyze.js +0 -53
- package/dist/core/operations/analyze.js.map +0 -1
- package/dist/core/prototype/spa-route-fallbacks.d.ts +0 -21
- package/dist/core/prototype/spa-route-fallbacks.d.ts.map +0 -1
- package/dist/core/prototype/spa-route-fallbacks.js +0 -93
- package/dist/core/prototype/spa-route-fallbacks.js.map +0 -1
- package/dist/graph/InMemoryGraph.d.ts +0 -2
- package/dist/graph/InMemoryGraph.d.ts.map +0 -1
- package/dist/graph/InMemoryGraph.js +0 -2
- package/dist/graph/InMemoryGraph.js.map +0 -1
- package/dist/graph/bundles.d.ts +0 -32
- package/dist/graph/bundles.d.ts.map +0 -1
- package/dist/graph/bundles.js +0 -109
- package/dist/graph/bundles.js.map +0 -1
- package/dist/graph/defaults.d.ts +0 -23
- package/dist/graph/defaults.d.ts.map +0 -1
- package/dist/graph/defaults.js +0 -25
- package/dist/graph/defaults.js.map +0 -1
- package/dist/graph/detail-sections.d.ts +0 -28
- package/dist/graph/detail-sections.d.ts.map +0 -1
- package/dist/graph/detail-sections.js +0 -220
- package/dist/graph/detail-sections.js.map +0 -1
- package/dist/graph/doc-extract.d.ts +0 -84
- package/dist/graph/doc-extract.d.ts.map +0 -1
- package/dist/graph/doc-extract.js +0 -821
- package/dist/graph/doc-extract.js.map +0 -1
- package/dist/graph/impact.d.ts +0 -5
- package/dist/graph/impact.d.ts.map +0 -1
- package/dist/graph/impact.js +0 -7
- package/dist/graph/impact.js.map +0 -1
- package/dist/graph/knowledge.d.ts +0 -11
- package/dist/graph/knowledge.d.ts.map +0 -1
- package/dist/graph/knowledge.js +0 -62
- package/dist/graph/knowledge.js.map +0 -1
- package/dist/graph/layer-audit.d.ts +0 -5
- package/dist/graph/layer-audit.d.ts.map +0 -1
- package/dist/graph/layer-audit.js +0 -29
- package/dist/graph/layer-audit.js.map +0 -1
- package/dist/graph/load.d.ts +0 -4
- package/dist/graph/load.d.ts.map +0 -1
- package/dist/graph/load.js +0 -12
- package/dist/graph/load.js.map +0 -1
- package/dist/graph/loadGraph.d.ts +0 -3
- package/dist/graph/loadGraph.d.ts.map +0 -1
- package/dist/graph/loadGraph.js +0 -7
- package/dist/graph/loadGraph.js.map +0 -1
- package/dist/graph/merge.d.ts +0 -27
- package/dist/graph/merge.d.ts.map +0 -1
- package/dist/graph/merge.js +0 -239
- package/dist/graph/merge.js.map +0 -1
- package/dist/graph/path-target-edges.d.ts +0 -2
- package/dist/graph/path-target-edges.d.ts.map +0 -1
- package/dist/graph/path-target-edges.js +0 -2
- package/dist/graph/path-target-edges.js.map +0 -1
- package/dist/graph/provenance.d.ts +0 -19
- package/dist/graph/provenance.d.ts.map +0 -1
- package/dist/graph/provenance.js +0 -199
- package/dist/graph/provenance.js.map +0 -1
- package/dist/graph/query.d.ts +0 -3
- package/dist/graph/query.d.ts.map +0 -1
- package/dist/graph/query.js +0 -2
- package/dist/graph/query.js.map +0 -1
- package/dist/graph/resolve.d.ts +0 -15
- package/dist/graph/resolve.d.ts.map +0 -1
- package/dist/graph/resolve.js +0 -117
- package/dist/graph/resolve.js.map +0 -1
- package/dist/graph/source-refs.d.ts +0 -2
- package/dist/graph/source-refs.d.ts.map +0 -1
- package/dist/graph/source-refs.js +0 -30
- package/dist/graph/source-refs.js.map +0 -1
- package/dist/graph/translation.d.ts +0 -14
- package/dist/graph/translation.d.ts.map +0 -1
- package/dist/graph/translation.js +0 -65
- package/dist/graph/translation.js.map +0 -1
- package/dist/index/doc-semantics.d.ts +0 -14
- package/dist/index/doc-semantics.d.ts.map +0 -1
- package/dist/index/doc-semantics.js +0 -101
- package/dist/index/doc-semantics.js.map +0 -1
- package/dist/index/docs-build.d.ts +0 -40
- package/dist/index/docs-build.d.ts.map +0 -1
- package/dist/index/docs-build.js +0 -136
- package/dist/index/docs-build.js.map +0 -1
- package/dist/index/docs-config.d.ts +0 -19
- package/dist/index/docs-config.d.ts.map +0 -1
- package/dist/index/docs-config.js +0 -5
- package/dist/index/docs-config.js.map +0 -1
- package/dist/interfaces/cli/format/adopt.d.ts +0 -23
- package/dist/interfaces/cli/format/adopt.d.ts.map +0 -1
- package/dist/interfaces/cli/format/adopt.js +0 -89
- package/dist/interfaces/cli/format/adopt.js.map +0 -1
- package/dist/interfaces/mcp/tools/adopt.d.ts +0 -22
- package/dist/interfaces/mcp/tools/adopt.d.ts.map +0 -1
- package/dist/interfaces/mcp/tools/adopt.js +0 -55
- package/dist/interfaces/mcp/tools/adopt.js.map +0 -1
- package/dist/lang/diff.d.ts +0 -12
- package/dist/lang/diff.d.ts.map +0 -1
- package/dist/lang/diff.js +0 -71
- package/dist/lang/diff.js.map +0 -1
- package/dist/lang/paths.d.ts +0 -16
- package/dist/lang/paths.d.ts.map +0 -1
- package/dist/lang/paths.js +0 -32
- package/dist/lang/paths.js.map +0 -1
- package/dist/lang/queue-layout.d.ts +0 -11
- package/dist/lang/queue-layout.d.ts.map +0 -1
- package/dist/lang/queue-layout.js +0 -56
- package/dist/lang/queue-layout.js.map +0 -1
- package/dist/lang/queue-store.d.ts +0 -23
- package/dist/lang/queue-store.d.ts.map +0 -1
- package/dist/lang/queue-store.js +0 -285
- package/dist/lang/queue-store.js.map +0 -1
- package/dist/lang/queue-types.d.ts +0 -122
- package/dist/lang/queue-types.d.ts.map +0 -1
- package/dist/lang/queue-types.js +0 -2
- package/dist/lang/queue-types.js.map +0 -1
- package/dist/lang/queue.d.ts +0 -17
- package/dist/lang/queue.d.ts.map +0 -1
- package/dist/lang/queue.js +0 -362
- package/dist/lang/queue.js.map +0 -1
- package/dist/lang/sections.d.ts +0 -26
- package/dist/lang/sections.d.ts.map +0 -1
- package/dist/lang/sections.js +0 -85
- package/dist/lang/sections.js.map +0 -1
- package/dist/markdown/parse.d.ts +0 -25
- package/dist/markdown/parse.d.ts.map +0 -1
- package/dist/markdown/parse.js +0 -100
- package/dist/markdown/parse.js.map +0 -1
- package/dist/prototype/build-base-path.d.ts +0 -11
- package/dist/prototype/build-base-path.d.ts.map +0 -1
- package/dist/prototype/build-base-path.js +0 -84
- package/dist/prototype/build-base-path.js.map +0 -1
- package/dist/prototype/build-manifest.d.ts +0 -21
- package/dist/prototype/build-manifest.d.ts.map +0 -1
- package/dist/prototype/build-manifest.js +0 -171
- package/dist/prototype/build-manifest.js.map +0 -1
- package/dist/prototype/config.d.ts +0 -21
- package/dist/prototype/config.d.ts.map +0 -1
- package/dist/prototype/config.js +0 -131
- package/dist/prototype/config.js.map +0 -1
- package/dist/prototype/deploy-path.d.ts +0 -9
- package/dist/prototype/deploy-path.d.ts.map +0 -1
- package/dist/prototype/deploy-path.js +0 -21
- package/dist/prototype/deploy-path.js.map +0 -1
- package/dist/prototype/htpasswd.d.ts +0 -8
- package/dist/prototype/htpasswd.d.ts.map +0 -1
- package/dist/prototype/htpasswd.js +0 -36
- package/dist/prototype/htpasswd.js.map +0 -1
- package/dist/prototype/nginx-config.d.ts +0 -16
- package/dist/prototype/nginx-config.d.ts.map +0 -1
- package/dist/prototype/nginx-config.js +0 -39
- package/dist/prototype/nginx-config.js.map +0 -1
- package/dist/prototype/parse-screen-index.d.ts +0 -10
- package/dist/prototype/parse-screen-index.d.ts.map +0 -1
- package/dist/prototype/parse-screen-index.js +0 -109
- package/dist/prototype/parse-screen-index.js.map +0 -1
- package/dist/prototype/preview-uri.d.ts +0 -8
- package/dist/prototype/preview-uri.d.ts.map +0 -1
- package/dist/prototype/preview-uri.js +0 -35
- package/dist/prototype/preview-uri.js.map +0 -1
- package/dist/prototype/relative-assets.d.ts +0 -9
- package/dist/prototype/relative-assets.d.ts.map +0 -1
- package/dist/prototype/relative-assets.js +0 -23
- package/dist/prototype/relative-assets.js.map +0 -1
- package/dist/prototype/resolve-default-screen.d.ts +0 -17
- package/dist/prototype/resolve-default-screen.d.ts.map +0 -1
- package/dist/prototype/resolve-default-screen.js +0 -31
- package/dist/prototype/resolve-default-screen.js.map +0 -1
- package/dist/prototype/rewrite-build-assets.d.ts +0 -8
- package/dist/prototype/rewrite-build-assets.d.ts.map +0 -1
- package/dist/prototype/rewrite-build-assets.js +0 -40
- package/dist/prototype/rewrite-build-assets.js.map +0 -1
- package/dist/prototype/route-defaults.d.ts +0 -43
- package/dist/prototype/route-defaults.d.ts.map +0 -1
- package/dist/prototype/route-defaults.js +0 -50
- package/dist/prototype/route-defaults.js.map +0 -1
- package/dist/prototype/screen-doc-paths.d.ts +0 -15
- package/dist/prototype/screen-doc-paths.d.ts.map +0 -1
- package/dist/prototype/screen-doc-paths.js +0 -38
- package/dist/prototype/screen-doc-paths.js.map +0 -1
- package/dist/prototype/spa-route-fallbacks.d.ts +0 -21
- package/dist/prototype/spa-route-fallbacks.d.ts.map +0 -1
- package/dist/prototype/spa-route-fallbacks.js +0 -93
- package/dist/prototype/spa-route-fallbacks.js.map +0 -1
- package/dist/prototype/theme-preview.d.ts +0 -17
- package/dist/prototype/theme-preview.d.ts.map +0 -1
- package/dist/prototype/theme-preview.js +0 -73
- package/dist/prototype/theme-preview.js.map +0 -1
- package/dist/prototype/themes.d.ts +0 -6
- package/dist/prototype/themes.d.ts.map +0 -1
- package/dist/prototype/themes.js +0 -55
- package/dist/prototype/themes.js.map +0 -1
- package/dist/prototype/types.d.ts +0 -160
- package/dist/prototype/types.d.ts.map +0 -1
- package/dist/prototype/types.js +0 -2
- package/dist/prototype/types.js.map +0 -1
- package/dist/prototype/validate.d.ts +0 -16
- package/dist/prototype/validate.d.ts.map +0 -1
- package/dist/prototype/validate.js +0 -149
- package/dist/prototype/validate.js.map +0 -1
- package/dist/registry/build.d.ts +0 -5
- package/dist/registry/build.d.ts.map +0 -1
- package/dist/registry/build.js +0 -71
- package/dist/registry/build.js.map +0 -1
- package/dist/registry/slug.d.ts +0 -4
- package/dist/registry/slug.d.ts.map +0 -1
- package/dist/registry/slug.js +0 -16
- package/dist/registry/slug.js.map +0 -1
- package/dist/registry/structure-patch.d.ts +0 -6
- package/dist/registry/structure-patch.d.ts.map +0 -1
- package/dist/registry/structure-patch.js +0 -49
- package/dist/registry/structure-patch.js.map +0 -1
- package/dist/template/scan.d.ts +0 -21
- package/dist/template/scan.d.ts.map +0 -1
- package/dist/template/scan.js +0 -84
- package/dist/template/scan.js.map +0 -1
- package/dist/template/validate.d.ts +0 -10
- package/dist/template/validate.d.ts.map +0 -1
- package/dist/template/validate.js +0 -64
- package/dist/template/validate.js.map +0 -1
- package/dist/util/fs.d.ts +0 -6
- package/dist/util/fs.d.ts.map +0 -1
- package/dist/util/fs.js +0 -24
- package/dist/util/fs.js.map +0 -1
- package/dist/util/git-diff.d.ts +0 -16
- package/dist/util/git-diff.d.ts.map +0 -1
- package/dist/util/git-diff.js +0 -93
- package/dist/util/git-diff.js.map +0 -1
- package/dist/util/gitignore.d.ts +0 -9
- package/dist/util/gitignore.d.ts.map +0 -1
- package/dist/util/gitignore.js +0 -44
- package/dist/util/gitignore.js.map +0 -1
- package/dist/util/open-browser.d.ts +0 -3
- package/dist/util/open-browser.d.ts.map +0 -1
- package/dist/util/open-browser.js +0 -24
- package/dist/util/open-browser.js.map +0 -1
- package/dist/util/paths.d.ts +0 -16
- package/dist/util/paths.d.ts.map +0 -1
- package/dist/util/paths.js +0 -19
- package/dist/util/paths.js.map +0 -1
- package/dist/util/prompt.d.ts +0 -14
- package/dist/util/prompt.d.ts.map +0 -1
- package/dist/util/prompt.js +0 -65
- package/dist/util/prompt.js.map +0 -1
- package/dist/visualize/html.d.ts +0 -13
- package/dist/visualize/html.d.ts.map +0 -1
- package/dist/visualize/html.js +0 -766
- package/dist/visualize/html.js.map +0 -1
- package/dist/visualize/stats.d.ts +0 -8
- package/dist/visualize/stats.d.ts.map +0 -1
- package/dist/visualize/stats.js +0 -9
- package/dist/visualize/stats.js.map +0 -1
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# Legacy → Docops migration guide
|
|
2
|
+
|
|
3
|
+
This file is **committed to your repository** when you run **Writer → Project Settings → Docops → Set up repository** (or `docops init`). You do **not** need ai-spector installed to follow this guide — only git, Bitbucket access, and Kari Writer.
|
|
4
|
+
|
|
5
|
+
**Start here if:** the project already has documents, an old folder layout, or `.ai-spector/` files and you want the Writer `.docops/` contract.
|
|
6
|
+
|
|
7
|
+
**Related:** [README.md](README.md) (contract overview) · [modules/](modules/) (per-feature guides)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## For AI agents (Cursor, ai-spector, Writer automation)
|
|
12
|
+
|
|
13
|
+
Use this section when an agent migrates a repo **without** guessing paths.
|
|
14
|
+
|
|
15
|
+
### Goals
|
|
16
|
+
|
|
17
|
+
1. Commit `.docops/docops.config.json` and scaffold files **without overwriting** existing destination files.
|
|
18
|
+
2. Set **Writer project storage layout** (`legacy` or `docops`) to match what is on the branch.
|
|
19
|
+
3. Set **`docTypes.*.path`** to **repo-root-relative** folders that already hold markdown (e.g. `docs/srs`, not `srs`).
|
|
20
|
+
|
|
21
|
+
### Agent workflow (ordered)
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
1. Detect layout (§1 table) on the target branch.
|
|
25
|
+
2. List existing docs folders under docs/ (or custom roots).
|
|
26
|
+
3. Copy legacy contract files (§2 table) — skip if destination exists.
|
|
27
|
+
4. Create or edit .docops/docops.config.json (§2.2, §3 Step 3).
|
|
28
|
+
5. Copy templates into docTypes.*.templatesPath if empty.
|
|
29
|
+
6. Commit + push.
|
|
30
|
+
7. In Writer: Project Settings → set storage layout (§2.1) to match migration state.
|
|
31
|
+
8. Run post-migration checklist (§5).
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**CLI (optional):** Run **`npx ai-spector docops guide --json`** first — shows current vs expected structure, files, and example config for this repo.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx ai-spector docops migrate --dry-run # preview legacy → contract
|
|
38
|
+
npx ai-spector docops migrate # full legacy migrate (no overwrite of existing)
|
|
39
|
+
npx ai-spector docops migrate --repair # fill gaps when config already exists
|
|
40
|
+
npx ai-spector docops init # greenfield scaffold
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**CLI failed or unavailable?** Run `npx ai-spector docops guide --prompt` — includes **wrong vs correct** for this repo, a tailored `docops.config.json` example, document paths, and scaffold checklist. Then use this guide for manual gap-fill.
|
|
44
|
+
|
|
45
|
+
### Hard rules for agents
|
|
46
|
+
|
|
47
|
+
| Rule | Detail |
|
|
48
|
+
|------|--------|
|
|
49
|
+
| **Do not overwrite** | Never replace an existing file at a contract path. Migration **fills gaps** only. |
|
|
50
|
+
| **Single layout path** | Writer reads **one** path per feature from **project storage layout** — no try-legacy-then-docops fallback. |
|
|
51
|
+
| **Repo-root-relative `docTypes.path`** | Use full paths like `docs/srs`. Short names like `srs` are **not** expanded to `docs/srs`. |
|
|
52
|
+
| **Do not move `docs/`** | Point `docTypes.*.path` at existing folders; keep markdown in place. |
|
|
53
|
+
| **Match storage layout to git** | Until git is fully on `.docops/`, keep Writer `storage_layout: legacy`; switch to `docops` after migration commit is on the working branch. |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 1. Detect your situation (no CLI required)
|
|
58
|
+
|
|
59
|
+
Open the repo in Bitbucket (or locally) and check which files exist on the **branch you will migrate**:
|
|
60
|
+
|
|
61
|
+
| Check | Path | Meaning |
|
|
62
|
+
|-------|------|---------|
|
|
63
|
+
| A | `.docops/docops.config.json` | Writer contract manifest exists |
|
|
64
|
+
| B | `.ai-spector/docflow.config.json` | Legacy ai-spector layout |
|
|
65
|
+
| C | `comments/` at repo root | Legacy comments location |
|
|
66
|
+
| D | `.ai-spector/.docflow/review-queue/` | Legacy review queue |
|
|
67
|
+
| E | `docs/` with markdown | Document content (keep as-is) |
|
|
68
|
+
|
|
69
|
+
| A | B/C/D | Situation | Start at |
|
|
70
|
+
|---|-------|-----------|----------|
|
|
71
|
+
| no | no | **Greenfield** — new Writer project | [Path A](#path-a--greenfield-writer-web-only) |
|
|
72
|
+
| no | yes | **Legacy** — needs migration | [Path B](#path-b--legacy-migration-without-ai-spector) |
|
|
73
|
+
| yes | * | **Docops** — contract exists | [Path C](#path-c--fill-gaps-or-verify) |
|
|
74
|
+
| yes | yes | **Mixed** — partial migration | [Path C](#path-c--fill-gaps-or-verify) |
|
|
75
|
+
|
|
76
|
+
Writer **Project Settings → Docops** may also show layout hints when git is linked.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 2. Path reference (legacy → contract)
|
|
81
|
+
|
|
82
|
+
Use this table when copying files manually (git `mv` or copy + commit):
|
|
83
|
+
|
|
84
|
+
| Legacy path | Contract path | Action |
|
|
85
|
+
|-------------|---------------|--------|
|
|
86
|
+
| `.ai-spector/docflow.config.json` | `.docops/docops.config.json` | **Rewrite** — use [examples/full-docops.config.json](examples/full-docops.config.json); map languages and `docTypes` from docflow + your `docs/` tree |
|
|
87
|
+
| `.ai-spector/review.config.json` | `.docops/review.config.json` | Copy if missing |
|
|
88
|
+
| `.ai-spector/.docflow/review-queue/` | `.docops/review-queue/` | Copy folder if missing |
|
|
89
|
+
| `comments/` (repo root) | `.docops/comments/` | Copy folder if missing |
|
|
90
|
+
| `prototype/screen-map.json` | `.docops/prototype/screen-map.json` | Copy if missing |
|
|
91
|
+
| `.ai-spector/.docflow/config/prototype/config.json` | `.docops/prototype/config.json` | Copy if missing |
|
|
92
|
+
| `.ai-spector/packs/*/templates/` | `.docops/templates/{layer}/` | Copy `*.md` templates per layer |
|
|
93
|
+
| (none) | `.docops/guide/` | Added by Writer setup — this documentation folder |
|
|
94
|
+
|
|
95
|
+
**Rule:** never overwrite existing destination files. Migration only **fills gaps**.
|
|
96
|
+
|
|
97
|
+
### 2.1 Storage layout (Writer project setting)
|
|
98
|
+
|
|
99
|
+
Writer stores **which path family to read from git** on the **project** row (`storage_layout` in the database). This is **not** inferred by trying multiple paths.
|
|
100
|
+
|
|
101
|
+
| `storage_layout` | When to use | Comments root | Review queue | Prototype screen-map | Prototype config |
|
|
102
|
+
|------------------|-------------|---------------|--------------|----------------------|------------------|
|
|
103
|
+
| `legacy` | Repo still uses `.ai-spector/` paths (default for old projects) | `comments/` | `.ai-spector/.docflow/review-queue/` | `prototype/screen-map.json` | `.ai-spector/.docflow/config/prototype/config.json` |
|
|
104
|
+
| `docops` | Repo migrated to `.docops/` contract paths | `.docops/comments/` | `.docops/review-queue/` | `.docops/prototype/screen-map.json` | `.docops/prototype/config.json` |
|
|
105
|
+
|
|
106
|
+
**Set in Writer:** Project Settings → Docops (or project update API: `storageLayout: "legacy"` \| `"docops"`).
|
|
107
|
+
|
|
108
|
+
**After migration:** when `.docops/docops.config.json` and contract paths exist on the branch users work in, set **`storage_layout` to `docops`**.
|
|
109
|
+
|
|
110
|
+
**Git vs DB:** `.docops/docops.config.json` may include `"layout": "docops"`. Writer still uses the **project `storage_layout`** for reads. Keep DB and git in sync.
|
|
111
|
+
|
|
112
|
+
**Do not rely on:** `DOCOPS_LEGACY_PATHS` env dual-read (deprecated). One layout per project.
|
|
113
|
+
|
|
114
|
+
### 2.2 Document folders (`docTypes.*.path`)
|
|
115
|
+
|
|
116
|
+
Document markdown lives under **`docTypes.<layer>.path`** — a folder **relative to the repository root**.
|
|
117
|
+
|
|
118
|
+
| `docTypes` key | Label | Example `path` | Typical on-disk layout |
|
|
119
|
+
|----------------|-------|----------------|------------------------|
|
|
120
|
+
| `srs` | SRS | `docs/srs` | `docs/srs/en/01-overview.md` |
|
|
121
|
+
| `basicDesign` | Basic Design | `docs/basic-design` | `docs/basic-design/en/screen-list.md` |
|
|
122
|
+
| `detailDesign` | Detail Design | `docs/detail-design` | `docs/detail-design/en/feature-list.md` |
|
|
123
|
+
| `otherDocument` | Other Document | `docs/other` | `docs/other/en/meeting-notes.md` |
|
|
124
|
+
|
|
125
|
+
**Default bootstrap:** `detailDesign` and `otherDocument` are written to config with `"enabled": false`. Detail Design templates still land in `.docops/templates/detail-design/`. Other Document has no `templatesPath`.
|
|
126
|
+
|
|
127
|
+
**Use full repo-root paths** in config:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
"docTypes": {
|
|
131
|
+
"srs": {
|
|
132
|
+
"enabled": true,
|
|
133
|
+
"path": "docs/srs",
|
|
134
|
+
"label": "SRS",
|
|
135
|
+
"templatesPath": ".docops/templates/srs"
|
|
136
|
+
},
|
|
137
|
+
"basicDesign": {
|
|
138
|
+
"enabled": true,
|
|
139
|
+
"path": "docs/basic-design",
|
|
140
|
+
"label": "Basic Design",
|
|
141
|
+
"templatesPath": ".docops/templates/basic-design"
|
|
142
|
+
},
|
|
143
|
+
"detailDesign": {
|
|
144
|
+
"enabled": false,
|
|
145
|
+
"path": "docs/detail-design",
|
|
146
|
+
"label": "Detail Design",
|
|
147
|
+
"templatesPath": ".docops/templates/detail-design"
|
|
148
|
+
},
|
|
149
|
+
"otherDocument": {
|
|
150
|
+
"enabled": false,
|
|
151
|
+
"path": "docs/other",
|
|
152
|
+
"label": "Other Document"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Path rules:**
|
|
158
|
+
|
|
159
|
+
- **`path` is literal** — `docs/srs` stays `docs/srs`. A short value like `srs` means a folder named `srs` at repo root, **not** `docs/srs`.
|
|
160
|
+
- **`docsRoot`** (`"docs"` by default) is **not** prepended to `docTypes.path`. Put the full folder in `path`.
|
|
161
|
+
- **Custom roots** are allowed (e.g. `"path": "detail-design"` at repo root) when that matches your tree.
|
|
162
|
+
- **Logical paths** in review/comments stay without the docs prefix: `srs/01-overview`, `basic-design/screen-list`. Writer/ai-spector map them using `docTypes.*.path`.
|
|
163
|
+
- **Do not overwrite** existing `docTypes.*.path` in config during repair — only fill missing `templatesPath` or scaffold files.
|
|
164
|
+
|
|
165
|
+
**Infer from tree:** if `docs/srs/` exists, set `srs.path` to `docs/srs`. If `detail-design/` exists at repo root, set `detailDesign.path` to `detail-design`.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Path A — Greenfield (Writer web only)
|
|
170
|
+
|
|
171
|
+
No legacy layout. **No ai-spector.**
|
|
172
|
+
|
|
173
|
+
1. **Project Settings** → Bitbucket: repo URL + token → **Save**
|
|
174
|
+
2. **Docops** section → choose **target branch** (use a feature branch if `main` is protected)
|
|
175
|
+
3. Click **Set up repository** (or **Customize** first)
|
|
176
|
+
4. Wait for the worker job to finish (status banner turns green)
|
|
177
|
+
5. Complete [post-migration checklist](#5-post-migration-checklist)
|
|
178
|
+
|
|
179
|
+
**What setup commits:**
|
|
180
|
+
|
|
181
|
+
- `.docops/docops.config.json`, review scaffolding, templates
|
|
182
|
+
- `{docTypes.*.path}/{lang}/.gitkeep` placeholders (e.g. `docs/srs/en/.gitkeep`)
|
|
183
|
+
- `.docops/guide/` — this folder (README, MIGRATION, modules, schemas, examples)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Path B — Legacy migration (without ai-spector)
|
|
188
|
+
|
|
189
|
+
For projects with legacy paths (table in §1) and **no** `.docops/docops.config.json` yet.
|
|
190
|
+
|
|
191
|
+
### Step 1 — Branch and backup
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
git checkout -b docops/migrate
|
|
195
|
+
git pull
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- [ ] Confirm you can push to this branch from Writer (Bitbucket token saved)
|
|
199
|
+
|
|
200
|
+
### Step 2 — Copy legacy files
|
|
201
|
+
|
|
202
|
+
From **repo root**, copy only when the contract path does not exist:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Comments (if you have root comments/)
|
|
206
|
+
test -d comments && test ! -d .docops/comments && cp -r comments .docops/comments
|
|
207
|
+
|
|
208
|
+
# Review queue
|
|
209
|
+
test -d .ai-spector/.docflow/review-queue && test ! -d .docops/review-queue \
|
|
210
|
+
&& cp -r .ai-spector/.docflow/review-queue .docops/review-queue
|
|
211
|
+
|
|
212
|
+
# Review config
|
|
213
|
+
test -f .ai-spector/review.config.json && test ! -f .docops/review.config.json \
|
|
214
|
+
&& cp .ai-spector/review.config.json .docops/review.config.json
|
|
215
|
+
|
|
216
|
+
# Prototype (if used)
|
|
217
|
+
mkdir -p .docops/prototype
|
|
218
|
+
test -f prototype/screen-map.json && test ! -f .docops/prototype/screen-map.json \
|
|
219
|
+
&& cp prototype/screen-map.json .docops/prototype/screen-map.json
|
|
220
|
+
test -f .ai-spector/.docflow/config/prototype/config.json \
|
|
221
|
+
&& test ! -f .docops/prototype/config.json \
|
|
222
|
+
&& cp .ai-spector/.docflow/config/prototype/config.json .docops/prototype/config.json
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Adjust paths if your project uses different legacy locations.
|
|
226
|
+
|
|
227
|
+
### Step 3 — Create `docops.config.json`
|
|
228
|
+
|
|
229
|
+
1. Copy [examples/full-docops.config.json](examples/full-docops.config.json) to `.docops/docops.config.json`
|
|
230
|
+
2. Edit to match your project:
|
|
231
|
+
|
|
232
|
+
| Field | What to set |
|
|
233
|
+
|-------|-------------|
|
|
234
|
+
| `layout` | `"docops"` when this repo uses contract paths (see §2.1) |
|
|
235
|
+
| `languages[]` | Codes and folder names under each `docTypes.*.path` (e.g. `en`, `vi`) |
|
|
236
|
+
| `primaryLanguage` | Main authoring language |
|
|
237
|
+
| `docTypes` | Enabled layers (`srs`, `basicDesign`, `detailDesign`) — see §2.2 |
|
|
238
|
+
| `docTypes.*.path` | **Repo-root-relative** folder (e.g. `docs/srs`, `docs/basic-design`) — must match existing markdown tree |
|
|
239
|
+
| `docTypes.*.templatesPath` | `.docops/templates/srs`, `.docops/templates/basic-design`, etc. |
|
|
240
|
+
| `capabilities` | `true` / `false` per Writer feature you use |
|
|
241
|
+
| `paths` | Contract paths for comments, review, prototype (usually defaults under `.docops/`) |
|
|
242
|
+
|
|
243
|
+
Validate (optional):
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
npx ajv-cli validate \
|
|
247
|
+
-s .docops/guide/schemas/docops.config.schema.json \
|
|
248
|
+
-d .docops/docops.config.json
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
If you have `.ai-spector/docflow.config.json`, open it side-by-side and copy language codes, doc layer paths, and plugin flags into `capabilities`.
|
|
252
|
+
|
|
253
|
+
### Step 4 — Templates
|
|
254
|
+
|
|
255
|
+
If `.docops/templates/` is empty, copy markdown templates:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Example: from ai-spector pack (adjust pack name to your project)
|
|
259
|
+
mkdir -p .docops/templates/srs .docops/templates/basic-design
|
|
260
|
+
cp -r .ai-spector/packs/kaopiz-srs/templates/* .docops/templates/srs/ 2>/dev/null || true
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Or run **Writer Set up repository** on a branch that still has **no** `docops.config.json` to scaffold templates — then merge with your copied legacy files.
|
|
264
|
+
|
|
265
|
+
### Step 5 — Commit and push
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
git add .docops
|
|
269
|
+
git commit -m "docops: migrate legacy layout to .docops contract"
|
|
270
|
+
git push -u origin docops/migrate
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Step 6 — Add guide folder (if missing)
|
|
274
|
+
|
|
275
|
+
If `.docops/guide/` is not in the commit yet:
|
|
276
|
+
|
|
277
|
+
1. Merge or cherry-pick from a branch where Writer setup ran, **or**
|
|
278
|
+
2. **Project Settings → Docops → Set up repository** on a branch **without** `docops.config.json` (e.g. temporary branch), copy `.docops/guide/` from that commit, **or**
|
|
279
|
+
3. Run Writer setup on your migrate branch **before** adding `docops.config.json` (setup first, then add config + legacy copies in a second commit)
|
|
280
|
+
|
|
281
|
+
Recommended order for Writer-only teams:
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
1. Create branch
|
|
285
|
+
2. Writer Set up repository → gets guide/, templates, default config
|
|
286
|
+
3. Edit docops.config.json for your languages/layers
|
|
287
|
+
4. Copy legacy comments/review-queue over (only if destinations empty)
|
|
288
|
+
5. Commit + push
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Step 7 — Verify
|
|
292
|
+
|
|
293
|
+
[Post-migration checklist](#5-post-migration-checklist)
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Path C — Fill gaps or verify
|
|
298
|
+
|
|
299
|
+
`.docops/docops.config.json` **already exists**.
|
|
300
|
+
|
|
301
|
+
### Missing files only (manual)
|
|
302
|
+
|
|
303
|
+
| Symptom | Fix |
|
|
304
|
+
|---------|-----|
|
|
305
|
+
| Review queue 500 / `Expected JSON object` on `pending.json` | Replace with `{"version": 2, "jobs": []}` — see [examples/review/minimal-pending.json](examples/review/minimal-pending.json). Do **not** use a bare array of logical paths. |
|
|
306
|
+
| No review registry | Copy [examples/review/minimal-registry.json](examples/review/minimal-registry.json) → `.docops/review-queue/registry.json` and edit |
|
|
307
|
+
| No review config | Copy [examples/review/minimal-review.config.json](examples/review/minimal-review.config.json) |
|
|
308
|
+
| No guide docs | Copy from another initialized branch or re-run setup on a branch without config, then copy `.docops/guide/` |
|
|
309
|
+
| Empty templates | Copy `*.md` into `docTypes.*.templatesPath` or run setup on greenfield branch and copy template folders |
|
|
310
|
+
| Missing `detailDesign` / `otherDocument` in config | Merge keys from [full-docops.config.json](examples/full-docops.config.json) (`enabled: false`) — see [guides/DOCOPS_MANUAL_FALLBACK.md](guides/DOCOPS_MANUAL_FALLBACK.md) |
|
|
311
|
+
| Empty `.docops/templates/detail-design/` | Copy from bootstrap `templates/detail-design/` even when DD disabled — [guides/DOCOPS_MANUAL_FALLBACK.md](guides/DOCOPS_MANUAL_FALLBACK.md) §4 |
|
|
312
|
+
| Prototype not working | See [modules/prototype.md](modules/prototype.md) — config, screen-map, `.htpasswd` |
|
|
313
|
+
|
|
314
|
+
Writer **Set up repository** returns **409** if `docops.config.json` already exists. To scaffold **missing** files without CLI:
|
|
315
|
+
|
|
316
|
+
- Follow [guides/DOCOPS_MANUAL_FALLBACK.md](guides/DOCOPS_MANUAL_FALLBACK.md) (agent gap-fill), or
|
|
317
|
+
- Add files manually from `guide/examples/`, or
|
|
318
|
+
- Use a temporary branch without config for setup, then copy missing paths into your working branch
|
|
319
|
+
|
|
320
|
+
### Optional automation (ai-spector installed)
|
|
321
|
+
|
|
322
|
+
If ai-spector is available locally:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
npx ai-spector docops migrate --dry-run # legacy → contract preview
|
|
326
|
+
npx ai-spector docops migrate # full legacy migrate
|
|
327
|
+
npx ai-spector docops migrate --repair # fill gaps when config exists
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
This is optional — [Path B](#path-b--legacy-migration-without-ai-spector) covers the same result with git + Writer.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 4. Projects that never used ai-spector
|
|
335
|
+
|
|
336
|
+
Some teams only have `docs/` and custom tooling (no `.ai-spector/`).
|
|
337
|
+
|
|
338
|
+
1. Follow [Path A](#path-a--greenfield-writer-web-only) — Writer setup scaffolds the contract
|
|
339
|
+
2. Edit `.docops/docops.config.json` so `docTypes.*.path` matches your existing folders (§2.2), e.g. `docs/srs`
|
|
340
|
+
3. Do **not** move `docs/` — Writer reads markdown in place via configured `path`
|
|
341
|
+
4. Set Writer **`storage_layout` to `docops`** once contract files exist on the branch
|
|
342
|
+
5. Enable only `capabilities` you need; see [modules/](modules/) for each feature's files
|
|
343
|
+
6. External adapters: read [adapters/README.md](adapters/README.md) — integration is **git files only**, no Writer API
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 5. Post-migration checklist
|
|
348
|
+
|
|
349
|
+
After any path, verify on the migrated branch (allow ~30s for Writer git cache):
|
|
350
|
+
|
|
351
|
+
### Contract
|
|
352
|
+
|
|
353
|
+
- [ ] `.docops/docops.config.json` valid JSON; `languages` and `docTypes` match on-disk folders (§2.2)
|
|
354
|
+
- [ ] `docTypes.*.path` uses repo-root-relative paths (e.g. `docs/srs`, not bare `srs` unless that folder exists at root)
|
|
355
|
+
- [ ] Writer project **`storage_layout`** matches branch (`legacy` until `.docops/` paths are live, then `docops`)
|
|
356
|
+
- [ ] `.docops/guide/README.md` and `guide/MIGRATION.md` present (this file)
|
|
357
|
+
- [ ] Review: `.docops/review.config.json` + `.docops/review-queue/registry.json` (if `review: true`)
|
|
358
|
+
- [ ] Comments: threads under `.docops/comments/` (if `comments: true`)
|
|
359
|
+
- [ ] Templates: `*.md` in each `templatesPath` (if `generate: true`)
|
|
360
|
+
- [ ] Prototype: `screen-map.json`, auth — [modules/prototype.md](modules/prototype.md)
|
|
361
|
+
|
|
362
|
+
### Writer UI
|
|
363
|
+
|
|
364
|
+
- [ ] **Project Settings → Docops** — setup complete, no blocking errors
|
|
365
|
+
- [ ] **Documents** tree loads
|
|
366
|
+
- [ ] **Templates** lists files from `.docops/templates/`
|
|
367
|
+
- [ ] **Review / Comments / Prototype** work for enabled capabilities
|
|
368
|
+
|
|
369
|
+
### Git and team
|
|
370
|
+
|
|
371
|
+
- [ ] Migration commit on the branch users work in
|
|
372
|
+
- [ ] CI and bots updated to read `.docops/` paths (see [adapters/README.md](adapters/README.md))
|
|
373
|
+
- [ ] Team entry point: `.docops/guide/README.md`
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 6. Writer admin: storage layout per project
|
|
378
|
+
|
|
379
|
+
Each linked git project has **`storage_layout`** in the Writer database:
|
|
380
|
+
|
|
381
|
+
| Value | Git paths Writer reads |
|
|
382
|
+
|-------|-------------------------|
|
|
383
|
+
| `legacy` (default) | `comments/`, `.ai-spector/.docflow/review-queue/`, `prototype/screen-map.json`, legacy prototype config |
|
|
384
|
+
| `docops` | `.docops/comments/`, `.docops/review-queue/`, `.docops/prototype/screen-map.json`, `.docops/prototype/config.json` |
|
|
385
|
+
|
|
386
|
+
**Migration sequence:**
|
|
387
|
+
|
|
388
|
+
1. While git still has only legacy paths → keep `storage_layout: legacy`
|
|
389
|
+
2. After `.docops/` contract files are committed on the working branch → set `storage_layout: docops`
|
|
390
|
+
3. Verify Documents, Review, Comments, Prototype on that branch
|
|
391
|
+
|
|
392
|
+
Writer does **not** fall back from docops path to legacy path (or vice versa) when a file is missing.
|
|
393
|
+
|
|
394
|
+
Deprecated: `DOCOPS_LEGACY_PATHS` environment dual-read. Use per-project `storage_layout` instead.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## 6.1 Entity registry and stable comment IDs
|
|
399
|
+
|
|
400
|
+
Full guide: **[ENTITY_REGISTRY_MIGRATION.md](ENTITY_REGISTRY_MIGRATION.md)** (commands, verification, rollback).
|
|
401
|
+
|
|
402
|
+
After `docops.config.json` includes `paths.registry`, run these **on each branch** that should use ID-keyed artifacts:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
npx ai-spector docops registry sync # 1. Build .docops/registry/ from docs/ (+ screen-map import)
|
|
406
|
+
npx ai-spector docops comments migrate # 2. Move comments/{path}/ → comments/documents/{entityId}/
|
|
407
|
+
npx ai-spector docops review-registry migrate # 3. Rekey review-queue/registry.json v3 → v4 (entityId keys)
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Or: `bash .docops/guide/scripts/migrate-entity-registry.sh` (copied during Writer setup).
|
|
411
|
+
|
|
412
|
+
Order matters: `registry sync` must run before comment or review migrations so logical paths resolve to entity UUIDs.
|
|
413
|
+
|
|
414
|
+
**Writer reads registry from git via Redis cache** — entity JSON is not mirrored into Postgres. The `git_document_registry` table remains for design-doc listing from `docs/` scans only.
|
|
415
|
+
|
|
416
|
+
Writer API and UI accept `entityId` (or `screenId` for prototype) when listing comments; `filePath` remains supported for one release (see `Deprecation` response headers).
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## 7. Migration flow (summary)
|
|
421
|
+
|
|
422
|
+
```text
|
|
423
|
+
Check repo files (§1)
|
|
424
|
+
│
|
|
425
|
+
├─ greenfield ──────► Writer Set up repository (Path A)
|
|
426
|
+
│
|
|
427
|
+
├─ legacy, no config ► copy legacy files (§2 table)
|
|
428
|
+
│ create docops.config.json (§2.2, Step 3)
|
|
429
|
+
│ commit + push
|
|
430
|
+
│ set Writer storage_layout (§2.1)
|
|
431
|
+
│ → checklist (§5)
|
|
432
|
+
│
|
|
433
|
+
└─ config exists ───► fill gaps manually (Path C)
|
|
434
|
+
or optional: ai-spector migrate --repair
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 8. After migration
|
|
440
|
+
|
|
441
|
+
1. [README.md](README.md) — contract overview
|
|
442
|
+
2. [modules/](modules/) — per-module schema, Writer flow, examples
|
|
443
|
+
3. [schemas/](schemas/) — validate JSON locally
|
|
444
|
+
4. [examples/](examples/) — copy-paste starting points
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## 9. Agent quick reference (copy for prompts)
|
|
449
|
+
|
|
450
|
+
```text
|
|
451
|
+
Migrate repo to .docops contract:
|
|
452
|
+
- Branch: docops/migrate (or user branch)
|
|
453
|
+
- Copy legacy → contract (§2 table); skip existing destinations
|
|
454
|
+
- docops.config.json: layout "docops", docTypes.*.path = repo-root-relative (docs/srs, docs/basic-design, …)
|
|
455
|
+
- Always include detailDesign + otherDocument (enabled: false) unless already present
|
|
456
|
+
- Copy .docops/templates/detail-design/ from bootstrap even when DD disabled
|
|
457
|
+
- capabilities + paths per project needs
|
|
458
|
+
- templates: .docops/templates/{layer}/*.md
|
|
459
|
+
- gitkeep: {docTypes.path}/{lang}/.gitkeep for each enabled layer × language
|
|
460
|
+
- Commit; then Writer storage_layout = docops
|
|
461
|
+
- Never overwrite existing files; never use short docTypes.path expecting docs/ prefix
|
|
462
|
+
- CLI failed → `npx ai-spector docops guide --prompt` then guides/DOCOPS_MANUAL_FALLBACK.md
|
|
463
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Docops contract — project guide
|
|
2
|
+
|
|
3
|
+
Writer reads this repo via git. Edit files here, commit, and push — no CLI required.
|
|
4
|
+
|
|
5
|
+
## Folder map
|
|
6
|
+
|
|
7
|
+
| Path | Purpose |
|
|
8
|
+
|------|---------|
|
|
9
|
+
| `docops.config.json` | Languages, doc layers, paths, capabilities |
|
|
10
|
+
| `registry/` | **Entity registry** — stable UUIDs per design doc / screen (`registry sync`) |
|
|
11
|
+
| `review.config.json` | Review sign-off preset |
|
|
12
|
+
| `review-queue/` | Review sign-off state (v4 keys = `entityId`; legacy v3 = `logicalPath`) |
|
|
13
|
+
| `comments/` | Comment threads — `documents/{entityId}/` or `screens/{screenId}/` (legacy: path folders) |
|
|
14
|
+
| `prototype/` | Screen map (legacy) or registry screens after sync |
|
|
15
|
+
| `templates/` | Markdown templates per doc layer |
|
|
16
|
+
| `modules/` | Per-feature setup guides (this folder) |
|
|
17
|
+
| `adapters/` | External tool integration rules |
|
|
18
|
+
|
|
19
|
+
**Not the same as:** `.docops/review-queue/registry.json` (review sign-off) or `.ai-spector/registry/section-registry.json` (traceability section index for local graph).
|
|
20
|
+
|
|
21
|
+
## Document paths
|
|
22
|
+
|
|
23
|
+
`docs/{docTypes.<layer>.path}/{language.path}/*.md`
|
|
24
|
+
|
|
25
|
+
Example: `docs/srs/en/1-introduction.md`
|
|
26
|
+
|
|
27
|
+
## Capabilities
|
|
28
|
+
|
|
29
|
+
| Key | Writer feature |
|
|
30
|
+
|-----|----------------|
|
|
31
|
+
| `review` | Review queue + sign-off |
|
|
32
|
+
| `comments` | Inline comments |
|
|
33
|
+
| `prototype` | Prototype screen map |
|
|
34
|
+
| `graph` | Traceability graph in **Writer web UI** (local `npx ai-spector index` always builds `.ai-spector/graph/` regardless) |
|
|
35
|
+
| `generate` | Cloud generation from templates |
|
|
36
|
+
| `translate` | Translation workflow UI |
|
|
37
|
+
|
|
38
|
+
Set a capability to `false` to hide that feature (no error).
|
|
39
|
+
|
|
40
|
+
## Module guides
|
|
41
|
+
|
|
42
|
+
- [Review](modules/review.md)
|
|
43
|
+
- [Comments](modules/comments.md)
|
|
44
|
+
- [Prototype](modules/prototype.md)
|
|
45
|
+
- [Generate](modules/generate.md)
|
|
46
|
+
- [Translate](modules/translate.md)
|
|
47
|
+
- [Graph](modules/graph.md)
|
|
48
|
+
- [External adapters](adapters/README.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# External Adapters — Docops Integration Guide
|
|
2
|
+
|
|
3
|
+
## Principles
|
|
4
|
+
|
|
5
|
+
Writer and local tools integrate through **files in git** — not direct API calls between them.
|
|
6
|
+
|
|
7
|
+
| Rule | Detail |
|
|
8
|
+
|------|--------|
|
|
9
|
+
| File bus | All state lives in `.docops/`, `docs/`, and optional `.ai-spector/` |
|
|
10
|
+
| Branch-scoped | Contract files on branch X apply when users view branch X |
|
|
11
|
+
| No Writer API | Adapters read/write the repo filesystem or git remote — not Writer REST |
|
|
12
|
+
| Lenient validation | Unknown JSON keys are ignored; missing optional files hide features |
|
|
13
|
+
|
|
14
|
+
## Concurrency
|
|
15
|
+
|
|
16
|
+
Comment threads and review registry use read-modify-write:
|
|
17
|
+
|
|
18
|
+
1. Read current file (and git SHA when available)
|
|
19
|
+
2. Apply change
|
|
20
|
+
3. Commit; retry on conflict
|
|
21
|
+
|
|
22
|
+
Do not silently overwrite concurrent edits.
|
|
23
|
+
|
|
24
|
+
## When to disable Writer UI
|
|
25
|
+
|
|
26
|
+
Set `capabilities.<module>: false` in `docops.config.json` when your adapter owns that workflow entirely. Writer hides the feature without error.
|
|
27
|
+
|
|
28
|
+
`capabilities.graph` and `capabilities.generate` affect **Writer cloud UI only**. The local ai-spector engine (MCP and CLI) always owns index, graph, and generate work sessions regardless of those flags.
|
|
29
|
+
|
|
30
|
+
## Schema reference
|
|
31
|
+
|
|
32
|
+
Full schemas and examples: bundled in the ai-spector package at `contracts/schemas/` and `contracts/examples/`, or `.docops/guide/schemas/` in this project after init.
|