gennady 0.6.0 → 0.7.0
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/README.md +2 -15
- package/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/ai/agents/agent-review-verifier.xml +6 -0
- package/ai/directives/architecture/README.md +21 -0
- package/ai/directives/coding/README.md +23 -0
- package/ai/directives/coding/result-conventions.xml +55 -0
- package/ai/directives/coding/svelte5-runes.xml +248 -0
- package/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/ai/directives/coding/typescript-rules.xml +589 -0
- package/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/ai/directives/dbc-audit.directive.xml +131 -0
- package/ai/directives/dev-review.directive.xml +148 -0
- package/ai/directives/infra/README.md +11 -0
- package/ai/directives/infra/eslint-setup.xml +467 -0
- package/ai/directives/infra/git-setup.xml +261 -0
- package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/ai/directives/infra/storybook-setup.xml +153 -0
- package/ai/directives/knowledge.xml +206 -0
- package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/ai/directives/sdd/README.md +49 -0
- package/ai/directives/sdd/audit.directive.xml +543 -0
- package/ai/directives/sdd/discovery.directive.xml +824 -0
- package/ai/directives/sdd/fix.directive.xml +249 -0
- package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/ai/directives/sdd/setup.directive.xml +213 -0
- package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/ai/directives/testing/README.md +25 -0
- package/ai/directives/testing/common.xml +234 -0
- package/ai/directives/testing/node-test.xml +288 -0
- package/ai/directives/testing/playwright-cli.xml +199 -0
- package/ai/directives/testing/playwright-e2e.xml +292 -0
- package/ai/directives/testing/storybook-usage.xml +173 -0
- package/ai/directives/testing/svelte-testing.xml +237 -0
- package/ai/directives/testing/vitest-rules.xml +326 -0
- package/ai/docs/README.md +17 -0
- package/ai/docs/ai-icl.md +538 -0
- package/ai/docs/ai-priming.md +548 -0
- package/ai/docs/ai-prompt-formats.md +406 -0
- package/ai/docs/ai-promting.md +572 -0
- package/ai/drafts/DRAFT.md +120 -0
- package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/ai/drafts/d.md +65 -0
- package/ai/drafts/music-posts.md +105 -0
- package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/ai/fw/v1/core/mental-model.xml +50 -0
- package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/ai/fw/v2/arch-universal.xml +73 -0
- package/ai/fw-draft/README.md +79 -0
- package/ai/fw-draft/bin/discovery.sh +116 -0
- package/ai/fw-draft/gennady.xml +58 -0
- package/ai/fw-draft/provider/claude.xml +16 -0
- package/ai/fw-draft/provider/cursor.xml +23 -0
- package/ai/fw-draft/provider/default.xml +12 -0
- package/ai/fw-draft/roles/developer.xml +18 -0
- package/ai/fw-draft/router.xml +39 -0
- package/ai/fw-draft/routes/development.xml +32 -0
- package/ai/fw-draft/routes/universal.xml +58 -0
- package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/dist/ai/agents/agent-review-verifier.xml +6 -0
- package/dist/ai/directives/architecture/README.md +21 -0
- package/dist/ai/directives/coding/README.md +23 -0
- package/dist/ai/directives/coding/result-conventions.xml +55 -0
- package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
- package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/dist/ai/directives/coding/typescript-rules.xml +589 -0
- package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/dist/ai/directives/dbc-audit.directive.xml +131 -0
- package/dist/ai/directives/dev-review.directive.xml +148 -0
- package/dist/ai/directives/infra/README.md +11 -0
- package/dist/ai/directives/infra/eslint-setup.xml +467 -0
- package/dist/ai/directives/infra/git-setup.xml +261 -0
- package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/dist/ai/directives/infra/storybook-setup.xml +153 -0
- package/dist/ai/directives/knowledge.xml +206 -0
- package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/dist/ai/directives/sdd/README.md +49 -0
- package/dist/ai/directives/sdd/audit.directive.xml +543 -0
- package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
- package/dist/ai/directives/sdd/fix.directive.xml +249 -0
- package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/dist/ai/directives/sdd/setup.directive.xml +213 -0
- package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/dist/ai/directives/testing/README.md +25 -0
- package/dist/ai/directives/testing/common.xml +234 -0
- package/dist/ai/directives/testing/node-test.xml +288 -0
- package/dist/ai/directives/testing/playwright-cli.xml +199 -0
- package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
- package/dist/ai/directives/testing/storybook-usage.xml +173 -0
- package/dist/ai/directives/testing/svelte-testing.xml +237 -0
- package/dist/ai/directives/testing/vitest-rules.xml +326 -0
- package/dist/ai/docs/README.md +17 -0
- package/dist/ai/docs/ai-icl.md +538 -0
- package/dist/ai/docs/ai-priming.md +548 -0
- package/dist/ai/docs/ai-prompt-formats.md +406 -0
- package/dist/ai/docs/ai-promting.md +572 -0
- package/dist/ai/drafts/DRAFT.md +120 -0
- package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/dist/ai/drafts/d.md +65 -0
- package/dist/ai/drafts/music-posts.md +105 -0
- package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/dist/ai/fw/v1/core/mental-model.xml +50 -0
- package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/dist/ai/fw/v2/arch-universal.xml +73 -0
- package/dist/ai/fw-draft/README.md +79 -0
- package/dist/ai/fw-draft/bin/discovery.sh +116 -0
- package/dist/ai/fw-draft/gennady.xml +58 -0
- package/dist/ai/fw-draft/provider/claude.xml +16 -0
- package/dist/ai/fw-draft/provider/cursor.xml +23 -0
- package/dist/ai/fw-draft/provider/default.xml +12 -0
- package/dist/ai/fw-draft/roles/developer.xml +18 -0
- package/dist/ai/fw-draft/router.xml +39 -0
- package/dist/ai/fw-draft/routes/development.xml +32 -0
- package/dist/ai/fw-draft/routes/universal.xml +58 -0
- package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/chunks/devtools-B-7ugZhF.js +79 -0
- package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
- package/dist/chunks/{index-B63fYXL2.js → index-BeL1Zcbg.js} +1 -1
- package/dist/chunks/index-CVR66voe.js +26963 -0
- package/dist/chunks/index-CXuhZzS3.js +16979 -0
- package/dist/chunks/{index-B5bA2T7A.js → index-CaahtXiM.js} +33 -9
- package/dist/chunks/{index-iqg0w_pE.js → index-CiEM-8nJ.js} +35 -19
- package/dist/chunks/{index-B4m0-PAT.js → index-D1qsi0Uc.js} +57 -33
- package/dist/chunks/index-D9ceRUyB.js +443 -0
- package/dist/chunks/index-DJpVmyp2.js +176 -0
- package/dist/chunks/{index-C0andxna.js → index-DU6jD7SS.js} +1 -1
- package/dist/chunks/index-KxSZKmZn.js +540 -0
- package/dist/chunks/{index-Dqe1TdW4.js → index-UbHoePfr.js} +12 -12
- package/dist/chunks/{index-5xIgwwKx.js → index-g1LXlp77.js} +2 -2
- package/dist/chunks/index-zBnnuvLA.js +3788 -0
- package/dist/chunks/{run-review-command.logic-a_M3CkeZ.js → run-review-command.logic-DpkRoEi8.js} +2 -2
- package/dist/chunks/services-CaLOhuLV.js +2889 -0
- package/dist/chunks/shared-Bjy30TeM.js +665 -0
- package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
- package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
- package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
- package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
- package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
- package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
- package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
- package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
- package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
- package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
- package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
- package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
- package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
- package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
- package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
- package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
- package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
- package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
- package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
- package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
- package/dist/cli/cmd/lint/index.d.ts +1 -0
- package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
- package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
- package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
- package/dist/cli/cmd/remote-console/index.d.ts +2 -0
- package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
- package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
- package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
- package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
- package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
- package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
- package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
- package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
- package/dist/cli/cmd/sync/index.d.ts +1 -0
- package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
- package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
- package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
- package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
- package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
- package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
- package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
- package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
- package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
- package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
- package/dist/cli/utils/prompts/index.d.ts +6 -6
- package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
- package/dist/gennady.js +30 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -23
- package/dist/services/agent-mon/diff/diff.d.ts +9 -0
- package/dist/services/agent-mon/diff/index.d.ts +1 -0
- package/dist/services/agent-mon/index.d.ts +10 -0
- package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
- package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
- package/dist/services/agent-mon/model/errors.d.ts +20 -0
- package/dist/services/agent-mon/model/index.d.ts +7 -0
- package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
- package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
- package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
- package/dist/services/agent-mon/monitor/index.d.ts +2 -0
- package/dist/services/agent-mon/observe/index.d.ts +1 -0
- package/dist/services/agent-mon/observe/observe.d.ts +12 -0
- package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
- package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
- package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
- package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
- package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
- package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
- package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
- package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
- package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
- package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
- package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
- package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
- package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
- package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
- package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +183 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
- package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
- package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
- package/dist/services/logger/logger.d.ts +26 -6
- package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
- package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
- package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
- package/dist/services/remote-console/remote-console.d.ts +6 -0
- package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
- package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
- package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
- package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
- package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
- package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
- package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
- package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
- package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
- package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
- package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
- package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
- package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
- package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
- package/dist/shared/backend/git/git-core.d.ts +24 -22
- package/dist/shared/backend/git/git-diff.d.ts +16 -5
- package/dist/shared/backend/rc/rc-config.d.ts +27 -15
- package/dist/shared/common/exec.d.ts +4 -6
- package/dist/shared/common/files.d.ts +1 -3
- package/dist/shared/common/language.d.ts +3 -6
- package/dist/shared/common/parse-args.d.ts +1 -4
- package/dist/shared/common/style.d.ts +3 -3
- package/dist/shared/common/think.d.ts +1 -5
- package/dist/shared/common/tokens.d.ts +1 -5
- package/dist/shared/common/unguard.d.ts +4 -8
- package/dist/shared/common/xml.d.ts +16 -12
- package/package.json +20 -4
- package/dist/.ai/agents/agent-review-verifier.xml +0 -181
- package/dist/chunks/index-CNbmXK8M.js +0 -3548
- package/dist/chunks/services-Sb7TwLxt.js +0 -122
- package/dist/chunks/shared-BgLzFWMH.js +0 -577
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
<SddTaskScaffolding keywords="task-scaffolding, dependency-graph, bdd, execution-planning, mandatory-rules-linkage, rules-cascade, rule-activation, hierarchical-tasks, modes, extend-dag, scope-graph, sdd-phase-3" type="directive" ver="3.0">
|
|
2
|
+
<Directive_Context>
|
|
3
|
+
<Mission>
|
|
4
|
+
Decompose the spec tree into a DAG of compact task tickets ready for autonomous execution by `sdd-execute` orchestrator (which dispatches phase-subagents under `phase-execution-protocol`).
|
|
5
|
+
|
|
6
|
+
Convergence point. Entry point: `specs/README.md` Scope Graph — canonical map of all scopes and their dependencies. From Portal extract:
|
|
7
|
+
- All scopes with their scope-type and `depends-on` edges (Mermaid graph + Scopes table).
|
|
8
|
+
- Per scope: read `specs/<scope>/<scope>.spec.md` for rules, requirements, architecture.
|
|
9
|
+
- Per product/library scope: read `specs/<scope>/<module>/<module>.spec.md` if 8 Module Map exists.
|
|
10
|
+
|
|
11
|
+
Outputs:
|
|
12
|
+
- `tasks/README.md` — project-level tracker (Entry Points, Tracker Index, High-Level cross-scope DAG, Decision Log). No global Cascade Table here — each scope has its own.
|
|
13
|
+
- `tasks/<scope>/README.md` — per-scope tracker: Cascade Table (derived from scope graph), intra-scope DAG, Tracker.
|
|
14
|
+
- `tasks/<scope>/<scope>.task-NN.md` — compact tickets for scope-level tasks.
|
|
15
|
+
- `tasks/<scope>/<module>/<module>.task-NN.md` — module-level tickets (when modules exist in scope).
|
|
16
|
+
- `tasks/integration/` — cross-scope integration tickets (optional; only when a dedicated `integration` scope is registered in Scope Graph).
|
|
17
|
+
|
|
18
|
+
Next phase: `sdd-execute` consumes one ticket at a time, dispatches phase-subagents per ticket's Phases Overview, then `audit`.
|
|
19
|
+
|
|
20
|
+
**Glossary.** Orchestrator = agent under `sdd-execute` SKILL. Phase agent = subagent under `phase-execution-protocol`. Auditor = agent under `audit`. Scope = architecturally cohesive unit from scope graph. scope-type ∈ {infrastructure, contracts, library, product}.
|
|
21
|
+
</Mission>
|
|
22
|
+
</Directive_Context>
|
|
23
|
+
|
|
24
|
+
<Belief_State>
|
|
25
|
+
<Axiom id="AX_DIRECTIVE_MODE">
|
|
26
|
+
**Two modes, auto-detected from intake:**
|
|
27
|
+
- `initial` — first run, `tasks/` absent or empty.
|
|
28
|
+
- `extend-dag` — add tickets for new/refined scope or module or pivot list, without regenerating existing.
|
|
29
|
+
</Axiom>
|
|
30
|
+
|
|
31
|
+
<Axiom id="AX_MODE_AUTO_DETECT_OR_HALT">
|
|
32
|
+
| Condition | Mode |
|
|
33
|
+
|---|---|
|
|
34
|
+
| No `tasks/` OR empty | `initial` |
|
|
35
|
+
| `tasks/` present + intake names new/refined scope or module OR Pivot Invalidation List | `extend-dag` |
|
|
36
|
+
| `tasks/` present + intake unclear | HALT, ask operator |
|
|
37
|
+
</Axiom>
|
|
38
|
+
|
|
39
|
+
<Axiom id="AX_SPEC_IS_SOLE_SOURCE">
|
|
40
|
+
**Phase reads specs only, never code.** Allowed inputs: operator intake; `specs/README.md`; per-scope spec files; per-module spec files; in `extend-dag` — existing `tasks/` artifacts (for max Task-ID + current DAG); rule files at `ai/directives/<category>/<rule>.xml`. No project-wide search (grep / find / ripgrep) outside the listed reads. Spec/code mismatch is resolved by `audit`.
|
|
41
|
+
</Axiom>
|
|
42
|
+
|
|
43
|
+
<Axiom id="AX_SCOPE_GRAPH_DETECTION">
|
|
44
|
+
Detection is driven by `specs/README.md` Scope Graph (Mermaid `graph TD`) and Scopes table. Portal absent → no specs → HALT.
|
|
45
|
+
|
|
46
|
+
From Portal extract:
|
|
47
|
+
- All scope names and their scope-types (from Scopes table).
|
|
48
|
+
- Dependency edges A→B (from Mermaid graph or Scopes table `depends-on`).
|
|
49
|
+
- For each scope with ✅ status, read its spec file at `specs/<scope>/<scope>.spec.md`.
|
|
50
|
+
|
|
51
|
+
Cascade computation requires full scope graph traversal:
|
|
52
|
+
- **Traversed-scopes** for a target scope = all scopes reachable via `depends-on` edges (transitive closure).
|
|
53
|
+
- **Cascade** = union of Effective Rules from traversed-scopes + target-scope rules + (module rules if product/library) + task additions.
|
|
54
|
+
|
|
55
|
+
| Scopes present | Result |
|
|
56
|
+
|---|---|
|
|
57
|
+
| Only infrastructure scopes | scaffold infra tasks only; no module trackers |
|
|
58
|
+
| Mix of product/library + infra/contracts | full project; infra tasks = DAG roots |
|
|
59
|
+
| No scopes at all | HALT: no spec input |
|
|
60
|
+
</Axiom>
|
|
61
|
+
|
|
62
|
+
<Axiom id="AX_EXTEND_DAG_PRESERVES_EXISTING_IDS">
|
|
63
|
+
**In `extend-dag`, existing Task-IDs and ticket files are immutable.**
|
|
64
|
+
|
|
65
|
+
- New tasks get next sequential `TSK-NN` after max existing.
|
|
66
|
+
- Existing tickets are NOT regenerated even if upstream specs changed — that is the orchestrator's reopen scenario via `sdd-execute`, not regeneration.
|
|
67
|
+
- `add-scope` upstream → scaffold only for the new scope.
|
|
68
|
+
- `add-module` or `refine-module` upstream → scaffold only for the new/changed surface; unchanged-surface tickets untouched.
|
|
69
|
+
- Per-scope Cascade Table may update; existing tickets keep their old per-phase `Rules:` lists — orchestrator re-derives on reopen if the operator opts in.
|
|
70
|
+
- DAG edges/IDs preserved; new tasks appended.
|
|
71
|
+
</Axiom>
|
|
72
|
+
|
|
73
|
+
<Axiom id="AX_RULES_RESOLUTION_HARD_FAIL">
|
|
74
|
+
**All rule references must resolve; missing rule = abort.** Sources: scope spec (5 Effective Rules for infra; 4.5 Rules for product/library), module spec (9 Handoff Module Rules Additions), task (operator-supplied at STEP_4). Each ref must exist as `ai/directives/<category>/<rule>.xml`. On miss: abort with explicit list. A placeholder rule reference (TBD, `<rule>`, "to be authored", any unresolved name) = abort, never write a ticket against it.
|
|
75
|
+
</Axiom>
|
|
76
|
+
|
|
77
|
+
<Axiom id="AX_RULES_CASCADE_RESOLUTION">
|
|
78
|
+
**Effective rule-set per task = union of 5 tiers; later tier overrides earlier on collision.**
|
|
79
|
+
|
|
80
|
+
Tier order (low → high):
|
|
81
|
+
1. **traversed-scopes** — union of Effective Rules from all scopes reachable via `depends-on` from target scope (transitive closure).
|
|
82
|
+
2. **target-scope** — scope spec 5 Effective Rules (infra) or 4.5 Rules (product/library).
|
|
83
|
+
3. **module:<name>** — module spec 9 Handoff Module Rules Additions (when modules exist).
|
|
84
|
+
4. **task** — operator-supplied during ticket generation.
|
|
85
|
+
|
|
86
|
+
Materialization:
|
|
87
|
+
- **Cascade Table** (Scope × Categories) lives in `tasks/<scope>/README.md` per scope, NOT in `tasks/README.md`. Generated from scope graph automatically.
|
|
88
|
+
- **Per-phase `Rules:` bullet list** inside each ticket's section 3 Phases block: derived by scaffolder per `AX_RULE_ACTIVATION_PLAN` from cascade × THAT PHASE's Target Files + kind. Rules are NOT declared at ticket level — only per phase.
|
|
89
|
+
- Auditor recomputes effective set per-phase from sources and compares with each phase block.
|
|
90
|
+
</Axiom>
|
|
91
|
+
|
|
92
|
+
<Axiom id="AX_RULE_ACTIVATION_PLAN">
|
|
93
|
+
Rules are resolved per phase, not per ticket. For each phase declared in the ticket's section 2 Phases Overview:
|
|
94
|
+
|
|
95
|
+
1. Read `ai/directives/knowledge.xml` — the canonical rule registry (`<Rules>` section).
|
|
96
|
+
2. From the scope's Project-Wide Rules, extract the candidate rule set for this scope.
|
|
97
|
+
3. For each candidate rule: evaluate its `<Triggers>` and `<SkipWhen>` against THIS PHASE's `Target Files` and phase `kind`. Include the rule only when `<Triggers>` match AND `<SkipWhen>` does not apply. Signal-based only — no hardcoded language/tool knowledge in this directive.
|
|
98
|
+
4. **Transitive closure via `<Depends_On>`.** For each included rule, open its file and read its `<Depends_On>` section (optional; lists rule-file paths this rule architecturally extends). Add every dependency to the phase's Rules set. Recurse until the set stops growing. Cycles → halt `H_RULES_CYCLE`. Missing dependency file → halt `H_MISSING_RULES`. This produces the explicit, fully-resolved set; phase-subagent does NOT walk `<Depends_On>` at runtime.
|
|
99
|
+
5. For each rule in the resolved set:
|
|
100
|
+
- `<File>` → full path to rule file (`ai/directives/<category>/<rule>.xml`); render as Markdown link in the phase's `Rules:` bullet list.
|
|
101
|
+
- `<RequiresVerification>` → collect aliases for ticket-level Verification table (step 7).
|
|
102
|
+
6. Write the phase's `Rules:` bullet list with one `[<rule-id>](<rule-file-path>)` per included rule (direct + transitive, all explicit).
|
|
103
|
+
7. After all phases are processed, collect the union of all `<RequiresVerification>` aliases across all phases of this ticket. Group rules by alias (multiple rules may share `check-command`). Resolve each unique alias from infra-spec Verification Commands.
|
|
104
|
+
- Alias present in spec → use its invocation.
|
|
105
|
+
- Alias absent → halt: H_VERIFICATION_COMMAND_MISSING (alias, ticket ID).
|
|
106
|
+
8. Write ticket section 5 Verification table (ticket-level, single table):
|
|
107
|
+
| Command | Required by |
|
|
108
|
+
One row per unique alias. "Required by" = comma-separated rule IDs that declared it. Phase-subagent runs only the rows whose Required-by intersects with its phase's `Rules`.
|
|
109
|
+
</Axiom>
|
|
110
|
+
|
|
111
|
+
<Axiom id="AX_DAG_AND_TICKET_BOUNDARIES">
|
|
112
|
+
**Topological order, no cycles. Default: minimum tickets — one per coherent spec unit.** Product / library scope → one ticket per module-spec. Infrastructure / contracts scope → one ticket per discrete capability.
|
|
113
|
+
|
|
114
|
+
DAG edges derive from real file-level dependencies, Bootstrap → consumers, and cross-scope `depends-on`. No «logical layer» phases — Ports → Adapters → Integrations is an analysis aid in discovery, NOT a ticket-multiplication rule. A Port and its single confirmed-v1 Adapter co-edit and live in one ticket.
|
|
115
|
+
|
|
116
|
+
**Split one ticket into N only when BOTH conditions hold:**
|
|
117
|
+
- **(P) Parallel sub-process potential** — N phase-subagents dispatched simultaneously; Target Files disjoint across all phases of each ticket; no Deps edge among the N.
|
|
118
|
+
- **(C) Context budget overflow** — combined cascade Rules + Spec References + Target Files exceed comfortable single-context for one phase-subagent's phase.
|
|
119
|
+
|
|
120
|
+
**NOT a reason to split:** audit milestone granularity (audit runs once per ticket regardless of size); logical layering (Port + Adapter ship together); partial shippability (consumer can't pick a half-module); human time-units (hours / days — irrelevant for AI execution bounded by context window).
|
|
121
|
+
|
|
122
|
+
Sequential split (A → B with hard Deps) without (C) = pure overhead: B's phase-subagent re-reads what A's already loaded; zero wall-clock gain.
|
|
123
|
+
|
|
124
|
+
Cross-scope: scope B DONE before A's tasks consuming B's outputs. Bootstrap tickets DONE before non-bootstrap of the same scope.
|
|
125
|
+
</Axiom>
|
|
126
|
+
|
|
127
|
+
<Axiom id="AX_BOOTSTRAP_TICKET_DERIVATION">
|
|
128
|
+
**Bootstrap Requirements rows with Owner=`this-scope-task` aggregate into the minimum number of tickets per `AX_DAG_AND_TICKET_BOUNDARIES`.** Default — group by Resolution affinity (all `package` rows → one «install deps» ticket; all `structural` rows editing the same config file → one ticket); subdivide only when (P) parallel-executable or (C) context overflow. Source: scope spec Bootstrap Requirements (infrastructure 9, contracts 7, library 8, product 8).
|
|
129
|
+
- Rows with Owner=`external-prereq-scope` → cross-scope dependency edge, not a ticket here.
|
|
130
|
+
- Rows with Owner=`operator-action` → noted in tracker index as a blocking external prerequisite, not a ticket.
|
|
131
|
+
- Bootstrap tickets must be DONE before any non-bootstrap ticket of the same scope (e.g. `install package` precedes `wire config that uses package`).
|
|
132
|
+
- Bootstrap tickets carry Verification populated from the Resolution column (e.g. `npm ls <pkg>` exit 0).
|
|
133
|
+
- If Bootstrap Requirements is absent from the spec → abort with `H_BOOTSTRAP_REQUIREMENTS_MISSING` (the spec did not pass discovery STEP_7).
|
|
134
|
+
</Axiom>
|
|
135
|
+
|
|
136
|
+
<Axiom id="AX_TICKET_HAS_BDD_AND_TESTS">
|
|
137
|
+
**Ticket carries BDD scenarios mapped to concrete tests.**
|
|
138
|
+
|
|
139
|
+
- Acceptance Criteria = strict BDD (Given/When/Then) translated from DbC pre/post + Requirements & Constraints + Decision Log. Negative scenarios, fallbacks, trust boundaries, platform limits pulled from spec, not inferred from component name.
|
|
140
|
+
- Each scenario gets a verification level marker: `contract` | `unit` | `integration` | `e2e`.
|
|
141
|
+
- Each scenario maps to `<test-file>::<canonical case name>` in section 6 Test Scenario Coverage, OR explicit `Deferred Test Ownership: <task-id>`.
|
|
142
|
+
- At least one phase of kind `test` MUST exist whose Target Files contains the test file, unless every scenario has `Deferred Test Ownership`.
|
|
143
|
+
- Canonical case names are normative: phase-subagent uses verbatim or updates the ticket before phase DONE.
|
|
144
|
+
- BDD describes behavior, not language-specific syntax.
|
|
145
|
+
- For every DbC contract in Spec References (Port / Adapter / Value Object / branded type / discriminated union): one `contract`-level typing scenario MUST exist — covers input/output shape, branded-type rejection at boundary, union exhaustiveness. `Deferred Test Ownership` not allowed for typing scenarios — they ship with the types.
|
|
146
|
+
</Axiom>
|
|
147
|
+
|
|
148
|
+
<Axiom id="AX_DONE_REQUIRES_EVIDENCE">
|
|
149
|
+
A Round cannot close (`[x] DONE` on the ticket) until ALL of:
|
|
150
|
+
- verification commands executed; result + exit code recorded in Execution Log;
|
|
151
|
+
- every BDD scenario has `<file>::<case>` confirmed OR deferred owner recorded;
|
|
152
|
+
- every entity introduced beyond module Entity Inventory logged as `Introduced <Name> because <reason>`;
|
|
153
|
+
- `Runtime Backing` honestly recorded; `real-runtime` claim without real implementation requires explicit `Deferred Runtime Scope`.
|
|
154
|
+
</Axiom>
|
|
155
|
+
|
|
156
|
+
<Axiom id="AX_TICKET_DEDUPLICATION">
|
|
157
|
+
**Project-wide content lives ONCE in `tasks/README.md`.** Declared there: file-header convention, baseline Completion Rule, Execution Log template, post-task audit hint. Per-scope Cascade Table lives in `tasks/<scope>/README.md`. Per ticket: only task-specific Meta, BDD, Test Scenario Coverage, Completion additions (if any), Execution Log instance (initially empty plan).
|
|
158
|
+
</Axiom>
|
|
159
|
+
|
|
160
|
+
<Axiom id="AX_TASK_ID_UNIQUENESS">
|
|
161
|
+
**`TSK-NN` is project-wide unique, sequential, immutable.**
|
|
162
|
+
|
|
163
|
+
- Before generating a ticket, scan `tasks/**/*.task-*.md` for collisions.
|
|
164
|
+
- ID never changes — even if ticket file moves between scopes.
|
|
165
|
+
- Code references via file headers point to IDs, not paths.
|
|
166
|
+
- Auditor cross-checks via `AX_TASK_ID_INTEGRITY`.
|
|
167
|
+
- Collision = abort; operator resolves.
|
|
168
|
+
</Axiom>
|
|
169
|
+
|
|
170
|
+
<Axiom id="AX_REOPEN_TICKET_FORMAT">
|
|
171
|
+
**Reopens accumulate as appended Rounds in one ticket; never spawn parallel tickets for same scope.**
|
|
172
|
+
|
|
173
|
+
- Meta `Reopens: <count> (<YYYY-MM-DD> — <last reason>)` on a single line; field omitted when 0.
|
|
174
|
+
- Status returns to `[~] IN_PROGRESS`; no separate `REOPENED`.
|
|
175
|
+
- Execution Log structured by `### Round N — <date>, <reason>`, append-only. Old Rounds NEVER edited.
|
|
176
|
+
- Re-runs are governed by `sdd-execute` orchestrator: audit FAIL triggers a `fix`-kind re-run of ONLY the phases whose Target Files contain finding locations. Phases not flagged are NOT re-run.
|
|
177
|
+
</Axiom>
|
|
178
|
+
|
|
179
|
+
<Axiom id="AX_EXECUTION_LOG_PLAN_VS_FACT">
|
|
180
|
+
**Scaffolding writes a MINIMAL skeleton; phase-subagent appends event lines as work happens.**
|
|
181
|
+
|
|
182
|
+
- **SKELETON** for Round 1 = under `### Round 1 — <date>, initial`, one `#### P<N>` block per phase declared in section 2 Phases Overview. Each block contains ONLY the closing lines:
|
|
183
|
+
```
|
|
184
|
+
#### P<N>
|
|
185
|
+
- [ ] `<ts>` ver <cmd from section 5> → <pass|fail> exit=<code>
|
|
186
|
+
- [ ] `<ts>` DONE
|
|
187
|
+
```
|
|
188
|
+
No pre-filled `file` / `test` / `cov` / `rules` / `recon` / `sync` lines — those were noise (duplicated Target Files / section 6 / Rules: list / git diff). Event lines (`intro` / `decision` / `tried` / `discovery` / `insight` / `verified` / `BLOCKED`) are APPENDED by the phase agent only when the event actually happens.
|
|
189
|
+
- **FACT** = the closing `[x]` lines have placeholders replaced with real values; preceding event lines exist only if their event happened.
|
|
190
|
+
- Each phase block ends with `**Handoff →** artifacts: [...]; decisions: [...]; open: [...]` line.
|
|
191
|
+
- Round closes with `#### Round close` block (single `DONE`) emitted by orchestrator after the last phase.
|
|
192
|
+
- **Forbidden**: `[x]` line containing any unreplaced `<…>` literal = fabricated done.
|
|
193
|
+
- Append-only by Rounds.
|
|
194
|
+
|
|
195
|
+
A trivial phase with no surprises has 2 lines (`ver`, `DONE`) + Handoff. A phase with real engineering content (decisions, discoveries, intros) has those lines too — but they earn their place by carrying information that isn't elsewhere.
|
|
196
|
+
</Axiom>
|
|
197
|
+
|
|
198
|
+
<Axiom id="AX_FILE_HEADER_TASK_TRACEABILITY">
|
|
199
|
+
**Files carry a unified file-header contract; IDs only, never paths; append-only for `@tasks`.**
|
|
200
|
+
|
|
201
|
+
Required file-level fields in execution profile:
|
|
202
|
+
- `@file` — mandatory; what the file holds.
|
|
203
|
+
- `@consumers` — mandatory; one or more consumers (see `AX_CONSUMERS_TAG_SEMANTICS`).
|
|
204
|
+
- `@tasks` — mandatory; associated `TSK-NN` list.
|
|
205
|
+
|
|
206
|
+
Canonical header shape:
|
|
207
|
+
```
|
|
208
|
+
// @file: <what the file holds>
|
|
209
|
+
// @consumers: <consumer-1, consumer-2, ...>
|
|
210
|
+
// @tasks: TSK-04, TSK-12
|
|
211
|
+
```
|
|
212
|
+
</Axiom>
|
|
213
|
+
|
|
214
|
+
<Axiom id="AX_CONSUMERS_TAG_SEMANTICS">
|
|
215
|
+
`@consumers:` names the entity (class, function, interface) that depends on this file's primary exports — not a file path, not a folder name. Name MUST match the consuming entity as named in the spec.
|
|
216
|
+
</Axiom>
|
|
217
|
+
|
|
218
|
+
<Axiom id="AX_CROSS_SCOPE_TASK_PLACEMENT">
|
|
219
|
+
Cross-scope integration tasks belong to the scope that **initiates or owns** the integration. If both sides have equal weight, create a dedicated `integration` scope in the Scope Graph and register it in `specs/README.md`. Never scatter pieces of one integration across multiple scope folders. `tasks/_integration/` is deprecated — do not create it.
|
|
220
|
+
</Axiom>
|
|
221
|
+
|
|
222
|
+
<Axiom id="AX_AUDIT_HOOK">
|
|
223
|
+
Round is complete only after `audit` returns PASS. `sdd-execute` orchestrator dispatches audit-subagent automatically after the last phase of a Round closes — operator does not invoke audit manually. `[x] DONE` on the ticket is mechanical close, not verification. Until audit PASS, dependents are blocked.
|
|
224
|
+
</Axiom>
|
|
225
|
+
|
|
226
|
+
<Axiom id="AX_PHASES_DECLARED_IN_HEADER">
|
|
227
|
+
Every ticket declares its work as an ordered list of phases in `## 2. Phases Overview` (compact table) and `## 3. Phases` (block per phase). Phase kinds are a closed vocabulary: `bootstrap | impl | test | config | doc | refactor`. (`fix` is reserved for re-runs at execution time, not for scaffolding.)
|
|
228
|
+
|
|
229
|
+
One phase = one focused unit of work for one subagent. Cross-phase dependencies (`Deps:`) are explicit. The orchestrator dispatches phases sequentially; the phase-subagent reads ONLY its phase's block, its phase's Rules, and prior-phase Handoff payloads.
|
|
230
|
+
|
|
231
|
+
Phase emission rules during scaffolding:
|
|
232
|
+
- Default mapping per Target Files content:
|
|
233
|
+
- production source files (e.g. `*.ts`, `*.py` excluding tests) → `impl` phase.
|
|
234
|
+
- test files (`*.test.*`, `*.spec.*`) → `test` phase, depends on the corresponding `impl`.
|
|
235
|
+
- third-party tool config files (`eslint.config.*`, `vitest.config.*`, `lefthook.yml`, etc.) → `config` phase.
|
|
236
|
+
- markdown docs → `doc` phase.
|
|
237
|
+
- package install + foundational config (from Bootstrap Requirements) → `bootstrap` phase, no Deps.
|
|
238
|
+
- trivial wiring files (module barrel `index.ts`, parent re-export update, single-line type-alias re-export) → NOT a separate ticket and NOT a separate phase. They are added to the `Target Files` of the `impl` phase that creates the symbols they re-export.
|
|
239
|
+
- Each phase carries its own `Rules:` list — subset of cascade-derived rules whose `<Triggers>` apply to its file class.
|
|
240
|
+
- Each phase carries its own `Target Files:` bullet list (NO ticket-level `Target Files` outside phases).
|
|
241
|
+
- Each phase carries `Inputs:` (`none` or list of prior phase IDs whose Handoff it consumes) and `Exit:` (one-line verifiable criterion).
|
|
242
|
+
|
|
243
|
+
Forbidden: emitting a ticket without `## 2. Phases Overview` and `## 3. Phases`; collapsing impl + test into one phase (they have different rule sets and different verification commands); emitting Target Files at ticket level instead of per-phase.
|
|
244
|
+
</Axiom>
|
|
245
|
+
|
|
246
|
+
<Axiom id="AX_SSOT_TRACEABILITY">
|
|
247
|
+
**No contract duplication.** Tickets link to spec sections via Markdown anchors. Module spec for contracts/consumers/invariants; scope spec 4 only for cross-cutting constraints.
|
|
248
|
+
</Axiom>
|
|
249
|
+
|
|
250
|
+
<Axiom id="AX_DIALOGUE_DISCIPLINE">
|
|
251
|
+
- **Phase agreement.** Agent never closes a phase autonomously. Signal `STATUS=READY_TO_ADVANCE`; operator confirms. Emit Phase Progress every round.
|
|
252
|
+
- **Neutral + critical.** Operator asks to merge tasks, skip a test, accept low coverage → surface the risk, demand justification. No auto-agreement.
|
|
253
|
+
- **Confidence explicit.** LOW / MEDIUM / HIGH stated. Under LOW: do not lock the DAG, do not close TASK_GENERATION.
|
|
254
|
+
- **Context budget.** Long dialogues: top-3 questions; compact Phase Progress; do not repeat full DAG when 1–2 edges changed.
|
|
255
|
+
</Axiom>
|
|
256
|
+
|
|
257
|
+
<Axiom id="AX_DECISION_LOG_REQUIRED">
|
|
258
|
+
Non-default scaffolding choices (operator merges 3 tasks into 1, refuses deferred coverage, overrides cascade activation) → `D-NNN` entry in `tasks/README.md` Decision Log with rationale.
|
|
259
|
+
</Axiom>
|
|
260
|
+
|
|
261
|
+
<Axiom id="AX_OPERATOR_LANGUAGE">
|
|
262
|
+
**Directive prose (axioms, halt names, step procedures, contract identifiers, structural section headings) — English.**
|
|
263
|
+
**Operator-facing artifact prose and operator-facing messages — Russian.** Russian applies to:
|
|
264
|
+
- Ticket body text (Purpose, Description, BDD scenario content after `Given` / `When` / `Then`, Decision Log `Why` / `Risk`).
|
|
265
|
+
- README content (Decision Log entries, Notes, descriptions).
|
|
266
|
+
- Halt messages emitted to the operator.
|
|
267
|
+
- Phase Progress free-text fields.
|
|
268
|
+
|
|
269
|
+
English regardless of context: code paths, file names, axiom IDs (`AX_*`), Trace anchors, IDs (`TSK-NN` / `D-NNN` / `H_*`), severity / status tokens (`TODO` / `IN_PROGRESS` / `DONE` / `BLOCKED`), BDD keywords, verification-level tokens, runtime-backing tokens, structural section headings, field labels.
|
|
270
|
+
</Axiom>
|
|
271
|
+
|
|
272
|
+
<Axiom id="AX_STATELESS_ARTIFACT">
|
|
273
|
+
All DAG decisions, links, BDD, completion rules baked into Markdown. Downstream sessions start with no scaffolding history.
|
|
274
|
+
</Axiom>
|
|
275
|
+
|
|
276
|
+
<Axiom id="AX_TICKET_SECTION_NAMES_NORMATIVE">
|
|
277
|
+
Ticket sections are wrapped with `<!--SECTION:UPPER_SNAKE-->…<!--/SECTION:UPPER_SNAKE-->` markers (grammar: `extract-section.sh`). **Anchor names in `TASK_TICKET_STRUCTURE` are normative, NOT illustrative** — orchestrator (`sdd-execute`) and auditor query them by exact string (`extract <ticket> PHASE_P<N>`, `META`, `EXECUTION_LOG`, …). Renaming or omitting a templated anchor breaks programmatic dispatch. Each `### P<N>` phase block under `## 3. Phases` gets its own anchor (`PHASE_P1`, `PHASE_P2`, …); the `## 3. Phases` container itself is NOT wrapped — extraction is per-phase.
|
|
278
|
+
</Axiom>
|
|
279
|
+
</Belief_State>
|
|
280
|
+
|
|
281
|
+
<Golden_Example>
|
|
282
|
+
Concrete ticket — `tasks/backend/payments/payments.task-04.md`. **Pattern: one module-spec → one ticket.** Port + Adapter + Value Objects + module barrel co-edit and travel together. Phases inside the ticket separate `impl` vs `test` cascades. Names of rules in the Activation Plan are project-specific (driven by cascade); the directive itself is language-agnostic.
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
# Task: TSK-04 — Implement payments module
|
|
286
|
+
|
|
287
|
+
## 1. Meta
|
|
288
|
+
- **Task-ID:** TSK-04
|
|
289
|
+
- **Status:** [ ] TODO
|
|
290
|
+
- **Purpose:** Реализовать модуль `payments` целиком: `PaymentGatewayPort` + `StripePaymentAdapter` + `PaymentRequest`/`TransactionId` Value Objects + module barrel; покрыть unit + integration тестами.
|
|
291
|
+
- **Scope:** `backend`
|
|
292
|
+
- **Module:** `payments`
|
|
293
|
+
- **Dependencies:** TSK-01, TSK-03
|
|
294
|
+
- **Spec References:**
|
|
295
|
+
- Module spec: [payments](../../../specs/backend/payments/payments.spec.md)
|
|
296
|
+
- Contract: [`PaymentGatewayPort`](../../../specs/backend/payments/payments.spec.md#paymentgatewayport)
|
|
297
|
+
- Adapter: [`StripePaymentAdapter`](../../../specs/backend/payments/payments.spec.md#stripepaymentadapter)
|
|
298
|
+
- Consumer: [`OrderProcessor`](../../../specs/backend/orders/orders.spec.md#orderprocessor)
|
|
299
|
+
- **Runtime Backing:** `real-runtime`
|
|
300
|
+
- **Verification Levels:** `unit`, `integration`
|
|
301
|
+
- **Deferred Runtime Scope:** None
|
|
302
|
+
|
|
303
|
+
## 2. Phases Overview
|
|
304
|
+
| ID | Kind | Deps | Status |
|
|
305
|
+
|----|------|------|--------|
|
|
306
|
+
| P1 | impl | — | [ ] |
|
|
307
|
+
| P2 | test | P1 | [ ] |
|
|
308
|
+
|
|
309
|
+
## 3. Phases
|
|
310
|
+
|
|
311
|
+
### P1 — impl
|
|
312
|
+
- **Objective:** реализовать Port + Adapter + Value Objects + module barrel в одной impl-фазе (один phase-subagent context).
|
|
313
|
+
- **Rules:**
|
|
314
|
+
- [typescript-rules](../../../ai/directives/coding/typescript-rules.xml)
|
|
315
|
+
- [ports-adapters](../../../ai/directives/architecture/ports-adapters.xml)
|
|
316
|
+
- **Target Files:**
|
|
317
|
+
- `src/payments/ports/payment-gateway-port.ts`
|
|
318
|
+
- `src/payments/value-objects/payment-request.ts`
|
|
319
|
+
- `src/payments/value-objects/transaction-id.ts`
|
|
320
|
+
- `src/payments/adapters/stripe-payment-adapter.ts`
|
|
321
|
+
- `src/payments/index.ts` <!-- trivial wiring lives here, not a separate phase -->
|
|
322
|
+
- **Inputs:** none
|
|
323
|
+
- **Exit:** typecheck pass; ports-adapters compliance; intro-discipline honored; `import { PaymentGatewayPort } from '@/payments'` resolves through module barrel.
|
|
324
|
+
|
|
325
|
+
### P2 — test
|
|
326
|
+
- **Objective:** unit + integration tests против контракта `PaymentGatewayPort` и `StripePaymentAdapter`.
|
|
327
|
+
- **Rules:**
|
|
328
|
+
- [node-test](../../../ai/directives/testing/node-test.xml)
|
|
329
|
+
- **Target Files:**
|
|
330
|
+
- `src/payments/adapters/stripe-payment-adapter.test.ts`
|
|
331
|
+
- `src/payments/ports/payment-gateway-port.contract.test.ts`
|
|
332
|
+
- **Inputs:** P1 handoff
|
|
333
|
+
- **Exit:** все BDD-сценарии из section 4 покрыты; tests pass
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Anti-pattern (forbidden):** splitting this into `TSK-04 Port + VOs`, `TSK-05 Adapter`, `TSK-06 module barrel`. Sequential split (each depends on prior) without (C) context overflow = pure sub-process overhead per `AX_DAG_AND_TICKET_BOUNDARIES`.
|
|
337
|
+
</Golden_Example>
|
|
338
|
+
|
|
339
|
+
<Halt_Conditions>
|
|
340
|
+
| 🛑 ID | Trigger |
|
|
341
|
+
|---|---|
|
|
342
|
+
| `H_NO_SPECS` | No specs/README.md or no scope specs found |
|
|
343
|
+
| `H_AMBIGUOUS_MODE` | `tasks/` present + intake unclear |
|
|
344
|
+
| `H_INCOMPLETE_SCOPE_SPEC` | Scope spec present but Discovery/required sections incomplete |
|
|
345
|
+
| `H_MISSING_RULES` | Any cascade source OR transitive `<Depends_On>` references a missing rule file |
|
|
346
|
+
| `H_RULES_CYCLE` | Transitive `<Depends_On>` closure encounters a cycle between rule files |
|
|
347
|
+
| `H_ID_COLLISION` | Generated `TSK-NN` collides with existing |
|
|
348
|
+
| `H_OPERATOR_REJECT` | Operator refuses Cascade Table / DAG / batch / final review |
|
|
349
|
+
| `H_LOW_CONFIDENCE` | Confidence LOW at DAG or task generation |
|
|
350
|
+
| `H_VERIFICATION_COMMAND_MISSING` | RequiresVerification alias not found in infra-spec Verification Commands |
|
|
351
|
+
| `H_BOOTSTRAP_REQUIREMENTS_MISSING` | Scope spec lacks Bootstrap Requirements section (spec did not pass discovery STEP_7) |
|
|
352
|
+
| `H_TYPING_SCENARIO_MISSING` | A contract in Spec References has no `contract`-level typing scenario in section 4 per `AX_TICKET_HAS_BDD_AND_TESTS` |
|
|
353
|
+
</Halt_Conditions>
|
|
354
|
+
|
|
355
|
+
<Execution_Plan>
|
|
356
|
+
<Step id="STEP_0_INTAKE">
|
|
357
|
+
<Goal>Read Specs Portal → detect scopes and graph (`AX_SCOPE_GRAPH_DETECTION`) → detect mode (`AX_MODE_AUTO_DETECT_OR_HALT`).</Goal>
|
|
358
|
+
<Action>
|
|
359
|
+
1. Emit TRACE_HEADER (STACK `ROOT__INTAKE`).
|
|
360
|
+
2. **Read `specs/README.md` Scope Graph as canonical entry point.** Portal absent → `H_NO_SPECS`. From Portal extract: all scope names + types + depends-on edges (Mermaid graph + Scopes table).
|
|
361
|
+
3. For each scope with ✅ status, read `specs/<scope>/<scope>.spec.md`.
|
|
362
|
+
4. For each product/library scope with 8 Module Map, read module specs.
|
|
363
|
+
5. Scope graph detection per `AX_SCOPE_GRAPH_DETECTION`. All absent → `H_NO_SPECS`.
|
|
364
|
+
6. Mode detection per `AX_MODE_AUTO_DETECT_OR_HALT`. On `H_AMBIGUOUS_MODE` halt with operator question.
|
|
365
|
+
7. In `extend-dag`: read existing `tasks/README.md`, per-scope READMEs, ticket files; capture max `TSK-NN` and current DAG.
|
|
366
|
+
8. Proceed to STEP_1.
|
|
367
|
+
</Action>
|
|
368
|
+
</Step>
|
|
369
|
+
|
|
370
|
+
<Step id="STEP_1_STACK_RESOLUTION">
|
|
371
|
+
<Goal>Load rule registry. Verify all rule references resolve. Build per-scope Cascade Tables. Operator approval.</Goal>
|
|
372
|
+
<Action>
|
|
373
|
+
1. TRACE_HEADER (STACK `ROOT__STACK_RESOLUTION`).
|
|
374
|
+
2. **Read `ai/directives/knowledge.xml` in full.** This is the canonical rule registry — contains `<Triggers>`, `<SkipWhen>`, `<ActivationHint>`, `<RequiresVerification>` for every rule. Required before verifying refs and before building per-phase Rules lists in STEP_4. Read it now — do not defer.
|
|
375
|
+
3. For each scope: traverse depends-on edges (transitive closure) to compute traversed-scopes. Collect rule refs from all traversed-scopes + target-scope + modules (task-tier added in STEP_3).
|
|
376
|
+
4. For each ref, verify file existence under `ai/directives/<category>/<rule>.xml`. Any miss → `H_MISSING_RULES` (abort with explicit list).
|
|
377
|
+
5. Build per-scope Cascade Tables (Scope × Categories matrix; tier rows from graph).
|
|
378
|
+
6. Phase Progress + Approval Check. STOP.
|
|
379
|
+
</Action>
|
|
380
|
+
</Step>
|
|
381
|
+
|
|
382
|
+
<Step id="STEP_2_DAG">
|
|
383
|
+
<Goal>Build acyclic task DAG in topological implementation order.</Goal>
|
|
384
|
+
<Action>
|
|
385
|
+
1. TRACE_HEADER (STACK `ROOT__DAG`).
|
|
386
|
+
2. **Read Bootstrap Requirements of each in-scope spec.** Section missing in any spec being scaffolded → `H_BOOTSTRAP_REQUIREMENTS_MISSING` (spec did not pass discovery STEP_7; abort with the offending scope name). For each row:
|
|
387
|
+
- Owner=`this-scope-task` → produce a Phase 0 ticket per `AX_BOOTSTRAP_TICKET_DERIVATION` (`bootstrap-<kind>-<short-name>`); Verification populated from Resolution column.
|
|
388
|
+
- Owner=`external-prereq-scope` → add cross-scope dependency edge (already declared in Scope Dependencies; verify consistency).
|
|
389
|
+
- Owner=`operator-action` → record in tracker index as an external prerequisite blocking Phase 0.
|
|
390
|
+
3. Analyze Entity Inventory + Contracts + Inter-Module Dependencies per module spec. Cross-scope dependencies from scope graph edges.
|
|
391
|
+
4. Form post-bootstrap tickets per `AX_DAG_AND_TICKET_BOUNDARIES` (default: one per coherent spec unit — one ticket per module-spec for product/library; one ticket per discrete capability for infra/contracts). Subdivide only when (P) parallel-executable or (C) context overflow. Assign sequential `TSK-NN` (project-wide; bootstrap tickets numbered first).
|
|
392
|
+
5. Check: no cycles; no context-overflow tickets per (C); no missing prerequisites; every non-bootstrap ticket depends (transitively) on all bootstrap tickets of the same scope.
|
|
393
|
+
5. Phase Progress + Approval Check (Mermaid graph). STOP.
|
|
394
|
+
</Action>
|
|
395
|
+
</Step>
|
|
396
|
+
|
|
397
|
+
<Step id="STEP_3_INDEX_GENERATION">
|
|
398
|
+
<Goal>Write project tracker + per-scope trackers per TASKS_README_STRUCTURE + SCOPE_TASKS_README_STRUCTURE.</Goal>
|
|
399
|
+
<Action>
|
|
400
|
+
1. TRACE_HEADER (STACK `ROOT__INDEX_GENERATION`).
|
|
401
|
+
2. Write `tasks/README.md` per `TASKS_README_STRUCTURE`. Project-Wide Conventions declared ONCE here per `AX_TICKET_DEDUPLICATION`. No Cascade Table here.
|
|
402
|
+
3. Per scope: write `tasks/<scope>/README.md` per `SCOPE_TASKS_README_STRUCTURE` with per-scope Cascade Table.
|
|
403
|
+
4. If cross-scope integrations exist: create a dedicated `integration` scope entry in `specs/README.md` and write `tasks/integration/README.md`.
|
|
404
|
+
5. Phase Progress + Approval Check. STOP.
|
|
405
|
+
</Action>
|
|
406
|
+
</Step>
|
|
407
|
+
|
|
408
|
+
<Step id="STEP_4_TASK_GENERATION">
|
|
409
|
+
<Goal>Emit each ticket per `TASK_TICKET_STRUCTURE`. Project-wide content NOT duplicated.</Goal>
|
|
410
|
+
<Action>
|
|
411
|
+
For each task:
|
|
412
|
+
1. TRACE_HEADER (STACK `ROOT__TASK_GENERATION__<TASK_ID>`).
|
|
413
|
+
2. Verify ID uniqueness per `AX_TASK_ID_UNIQUENESS`. Collision → `H_ID_COLLISION`.
|
|
414
|
+
3. Decompose into phases per `AX_PHASES_DECLARED_IN_HEADER`. Compute scope-level cascade per `AX_RULES_CASCADE_RESOLUTION`; for each phase, derive `Rules:` list per `AX_RULE_ACTIVATION_PLAN` (per-phase filtering by Target Files + kind).
|
|
415
|
+
4. Determine ticket path:
|
|
416
|
+
- Scope-level task: `tasks/<scope>/<scope>.task-NN.md`.
|
|
417
|
+
- Module-level task: `tasks/<scope>/<module>/<module>.task-NN.md`.
|
|
418
|
+
- Cross-scope integration: `tasks/integration/<label>.task-NN.md`.
|
|
419
|
+
5. Draft section 4 BDD per `AX_TICKET_HAS_BDD_AND_TESTS`, including the mandatory `contract`-level typing scenario for each DbC contract in Spec References.
|
|
420
|
+
6. **BDD review pass — isolated subagent.** Dispatch ONE general-purpose subagent with clean context; inputs = module spec slice + contract anchors + Requirements & Constraints + draft section 4 only; question = «какие negative / corner / trust-boundary / failure-mode сценарии отсутствуют?». Merge approved candidates into section 4 + section 6; append the full reviewed checklist (merged / rejected with reason) to section 8 Decision Log. Out-of-scope proposals (new entities / phases / contracts) → rejected, surfaced to operator at STEP_5.
|
|
421
|
+
7. Validate every contract in Spec References has its typing scenario mapped to a real test file under a `test` phase of THIS ticket. Missing → `H_TYPING_SCENARIO_MISSING` (name offending contract).
|
|
422
|
+
8. Write ticket per `TASK_TICKET_STRUCTURE`.
|
|
423
|
+
9. Pre-fill section 7 Execution Log as PLAN per `AX_EXECUTION_LOG_PLAN_VS_FACT` — one `#### P<N>` block per phase declared in section 2 Phases Overview.
|
|
424
|
+
10. Phase Progress per batch + Approval Check. STOP.
|
|
425
|
+
</Action>
|
|
426
|
+
</Step>
|
|
427
|
+
|
|
428
|
+
<Step id="STEP_5_REVIEW">
|
|
429
|
+
<Goal>Final operator agreement.</Goal>
|
|
430
|
+
<Action>
|
|
431
|
+
TRACE_HEADER (STACK `ROOT__REVIEW`). List created files with traceability links. Approval Check. STOP.
|
|
432
|
+
</Action>
|
|
433
|
+
</Step>
|
|
434
|
+
</Execution_Plan>
|
|
435
|
+
|
|
436
|
+
<Frame_Rules>
|
|
437
|
+
<Rule id="FRAME_PUSH_WHEN">Open nested frame on disputes about granularity, order, BDD scenarios, deferred coverage, per-task detail.</Rule>
|
|
438
|
+
<Rule id="FRAME_POP_WHEN">Close on confirmed conclusion, deferred status, or when local discussion cannot advance.</Rule>
|
|
439
|
+
<Rule id="FRAME_STATUS_VALUES">OPEN | BLOCKED | READY_TO_RETURN | READY_TO_ADVANCE | DEFERRED.</Rule>
|
|
440
|
+
</Frame_Rules>
|
|
441
|
+
|
|
442
|
+
<Output_Contracts>
|
|
443
|
+
<Contract id="TRACE_HEADER_FORMAT">
|
|
444
|
+
```text
|
|
445
|
+
📋 TS_R<N> | STACK: ROOT__<FRAME>__<SUBFRAME> | FRAME: F_<KEY>_R<N> | <📂|🚧|↩️|⏭️|💤> <STATUS> | CONF: <LOW|MEDIUM|HIGH>
|
|
446
|
+
🎯 GOAL: <local goal>
|
|
447
|
+
⏭️ EXIT: <exit condition>
|
|
448
|
+
```
|
|
449
|
+
</Contract>
|
|
450
|
+
|
|
451
|
+
<Contract id="PHASE_PROGRESS_FORMAT">
|
|
452
|
+
```markdown
|
|
453
|
+
🎯 Phase Progress — <STEP_NAME>
|
|
454
|
+
✅ Closed: <agreed>
|
|
455
|
+
⏳ Open: <under discussion>
|
|
456
|
+
🛑 Blocking: <if any, else —>
|
|
457
|
+
▶️ Next: <proposal>
|
|
458
|
+
📊 Counters: <e.g. "DAG: 18 tasks across 3 scopes; 14/18 tickets generated">
|
|
459
|
+
```
|
|
460
|
+
</Contract>
|
|
461
|
+
|
|
462
|
+
<Contract id="TASK_TICKET_STRUCTURE">
|
|
463
|
+
Anchor names in this template are normative per `AX_TICKET_SECTION_NAMES_NORMATIVE`. Project-wide content (file-header rule, baseline Completion Rule, Execution Log protocol, audit hint) lives in `tasks/README.md` per `AX_TICKET_DEDUPLICATION` — NOT duplicated here.
|
|
464
|
+
|
|
465
|
+
```markdown
|
|
466
|
+
# Task: <Task-ID> — <Task Title>
|
|
467
|
+
|
|
468
|
+
<!--SECTION:META-->
|
|
469
|
+
## 1. Meta
|
|
470
|
+
- **Task-ID:** <TSK-NN>
|
|
471
|
+
- **Status:** [ ] TODO <!-- [ ] TODO | [~] IN_PROGRESS | [x] DONE | [!] BLOCKED -->
|
|
472
|
+
- **Purpose:** <semantic goal one-liner>
|
|
473
|
+
- **Scope:** <scope-name>
|
|
474
|
+
- **Module:** <module-name or N/A>
|
|
475
|
+
- **Dependencies:** <comma-separated Task-IDs or None>
|
|
476
|
+
- **Reopens:** <count> (<YYYY-MM-DD> — <last reason>) <!-- omit when 0 -->
|
|
477
|
+
- **Spec References:**
|
|
478
|
+
- Contract: [<ContractName>](<spec anchor>)
|
|
479
|
+
- Consumer: [<ConsumerName>](<spec anchor>)
|
|
480
|
+
- Constraints (if applicable): [<ScopeSpec section 4>](<path>)
|
|
481
|
+
- **Runtime Backing:** `not-implemented` | `simulation` | `real-runtime`
|
|
482
|
+
- **Verification Levels:** subset of `contract` | `unit` | `integration` | `e2e`
|
|
483
|
+
- **Deferred Runtime Scope:** None | <description>
|
|
484
|
+
<!--/SECTION:META-->
|
|
485
|
+
|
|
486
|
+
<!--SECTION:PHASES_OVERVIEW-->
|
|
487
|
+
## 2. Phases Overview
|
|
488
|
+
| ID | Kind | Deps | Status |
|
|
489
|
+
|----|----------|------|--------|
|
|
490
|
+
| P1 | <kind> | — | [ ] |
|
|
491
|
+
| P2 | <kind> | P1 | [ ] |
|
|
492
|
+
|
|
493
|
+
<!-- Status set per phase by phase-subagent at end of phase. Orchestrator reads this table for planning. -->
|
|
494
|
+
<!--/SECTION:PHASES_OVERVIEW-->
|
|
495
|
+
|
|
496
|
+
## 3. Phases
|
|
497
|
+
|
|
498
|
+
<!--SECTION:PHASE_P1-->
|
|
499
|
+
### P1 — <kind>
|
|
500
|
+
- **Objective:** <one-line description>
|
|
501
|
+
- **Rules:**
|
|
502
|
+
- [ai/directives/<category>/<rule>.xml](<relative-path>)
|
|
503
|
+
- [ai/directives/<category>/<rule>.xml](<relative-path>)
|
|
504
|
+
- **Target Files:**
|
|
505
|
+
- <path>
|
|
506
|
+
- <path>
|
|
507
|
+
- **Inputs:** none <!-- or "P0 handoff" / "P0, P1 handoffs" -->
|
|
508
|
+
- **Exit:** <verifiable criterion, e.g. "typecheck pass; ports-adapters compliance">
|
|
509
|
+
<!--/SECTION:PHASE_P1-->
|
|
510
|
+
|
|
511
|
+
<!--SECTION:PHASE_P2-->
|
|
512
|
+
### P2 — <kind>
|
|
513
|
+
- **Objective:** <one-line>
|
|
514
|
+
- **Rules:**
|
|
515
|
+
- [ai/directives/<category>/<rule>.xml](<relative-path>)
|
|
516
|
+
- **Target Files:**
|
|
517
|
+
- <path>
|
|
518
|
+
- **Inputs:** P1 handoff
|
|
519
|
+
- **Exit:** <verifiable criterion>
|
|
520
|
+
<!--/SECTION:PHASE_P2-->
|
|
521
|
+
|
|
522
|
+
<!--SECTION:BDD-->
|
|
523
|
+
## 4. Acceptance Criteria (BDD)
|
|
524
|
+
Contract: see Spec References.
|
|
525
|
+
|
|
526
|
+
**Feature:** <component behavior>
|
|
527
|
+
|
|
528
|
+
**Scenario:** <name> [`<verification level>`]
|
|
529
|
+
- **Given** <precondition>
|
|
530
|
+
- **When** <command/query>
|
|
531
|
+
- **Then** <postcondition>
|
|
532
|
+
- **And** <side effect>
|
|
533
|
+
<!--/SECTION:BDD-->
|
|
534
|
+
|
|
535
|
+
<!--SECTION:VERIFICATION-->
|
|
536
|
+
## 5. Verification
|
|
537
|
+
| Command | Required by |
|
|
538
|
+
|---------|-------------|
|
|
539
|
+
| <resolved invocation> | <rule-id>, <rule-id> |
|
|
540
|
+
|
|
541
|
+
<!-- One row per unique Verification Commands alias from infra-spec. Multiple rules
|
|
542
|
+
sharing check-command produce a single row. Phase-subagent runs only the rows
|
|
543
|
+
whose Required-by overlaps with its phase's Rules list. -->
|
|
544
|
+
|
|
545
|
+
- **Task-specific Completion additions:** <list or "none beyond project baseline">
|
|
546
|
+
<!--/SECTION:VERIFICATION-->
|
|
547
|
+
|
|
548
|
+
<!--SECTION:TEST_COVERAGE-->
|
|
549
|
+
## 6. Test Scenario Coverage
|
|
550
|
+
- Scenario <name> → `<test-file>` :: `<canonical case name>`
|
|
551
|
+
<!--/SECTION:TEST_COVERAGE-->
|
|
552
|
+
|
|
553
|
+
<!--SECTION:EXECUTION_LOG-->
|
|
554
|
+
## 7. Execution Log
|
|
555
|
+
*(Round = one execute-then-audit attempt. Per-phase blocks within a Round. Skeleton is minimal — event lines (`intro` / `decision` / `tried` / `discovery` / `insight` / `BLOCKED`) appear ONLY when the event happens. Token vocabulary in [tasks/README.md#execution-log-template](../../README.md#execution-log-template).)*
|
|
556
|
+
|
|
557
|
+
### Round 1 — <YYYY-MM-DD>, initial
|
|
558
|
+
<!-- Skeleton pre-filled: only the closing ver + DONE lines per phase. Phase agent
|
|
559
|
+
prepends event lines as decisions/discoveries/intros/problems actually happen. -->
|
|
560
|
+
|
|
561
|
+
#### P1
|
|
562
|
+
- [ ] `<ts>` ver `<cmd>` → `<pass|fail>` exit=`<code>`
|
|
563
|
+
- [ ] `<ts>` DONE
|
|
564
|
+
**Handoff →** artifacts: [...]; decisions: [...]; open: [...]
|
|
565
|
+
|
|
566
|
+
#### P2
|
|
567
|
+
- [ ] `<ts>` ver `<cmd>` → `<pass|fail>` exit=`<code>`
|
|
568
|
+
- [ ] `<ts>` DONE
|
|
569
|
+
**Handoff →** artifacts: [...]; decisions: [...]; open: [...]
|
|
570
|
+
|
|
571
|
+
<!-- After last phase, orchestrator appends Round close: -->
|
|
572
|
+
#### Round close
|
|
573
|
+
- [ ] `<ts>` DONE
|
|
574
|
+
<!--/SECTION:EXECUTION_LOG-->
|
|
575
|
+
|
|
576
|
+
<!-- AUDIT_ROUNDS section appended ONLY after first reopen-triggering audit, per audit AX_REOPEN_ROUNDS_IN_TICKET. Anchor format: -->
|
|
577
|
+
<!-- <!--SECTION:AUDIT_ROUNDS--> -->
|
|
578
|
+
<!-- ## Audit Rounds -->
|
|
579
|
+
<!-- …(per TICKET_AUDIT_ROUND_FORMAT in audit.directive.xml) -->
|
|
580
|
+
<!-- <!--/SECTION:AUDIT_ROUNDS--> -->
|
|
581
|
+
```
|
|
582
|
+
</Contract>
|
|
583
|
+
|
|
584
|
+
<Contract id="TASKS_README_STRUCTURE">
|
|
585
|
+
Project-level tracker. High-level DAG = cross-scope edges only; intra-scope edges live in scope READMEs. No Cascade Table here.
|
|
586
|
+
|
|
587
|
+
```markdown
|
|
588
|
+
# Project Tasks
|
|
589
|
+
|
|
590
|
+
## Entry Points
|
|
591
|
+
- [Specs Portal](../specs/README.md) — Scope Graph + all scope specs.
|
|
592
|
+
- Tickets are executed ONLY via `sdd-execute` SKILL (single ticket) or `sdd-execute-batch` SKILL (queue). The orchestrator dispatches phase-subagents per ticket's Phases Overview, then `sdd-audit` automatically — operator does not invoke audit manually.
|
|
593
|
+
|
|
594
|
+
## Project-Wide Conventions
|
|
595
|
+
|
|
596
|
+
### File-header Convention
|
|
597
|
+
Per `AX_FILE_HEADER_TASK_TRACEABILITY` — canonical format, rules, and lang-agnostic note defined there.
|
|
598
|
+
|
|
599
|
+
### Completion Rule (baseline)
|
|
600
|
+
A task cannot transition to `[x] DONE` until ALL of (per `AX_DONE_REQUIRES_EVIDENCE`):
|
|
601
|
+
1. Every phase declared in section 2 Phases Overview has Status `[x]`.
|
|
602
|
+
2. Every BDD scenario mapped to test ownership in section 6 OR has `Deferred Test Ownership: <task-id>`.
|
|
603
|
+
3. Verification commands relevant to each phase executed; results + exit codes recorded in that phase's Execution Log block.
|
|
604
|
+
4. Canonical case names match real test cases or ticket updated.
|
|
605
|
+
5. `Deferred Runtime Scope` recorded if applicable.
|
|
606
|
+
6. Every introduced-beyond-Inventory entity logged as `<ts> intro <Name> ← <reason>` in the relevant phase block.
|
|
607
|
+
7. Every phase block ends with a typed **Handoff →** line.
|
|
608
|
+
|
|
609
|
+
Task-specific additions live in each ticket's section 5.
|
|
610
|
+
|
|
611
|
+
### Execution Log Template
|
|
612
|
+
Canonical token vocabulary (single source of truth; phase-protocol and audit reference this table, do not redefine):
|
|
613
|
+
|
|
614
|
+
| Token | Tail | Mandatory when |
|
|
615
|
+
|---|---|---|
|
|
616
|
+
| `intro` | `<Entity> ← <reason>` | new entity appears in code beyond module Entity Inventory |
|
|
617
|
+
| `decision` | `<key>=<value> ← <reason>` | typed choice that affected output |
|
|
618
|
+
| `tried` | `<approach> → <result>` | approach attempted then abandoned (failed path worth recording) |
|
|
619
|
+
| `discovery` | `<fact>` | reality diverged from spec / assumption |
|
|
620
|
+
| `insight` | `<observation> → <spec-section>, <change>` | spec gap detected |
|
|
621
|
+
| `verified` | `<tool>@<version> <summary>` | `config` kind: third-party API confirmed |
|
|
622
|
+
| `ver` | `<cmd> → pass|fail exit=<N>` | once per phase, closing run (always present) |
|
|
623
|
+
| `BLOCKED` | `<cause>` | phase ended `[!] BLOCKED` |
|
|
624
|
+
| `DONE` | (no tail) | terminal line of phase or Round close (always present) |
|
|
625
|
+
|
|
626
|
+
Round structure:
|
|
627
|
+
```markdown
|
|
628
|
+
### Round <N> — <YYYY-MM-DD>, <reason>
|
|
629
|
+
|
|
630
|
+
#### P1
|
|
631
|
+
<!-- event lines (0+, from the table above) appended as events happen -->
|
|
632
|
+
- [x] `<ts>` ver <cmd> → pass exit=0
|
|
633
|
+
- [x] `<ts>` DONE
|
|
634
|
+
**Handoff →** artifacts: [...]; decisions: [...]; open: [...]
|
|
635
|
+
|
|
636
|
+
#### Round close
|
|
637
|
+
- [x] `<ts>` DONE
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
Trivial phase with no events → 2 lines (`ver` + `DONE`) + Handoff. Padding with empty lines is forbidden.
|
|
641
|
+
|
|
642
|
+
⛔ `[x]` line with any unreplaced `<…>` literal = fabricated done → `EXECUTION_LOG_INCOMPLETE` (BLOCKER).
|
|
643
|
+
|
|
644
|
+
### Post-task Hook
|
|
645
|
+
Per `AX_AUDIT_HOOK`. After last phase of a Round closes, the orchestrator dispatches `sdd-audit`. Until audit returns PASS, Round is closed-but-unverified and dependents are blocked.
|
|
646
|
+
|
|
647
|
+
## High-Level DAG
|
|
648
|
+
Cross-scope edges + integration tickets only. Intra-scope DAGs live in per-scope READMEs.
|
|
649
|
+
|
|
650
|
+
```mermaid
|
|
651
|
+
graph TD
|
|
652
|
+
backend --> infra-base
|
|
653
|
+
web --> infra-base
|
|
654
|
+
web --> backend
|
|
655
|
+
TSK-13[Cross-scope integration] -.-> web
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
## Tracker Index
|
|
659
|
+
| Scope | Type | Tracker | Tasks | Done |
|
|
660
|
+
|---|---|---|---|---|
|
|
661
|
+
| infra-base | infrastructure | [README](infra-base/README.md) | 6 | 0/6 |
|
|
662
|
+
| api-contracts | contracts | [README](api-contracts/README.md) | 2 | 0/2 |
|
|
663
|
+
| backend | product | [README](backend/README.md) | 12 | 0/12 |
|
|
664
|
+
| web | product | [README](web/README.md) | 8 | 0/8 |
|
|
665
|
+
| integration | integration | [README](integration/README.md) | 1 | 0/1 |
|
|
666
|
+
|
|
667
|
+
## Decision Log (task-scaffolding-level)
|
|
668
|
+
[D-NNN entries when operator made non-default choices.]
|
|
669
|
+
```
|
|
670
|
+
</Contract>
|
|
671
|
+
|
|
672
|
+
<Contract id="SCOPE_TASKS_README_STRUCTURE">
|
|
673
|
+
Per-scope tracker at `tasks/<scope>/README.md`. Contains Cascade Table (derived from scope graph) + intra-scope DAG + Tracker.
|
|
674
|
+
|
|
675
|
+
```markdown
|
|
676
|
+
# Tasks: <scope-name>
|
|
677
|
+
|
|
678
|
+
## Scope Spec
|
|
679
|
+
- [Scope spec](../../specs/<scope>/<scope>.spec.md)
|
|
680
|
+
|
|
681
|
+
## Cascade Table
|
|
682
|
+
Effective rules for tasks in this scope. Derived from scope graph (depends-on transitive closure).
|
|
683
|
+
|
|
684
|
+
Tier order (low → high priority on collision): `traversed-scopes` → `target-scope` → `module:<name>` → `task`.
|
|
685
|
+
|
|
686
|
+
| Tier | coding | testing | architecture | infra |
|
|
687
|
+
|------|--------|---------|--------------|-------|
|
|
688
|
+
| infra-base (traversed) | typescript-rules | vitest-rules | | eslint-setup, git-setup, nodejs-npm-setup |
|
|
689
|
+
| api-contracts (traversed) | | | | |
|
|
690
|
+
| <scope-name> (target) | | | ports-adapters | |
|
|
691
|
+
| module:payments | | node-test | | |
|
|
692
|
+
|
|
693
|
+
### Rule Sources
|
|
694
|
+
- Traversed scopes: [scope graph](../../specs/README.md)
|
|
695
|
+
- Target scope: [<scope> spec 5/4.5](../../specs/<scope>/<scope>.spec.md)
|
|
696
|
+
- Module: each module's 9 Handoff
|
|
697
|
+
- Files: `ai/directives/<category>/<rule>.xml`
|
|
698
|
+
|
|
699
|
+
## Intra-Scope DAG
|
|
700
|
+
```mermaid
|
|
701
|
+
graph TD
|
|
702
|
+
TSK-04 --> TSK-05
|
|
703
|
+
TSK-06 --> TSK-04
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
## Tracker
|
|
707
|
+
| Task-ID | Title | Module | Dependencies | Status | Reopens |
|
|
708
|
+
|---------|-------|--------|--------------|--------|---------|
|
|
709
|
+
| [TSK-04](payments/payments.task-04.md) | Implement StripePaymentAdapter | payments | TSK-01, TSK-03 | `[ ]` TODO | 0 |
|
|
710
|
+
|
|
711
|
+
## Notes
|
|
712
|
+
[Optional: scope-specific execution notes, deviations, deferred items.]
|
|
713
|
+
```
|
|
714
|
+
</Contract>
|
|
715
|
+
</Output_Contracts>
|
|
716
|
+
|
|
717
|
+
</SddTaskScaffolding>
|