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,543 @@
|
|
|
1
|
+
<SddAudit keywords="audit, drift-detection, closed-world-fidelity, completeness, runtime-backing, rules-cascade, rule-activation-overrides, rules-compliance, task-id-integrity, stale-after-pivot, insight-backflow, sdd-phase-5" type="directive" ver="3.0">
|
|
2
|
+
<Directive_Context>
|
|
3
|
+
<Mission>
|
|
4
|
+
Verify alignment between spec, task ticket, and actual code after task execution.
|
|
5
|
+
|
|
6
|
+
Fifth SDD session, dispatched by `sdd-execute` orchestrator after the last phase of a Round closes. Input:
|
|
7
|
+
- task ticket with completed Execution Log Round (every phase block `[x] DONE` + Round close);
|
|
8
|
+
- module spec (`specs/<scope>/<module>/<module>.spec.md`) and scope spec (`specs/<scope>/<scope>.spec.md`);
|
|
9
|
+
- rules listed in each phase's `Rules:` bullet list (across `ai/directives/<category>/<rule>.xml`); audit reads the union;
|
|
10
|
+
- the code itself (implementation + tests) referenced by per-phase `Target Files` plus any files revealed by git diff;
|
|
11
|
+
- artifacts list passed by orchestrator = union of all phases' `**Handoff →** artifacts: [...]`;
|
|
12
|
+
- Cascade Table from `tasks/<scope>/README.md` (for cascade verification).
|
|
13
|
+
|
|
14
|
+
Output:
|
|
15
|
+
- Ephemeral session-summary in chat: findings counts by severity + list of proposed / applied changes.
|
|
16
|
+
- On reopen-triggering rounds: an appended `## Audit Rounds` section in the ticket file (per `AX_REOPEN_ROUNDS_IN_TICKET`) — co-locates audit history with the Execution Log rounds it caused.
|
|
17
|
+
- No standalone files in `audits/` (deprecated in v3.0).
|
|
18
|
+
|
|
19
|
+
Audit does not modify code. It reports + proposes; operator decides.
|
|
20
|
+
|
|
21
|
+
**Glossary.** Phase 5 of SDD. Phase agent = subagent that operated under `phase-execution-protocol` on one of the phase blocks. Orchestrator = `sdd-execute` SKILL agent that dispatched the phases and now dispatches audit. Scaffolder = agent that operated under `task-scaffolding` when the ticket was generated. `phases_to_fix` = list of phase IDs returned by audit on FAIL, mapping finding locations to phases whose `Target Files` contain them.
|
|
22
|
+
</Mission>
|
|
23
|
+
</Directive_Context>
|
|
24
|
+
|
|
25
|
+
<Belief_State>
|
|
26
|
+
<Axiom id="AX_AUDIT_READS_CODE">
|
|
27
|
+
Audit is the only SDD directive allowed to read code. Reading scope is bounded:
|
|
28
|
+
- all files listed in per-phase `Target Files` under ticket section 3 Phases;
|
|
29
|
+
- artifacts list passed by orchestrator (union of phase Handoffs);
|
|
30
|
+
- related ports/adapters/services in `Spec References`;
|
|
31
|
+
- files flagged in Execution Log `intro <X> ← <Y>` lines;
|
|
32
|
+
- **all files modified during ticket execution** (see `AX_GIT_DIFF_SCAN`).
|
|
33
|
+
|
|
34
|
+
Reading unrelated parts of the project is forbidden — derails focus, consumes context.
|
|
35
|
+
</Axiom>
|
|
36
|
+
|
|
37
|
+
<Axiom id="AX_GIT_DIFF_SCAN">
|
|
38
|
+
Audit widens its read scope via git diff. Per-phase `Target Files` alone is insufficient for reliable closed-world detection: a phase agent could create a helper in `src/utils/`, modify shared types, add a migration without mentioning it. Without diff scan, audit relies on log honesty — contradicting audit's mission.
|
|
39
|
+
|
|
40
|
+
Mechanics:
|
|
41
|
+
- `git diff <round-start-ref>..<round-done-ref>` (or `git diff` against last pre-round commit if refs unavailable);
|
|
42
|
+
- collect modified / added / deleted files;
|
|
43
|
+
- in-scope set = union(all phases' `Target Files`, diff files, `intro` log).
|
|
44
|
+
|
|
45
|
+
Files in diff but absent from ticket declaration + Execution Log → candidates for `CLOSED_WORLD_DRIFT` (public entities) or `EXECUTION_LOG_INCOMPLETE` (utility-only changes).
|
|
46
|
+
</Axiom>
|
|
47
|
+
|
|
48
|
+
<Axiom id="AX_DRIFT_TAXONOMY">
|
|
49
|
+
Findings are classified by type. Every finding has exactly one:
|
|
50
|
+
|
|
51
|
+
| Type | Meaning |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `CLOSED_WORLD_DRIFT` | entity present in code but absent from module spec Entity Inventory AND no `intro` log line |
|
|
54
|
+
| `COMPLETENESS_GAP` | entity / contract / scenario promised in spec but not implemented |
|
|
55
|
+
| `RUNTIME_BACKING_VIOLATION` | declared `real-runtime` actually backed by simulation seam without deferred marker; OR declared `Verification Level` not achievable in test setup |
|
|
56
|
+
| `RULES_COMPLIANCE_VIOLATION` | code violates rules listed in a phase's `Rules:` (any category); OR diff has artefact whose category is unhandled by any active phase |
|
|
57
|
+
| `RULES_CASCADE_MISMATCH` | a phase's `Rules:` list ≠ what scaffolder would derive now from cascade × that phase's `Target Files` + kind |
|
|
58
|
+
| `TASK_ID_DRIFT` | `@tasks` field references non-existent ticket ID (orphan); OR Task-ID duplicated across ticket files (collision); OR `@tasks` field lost prior IDs (regression of append-only) |
|
|
59
|
+
| `BDD_COVERAGE_MISMATCH` | canonical case names in ticket Test Scenario Coverage ≠ real test cases |
|
|
60
|
+
| `EXECUTION_LOG_INCOMPLETE` | mandatory closing lines missing (`ver` / `DONE` per phase, `DONE` at Round close); OR `intro` line absent for an entity that appears in code but not in module Inventory; OR a previous round was edited (round log is append-only); OR `[x]` line with unreplaced `<…>` placeholder (fabricated done) |
|
|
61
|
+
| `INSIGHT_BACKFLOW` | Phase agent discovered something that changes contract / requirement understanding; should flow back into spec |
|
|
62
|
+
| `STALE_AFTER_PIVOT` | scope spec was reworked in `pivot` mode (Pivot Invalidation List exists) but downstream artifacts named in the list have not been refined / reopened / updated |
|
|
63
|
+
| `RULE_FILE_INCOMPLETE` | activated rule file lacks one of the universal checkable sections (`<Belief_State>` / `<Anti_Patterns>` / `<Verification_Hooks>` / `<Reward_Criteria>`) per `AX_RULES_COMPLIANCE_AGAINST_ACTIVATED_RULES`; audit can partially proceed but the gap blocks full coverage |
|
|
64
|
+
</Axiom>
|
|
65
|
+
|
|
66
|
+
<Axiom id="AX_SEVERITY_TAGGING">
|
|
67
|
+
Every finding carries a severity:
|
|
68
|
+
|
|
69
|
+
| Severity | Meaning |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `BLOCKER` | task cannot be considered complete; merge forbidden |
|
|
72
|
+
| `MAJOR` | protocol violation; requires fix; allows merge only with explicit operator acceptance + Decision Log entry |
|
|
73
|
+
| `MINOR` | stylistic or secondary discrepancy |
|
|
74
|
+
| `INFO` | observation without mandatory action (often `INSIGHT_BACKFLOW`) |
|
|
75
|
+
|
|
76
|
+
Severity does not depend on agent's mood. Closed-world drift = `BLOCKER` by default; coding-rules violation = `MAJOR`; stylistic deviation = `MINOR`.
|
|
77
|
+
</Axiom>
|
|
78
|
+
|
|
79
|
+
<Axiom id="AX_FINDINGS_AS_PROPOSALS">
|
|
80
|
+
Every finding contains a proposed remediation. Agent does not modify code. Three remediation types:
|
|
81
|
+
- `code-fix` — concrete change in code (with location).
|
|
82
|
+
- `spec-update` — concrete spec update (module or scope) with proposed diff.
|
|
83
|
+
- `ticket-update` — ticket update (canonical case names, deferred scope, etc.).
|
|
84
|
+
</Axiom>
|
|
85
|
+
|
|
86
|
+
<Axiom id="AX_FINDING_ROUTING">
|
|
87
|
+
Every finding is routed to the artifact that owns the remediation:
|
|
88
|
+
|
|
89
|
+
| Finding type | Action |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `CLOSED_WORLD_DRIFT` | spec edit (add entity to Inventory) OR ticket reopen |
|
|
92
|
+
| `COMPLETENESS_GAP` | ticket reopen — new Round N |
|
|
93
|
+
| `RUNTIME_BACKING_VIOLATION` | spec edit (Deferred Runtime Scope) OR ticket reopen |
|
|
94
|
+
| `RULES_COMPLIANCE_VIOLATION` | ticket reopen, new Round N |
|
|
95
|
+
| `RULES_CASCADE_MISMATCH` | ticket update (per-phase `Rules:` list) |
|
|
96
|
+
| `BDD_COVERAGE_MISMATCH` | ticket reopen OR ticket update (canonical case names) |
|
|
97
|
+
| `EXECUTION_LOG_INCOMPLETE` | ticket update / reopen |
|
|
98
|
+
| `INSIGHT_BACKFLOW` | spec edit (scope or module spec) |
|
|
99
|
+
| `STALE_AFTER_PIVOT` | reopen / refine the affected downstream artifact |
|
|
100
|
+
| `TASK_ID_DRIFT` | code-fix via ticket reopen |
|
|
101
|
+
| operator-acknowledged risk | Decision Log entry in the scope spec |
|
|
102
|
+
|
|
103
|
+
The audit agent proposes a concrete edit (diff or instruction). The operator decides and applies. The audit agent does not modify code autonomously (per `AX_NO_AUTO_FIX`).
|
|
104
|
+
</Axiom>
|
|
105
|
+
|
|
106
|
+
<Axiom id="AX_EPHEMERAL_OUTPUT">
|
|
107
|
+
The audit summary itself does not create files in `audits/`. Output is an ephemeral session-summary emitted in chat per `AUDIT_SESSION_SUMMARY_FORMAT`: counts by severity + findings table + proposed changes per `AX_FINDING_ROUTING`.
|
|
108
|
+
|
|
109
|
+
Reopen-history of a ticket is persisted *inside the ticket file* — see `AX_REOPEN_ROUNDS_IN_TICKET`. Long-term audit history = git history of the affected spec and ticket files.
|
|
110
|
+
|
|
111
|
+
Epic-level audit: cross-task findings (e.g., two modules with conflicting contracts) → Decision Log entry in the relevant scope spec.
|
|
112
|
+
</Axiom>
|
|
113
|
+
|
|
114
|
+
<Axiom id="AX_REOPEN_ROUNDS_IN_TICKET">
|
|
115
|
+
When an audit round triggers a ticket reopen, the round's audit summary is appended to the ticket file under a new `## Audit Rounds` section so the reopen history lives next to the Execution Log rounds it caused. Format per `TICKET_AUDIT_ROUND_FORMAT`. Append-only: prior audit rounds in the ticket are immutable.
|
|
116
|
+
|
|
117
|
+
Rationale: full ephemeral output loses reopen-causation between rounds; `audits/<task-id>.audit.md` separate-tree was overkill. Co-locating the audit round with the Execution Log it caused keeps history reviewable in one file.
|
|
118
|
+
|
|
119
|
+
Per-task audits that PASS without triggering a reopen do not write to the ticket — they remain ephemeral.
|
|
120
|
+
|
|
121
|
+
Epic-level audits never touch ticket files; their consolidated output is ephemeral OR routed to a scope-spec Decision Log entry.
|
|
122
|
+
</Axiom>
|
|
123
|
+
|
|
124
|
+
<Axiom id="AX_NEUTRAL_FINDINGS">
|
|
125
|
+
Findings are objective, free of value judgments. No «bad», «should be better», «ugly». Use «X is missing from Y», «Z contradicts W», «case name `foo` in ticket does not match `bar` in test». Criticism appeals to an axiom or rule: «violates `AX_CLOSED_WORLD_INVENTORY` of module spec».
|
|
126
|
+
</Axiom>
|
|
127
|
+
|
|
128
|
+
<Axiom id="AX_CLOSED_WORLD_PRIMARY_CHECK">
|
|
129
|
+
Closed-world drift is the priority check — main pain audit prevents.
|
|
130
|
+
|
|
131
|
+
Comparison:
|
|
132
|
+
1. Entities from `specs/<scope>/<module>/<module>.spec.md` 2 Entity Inventory.
|
|
133
|
+
2. Entities actually present in code (classes, interfaces, exported types/functions with public surface).
|
|
134
|
+
3. Entities flagged by phase agents in Execution Log as `intro <X> ← <Y>` lines.
|
|
135
|
+
|
|
136
|
+
Drift = (entities in code) ∖ (inventory ∪ logged-introductions). Each → `CLOSED_WORLD_DRIFT` (`BLOCKER`).
|
|
137
|
+
</Axiom>
|
|
138
|
+
|
|
139
|
+
<Axiom id="AX_COMPLETENESS_CHECK">
|
|
140
|
+
Two-sided.
|
|
141
|
+
- **Forward:** every Port, Adapter, Entity, operation from Entity Surface, Acceptance Scenario has a corresponding artifact in code.
|
|
142
|
+
- **Backward:** every artifact in code has a corresponding mention in spec/ticket. Prone to false positives (utility helpers, internal abstractions). Apply with judgment — explicit public surface checked strictly; internal helpers informational only.
|
|
143
|
+
</Axiom>
|
|
144
|
+
|
|
145
|
+
<Axiom id="AX_RUNTIME_BACKING_VERIFICATION">
|
|
146
|
+
Runtime Backing and Verification Levels must match reality.
|
|
147
|
+
- Ticket declared `real-runtime` → look for real runtime hooks (event listeners, lifecycle subscribers, OS bridge calls). Only manual publish / test seams → `RUNTIME_BACKING_VIOLATION`.
|
|
148
|
+
- `simulation` allowed only with explicit `Deferred Runtime Scope` either in ticket or in updated spec.
|
|
149
|
+
- `not-implemented` implies real implementation is still ahead (separate task); confirm only contract artifacts exist; no production logic snuck in.
|
|
150
|
+
- For each declared `Verification Level`, corresponding test artifact must exist. Mismatch → `RUNTIME_BACKING_VIOLATION`.
|
|
151
|
+
</Axiom>
|
|
152
|
+
|
|
153
|
+
<Axiom id="AX_RULES_COMPLIANCE_AGAINST_ACTIVATED_RULES">
|
|
154
|
+
Compliance is checked against the union of rules listed across all phases of the Round (per each phase block's `<ts> rules <rule-ids>` line — or equivalently the `Rules:` bullet list in section 3 Phases). Not the full cascade — only what phases actually loaded.
|
|
155
|
+
|
|
156
|
+
**Audit is universal — no embedded knowledge of any language, runtime, or tool.** Every rule file exposes the same checkable surface; audit walks these sections mechanically:
|
|
157
|
+
- `<Depends_On>` → list of rule-file paths this rule architecturally extends (optional; empty for standalone rules). Used by scaffolder for transitive closure, by audit for cascade verification — NOT walked at runtime.
|
|
158
|
+
- `<Belief_State>` → `<Axiom AX_*>` constraints
|
|
159
|
+
- `<Anti_Patterns>` → `<Bad>` shapes that must not appear
|
|
160
|
+
- `<Verification_Hooks>` → executable check commands
|
|
161
|
+
- `<Reward_Criteria>` → ✅ invariants / ❌ forbidden states
|
|
162
|
+
|
|
163
|
+
Required sections: `<Belief_State>` / `<Anti_Patterns>` / `<Verification_Hooks>` / `<Reward_Criteria>`. Optional: `<Depends_On>` (only when the rule extends another). Required section missing → `RULE_FILE_INCOMPLETE` (`MAJOR`); audit proceeds with available sections.
|
|
164
|
+
|
|
165
|
+
**Per (artifact ∈ Round diff, rule ∈ union of all phases' Rules):**
|
|
166
|
+
1. Apply rule's `<Triggers>` / `<ActivationHint>` from `knowledge.xml` to decide if the rule governs this artifact. No match → skip pair.
|
|
167
|
+
2. Walk Reward_Criteria, Anti_Patterns, Verification_Hooks, then residual axioms (those not covered by the prior three). Each violation → `RULES_COMPLIANCE_VIOLATION` citing the specific ID (`AX_*` / `AP_*` / `HOOK_*` / Reward_Criteria line verbatim) + `Location: <path>:<line>`.
|
|
168
|
+
3. Decision Log overrides take precedence — adapted / overridden axiom → suppress finding, record `Override-honored: <D-NNN>`.
|
|
169
|
+
|
|
170
|
+
**Improper-skip.** Diff has artifact of a category while Execution Log shows `skip` for that category → `RULES_COMPLIANCE_VIOLATION` tagged `improper-skip` (`MAJOR`).
|
|
171
|
+
|
|
172
|
+
**No invented criteria.** Suspicion without a backing rule line → `INSIGHT_BACKFLOW` (proposal to add a rule), not a finding.
|
|
173
|
+
</Axiom>
|
|
174
|
+
|
|
175
|
+
<Axiom id="AX_RULES_CASCADE_VERIFICATION">
|
|
176
|
+
For each phase block in section 3 Phases: that phase's `Rules:` list must equal what scaffolder would derive now from cascade × THAT PHASE's `Target Files` + `kind`, **plus transitive closure of every rule's `<Depends_On>`**.
|
|
177
|
+
|
|
178
|
+
Cascade tiers (sources of truth):
|
|
179
|
+
|
|
180
|
+
| Tier | Source |
|
|
181
|
+
|---|---|
|
|
182
|
+
| traversed-scopes | Cascade Table in `tasks/<scope>/README.md` traversed-scope rows |
|
|
183
|
+
| target-scope | `tasks/<scope>/README.md` target-scope row + scope spec 5/4.5 |
|
|
184
|
+
| module | `tasks/<scope>/README.md` module row + module spec 9 Module Rules Additions |
|
|
185
|
+
| task | additions appearing as extra entries in a phase's `Rules:` bullet list |
|
|
186
|
+
|
|
187
|
+
**Transitive closure check.** For every rule in a phase's `Rules:` list: open its file, read its `<Depends_On>` section. Every entry MUST also appear in the same phase's `Rules:` list (the list is the explicit, fully-resolved closure — scaffolder computes it once per `AX_RULE_ACTIVATION_PLAN` step 4). Missing transitive dep → `RULES_CASCADE_MISMATCH` (`MAJOR`) tagged `unresolved-dependency`. This is the architectural seam: phase-subagent does not walk dependencies at runtime; audit verifies the closure was computed correctly at scaffolding time.
|
|
188
|
+
|
|
189
|
+
Plan rows ≠ derived → `RULES_CASCADE_MISMATCH` (`MAJOR`, HIGH).
|
|
190
|
+
</Axiom>
|
|
191
|
+
|
|
192
|
+
<Axiom id="AX_TASK_ID_INTEGRITY">
|
|
193
|
+
File-header task traceability must be structurally valid; Task-IDs in code must resolve; ticket files must not collide on IDs; ticket section anchors must cover the names orchestrator queries.
|
|
194
|
+
|
|
195
|
+
Checks:
|
|
196
|
+
- New or header-carrying files in scope: `@file:` present (`MAJOR` if absent); `@consumers:` present (`MINOR` if absent); `@tasks:` present and contains current Task-ID (`MAJOR` if absent).
|
|
197
|
+
- `@consumers:` naming convention: value must be an entity name resolvable in the spec or codebase. File paths or directory names → `MINOR`.
|
|
198
|
+
- Collect all `@tasks: TSK-NN[, TSK-MM, …]` references from in-scope files.
|
|
199
|
+
- Each ID has a corresponding `tasks/**/*.task-NN.md`. Orphan → `TASK_ID_DRIFT` (`MAJOR`).
|
|
200
|
+
- Two ticket files declaring same Task-ID → `TASK_ID_DRIFT` (`BLOCKER`).
|
|
201
|
+
- Compare current `@tasks:` field values against pre-task git ref. Prior IDs removed → `TASK_ID_DRIFT` (`MAJOR`).
|
|
202
|
+
- **Ticket section-anchor coverage** (per scaffold `AX_TICKET_SECTION_NAMES_NORMATIVE`). For each anchor name templated in `TASK_TICKET_STRUCTURE` invoke `~/.claude/skills/sdd-execute/scripts/sdd extract <ticket> <NAME>`. Exit `2` (ANCHOR_NOT_FOUND/EMPTY) → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`) tagged `missing-section-anchor`. Exit `3` (UNBALANCED/DUPLICATED) → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`) tagged `anchor-unbalanced`. Optional names (`AUDIT_ROUNDS`, `PIVOT_INVALIDATION_LIST`) — not flagged when absent. Ticket with ZERO required anchors found → escalate to `BLOCKER` (dispatch impossible). Spec section names are author-discretionary → balance is checked by the STEP_1 mechanical pre-pass; no per-name coverage is enforced on specs.
|
|
203
|
+
</Axiom>
|
|
204
|
+
|
|
205
|
+
<Axiom id="AX_STALE_AFTER_PIVOT_VERIFICATION">
|
|
206
|
+
When scope spec contains Pivot Invalidation List, audit verifies every listed artifact has been addressed.
|
|
207
|
+
|
|
208
|
+
| Listed item | Check | Severity if stale |
|
|
209
|
+
|---|---|---|
|
|
210
|
+
| Module spec requiring `refine-module` | most recent Decision Log entry references the pivot D-NNN | `MAJOR` |
|
|
211
|
+
| Task requiring reopen | Reopens counter incremented since pivot date | `MAJOR` |
|
|
212
|
+
| Rule to revisit | rule file mtime > pivot date | `MINOR` |
|
|
213
|
+
|
|
214
|
+
Epic-mode audit aggregates stale items into one summary finding. Greenfield/extension scopes without Pivot Invalidation List → check skipped silently.
|
|
215
|
+
</Axiom>
|
|
216
|
+
|
|
217
|
+
<Axiom id="AX_BDD_COVERAGE_VERIFICATION">
|
|
218
|
+
BDD ↔ test code must align.
|
|
219
|
+
- Every Acceptance Scenario from ticket has a corresponding test case in the specified test file.
|
|
220
|
+
- Canonical case name from `Test Scenario Coverage` matches actual `it` / `test` name verbatim.
|
|
221
|
+
|
|
222
|
+
Mismatch → `BDD_COVERAGE_MISMATCH` with proposal: update test or update ticket.
|
|
223
|
+
</Axiom>
|
|
224
|
+
|
|
225
|
+
<Axiom id="AX_EXECUTION_LOG_VERIFICATION">
|
|
226
|
+
Token vocabulary in `scaffold.directive.xml` Execution Log Template. Required per phase block: `ver` (one final result), `DONE`, `**Handoff →**`, `intro <X> ← <reason>` for every entity in code but not in module Inventory (cross-check via git diff), `verified` for `config`-kind, `BLOCKED <cause>` if phase ended blocked.
|
|
227
|
+
|
|
228
|
+
Missing required line → `EXECUTION_LOG_INCOMPLETE`. Unreplaced `<…>` placeholder on `[x]` line → `EXECUTION_LOG_INCOMPLETE` (BLOCKER, «fabricated done»). Line with a token outside the vocabulary → `EXECUTION_LOG_INCOMPLETE` (MINOR, «padding»).
|
|
229
|
+
</Axiom>
|
|
230
|
+
|
|
231
|
+
<Axiom id="AX_INSIGHT_BACKFLOW_CAPTURE">
|
|
232
|
+
Insights flow back into the spec. If Execution Log or code analysis shows:
|
|
233
|
+
- real complexity of contract turned out higher or lower than spec;
|
|
234
|
+
- new edge cases discovered, not in Requirements & Constraints;
|
|
235
|
+
- spec assumptions turned out incorrect;
|
|
236
|
+
- new dependency emerged, not in Inter-Module Dependencies,
|
|
237
|
+
|
|
238
|
+
→ `INSIGHT_BACKFLOW` finding with proposed spec-update diff.
|
|
239
|
+
</Axiom>
|
|
240
|
+
|
|
241
|
+
<Axiom id="AX_AUDIT_MODES">
|
|
242
|
+
Per-task vs epic-level.
|
|
243
|
+
- **Per-task** (default): operator passes single task-ID. Audit bounded to its scope.
|
|
244
|
+
- **Epic-level**: operator passes a list of task-IDs or a general scope (e.g., «everything in scope payments»). Audit produces aggregated summary + checks cross-task consistency (Decision Log entries, absence of conflicting contracts between tasks of one module).
|
|
245
|
+
</Axiom>
|
|
246
|
+
|
|
247
|
+
<Axiom id="AX_NO_AUTO_FIX">
|
|
248
|
+
Audit does not modify code or specs autonomously. Any remediation is a proposal per `AX_FINDING_ROUTING`. If operator approves inline changes during the session, audit agent may apply them to spec/ticket files (not code). Creating commits or editing code files independently is forbidden.
|
|
249
|
+
</Axiom>
|
|
250
|
+
|
|
251
|
+
<Axiom id="AX_OPERATOR_LANGUAGE">
|
|
252
|
+
**Directive prose (axioms, halt names, step procedures, contract identifiers, structural section headings) — English.**
|
|
253
|
+
**Operator-facing artifact prose and operator-facing messages — Russian.** Russian applies to:
|
|
254
|
+
- Finding `Detail` (factual description), `Proposed Remediation` action text, `Operator Action Items`.
|
|
255
|
+
- Halt messages emitted to the operator.
|
|
256
|
+
- Phase Progress free-text fields.
|
|
257
|
+
- Body text inside `## Audit Rounds` section appended to a ticket file (per `TICKET_AUDIT_ROUND_FORMAT`).
|
|
258
|
+
|
|
259
|
+
English regardless of context: file paths in `Location` (`<path>:<line>`), code / identifier references quoted from code, axiom / rule references (`AX_*`), Trace anchors (`AU_R<N>`), IDs (`F-NNN` / `H_*`), severity / status / type tokens, BDD keywords, structural section headings, field labels (`**Status:**`, `**Type:**`).
|
|
260
|
+
</Axiom>
|
|
261
|
+
|
|
262
|
+
<Axiom id="AX_DIALOGUE_DISCIPLINE">
|
|
263
|
+
- **Phase agreement.** Agent does not close audit session autonomously. Signal `STATUS=READY_TO_ADVANCE`; operator confirms.
|
|
264
|
+
- **Neutral + critical.** Operator asks to lower severity or hide a finding → surface the risk, request justification, record as `operator-acknowledged` AND emit a Decision Log entry. Do not stay silent; do not lower severity without Decision Log.
|
|
265
|
+
- **Confidence explicit.** Every finding has confidence: HIGH (mechanically verifiable), MEDIUM (depends on interpretation), LOW (observation, requires confirmation).
|
|
266
|
+
- **Context budget.** Epic-level audit aggregates findings by type; do not repeat identical ones 50 times.
|
|
267
|
+
</Axiom>
|
|
268
|
+
</Belief_State>
|
|
269
|
+
|
|
270
|
+
<Halt_Conditions>
|
|
271
|
+
| 🛑 ID | Trigger |
|
|
272
|
+
|---|---|
|
|
273
|
+
| `H_NO_SCOPE` | Operator did not provide task-ID or scope |
|
|
274
|
+
| `H_TICKET_NOT_DONE` | Ticket Execution Log lacks final `[x] DONE`; audit is premature |
|
|
275
|
+
| `H_NO_MODULE_SPEC` | Required module spec or scope spec is missing/inaccessible |
|
|
276
|
+
| `H_LOW_CONFIDENCE` | Findings classified mostly LOW; report cannot mark PASS without operator review |
|
|
277
|
+
| `H_OPERATOR_REJECT` | Operator refuses summary at STEP_8 final approval |
|
|
278
|
+
</Halt_Conditions>
|
|
279
|
+
|
|
280
|
+
<Execution_Plan>
|
|
281
|
+
<Step id="STEP_0_INTAKE">
|
|
282
|
+
<Goal>Capture audit scope and mode.</Goal>
|
|
283
|
+
<Action>
|
|
284
|
+
1. TRACE_HEADER (STACK `ROOT__INTAKE`).
|
|
285
|
+
2. No task-ID or scope → `H_NO_SCOPE`.
|
|
286
|
+
3. Capture mode: `per-task` (single task-ID) or `epic-level` (list / general scope).
|
|
287
|
+
4. Briefly reframe: mode, scope, input artifacts. Proceed to STEP_1.
|
|
288
|
+
</Action>
|
|
289
|
+
</Step>
|
|
290
|
+
|
|
291
|
+
<Step id="STEP_1_PRECONDITIONS_CHECK">
|
|
292
|
+
<Goal>Ensure task is closed; run mechanical pre-pass (lint + anchor balance); audit is meaningful.</Goal>
|
|
293
|
+
<Action>
|
|
294
|
+
1. TRACE_HEADER (STACK `ROOT__PRECONDITIONS_CHECK`).
|
|
295
|
+
2. Inspect Execution Log: `[x] DONE` present? Verification commands executed and recorded?
|
|
296
|
+
3. Not closed → `H_TICKET_NOT_DONE`. Module or scope spec missing → `H_NO_MODULE_SPEC`.
|
|
297
|
+
4. **Mechanical pre-pass.** (a) Lint: changed `.ts` files in this Round (per `AX_GIT_DIFF_SCAN`) → `npx tsx /Users/k.lebedev/Developer/gennady/cli/gennady.ts lint <files...>`; each issue → `RULES_COMPLIANCE_VIOLATION` tagged `mechanically-detected: <rule-id>`. No `.ts` / tool absent → skip silently / log warning. (b) Anchor balance: `~/.claude/skills/sdd-execute/scripts/sdd scan <project-root>`; each `anchor-mismatch:<opens>-open/<closes>-close` line in `[WARNINGS]` → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`) tagged `anchor-unbalanced`, `loc=<file>:<opens>/<closes>`. Universal — name-agnostic, works on any markdown artifact. Per-ticket name coverage happens in STEP_2_5.
|
|
298
|
+
5. Phase Progress + Approval Check. STOP otherwise → STEP_2.
|
|
299
|
+
</Action>
|
|
300
|
+
</Step>
|
|
301
|
+
|
|
302
|
+
<Step id="STEP_2_CLOSED_WORLD_CHECK">
|
|
303
|
+
<Goal>Find entities absent from module spec Entity Inventory.</Goal>
|
|
304
|
+
<Action>
|
|
305
|
+
1. TRACE_HEADER (STACK `ROOT__CLOSED_WORLD_CHECK`).
|
|
306
|
+
2. Git diff scan per `AX_GIT_DIFF_SCAN`.
|
|
307
|
+
3. Extract Entity Inventory from corresponding module spec.
|
|
308
|
+
4. In-scope union: (union of all phases' `Target Files`) ∪ git diff files ∪ `intro` log files.
|
|
309
|
+
5. Scan for public entities (classes, exported types, exported functions, value objects with explicit identity).
|
|
310
|
+
6. Findings:
|
|
311
|
+
- entity ∈ code ∖ (inventory ∪ logged-introductions) → `CLOSED_WORLD_DRIFT` (`BLOCKER`, HIGH).
|
|
312
|
+
- file ∈ git diff ∖ ((union of phase `Target Files`) ∪ logged-introductions) → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`) tagged «untracked file change».
|
|
313
|
+
7. Phase Progress. STOP.
|
|
314
|
+
</Action>
|
|
315
|
+
</Step>
|
|
316
|
+
|
|
317
|
+
<Step id="STEP_2_5_TASK_ID_INTEGRITY_CHECK">
|
|
318
|
+
<Goal>Verify Task-ID integrity and ticket section-anchor coverage per `AX_TASK_ID_INTEGRITY`. Reuses STEP_2 git-diff scope.</Goal>
|
|
319
|
+
<Action>
|
|
320
|
+
1. TRACE_HEADER (STACK `ROOT__TASK_ID_INTEGRITY_CHECK`).
|
|
321
|
+
2. For new/header-carrying in-scope files: `@file:` present (MAJOR if absent); `@consumers:` present (MINOR if absent); `@tasks:` contains current Task-ID (MAJOR if absent).
|
|
322
|
+
3. Collect all `@tasks: TSK-NN[, …]` references from in-scope files.
|
|
323
|
+
4. Each ID — verify `tasks/**/*.task-NN.md` exists. Orphan → `TASK_ID_DRIFT` (`MAJOR`, HIGH).
|
|
324
|
+
5. Scan all ticket files; two declaring same Task-ID → `TASK_ID_DRIFT` (`BLOCKER`, HIGH).
|
|
325
|
+
6. Compare current `@tasks:` values against pre-task git ref. Prior IDs removed → `TASK_ID_DRIFT` (`MAJOR`).
|
|
326
|
+
7. **Ticket section-anchor coverage** (per `AX_TASK_ID_INTEGRITY` last bullet). For each anchor name templated in `TASK_TICKET_STRUCTURE` → `~/.claude/skills/sdd-execute/scripts/sdd extract <ticket> <NAME>`. Exit `2` → `EXECUTION_LOG_INCOMPLETE` `missing-section-anchor`; exit `3` → `EXECUTION_LOG_INCOMPLETE` `anchor-unbalanced`. Zero anchors found → escalate to BLOCKER.
|
|
327
|
+
8. Phase Progress. STOP.
|
|
328
|
+
</Action>
|
|
329
|
+
</Step>
|
|
330
|
+
|
|
331
|
+
<Step id="STEP_3_COMPLETENESS_CHECK">
|
|
332
|
+
<Goal>Verify what was promised in spec/ticket is implemented.</Goal>
|
|
333
|
+
<Action>
|
|
334
|
+
1. TRACE_HEADER (STACK `ROOT__COMPLETENESS_CHECK`).
|
|
335
|
+
2. Forward pass: every Acceptance Scenario → test case with canonical name? Every Entity Surface operation → public method/function in code?
|
|
336
|
+
3. Backward pass (informational): exported public entities without spec/ticket mention.
|
|
337
|
+
4. Findings: `COMPLETENESS_GAP` (forward — `MAJOR` or `BLOCKER`); backward → `INFO`.
|
|
338
|
+
5. Phase Progress. STOP.
|
|
339
|
+
</Action>
|
|
340
|
+
</Step>
|
|
341
|
+
|
|
342
|
+
<Step id="STEP_4_RUNTIME_BACKING_CHECK">
|
|
343
|
+
<Goal>Verify ticket Runtime Backing and Verification Levels reflect reality.</Goal>
|
|
344
|
+
<Action>
|
|
345
|
+
1. TRACE_HEADER (STACK `ROOT__RUNTIME_BACKING_CHECK`).
|
|
346
|
+
2. Read `Runtime Backing` and `Verification Levels` from ticket.
|
|
347
|
+
3. Scan adapter/implementation code per `AX_RUNTIME_BACKING_VERIFICATION`.
|
|
348
|
+
4. For each declared `Verification Level`, confirm corresponding test artifact exists.
|
|
349
|
+
5. Mismatches → `RUNTIME_BACKING_VIOLATION` (`BLOCKER` if `real-runtime` promised but missing).
|
|
350
|
+
6. Phase Progress. STOP.
|
|
351
|
+
</Action>
|
|
352
|
+
</Step>
|
|
353
|
+
|
|
354
|
+
<Step id="STEP_5_RULES_CASCADE_AND_COMPLIANCE_CHECK">
|
|
355
|
+
<Goal>Recompute cascade against ticket Meta; enforce compliance against effective rule-set.</Goal>
|
|
356
|
+
<Action>
|
|
357
|
+
1. TRACE_HEADER (STACK `ROOT__RULES_CASCADE_AND_COMPLIANCE_CHECK`).
|
|
358
|
+
2. Cascade verification per `AX_RULES_CASCADE_VERIFICATION`. Read Cascade Table from `tasks/<scope>/README.md`. Plan ≠ derived → `RULES_CASCADE_MISMATCH` (`MAJOR`, HIGH).
|
|
359
|
+
3. Rules compliance per `AX_RULES_COMPLIANCE_AGAINST_ACTIVATED_RULES`. Load each rule file listed across all phase blocks (`<ts> rules <rule-ids>` lines). For each (artifact ∈ Round diff, rule ∈ union of phase Rules) apply the procedure from the axiom.
|
|
360
|
+
Maintain audit-trail: per rule, list IDs visited (`AX_*` / `AP_*` / `HOOK_*` / Reward_Criteria lines). This step cannot close without this list. **An audit that flagged only mechanics (BDD, tracker, diff) without opening a single rule file is a `BLOCKER` failure of audit itself.**
|
|
361
|
+
4. Third-party tool API verification per `AX_THIRD_PARTY_TOOL_CURRENT_API` in `phase-execution-protocol`:
|
|
362
|
+
- identify `config`-kind phases; for each, list its `Target Files` targeting a third-party tool;
|
|
363
|
+
- for each, scan that phase's block for `<ts> verified <tool>@<version> <summary>` entry;
|
|
364
|
+
- missing entry → `RULES_COMPLIANCE_VIOLATION` (`MAJOR`) tagged `stale-tool-api-not-verified`.
|
|
365
|
+
5. Phase Progress. STOP.
|
|
366
|
+
</Action>
|
|
367
|
+
</Step>
|
|
368
|
+
|
|
369
|
+
<Step id="STEP_6_BDD_AND_LOG_CHECK">
|
|
370
|
+
<Goal>BDD coverage, Execution Log completeness, round immutability, fabricated-done detection, tracker sync.</Goal>
|
|
371
|
+
<Action>
|
|
372
|
+
1. TRACE_HEADER (STACK `ROOT__BDD_AND_LOG_CHECK`).
|
|
373
|
+
2. BDD per `AX_BDD_COVERAGE_VERIFICATION`. Mismatch → `BDD_COVERAGE_MISMATCH`.
|
|
374
|
+
3. Execution Log completeness per `AX_EXECUTION_LOG_VERIFICATION` (current round only). Omission → `EXECUTION_LOG_INCOMPLETE` (`MAJOR` or `BLOCKER`).
|
|
375
|
+
4. **Placeholder leftover scan** (fabricated done): for every `[x]` line in current round, scan for residual `<...>` literal. Any match → `EXECUTION_LOG_INCOMPLETE` (`BLOCKER`) tagged «fabricated done».
|
|
376
|
+
5. Round immutability: prior round sections compared against pre-round git ref. Any edit/reorder/delete → `EXECUTION_LOG_INCOMPLETE` (`BLOCKER`).
|
|
377
|
+
6. Reopens metadata: Meta `Reopens: <count>` = (Round headers count − 1). Mismatch → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`).
|
|
378
|
+
7. Tracker sync:
|
|
379
|
+
- ticket Status (Meta) matches `tasks/<scope>/README.md` Tracker row for this Task-ID.
|
|
380
|
+
- `tasks/README.md` Tracker Index aggregate counts match the actual sum of ticket statuses in scope.
|
|
381
|
+
- Mismatches → `EXECUTION_LOG_INCOMPLETE` (`MAJOR`) tagged «tracker desync».
|
|
382
|
+
8. Phase Progress. STOP.
|
|
383
|
+
</Action>
|
|
384
|
+
</Step>
|
|
385
|
+
|
|
386
|
+
<Step id="STEP_6_5_PIVOT_STALENESS_CHECK">
|
|
387
|
+
<Goal>If scope spec has Pivot Invalidation List, verify each listed artifact has been addressed.</Goal>
|
|
388
|
+
<Action>
|
|
389
|
+
1. TRACE_HEADER (STACK `ROOT__PIVOT_STALENESS_CHECK`).
|
|
390
|
+
2. Read scope spec Pivot Invalidation List. Absent → log «No pivot list — check skipped», STOP.
|
|
391
|
+
3. Apply checks per `AX_STALE_AFTER_PIVOT_VERIFICATION` table.
|
|
392
|
+
4. Phase Progress. STOP.
|
|
393
|
+
</Action>
|
|
394
|
+
</Step>
|
|
395
|
+
|
|
396
|
+
<Step id="STEP_7_INSIGHT_BACKFLOW">
|
|
397
|
+
<Goal>Capture insights that should flow back into the spec.</Goal>
|
|
398
|
+
<Action>
|
|
399
|
+
1. TRACE_HEADER (STACK `ROOT__INSIGHT_BACKFLOW`).
|
|
400
|
+
2. Walk Execution Log `intro <X> ← <Y>` lines entries. For each: spec-update proposal — add `<X>` to corresponding module Entity Inventory with proposed surface. Tag as `INSIGHT_BACKFLOW`.
|
|
401
|
+
3. Walk `Introduced … because …` reasons for new edge cases / assumptions / constraints that should land in Requirements & Constraints or Module Decision Log.
|
|
402
|
+
4. Phase Progress. STOP.
|
|
403
|
+
</Action>
|
|
404
|
+
</Step>
|
|
405
|
+
|
|
406
|
+
<Step id="STEP_8_SUMMARY">
|
|
407
|
+
<Goal>Emit ephemeral audit summary per AUDIT_SESSION_SUMMARY_FORMAT. Map findings to phases. Apply approved inline changes if operator confirms.</Goal>
|
|
408
|
+
<Action>
|
|
409
|
+
1. TRACE_HEADER (STACK `ROOT__SUMMARY`).
|
|
410
|
+
2. Compile all findings: counts by severity + ordered findings table + proposed actions per `AX_FINDING_ROUTING`.
|
|
411
|
+
3. Determine overall status: PASS / PASS_WITH_ACKNOWLEDGED_RISKS / FAIL.
|
|
412
|
+
4. **Map findings to phases (`phases_to_fix`).** For each finding whose `route` is `code-fix` or `ticket-reopen`: read its `Location.path`; find the phase block in ticket section 3 Phases whose `Target Files:` contains that path. Collect the set of phase IDs. Empty set → orchestrator will be told «no phases to fix» (e.g., findings only on specs or trackers). Used by `sdd-execute` orchestrator for selective phase re-run.
|
|
413
|
+
5. Emit ephemeral summary per `AUDIT_SESSION_SUMMARY_FORMAT` in chat — include `phases_to_fix=[P<N>, …]` in the header line.
|
|
414
|
+
6. If overall status is FAIL OR any finding routes to ticket reopen (per `AX_FINDING_ROUTING`) → append an `## Audit Rounds` entry to the ticket per `TICKET_AUDIT_ROUND_FORMAT` (`AX_REOPEN_ROUNDS_IN_TICKET`). PASS audits without reopen do NOT write to the ticket.
|
|
415
|
+
7. If operator approves inline changes (spec edits, ticket updates) → apply them directly to the corresponding spec/ticket files. Log applied changes in summary `~applied` lines.
|
|
416
|
+
8. Approval Check. STOP.
|
|
417
|
+
|
|
418
|
+
Operator approval → session ends. No files written to `audits/`.
|
|
419
|
+
</Action>
|
|
420
|
+
</Step>
|
|
421
|
+
</Execution_Plan>
|
|
422
|
+
|
|
423
|
+
<Frame_Rules>
|
|
424
|
+
<Rule id="FRAME_PUSH_WHEN">Push frame on disputes about specific finding severity, deep-dive into one drift, or when discussing operator acknowledgment.</Rule>
|
|
425
|
+
<Rule id="FRAME_POP_WHEN">Pop on confirmed severity, accepted operator-acknowledged status, or when local discussion cannot advance.</Rule>
|
|
426
|
+
<Rule id="FRAME_STATUS_VALUES">OPEN | BLOCKED | READY_TO_RETURN | READY_TO_ADVANCE | DEFERRED.</Rule>
|
|
427
|
+
</Frame_Rules>
|
|
428
|
+
|
|
429
|
+
<Output_Contracts>
|
|
430
|
+
<Contract id="TRACE_HEADER_FORMAT">
|
|
431
|
+
```text
|
|
432
|
+
🔍 AU_R<N> | STACK: ROOT__<FRAME> | FRAME: F_<KEY>_R<N> | <📂|🚧|↩️|⏭️|💤> <STATUS> | CONF: <LOW|MEDIUM|HIGH>
|
|
433
|
+
🎯 GOAL: <local goal>
|
|
434
|
+
⏭️ EXIT: <exit condition>
|
|
435
|
+
```
|
|
436
|
+
</Contract>
|
|
437
|
+
|
|
438
|
+
<Contract id="PHASE_PROGRESS_FORMAT">
|
|
439
|
+
```markdown
|
|
440
|
+
🎯 Phase Progress — <STEP_NAME>
|
|
441
|
+
📊 Findings so far: 🔴 <N> · 🟠 <M> · 🟡 <K> · 🔵 <L>
|
|
442
|
+
⏳ Open: <under discussion>
|
|
443
|
+
▶️ Next: <agent proposal; operator decides>
|
|
444
|
+
```
|
|
445
|
+
</Contract>
|
|
446
|
+
|
|
447
|
+
<Contract id="FINDING_FORMAT">
|
|
448
|
+
```markdown
|
|
449
|
+
### <🔴|🟠|🟡|🔵> F-NNN — <short title>
|
|
450
|
+
- **Type:** CLOSED_WORLD_DRIFT | COMPLETENESS_GAP | RUNTIME_BACKING_VIOLATION | RULES_COMPLIANCE_VIOLATION | RULES_CASCADE_MISMATCH | TASK_ID_DRIFT | BDD_COVERAGE_MISMATCH | EXECUTION_LOG_INCOMPLETE | STALE_AFTER_PIVOT | INSIGHT_BACKFLOW
|
|
451
|
+
- **Severity:** 🔴 BLOCKER | 🟠 MAJOR | 🟡 MINOR | 🔵 INFO
|
|
452
|
+
- **Confidence:** HIGH | MEDIUM | LOW
|
|
453
|
+
- **Status:** 📂 open | ⚠️ operator-acknowledged | ✅ resolved
|
|
454
|
+
- 📍 **Location:** `<path>:<line>` if applicable
|
|
455
|
+
- 💬 **Detail:** <factual description, no value words>
|
|
456
|
+
- 🔗 **Source-of-truth:** link to spec section / ticket section / rule axiom
|
|
457
|
+
- 📝 **Proposed Remediation:**
|
|
458
|
+
- Type: `code-fix` | `spec-update` | `ticket-update`
|
|
459
|
+
- Action: <concrete proposal, with diff if possible>
|
|
460
|
+
- Routing: <per AX_FINDING_ROUTING — where this change goes>
|
|
461
|
+
```
|
|
462
|
+
F-NNN IDs unique per audit session; do not reuse.
|
|
463
|
+
|
|
464
|
+
Usage: this verbose form is for in-session discussion / deep dive only. The canonical machine-readable record at session end is the compact `AUDIT_SESSION_SUMMARY_FORMAT`. Do NOT emit `FINDING_FORMAT` blocks in the final summary.
|
|
465
|
+
</Contract>
|
|
466
|
+
|
|
467
|
+
<Contract id="AUDIT_SESSION_SUMMARY_FORMAT">
|
|
468
|
+
**Compact AI-to-AI inline format.** Ephemeral output at session end. One header line + one line per finding + optional applied-changes lines. No markdown tables, no decorative prose. Designed so the next agent (or operator's tooling) parses it in one pass.
|
|
469
|
+
|
|
470
|
+
Grammar (one logical record per line, EOL-terminated; fields separated by ` | `):
|
|
471
|
+
|
|
472
|
+
```
|
|
473
|
+
@audit task=<Task-ID> round=<N> mode=<per-task|epic> status=<PASS|PASS_RISK|FAIL> counts=B<n>·M<n>·m<n>·I<n> phases_to_fix=[<P<N>>,...]
|
|
474
|
+
F-<NN> | sev=<B|M|m|I> | type=<TYPE_TOKEN> | conf=<H|M|L> | loc=<path:line|—> | phase=<P<N>|—> | src=<spec/ticket/rule anchor|—> | route=<spec-edit|ticket-reopen|ticket-update|decision-log|code-fix> | act=<one-line action, no newlines>
|
|
475
|
+
F-<NN> | …
|
|
476
|
+
~applied | <target> | <one-line description of inline change> (optional, repeat per applied change)
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Token vocabulary:
|
|
480
|
+
- `sev`: `B`=BLOCKER, `M`=MAJOR, `m`=MINOR, `I`=INFO.
|
|
481
|
+
- `conf`: `H`=HIGH, `M`=MEDIUM, `L`=LOW.
|
|
482
|
+
- `type`: one of `CLOSED_WORLD_DRIFT` | `COMPLETENESS_GAP` | `RUNTIME_BACKING_VIOLATION` | `RULES_COMPLIANCE_VIOLATION` | `RULES_CASCADE_MISMATCH` | `TASK_ID_DRIFT` | `BDD_COVERAGE_MISMATCH` | `EXECUTION_LOG_INCOMPLETE` | `STALE_AFTER_PIVOT` | `INSIGHT_BACKFLOW`.
|
|
483
|
+
- `route`: one of `spec-edit` | `ticket-reopen` | `ticket-update` | `decision-log` | `code-fix` (per `AX_FINDING_ROUTING`).
|
|
484
|
+
- `act` text: Russian operator-facing per `AX_OPERATOR_LANGUAGE` (this is operator-facing artifact prose), single line, no pipe character.
|
|
485
|
+
- `status` `PASS_RISK` = PASS_WITH_ACKNOWLEDGED_RISKS.
|
|
486
|
+
|
|
487
|
+
Example:
|
|
488
|
+
```
|
|
489
|
+
@audit task=TSK-04 round=3 mode=per-task status=FAIL counts=B1·M2·m0·I1
|
|
490
|
+
F-01 | sev=B | type=CLOSED_WORLD_DRIFT | conf=H | loc=src/payments/adapter.ts:42 | src=specs/backend/payments/payments.spec.md#2 | route=spec-edit | act=добавить `IdempotencyKey` в Entity Inventory модуля payments
|
|
491
|
+
F-02 | sev=M | type=RULES_COMPLIANCE_VIOLATION | conf=H | loc=src/payments/adapter.ts:100 | src=ai/directives/coding/typescript-rules.xml#AX_STRICT_NULL | route=ticket-reopen | act=добавить null-guard на response.balanceTransaction
|
|
492
|
+
F-03 | sev=M | type=BDD_COVERAGE_MISMATCH | conf=H | loc=src/payments/adapter.test.ts:55 | src=tasks/backend/payments/payments.task-04.md#4 | route=ticket-update | act=переименовать тест-кейс в `should reject non-positive amount with InvalidAmountError`
|
|
493
|
+
F-04 | sev=I | type=INSIGHT_BACKFLOW | conf=M | loc=src/payments/adapter.ts:88 | src=specs/backend/payments/payments.spec.md#4 | route=spec-edit | act=зафиксировать retry-budget в DbC postcondition
|
|
494
|
+
~applied | specs/backend/payments/payments.spec.md2 | добавлен `IdempotencyKey` в Entity Inventory
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Rules:
|
|
498
|
+
- First line MUST be the `@audit` header. No prose preamble.
|
|
499
|
+
- Findings ordered by descending severity, then by `F-NN`.
|
|
500
|
+
- No empty lines inside the block.
|
|
501
|
+
- If `loc` or `src` is N/A, emit literal `—` (em-dash) — do not omit the field.
|
|
502
|
+
- `act` is operator-facing prose (Russian per policy); everything else is English tokens.
|
|
503
|
+
</Contract>
|
|
504
|
+
|
|
505
|
+
<Contract id="TICKET_AUDIT_ROUND_FORMAT">
|
|
506
|
+
Appended to the ticket file as a `## Audit Rounds` section (created on first reopen-triggering audit; subsequent audits append `### Audit Round N` entries). Same compact AI-to-AI inline grammar as `AUDIT_SESSION_SUMMARY_FORMAT` — the ticket carries the canonical audit record machines can re-parse later.
|
|
507
|
+
|
|
508
|
+
Shape inside the ticket:
|
|
509
|
+
|
|
510
|
+
```markdown
|
|
511
|
+
## Audit Rounds
|
|
512
|
+
|
|
513
|
+
### Audit Round <N> — <YYYY-MM-DD>, after Execution Round <M>
|
|
514
|
+
```
|
|
515
|
+
@audit task=<Task-ID> round=<N> after-exec-round=<M> triggered-reopen=<Round-M+1|none> status=<FAIL|PASS_RISK> counts=B<n>·M<n>·m<n>·I<n>
|
|
516
|
+
F-NN | sev=… | type=… | conf=… | loc=… | src=… | route=… | act=…
|
|
517
|
+
…
|
|
518
|
+
~applied | <target> | <one-line description>
|
|
519
|
+
```
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
Concrete example (inside a ticket file):
|
|
523
|
+
|
|
524
|
+
```markdown
|
|
525
|
+
## Audit Rounds
|
|
526
|
+
|
|
527
|
+
### Audit Round 1 — 2026-05-12, after Execution Round 1
|
|
528
|
+
```
|
|
529
|
+
@audit task=TSK-04 round=1 after-exec-round=1 triggered-reopen=Round-2 status=FAIL counts=B1·M1·m0·I0
|
|
530
|
+
F-01 | sev=B | type=CLOSED_WORLD_DRIFT | conf=H | loc=src/payments/adapter.ts:42 | src=specs/backend/payments/payments.spec.md#2 | route=spec-edit | act=добавить `IdempotencyKey` в Entity Inventory
|
|
531
|
+
F-02 | sev=M | type=RULES_COMPLIANCE_VIOLATION | conf=H | loc=src/payments/adapter.ts:100 | src=ai/directives/coding/typescript-rules.xml#AX_STRICT_NULL | route=ticket-reopen | act=добавить null-guard на response.balanceTransaction
|
|
532
|
+
~applied | specs/backend/payments/payments.spec.md2 | добавлен `IdempotencyKey` в Entity Inventory
|
|
533
|
+
```
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
Constraints:
|
|
537
|
+
- Append-only. Prior `### Audit Round` entries are immutable (mirrors Round-immutability in `phase-execution-protocol`).
|
|
538
|
+
- PASS audits without reopen are NOT written here — output stays ephemeral.
|
|
539
|
+
- `N` increments monotonically across the ticket's lifetime, independent of Execution Round numbers.
|
|
540
|
+
- The fenced code block inside each round is the same compact grammar as `AUDIT_SESSION_SUMMARY_FORMAT` — machines parse it without rewriting.
|
|
541
|
+
</Contract>
|
|
542
|
+
</Output_Contracts>
|
|
543
|
+
</SddAudit>
|