@llipe.com/dev-tasks 0.10.0 → 0.16.1
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/.claude/agents/developer.md +108 -35
- package/.claude/agents/github-ops.md +48 -4
- package/.claude/agents/housekeeping.md +44 -7
- package/.claude/agents/qa-engineer.md +45 -3
- package/.claude/agents/researcher.md +116 -0
- package/.claude/agents/technical-writer.md +61 -6
- package/.claude/agents/ux-engineer.md +1 -0
- package/.claude/agents/verifier.md +48 -6
- package/.claude/commands/developer.md +2 -266
- package/.claude/commands/infra-engineer.md +92 -0
- package/.claude/commands/planner.md +64 -28
- package/.claude/commands/product-engineer.md +58 -19
- package/.claude/commands/researcher.md +27 -0
- package/.claude/commands/technical-writer.md +1 -1
- package/.claude/hooks/branch-guard.sh +30 -0
- package/.claude/hooks/git-guard.sh +483 -22
- package/.claude/skills/activity-codebase-research/SKILL.md +151 -0
- package/.claude/skills/activity-e2e-test-implementation/SKILL.md +156 -0
- package/.claude/skills/activity-generate-spec/SKILL.md +34 -10
- package/.claude/skills/activity-grill/SKILL.md +150 -0
- package/.claude/skills/activity-init/SKILL.md +121 -71
- package/.claude/skills/activity-integration-test-implementation/SKILL.md +156 -0
- package/.claude/skills/activity-refine/SKILL.md +75 -15
- package/.claude/skills/activity-test-standards/SKILL.md +66 -0
- package/.claude/skills/aws-ops/SKILL.md +155 -0
- package/.claude/skills/deploy-ops/SKILL.md +121 -0
- package/.claude/skills/fly-ops/SKILL.md +138 -0
- package/.claude/skills/git-ops/SKILL.md +27 -7
- package/.claude/skills/implement/SKILL.md +49 -4
- package/.claude/skills/memo-cli-usage/REFERENCE.md +230 -17
- package/.claude/skills/memo-cli-usage/SKILL.md +66 -13
- package/.claude/skills/plan/SKILL.md +43 -1
- package/.claude/skills/supabase-ops/SKILL.md +109 -0
- package/.github/agents/developer.agent.md +80 -18
- package/.github/agents/github-ops.agent.md +46 -4
- package/.github/agents/housekeeping.agent.md +43 -7
- package/.github/agents/infra-engineer.agent.md +139 -0
- package/.github/agents/planner.agent.md +45 -9
- package/.github/agents/product-engineer.agent.md +58 -19
- package/.github/agents/qa-engineer.agent.md +43 -4
- package/.github/agents/researcher.agent.md +115 -0
- package/.github/agents/technical-writer.agent.md +60 -6
- package/.github/agents/verifier.agent.md +46 -5
- package/.github/instructions/implement.instructions.md +49 -4
- package/.github/instructions/plan.instructions.md +43 -1
- package/.github/prompts/infra-engineer.prompt.md +12 -0
- package/.github/prompts/product-engineer-init.prompt.md +5 -6
- package/.github/prompts/researcher.prompt.md +28 -0
- package/.github/prompts/technical-writer.prompt.md +1 -1
- package/.github/skills/activity-codebase-research/SKILL.md +146 -0
- package/.github/skills/activity-e2e-test-implementation/SKILL.md +156 -0
- package/.github/skills/activity-generate-spec/SKILL.md +34 -10
- package/.github/skills/activity-grill/SKILL.md +145 -0
- package/.github/skills/activity-init/SKILL.md +120 -70
- package/.github/skills/activity-integration-test-implementation/SKILL.md +156 -0
- package/.github/skills/activity-refine/SKILL.md +75 -15
- package/.github/skills/activity-test-standards/SKILL.md +66 -0
- package/.github/skills/aws-ops/SKILL.md +150 -0
- package/.github/skills/deploy-ops/SKILL.md +116 -0
- package/.github/skills/fly-ops/SKILL.md +133 -0
- package/.github/skills/git-ops/SKILL.md +27 -7
- package/.github/skills/memo-cli-usage/REFERENCE.md +230 -17
- package/.github/skills/memo-cli-usage/SKILL.md +66 -13
- package/.github/skills/supabase-ops/SKILL.md +104 -0
- package/.kiro/agents/developer.md +81 -19
- package/.kiro/agents/github-ops.md +46 -4
- package/.kiro/agents/housekeeping.md +44 -8
- package/.kiro/agents/infra-engineer.md +102 -0
- package/.kiro/agents/planner.md +53 -20
- package/.kiro/agents/product-engineer.md +61 -22
- package/.kiro/agents/qa-engineer.md +44 -5
- package/.kiro/agents/researcher.md +118 -0
- package/.kiro/agents/technical-writer.md +63 -9
- package/.kiro/agents/verifier.md +48 -7
- package/.kiro/skills/activity-codebase-research/SKILL.md +151 -0
- package/.kiro/skills/activity-e2e-test-implementation/SKILL.md +156 -0
- package/.kiro/skills/activity-generate-spec/SKILL.md +34 -10
- package/.kiro/skills/activity-grill/SKILL.md +150 -0
- package/.kiro/skills/activity-init/SKILL.md +121 -71
- package/.kiro/skills/activity-integration-test-implementation/SKILL.md +156 -0
- package/.kiro/skills/activity-refine/SKILL.md +75 -15
- package/.kiro/skills/activity-test-standards/SKILL.md +66 -0
- package/.kiro/skills/aws-ops/SKILL.md +155 -0
- package/.kiro/skills/deploy-ops/SKILL.md +121 -0
- package/.kiro/skills/fly-ops/SKILL.md +138 -0
- package/.kiro/skills/git-ops/SKILL.md +27 -7
- package/.kiro/skills/memo-cli-usage/REFERENCE.md +230 -17
- package/.kiro/skills/memo-cli-usage/SKILL.md +66 -13
- package/.kiro/skills/supabase-ops/SKILL.md +109 -0
- package/.kiro/steering/implement.md +49 -4
- package/.kiro/steering/plan.md +43 -1
- package/AGENTS.md +88 -261
- package/AGENTS.md.template +124 -0
- package/CHANGELOG.md +196 -0
- package/CLAUDE.md +24 -18
- package/CLAUDE.md.template +103 -0
- package/README.md +168 -145
- package/TESTING.md +84 -140
- package/bundle-manifest.json +43 -2
- package/dist/bin/dev-tasks.js +65 -3
- package/dist/bin/dev-tasks.js.map +1 -1
- package/dist/{adapters/cli → bin}/parse-args.d.ts +2 -6
- package/dist/bin/parse-args.d.ts.map +1 -0
- package/dist/{adapters/cli → bin}/parse-args.js +2 -18
- package/dist/bin/parse-args.js.map +1 -0
- package/dist/core/checks/decision-log-format.d.ts +44 -0
- package/dist/core/checks/decision-log-format.d.ts.map +1 -0
- package/dist/core/checks/decision-log-format.js +171 -0
- package/dist/core/checks/decision-log-format.js.map +1 -0
- package/dist/core/checks/docs-structure.d.ts +82 -0
- package/dist/core/checks/docs-structure.d.ts.map +1 -0
- package/dist/core/checks/docs-structure.js +285 -0
- package/dist/core/checks/docs-structure.js.map +1 -0
- package/dist/core/checks/glossary.d.ts +178 -0
- package/dist/core/checks/glossary.d.ts.map +1 -0
- package/dist/core/checks/glossary.js +651 -0
- package/dist/core/checks/glossary.js.map +1 -0
- package/dist/core/checks/index.d.ts +19 -0
- package/dist/core/checks/index.d.ts.map +1 -0
- package/dist/core/checks/index.js +16 -0
- package/dist/core/checks/index.js.map +1 -0
- package/dist/core/checks/run.d.ts +22 -0
- package/dist/core/checks/run.d.ts.map +1 -0
- package/dist/core/checks/run.js +51 -0
- package/dist/core/checks/run.js.map +1 -0
- package/dist/core/distribution/doctor.d.ts +46 -1
- package/dist/core/distribution/doctor.d.ts.map +1 -1
- package/dist/core/distribution/doctor.js +161 -2
- package/dist/core/distribution/doctor.js.map +1 -1
- package/dist/core/distribution/index.d.ts +9 -3
- package/dist/core/distribution/index.d.ts.map +1 -1
- package/dist/core/distribution/index.js +5 -2
- package/dist/core/distribution/index.js.map +1 -1
- package/dist/core/distribution/install-if-absent.d.ts +46 -0
- package/dist/core/distribution/install-if-absent.d.ts.map +1 -0
- package/dist/core/distribution/install-if-absent.js +81 -0
- package/dist/core/distribution/install-if-absent.js.map +1 -0
- package/dist/core/distribution/install.d.ts.map +1 -1
- package/dist/core/distribution/install.js +5 -0
- package/dist/core/distribution/install.js.map +1 -1
- package/dist/core/distribution/migrate-docs.d.ts +64 -0
- package/dist/core/distribution/migrate-docs.d.ts.map +1 -0
- package/dist/core/distribution/migrate-docs.js +139 -0
- package/dist/core/distribution/migrate-docs.js.map +1 -0
- package/dist/core/distribution/profiles.d.ts +49 -0
- package/dist/core/distribution/profiles.d.ts.map +1 -1
- package/dist/core/distribution/profiles.js +45 -0
- package/dist/core/distribution/profiles.js.map +1 -1
- package/dist/core/distribution/update.d.ts +14 -0
- package/dist/core/distribution/update.d.ts.map +1 -1
- package/dist/core/distribution/update.js +77 -3
- package/dist/core/distribution/update.js.map +1 -1
- package/dist/core/distribution/workspace.d.ts +84 -0
- package/dist/core/distribution/workspace.d.ts.map +1 -0
- package/dist/core/distribution/workspace.js +276 -0
- package/dist/core/distribution/workspace.js.map +1 -0
- package/dist/core/exit-codes.d.ts +15 -35
- package/dist/core/exit-codes.d.ts.map +1 -1
- package/dist/core/exit-codes.js +15 -36
- package/dist/core/exit-codes.js.map +1 -1
- package/dist/core/index.d.ts +1 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -7
- package/dist/core/index.js.map +1 -1
- package/package.json +17 -32
- package/templates/claude/settings.json +48 -0
- package/templates/domain/ubiquitous-language.md +28 -0
- package/templates/infra/environments.yaml +16 -0
- package/templates/infra/redaction-patterns.txt +47 -0
- package/templates/runbooks/README.md +14 -0
- package/templates/runbooks/runbook-template.md +40 -0
- package/templates/scripts/deploy-status.sh +89 -0
- package/templates/scripts/deploy-verify.sh +85 -0
- package/templates/scripts/deploy.sh +284 -0
- package/templates/scripts/release.sh +170 -0
- package/templates/scripts/rollback.sh +109 -0
- package/templates/workflows/deploy-dev.yml +66 -0
- package/templates/workflows/deploy-prod.yml +66 -0
- package/templates/workflows/rollback.yml +77 -0
- package/dist/adapters/cli/catalog-build.d.ts +0 -30
- package/dist/adapters/cli/catalog-build.d.ts.map +0 -1
- package/dist/adapters/cli/catalog-build.js +0 -73
- package/dist/adapters/cli/catalog-build.js.map +0 -1
- package/dist/adapters/cli/catalog-query.d.ts +0 -13
- package/dist/adapters/cli/catalog-query.d.ts.map +0 -1
- package/dist/adapters/cli/catalog-query.js +0 -329
- package/dist/adapters/cli/catalog-query.js.map +0 -1
- package/dist/adapters/cli/catalog-scaffold.d.ts +0 -24
- package/dist/adapters/cli/catalog-scaffold.d.ts.map +0 -1
- package/dist/adapters/cli/catalog-scaffold.js +0 -46
- package/dist/adapters/cli/catalog-scaffold.js.map +0 -1
- package/dist/adapters/cli/catalog-validate.d.ts +0 -35
- package/dist/adapters/cli/catalog-validate.d.ts.map +0 -1
- package/dist/adapters/cli/catalog-validate.js +0 -122
- package/dist/adapters/cli/catalog-validate.js.map +0 -1
- package/dist/adapters/cli/ctx-assemble.d.ts +0 -19
- package/dist/adapters/cli/ctx-assemble.d.ts.map +0 -1
- package/dist/adapters/cli/ctx-assemble.js +0 -293
- package/dist/adapters/cli/ctx-assemble.js.map +0 -1
- package/dist/adapters/cli/ctx-fetch.d.ts +0 -49
- package/dist/adapters/cli/ctx-fetch.d.ts.map +0 -1
- package/dist/adapters/cli/ctx-fetch.js +0 -267
- package/dist/adapters/cli/ctx-fetch.js.map +0 -1
- package/dist/adapters/cli/extract-all.d.ts +0 -31
- package/dist/adapters/cli/extract-all.d.ts.map +0 -1
- package/dist/adapters/cli/extract-all.js +0 -374
- package/dist/adapters/cli/extract-all.js.map +0 -1
- package/dist/adapters/cli/extract-asyncapi.d.ts +0 -26
- package/dist/adapters/cli/extract-asyncapi.d.ts.map +0 -1
- package/dist/adapters/cli/extract-asyncapi.js +0 -142
- package/dist/adapters/cli/extract-asyncapi.js.map +0 -1
- package/dist/adapters/cli/extract-component.d.ts +0 -24
- package/dist/adapters/cli/extract-component.d.ts.map +0 -1
- package/dist/adapters/cli/extract-component.js +0 -198
- package/dist/adapters/cli/extract-component.js.map +0 -1
- package/dist/adapters/cli/extract-detect.d.ts +0 -19
- package/dist/adapters/cli/extract-detect.d.ts.map +0 -1
- package/dist/adapters/cli/extract-detect.js +0 -98
- package/dist/adapters/cli/extract-detect.js.map +0 -1
- package/dist/adapters/cli/extract-openapi.d.ts +0 -29
- package/dist/adapters/cli/extract-openapi.d.ts.map +0 -1
- package/dist/adapters/cli/extract-openapi.js +0 -111
- package/dist/adapters/cli/extract-openapi.js.map +0 -1
- package/dist/adapters/cli/extract-schema.d.ts +0 -15
- package/dist/adapters/cli/extract-schema.d.ts.map +0 -1
- package/dist/adapters/cli/extract-schema.js +0 -39
- package/dist/adapters/cli/extract-schema.js.map +0 -1
- package/dist/adapters/cli/index.d.ts +0 -6
- package/dist/adapters/cli/index.d.ts.map +0 -1
- package/dist/adapters/cli/index.js +0 -5
- package/dist/adapters/cli/index.js.map +0 -1
- package/dist/adapters/cli/init.d.ts +0 -37
- package/dist/adapters/cli/init.d.ts.map +0 -1
- package/dist/adapters/cli/init.js +0 -336
- package/dist/adapters/cli/init.js.map +0 -1
- package/dist/adapters/cli/parse-args.d.ts.map +0 -1
- package/dist/adapters/cli/parse-args.js.map +0 -1
- package/dist/adapters/cli/scope-gate.d.ts +0 -25
- package/dist/adapters/cli/scope-gate.d.ts.map +0 -1
- package/dist/adapters/cli/scope-gate.js +0 -157
- package/dist/adapters/cli/scope-gate.js.map +0 -1
- package/dist/adapters/cli/scope.d.ts +0 -26
- package/dist/adapters/cli/scope.d.ts.map +0 -1
- package/dist/adapters/cli/scope.js +0 -172
- package/dist/adapters/cli/scope.js.map +0 -1
- package/dist/adapters/cli/validate-component.d.ts +0 -24
- package/dist/adapters/cli/validate-component.d.ts.map +0 -1
- package/dist/adapters/cli/validate-component.js +0 -62
- package/dist/adapters/cli/validate-component.js.map +0 -1
- package/dist/adapters/cli/verify-contract-diff.d.ts +0 -21
- package/dist/adapters/cli/verify-contract-diff.d.ts.map +0 -1
- package/dist/adapters/cli/verify-contract-diff.js +0 -69
- package/dist/adapters/cli/verify-contract-diff.js.map +0 -1
- package/dist/adapters/cli/verify-drift.d.ts +0 -24
- package/dist/adapters/cli/verify-drift.d.ts.map +0 -1
- package/dist/adapters/cli/verify-drift.js +0 -103
- package/dist/adapters/cli/verify-drift.js.map +0 -1
- package/dist/adapters/cli/verify-impact.d.ts +0 -23
- package/dist/adapters/cli/verify-impact.d.ts.map +0 -1
- package/dist/adapters/cli/verify-impact.js +0 -119
- package/dist/adapters/cli/verify-impact.js.map +0 -1
- package/dist/adapters/mcp/index.d.ts +0 -5
- package/dist/adapters/mcp/index.d.ts.map +0 -1
- package/dist/adapters/mcp/index.js +0 -2
- package/dist/adapters/mcp/index.js.map +0 -1
- package/dist/bin/dt.d.ts +0 -7
- package/dist/bin/dt.d.ts.map +0 -1
- package/dist/bin/dt.js +0 -647
- package/dist/bin/dt.js.map +0 -1
- package/dist/core/catalog/build.d.ts +0 -143
- package/dist/core/catalog/build.d.ts.map +0 -1
- package/dist/core/catalog/build.js +0 -475
- package/dist/core/catalog/build.js.map +0 -1
- package/dist/core/catalog/checks/index.d.ts +0 -18
- package/dist/core/catalog/checks/index.d.ts.map +0 -1
- package/dist/core/catalog/checks/index.js +0 -18
- package/dist/core/catalog/checks/index.js.map +0 -1
- package/dist/core/catalog/checks/v01-schema.d.ts +0 -17
- package/dist/core/catalog/checks/v01-schema.d.ts.map +0 -1
- package/dist/core/catalog/checks/v01-schema.js +0 -57
- package/dist/core/catalog/checks/v01-schema.js.map +0 -1
- package/dist/core/catalog/checks/v02-v03-identity.d.ts +0 -14
- package/dist/core/catalog/checks/v02-v03-identity.d.ts.map +0 -1
- package/dist/core/catalog/checks/v02-v03-identity.js +0 -60
- package/dist/core/catalog/checks/v02-v03-identity.js.map +0 -1
- package/dist/core/catalog/checks/v04-referential-integrity.d.ts +0 -7
- package/dist/core/catalog/checks/v04-referential-integrity.d.ts.map +0 -1
- package/dist/core/catalog/checks/v04-referential-integrity.js +0 -32
- package/dist/core/catalog/checks/v04-referential-integrity.js.map +0 -1
- package/dist/core/catalog/checks/v05-domain-existence.d.ts +0 -6
- package/dist/core/catalog/checks/v05-domain-existence.d.ts.map +0 -1
- package/dist/core/catalog/checks/v05-domain-existence.js +0 -23
- package/dist/core/catalog/checks/v05-domain-existence.js.map +0 -1
- package/dist/core/catalog/checks/v06-v07-paths.d.ts +0 -29
- package/dist/core/catalog/checks/v06-v07-paths.d.ts.map +0 -1
- package/dist/core/catalog/checks/v06-v07-paths.js +0 -107
- package/dist/core/catalog/checks/v06-v07-paths.js.map +0 -1
- package/dist/core/catalog/checks/v08-v10-contracts.d.ts +0 -13
- package/dist/core/catalog/checks/v08-v10-contracts.d.ts.map +0 -1
- package/dist/core/catalog/checks/v08-v10-contracts.js +0 -70
- package/dist/core/catalog/checks/v08-v10-contracts.js.map +0 -1
- package/dist/core/catalog/checks/v11-manual-fields.d.ts +0 -16
- package/dist/core/catalog/checks/v11-manual-fields.d.ts.map +0 -1
- package/dist/core/catalog/checks/v11-manual-fields.js +0 -60
- package/dist/core/catalog/checks/v11-manual-fields.js.map +0 -1
- package/dist/core/catalog/checks/v12-cycles.d.ts +0 -8
- package/dist/core/catalog/checks/v12-cycles.d.ts.map +0 -1
- package/dist/core/catalog/checks/v12-cycles.js +0 -28
- package/dist/core/catalog/checks/v12-cycles.js.map +0 -1
- package/dist/core/catalog/checks/v13-orphan-contracts.d.ts +0 -7
- package/dist/core/catalog/checks/v13-orphan-contracts.d.ts.map +0 -1
- package/dist/core/catalog/checks/v13-orphan-contracts.js +0 -33
- package/dist/core/catalog/checks/v13-orphan-contracts.js.map +0 -1
- package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts +0 -8
- package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts.map +0 -1
- package/dist/core/catalog/checks/v14-v15-lifecycle.js +0 -42
- package/dist/core/catalog/checks/v14-v15-lifecycle.js.map +0 -1
- package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts +0 -7
- package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts.map +0 -1
- package/dist/core/catalog/checks/v16-deprecated-consumers.js +0 -47
- package/dist/core/catalog/checks/v16-deprecated-consumers.js.map +0 -1
- package/dist/core/catalog/checks/v17-low-confidence.d.ts +0 -7
- package/dist/core/catalog/checks/v17-low-confidence.d.ts.map +0 -1
- package/dist/core/catalog/checks/v17-low-confidence.js +0 -32
- package/dist/core/catalog/checks/v17-low-confidence.js.map +0 -1
- package/dist/core/catalog/checks/v18-low-payload.d.ts +0 -7
- package/dist/core/catalog/checks/v18-low-payload.d.ts.map +0 -1
- package/dist/core/catalog/checks/v18-low-payload.js +0 -33
- package/dist/core/catalog/checks/v18-low-payload.js.map +0 -1
- package/dist/core/catalog/checks/v19-domain-membership.d.ts +0 -8
- package/dist/core/catalog/checks/v19-domain-membership.d.ts.map +0 -1
- package/dist/core/catalog/checks/v19-domain-membership.js +0 -55
- package/dist/core/catalog/checks/v19-domain-membership.js.map +0 -1
- package/dist/core/catalog/coverage.d.ts +0 -39
- package/dist/core/catalog/coverage.d.ts.map +0 -1
- package/dist/core/catalog/coverage.js +0 -62
- package/dist/core/catalog/coverage.js.map +0 -1
- package/dist/core/catalog/graph.d.ts +0 -49
- package/dist/core/catalog/graph.d.ts.map +0 -1
- package/dist/core/catalog/graph.js +0 -114
- package/dist/core/catalog/graph.js.map +0 -1
- package/dist/core/catalog/index-model.d.ts +0 -96
- package/dist/core/catalog/index-model.d.ts.map +0 -1
- package/dist/core/catalog/index-model.js +0 -8
- package/dist/core/catalog/index-model.js.map +0 -1
- package/dist/core/catalog/index.d.ts +0 -5
- package/dist/core/catalog/index.d.ts.map +0 -1
- package/dist/core/catalog/index.js +0 -2
- package/dist/core/catalog/index.js.map +0 -1
- package/dist/core/catalog/queries.d.ts +0 -69
- package/dist/core/catalog/queries.d.ts.map +0 -1
- package/dist/core/catalog/queries.js +0 -165
- package/dist/core/catalog/queries.js.map +0 -1
- package/dist/core/catalog/resolve.d.ts +0 -47
- package/dist/core/catalog/resolve.d.ts.map +0 -1
- package/dist/core/catalog/resolve.js +0 -318
- package/dist/core/catalog/resolve.js.map +0 -1
- package/dist/core/catalog/scaffold.d.ts +0 -31
- package/dist/core/catalog/scaffold.d.ts.map +0 -1
- package/dist/core/catalog/scaffold.js +0 -141
- package/dist/core/catalog/scaffold.js.map +0 -1
- package/dist/core/catalog/validate-component.d.ts +0 -50
- package/dist/core/catalog/validate-component.d.ts.map +0 -1
- package/dist/core/catalog/validate-component.js +0 -105
- package/dist/core/catalog/validate-component.js.map +0 -1
- package/dist/core/catalog/validate.d.ts +0 -71
- package/dist/core/catalog/validate.d.ts.map +0 -1
- package/dist/core/catalog/validate.js +0 -103
- package/dist/core/catalog/validate.js.map +0 -1
- package/dist/core/context/assemble.d.ts +0 -126
- package/dist/core/context/assemble.d.ts.map +0 -1
- package/dist/core/context/assemble.js +0 -197
- package/dist/core/context/assemble.js.map +0 -1
- package/dist/core/context/cache.d.ts +0 -60
- package/dist/core/context/cache.d.ts.map +0 -1
- package/dist/core/context/cache.js +0 -236
- package/dist/core/context/cache.js.map +0 -1
- package/dist/core/context/exit-codes.d.ts +0 -28
- package/dist/core/context/exit-codes.d.ts.map +0 -1
- package/dist/core/context/exit-codes.js +0 -28
- package/dist/core/context/exit-codes.js.map +0 -1
- package/dist/core/context/fetch.d.ts +0 -55
- package/dist/core/context/fetch.d.ts.map +0 -1
- package/dist/core/context/fetch.js +0 -112
- package/dist/core/context/fetch.js.map +0 -1
- package/dist/core/context/index.d.ts +0 -11
- package/dist/core/context/index.d.ts.map +0 -1
- package/dist/core/context/index.js +0 -8
- package/dist/core/context/index.js.map +0 -1
- package/dist/core/context/init.d.ts +0 -179
- package/dist/core/context/init.d.ts.map +0 -1
- package/dist/core/context/init.js +0 -532
- package/dist/core/context/init.js.map +0 -1
- package/dist/core/context/layers/architecture-layer.d.ts +0 -13
- package/dist/core/context/layers/architecture-layer.d.ts.map +0 -1
- package/dist/core/context/layers/architecture-layer.js +0 -24
- package/dist/core/context/layers/architecture-layer.js.map +0 -1
- package/dist/core/context/layers/contracts-layer.d.ts +0 -13
- package/dist/core/context/layers/contracts-layer.d.ts.map +0 -1
- package/dist/core/context/layers/contracts-layer.js +0 -83
- package/dist/core/context/layers/contracts-layer.js.map +0 -1
- package/dist/core/context/layers/conventions-delta-layer.d.ts +0 -13
- package/dist/core/context/layers/conventions-delta-layer.d.ts.map +0 -1
- package/dist/core/context/layers/conventions-delta-layer.js +0 -37
- package/dist/core/context/layers/conventions-delta-layer.js.map +0 -1
- package/dist/core/context/layers/flow-layer.d.ts +0 -14
- package/dist/core/context/layers/flow-layer.d.ts.map +0 -1
- package/dist/core/context/layers/flow-layer.js +0 -61
- package/dist/core/context/layers/flow-layer.js.map +0 -1
- package/dist/core/context/layers/index-layer.d.ts +0 -13
- package/dist/core/context/layers/index-layer.d.ts.map +0 -1
- package/dist/core/context/layers/index-layer.js +0 -77
- package/dist/core/context/layers/index-layer.js.map +0 -1
- package/dist/core/context/layers/primary-layer.d.ts +0 -16
- package/dist/core/context/layers/primary-layer.d.ts.map +0 -1
- package/dist/core/context/layers/primary-layer.js +0 -61
- package/dist/core/context/layers/primary-layer.js.map +0 -1
- package/dist/core/context/layers/secondary-layer.d.ts +0 -19
- package/dist/core/context/layers/secondary-layer.d.ts.map +0 -1
- package/dist/core/context/layers/secondary-layer.js +0 -52
- package/dist/core/context/layers/secondary-layer.js.map +0 -1
- package/dist/core/context/session-lock.d.ts +0 -114
- package/dist/core/context/session-lock.d.ts.map +0 -1
- package/dist/core/context/session-lock.js +0 -90
- package/dist/core/context/session-lock.js.map +0 -1
- package/dist/core/context/tokens.d.ts +0 -35
- package/dist/core/context/tokens.d.ts.map +0 -1
- package/dist/core/context/tokens.js +0 -88
- package/dist/core/context/tokens.js.map +0 -1
- package/dist/core/extract/asyncapi/declared.d.ts +0 -19
- package/dist/core/extract/asyncapi/declared.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/declared.js +0 -168
- package/dist/core/extract/asyncapi/declared.js.map +0 -1
- package/dist/core/extract/asyncapi/index.d.ts +0 -12
- package/dist/core/extract/asyncapi/index.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/index.js +0 -8
- package/dist/core/extract/asyncapi/index.js.map +0 -1
- package/dist/core/extract/asyncapi/payloads.d.ts +0 -20
- package/dist/core/extract/asyncapi/payloads.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/payloads.js +0 -421
- package/dist/core/extract/asyncapi/payloads.js.map +0 -1
- package/dist/core/extract/asyncapi/topics.d.ts +0 -27
- package/dist/core/extract/asyncapi/topics.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/topics.js +0 -368
- package/dist/core/extract/asyncapi/topics.js.map +0 -1
- package/dist/core/extract/asyncapi/types.d.ts +0 -129
- package/dist/core/extract/asyncapi/types.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/types.js +0 -5
- package/dist/core/extract/asyncapi/types.js.map +0 -1
- package/dist/core/extract/asyncapi/validate.d.ts +0 -29
- package/dist/core/extract/asyncapi/validate.d.ts.map +0 -1
- package/dist/core/extract/asyncapi/validate.js +0 -156
- package/dist/core/extract/asyncapi/validate.js.map +0 -1
- package/dist/core/extract/component.d.ts +0 -204
- package/dist/core/extract/component.d.ts.map +0 -1
- package/dist/core/extract/component.js +0 -258
- package/dist/core/extract/component.js.map +0 -1
- package/dist/core/extract/detect.d.ts +0 -35
- package/dist/core/extract/detect.d.ts.map +0 -1
- package/dist/core/extract/detect.js +0 -89
- package/dist/core/extract/detect.js.map +0 -1
- package/dist/core/extract/index.d.ts +0 -12
- package/dist/core/extract/index.d.ts.map +0 -1
- package/dist/core/extract/index.js +0 -6
- package/dist/core/extract/index.js.map +0 -1
- package/dist/core/extract/ladder.d.ts +0 -79
- package/dist/core/extract/ladder.d.ts.map +0 -1
- package/dist/core/extract/ladder.js +0 -70
- package/dist/core/extract/ladder.js.map +0 -1
- package/dist/core/extract/openapi/index.d.ts +0 -43
- package/dist/core/extract/openapi/index.d.ts.map +0 -1
- package/dist/core/extract/openapi/index.js +0 -142
- package/dist/core/extract/openapi/index.js.map +0 -1
- package/dist/core/extract/openapi/route1.d.ts +0 -36
- package/dist/core/extract/openapi/route1.d.ts.map +0 -1
- package/dist/core/extract/openapi/route1.js +0 -333
- package/dist/core/extract/openapi/route1.js.map +0 -1
- package/dist/core/extract/openapi/route2-introspect.d.ts +0 -18
- package/dist/core/extract/openapi/route2-introspect.d.ts.map +0 -1
- package/dist/core/extract/openapi/route2-introspect.js +0 -249
- package/dist/core/extract/openapi/route2-introspect.js.map +0 -1
- package/dist/core/extract/openapi/route2.d.ts +0 -69
- package/dist/core/extract/openapi/route2.d.ts.map +0 -1
- package/dist/core/extract/openapi/route2.js +0 -211
- package/dist/core/extract/openapi/route2.js.map +0 -1
- package/dist/core/extract/openapi/route3.d.ts +0 -26
- package/dist/core/extract/openapi/route3.d.ts.map +0 -1
- package/dist/core/extract/openapi/route3.js +0 -737
- package/dist/core/extract/openapi/route3.js.map +0 -1
- package/dist/core/extract/openapi/types.d.ts +0 -125
- package/dist/core/extract/openapi/types.d.ts.map +0 -1
- package/dist/core/extract/openapi/types.js +0 -5
- package/dist/core/extract/openapi/types.js.map +0 -1
- package/dist/core/extract/openapi/validate.d.ts +0 -29
- package/dist/core/extract/openapi/validate.d.ts.map +0 -1
- package/dist/core/extract/openapi/validate.js +0 -200
- package/dist/core/extract/openapi/validate.js.map +0 -1
- package/dist/core/extract/orm/drizzle.d.ts +0 -20
- package/dist/core/extract/orm/drizzle.d.ts.map +0 -1
- package/dist/core/extract/orm/drizzle.js +0 -283
- package/dist/core/extract/orm/drizzle.js.map +0 -1
- package/dist/core/extract/orm/information-schema.d.ts +0 -26
- package/dist/core/extract/orm/information-schema.d.ts.map +0 -1
- package/dist/core/extract/orm/information-schema.js +0 -142
- package/dist/core/extract/orm/information-schema.js.map +0 -1
- package/dist/core/extract/orm/prisma.d.ts +0 -23
- package/dist/core/extract/orm/prisma.d.ts.map +0 -1
- package/dist/core/extract/orm/prisma.js +0 -234
- package/dist/core/extract/orm/prisma.js.map +0 -1
- package/dist/core/extract/orm/typeorm.d.ts +0 -22
- package/dist/core/extract/orm/typeorm.d.ts.map +0 -1
- package/dist/core/extract/orm/typeorm.js +0 -269
- package/dist/core/extract/orm/typeorm.js.map +0 -1
- package/dist/core/extract/orm/types.d.ts +0 -97
- package/dist/core/extract/orm/types.d.ts.map +0 -1
- package/dist/core/extract/orm/types.js +0 -6
- package/dist/core/extract/orm/types.js.map +0 -1
- package/dist/core/extract/prompt.d.ts +0 -21
- package/dist/core/extract/prompt.d.ts.map +0 -1
- package/dist/core/extract/prompt.js +0 -79
- package/dist/core/extract/prompt.js.map +0 -1
- package/dist/core/extract/provider.d.ts +0 -121
- package/dist/core/extract/provider.d.ts.map +0 -1
- package/dist/core/extract/provider.js +0 -6
- package/dist/core/extract/provider.js.map +0 -1
- package/dist/core/extract/providers/node-ts.d.ts +0 -69
- package/dist/core/extract/providers/node-ts.d.ts.map +0 -1
- package/dist/core/extract/providers/node-ts.js +0 -320
- package/dist/core/extract/providers/node-ts.js.map +0 -1
- package/dist/core/extract/render/schema-md.d.ts +0 -16
- package/dist/core/extract/render/schema-md.d.ts.map +0 -1
- package/dist/core/extract/render/schema-md.js +0 -140
- package/dist/core/extract/render/schema-md.js.map +0 -1
- package/dist/core/extract/report.d.ts +0 -125
- package/dist/core/extract/report.d.ts.map +0 -1
- package/dist/core/extract/report.js +0 -52
- package/dist/core/extract/report.js.map +0 -1
- package/dist/core/extract/schema.d.ts +0 -34
- package/dist/core/extract/schema.d.ts.map +0 -1
- package/dist/core/extract/schema.js +0 -146
- package/dist/core/extract/schema.js.map +0 -1
- package/dist/core/extract/workspaces.d.ts +0 -33
- package/dist/core/extract/workspaces.d.ts.map +0 -1
- package/dist/core/extract/workspaces.js +0 -193
- package/dist/core/extract/workspaces.js.map +0 -1
- package/dist/core/providers/index.d.ts +0 -6
- package/dist/core/providers/index.d.ts.map +0 -1
- package/dist/core/providers/index.js +0 -2
- package/dist/core/providers/index.js.map +0 -1
- package/dist/core/providers/tracker.d.ts +0 -74
- package/dist/core/providers/tracker.d.ts.map +0 -1
- package/dist/core/providers/tracker.js +0 -38
- package/dist/core/providers/tracker.js.map +0 -1
- package/dist/core/scope/calibration.d.ts +0 -25
- package/dist/core/scope/calibration.d.ts.map +0 -1
- package/dist/core/scope/calibration.js +0 -52
- package/dist/core/scope/calibration.js.map +0 -1
- package/dist/core/scope/closure.d.ts +0 -31
- package/dist/core/scope/closure.d.ts.map +0 -1
- package/dist/core/scope/closure.js +0 -68
- package/dist/core/scope/closure.js.map +0 -1
- package/dist/core/scope/gate.d.ts +0 -41
- package/dist/core/scope/gate.d.ts.map +0 -1
- package/dist/core/scope/gate.js +0 -165
- package/dist/core/scope/gate.js.map +0 -1
- package/dist/core/scope/index.d.ts +0 -18
- package/dist/core/scope/index.d.ts.map +0 -1
- package/dist/core/scope/index.js +0 -12
- package/dist/core/scope/index.js.map +0 -1
- package/dist/core/scope/partition.d.ts +0 -36
- package/dist/core/scope/partition.d.ts.map +0 -1
- package/dist/core/scope/partition.js +0 -78
- package/dist/core/scope/partition.js.map +0 -1
- package/dist/core/scope/prompt.d.ts +0 -39
- package/dist/core/scope/prompt.d.ts.map +0 -1
- package/dist/core/scope/prompt.js +0 -123
- package/dist/core/scope/prompt.js.map +0 -1
- package/dist/core/scope/scoping.d.ts +0 -52
- package/dist/core/scope/scoping.d.ts.map +0 -1
- package/dist/core/scope/scoping.js +0 -99
- package/dist/core/scope/scoping.js.map +0 -1
- package/dist/core/scope/types.d.ts +0 -77
- package/dist/core/scope/types.d.ts.map +0 -1
- package/dist/core/scope/types.js +0 -5
- package/dist/core/scope/types.js.map +0 -1
- package/dist/core/scope/validate.d.ts +0 -47
- package/dist/core/scope/validate.d.ts.map +0 -1
- package/dist/core/scope/validate.js +0 -90
- package/dist/core/scope/validate.js.map +0 -1
- package/dist/core/verify/asyncapi-diff.d.ts +0 -34
- package/dist/core/verify/asyncapi-diff.d.ts.map +0 -1
- package/dist/core/verify/asyncapi-diff.js +0 -209
- package/dist/core/verify/asyncapi-diff.js.map +0 -1
- package/dist/core/verify/contract-diff.d.ts +0 -39
- package/dist/core/verify/contract-diff.d.ts.map +0 -1
- package/dist/core/verify/contract-diff.js +0 -63
- package/dist/core/verify/contract-diff.js.map +0 -1
- package/dist/core/verify/drift.d.ts +0 -47
- package/dist/core/verify/drift.d.ts.map +0 -1
- package/dist/core/verify/drift.js +0 -122
- package/dist/core/verify/drift.js.map +0 -1
- package/dist/core/verify/impact.d.ts +0 -22
- package/dist/core/verify/impact.d.ts.map +0 -1
- package/dist/core/verify/impact.js +0 -93
- package/dist/core/verify/impact.js.map +0 -1
- package/dist/core/verify/index.d.ts +0 -10
- package/dist/core/verify/index.d.ts.map +0 -1
- package/dist/core/verify/index.js +0 -9
- package/dist/core/verify/index.js.map +0 -1
- package/dist/core/verify/openapi-diff.d.ts +0 -29
- package/dist/core/verify/openapi-diff.d.ts.map +0 -1
- package/dist/core/verify/openapi-diff.js +0 -291
- package/dist/core/verify/openapi-diff.js.map +0 -1
- package/dist/core/verify/types.d.ts +0 -138
- package/dist/core/verify/types.d.ts.map +0 -1
- package/dist/core/verify/types.js +0 -5
- package/dist/core/verify/types.js.map +0 -1
- package/schemas/component.schema.json +0 -203
- package/schemas/flow.schema.json +0 -75
- package/schemas/scope-output.schema.json +0 -62
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Plan and apply infrastructure changes one approved, reversible step at a time; record every result and hand off a draft PR."
|
|
3
|
+
argument-hint: "<environment> [infra/changes/<ChangeId>] [plan or discovery request]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /infra-engineer — Infrastructure Change Controller
|
|
7
|
+
|
|
8
|
+
**Runs in the main thread.** It pauses for plan approval and then exactly one approval per step. It never runs an autonomous or batch mode.
|
|
9
|
+
|
|
10
|
+
**Request:** $ARGUMENTS
|
|
11
|
+
|
|
12
|
+
Adopt the following role and execute the complete `infra-engineer` contract. The canonical policy is reproduced here so Claude has behavioral parity with Copilot and Kiro.
|
|
13
|
+
|
|
14
|
+
## Authority and working loop
|
|
15
|
+
|
|
16
|
+
You are **infra-engineer**. Respect `AGENTS.md`, `docs/tech.md`, and the target repository's environment declaration. The non-skippable loop is:
|
|
17
|
+
|
|
18
|
+
`discover → plan → approve plan → (approve step → backup → apply → verify → record) → result`
|
|
19
|
+
|
|
20
|
+
There is no skippable phase, autonomous mode, batch mode, or approval that carries across steps. No write occurs without a valid `ChangeId` and approval for that specific step. You MUST NOT push or merge to `main`, or create, move, delete, or push tags. Reading logs is the only exception to the write gate and remains bounded and redacted.
|
|
21
|
+
|
|
22
|
+
## Step contract and lifecycle
|
|
23
|
+
|
|
24
|
+
`ChangeId` is `infra/changes/<YYYYMMDD>-<two-to-five-hyphenated-words>/`. `plan.md` records ChangeId, environment, identity, cost, approval status, and each step's `Kind`, `Tool`, `Touches state`, `Backup`, `Forward`, `Verify`, and `Revert`. `commands.sh` is append-only and references secrets by ARN, name, or substitution. `rollback.sh` is regenerated after each applied step in reverse order and supports `--from N`. `result.md` records each step's `Step`, `Status`, `Backup id`, `Restore command`, `Verified at`, and `Evidence`, then a final `status:`. Inventory JSON has `_generated` with `platform`, `identity`, `discovered_at`, `tool_version`, and `notice: "generated by infra-engineer, do not hand-edit"`; Supabase also reports `has_legacy_keys` and `rls_disabled_tables` without key material.
|
|
25
|
+
|
|
26
|
+
Each step has `kind`, `tool`, `environment`, `forward`, `expected result`, `verify`, `revert`, and `touches state`. Valid states are `pending → approved → backed_up? → applied → verified | failed → reverted?`, with `pending → skipped` only when a human gives a reason. Invalid transitions, duplicate approvals, and resumed completed steps are blocked.
|
|
27
|
+
|
|
28
|
+
Every step has a revert. Production with no revert is refused; non-production `Revert: none (accepted)` needs explicit per-step acceptance. Production `touches state: yes` requires a backup id and restore command in `result.md` before apply. The two-tier model classifies resources as foundation or application; foundation resources route to `tier0_tool` and are never applied. Foundation resources route to `tier0_tool` and are never applied; ephemeral resources carry `ExpiresAt`. Destroy uses reverse dependency order, typed environment confirmation, and refuses production foundation targets.
|
|
29
|
+
|
|
30
|
+
## Environment, identity, tools, and tool-routing table
|
|
31
|
+
|
|
32
|
+
A missing `infra/environments.yaml` or a first line of `# status: template` is treated as missing and blocks. Missing platform blocks refuse steps targeting that platform. `production: true` selects tag-triggered deploys, backup, and no-revert policy.
|
|
33
|
+
|
|
34
|
+
The tool check verifies presence, skill-declared version floor, and authentication. Results are `ok`, `missing`, `below-floor`, `unauthenticated`, or `wrong-identity`; non-`ok` blocks with remediation. No auto-install and no fallback. Floors are AWS CLI `2.x`, flyctl current major, Supabase CLI `2.x`, gh `2.x`, and yq `4.x`. Identity assertion compares the target environment with these probes: `aws sts get-caller-identity`, `flyctl auth whoami`, `supabase projects list`, `gh auth status`, and the Cloudflare token verification endpoint; mismatch is `blocked`.
|
|
35
|
+
|
|
36
|
+
| Change kind | Tool | Phase | Owning skill |
|
|
37
|
+
| --------------------- | ---------------------------------------- | -------- | --------------------------------------------- |
|
|
38
|
+
| discover AWS | aws | discover | aws-ops |
|
|
39
|
+
| discover Fly | flyctl | discover | fly-ops |
|
|
40
|
+
| discover Supabase | supabase | discover | supabase-ops |
|
|
41
|
+
| build image | aws | apply | aws-ops |
|
|
42
|
+
| create app | flyctl | apply | fly-ops |
|
|
43
|
+
| deploy app | flyctl / deploy script | apply | fly-ops / deploy-ops |
|
|
44
|
+
| set secret | aws / flyctl / supabase / GitHub Actions | apply | aws-ops / fly-ops / supabase-ops / deploy-ops |
|
|
45
|
+
| create IAM policy | aws | apply | aws-ops |
|
|
46
|
+
| attach IAM policy | aws | apply | aws-ops |
|
|
47
|
+
| DNS record | Cloudflare API | apply | deploy-ops |
|
|
48
|
+
| certificate (ACM) | aws | apply | aws-ops |
|
|
49
|
+
| certificate (Fly) | flyctl | apply | fly-ops |
|
|
50
|
+
| database migration | supabase | apply | supabase-ops |
|
|
51
|
+
| foundation change | tier0_tool | route | owning platform skill |
|
|
52
|
+
| repo and PR operation | gh | record | github-ops |
|
|
53
|
+
| pipeline change | gh / git | record | deploy-ops / github-ops |
|
|
54
|
+
| log triage | owning platform log tool | discover | owning platform skill |
|
|
55
|
+
| cost sweep | owning platform read-only tool | discover | owning platform skill |
|
|
56
|
+
|
|
57
|
+
## Costs, tags, secrets, logs, and certificates
|
|
58
|
+
|
|
59
|
+
`plan.md` lists each monthly estimate with a source; at or above threshold is marked `APPROVAL REQUIRED` and approved by name. Cost sweep is read-only and checks unassociated EIPs, available EBS, stale snapshots, idle NAT, unused load balancers, zero-scaled services holding a load balancer, expired `ExpiresAt`, untagged resources, and log groups without retention. Resources carry environment, owner, ChangeId, and `ExpiresAt` where applicable. Agents never create, move, delete, or push tags. Secrets use ARN/name references, `fly secrets`, `supabase secrets`, `gh secret set`, and OIDC where possible; no values are recorded.
|
|
60
|
+
|
|
61
|
+
Log triage requires a bounded UTC `--since` or start/end window and stated scan scope before any billed query. Every result passes through `templates/infra/redaction-patterns.txt`; raw output is never written and inference is labelled. Cloudflare DNS captures the prior record as revert before update and verifies after; ACM and Fly certificate steps are separate approved routing-table steps.
|
|
62
|
+
|
|
63
|
+
## Runbook Delivery in the Same PR (FR-49a)
|
|
64
|
+
|
|
65
|
+
A script or workflow that ships without a runbook is a procedure that
|
|
66
|
+
lives in one person's head until they leave. These **MUST** arrive with a
|
|
67
|
+
runbook in the **same draft PR**, not a follow-up issue:
|
|
68
|
+
|
|
69
|
+
- every script added or materially changed under `templates/scripts/`
|
|
70
|
+
- every workflow under `templates/workflows/` and `.github/workflows/`
|
|
71
|
+
- every `infra-engineer` change kind — secrets, deploy, DNS,
|
|
72
|
+
certificates, IAM policy, migrations
|
|
73
|
+
|
|
74
|
+
Updating an existing runbook satisfies this; a new file is required only
|
|
75
|
+
when no runbook covers the procedure. Add the new file to
|
|
76
|
+
`docs/runbooks/README.md` and to `EXPECTED_RUNBOOKS` in
|
|
77
|
+
`test/unit/runbook-set.test.ts`, or the suite fails on the undeclared
|
|
78
|
+
file — which is the reminder working, not a problem with it.
|
|
79
|
+
|
|
80
|
+
A PR that skips this is flagged by the `verifier`'s runbook-coverage
|
|
81
|
+
finding. That finding is advisory and does not block the PR; this rule
|
|
82
|
+
is what it is measuring against.
|
|
83
|
+
|
|
84
|
+
## Handoff
|
|
85
|
+
|
|
86
|
+
Outcomes are `applied`, `verified`, `failed`, `blocked`, `routed`, `reverted`, or `skipped(<reason>)` with remediation for blocked. Retry at most three attempts or fifteen minutes per step. Commit the ChangeId records on an issue/story branch with a Conventional Commit and have `github-ops` open a draft PR with plan, result, rollback, and validation evidence. Never merge the draft PR.
|
|
87
|
+
|
|
88
|
+
## Reverse-direction routing
|
|
89
|
+
|
|
90
|
+
You **MAY** conditionally invoke `researcher` when the platform surface is unfamiliar — an unknown account layout, an undocumented resource graph, or a provider feature you have not exercised — and consume its `/workstream/research-*.md` artifact before planning. This is conditional and never mandatory: a familiar surface invokes `researcher` for nothing.
|
|
91
|
+
|
|
92
|
+
A `verifier` audit does **not** apply to `infra/` deliverables. `infra/` change records (`plan.md`, `commands.sh`, `rollback.sh`, `result.md`) and inventory are operational artifacts governed by the per-step approval, revert, and backup gates of this agent, not by the grey-box fidelity audit that `verifier` runs against feature code. The human review on the change-record draft PR is the gate for `infra/` work.
|
|
@@ -32,8 +32,7 @@ GitHub Issues and PRs are the source of truth for execution status.
|
|
|
32
32
|
|
|
33
33
|
You **MUST NOT** write application code for stories. You orchestrate and consolidate.
|
|
34
34
|
When a delegated story has UI impact and `/DESIGN.md` exists, you **MUST** require DESIGN.md compliance checks in the `developer` handoff payload.
|
|
35
|
-
|
|
36
|
-
When orchestrating cross-repo partitioned work (>1 `primary` component), you **MUST** delegate each per-repo sub-task to `developer` scoped exclusively to its assigned repository. Sub-tasks **MUST** be ordered producer-before-consumers. If a boundary contract has `payload_confidence: low`, you **MUST** block the dependent sub-task until the contract is raised to `medium`. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
|
|
35
|
+
**Per-story infra routing (conditional).** When an individual story in the queue carries infrastructure scope — a platform write such as secrets, deploy, DNS, certificates, IAM policy, or a migration against a shared or cloud project — you **MUST** route that work to `infra-engineer` rather than letting `developer` run the platform command, so the approval, revert, and backup gates bind. This is distinct from the post-integration deploy handoff below: it applies per story, during the execution queue, only when that story's scope requires it. It is conditional and never mandatory — a story with no infra scope invokes `infra-engineer` for nothing.
|
|
37
36
|
|
|
38
37
|
### Skills
|
|
39
38
|
|
|
@@ -57,6 +56,38 @@ If any required input is missing, ask one focused question with a default option
|
|
|
57
56
|
|
|
58
57
|
---
|
|
59
58
|
|
|
59
|
+
## memo-cli Integration (When Available)
|
|
60
|
+
|
|
61
|
+
### Bank Declaration
|
|
62
|
+
|
|
63
|
+
This agent's bank id is `planner-memory`, stable for the agent's life (PRD §15). Export it before any memo command in the session:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
export MEMO_BANK=planner-memory
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`planner` does not read or write memo entries itself — orchestration-scoped context comes from the task file/GitHub milestone, and each delegated `developer` subagent runs its own `memo recall`/`memo write` sequence scoped to `developer-memory`. This declaration exists for AC parity with the other long-lived agent definitions and for any future orchestration-level use of `--bank $MEMO_BANK`.
|
|
70
|
+
|
|
71
|
+
### Session Close
|
|
72
|
+
|
|
73
|
+
No memo action in Phase 2. `memo used` and `memo decay` arrive with memo-cli 1.4.0.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Codebase Research for Pre-Orchestration (Conditional)
|
|
78
|
+
|
|
79
|
+
Before parsing stories and building the dependency graph, you **SHOULD** invoke `researcher` if:
|
|
80
|
+
|
|
81
|
+
- The stories span multiple modules or packages whose dependencies are not yet established.
|
|
82
|
+
- The orchestration involves unfamiliar areas of the codebase.
|
|
83
|
+
- Story ordering requires understanding cross-module data flow or contract boundaries.
|
|
84
|
+
|
|
85
|
+
**Skip when:** story dependencies are already explicit in the task file, the codebase is small and well-understood, or a non-stale research artifact already covers the scope.
|
|
86
|
+
|
|
87
|
+
When triggered, delegate to `researcher` with the orchestration question (e.g., "What are the dependency relationships between modules X, Y, and Z?"). Consume the resulting `/workstream/research-*.md` artifact to inform dependency ordering in Phase 1.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
60
91
|
## Phase 0 - Discover Task Source
|
|
61
92
|
|
|
62
93
|
### Option A - File in /workstream
|
|
@@ -281,6 +312,7 @@ For each story invoke `developer` in **Execute Mode** with:
|
|
|
281
312
|
- Story scope to avoid cross-story edits
|
|
282
313
|
- Test-first directive: developer **MUST** follow test-first design (write tests before implementation)
|
|
283
314
|
- Test plan reference (if available): path to `/workstream/test-plan-*.md` for this story
|
|
315
|
+
- Decision log (`decision_log_path`): `workstream/decisions-<feature>.md`, passed unconditionally for every story — every feature has exactly one decision log, whether or not this story's spec section cited a decision
|
|
284
316
|
|
|
285
317
|
### Verifier Design Mode (Pre-Implementation)
|
|
286
318
|
|
|
@@ -306,6 +338,7 @@ Execution mode: pre-approved autonomous sequential
|
|
|
306
338
|
Integration target branch: {{ integration_branch }}
|
|
307
339
|
Test-first: YES — write/update tests before implementation for each behavioral sub-task
|
|
308
340
|
Test plan: {{ test_plan_path | default: "none — derive tests from acceptance criteria" }}
|
|
341
|
+
Decision log: {{ decision_log_path }}
|
|
309
342
|
|
|
310
343
|
Implement only this story scope.
|
|
311
344
|
Follow test-first design: for each behavioral sub-task, write tests first, verify they fail, then implement.
|
|
@@ -356,7 +389,7 @@ workstream_files:
|
|
|
356
389
|
- audit: PASS | FAIL | NOT RUN
|
|
357
390
|
coverage_gate: PASS | FAIL | SKIPPED(<reason>)
|
|
358
391
|
checklist_sync: synced | mismatch-fixed | blocked
|
|
359
|
-
verifier_audit: run | blocked
|
|
392
|
+
verifier_audit: run | not-run(no-delegation) | blocked
|
|
360
393
|
fidelity_verdict: High | Medium | Low | none
|
|
361
394
|
highest_drift_impact: Critical | Major | Minor | None
|
|
362
395
|
drift_findings: <count-or-none>
|
|
@@ -393,15 +426,15 @@ For each completed story PR:
|
|
|
393
426
|
2. Verify required checks are successful.
|
|
394
427
|
3. Verify delegated closeout payload reports `docs_drift_status` as `clean` or `drift-fixed`.
|
|
395
428
|
4. Verify delegated quality gates are all `PASS` (`test`, `lint`, `format:check`, `typecheck`, `audit`).
|
|
396
|
-
5.
|
|
397
|
-
6.
|
|
429
|
+
5. **Invoke `qa-engineer` directly** — scoped to this story's diff/branch/PR — immediately after receiving the `developer` subagent's closeout payload. The `developer` subagent structurally lacks the `Task` tool (see `.claude/agents/developer.md`'s Operating Context) and may honestly self-report `coverage_gate: SKIPPED(no-delegation)`; that is expected in this path, not a red flag. Record the result of _planner's own_ `qa-engineer` invocation and verify it is `PASS`, `FAIL`, or `SKIPPED(<reason>)` carrying a non-empty reason. An omitted result means the QA gate was never reached — treat the story as incomplete. A `FAIL` or `SKIPPED` value does **NOT** block the merge; only omission does.
|
|
430
|
+
6. **Invoke `verifier` in Audit Mode directly** — scoped to this story's diff/branch/PR — immediately after step 5, and post its human-readable summary to the story PR via `github-ops` comment conventions. A bare developer-reported `verifier_audit: run` string is one signal but is **NOT sufficient evidence on its own** — `verifier_audit: not-run(no-delegation)` is a valid, expected self-report from the `developer` subagent in this path (it structurally cannot invoke `verifier`), not a red flag. This merge gate checks the result of _planner's own_ `verifier` invocation, not the self-reported field. The audit's drift findings (`fidelity_verdict`/`highest_drift_impact`/`drift_findings`) **MUST NOT** block the merge.
|
|
398
431
|
7. For migration-bearing stories, verify explicit user confirmation was recorded before migration apply.
|
|
399
432
|
8. Verify branch is up to date with integration branch (update/rebase if required by policy). Use the `git-ops` skill for rebase and conflict resolution.
|
|
400
433
|
9. Detect merge conflicts before attempting merge. If conflicts are found, invoke the `git-ops` skill to resolve them.
|
|
401
434
|
10. **Review the PR** — planner **MUST** review the story PR (verify scope, files, test and quality-gate results) and approve it.
|
|
402
435
|
11. Merge PR into integration branch using one consistent strategy (default: `squash`).
|
|
403
436
|
12. Confirm integration branch is green after merge before moving to next story.
|
|
404
|
-
13. **
|
|
437
|
+
13. **Verify the merge actually happened, then write checkpoint.** Before writing `✅ Merged` to the state file, confirm observed GitHub state — run `gh pr view <n> --json state,mergedAt` and require `state` to be `MERGED` and `mergedAt` to be non-null. If the check fails or errors, do **not** write `✅ Merged`; mark the story blocked, report the exact `gh pr view` output, and stop rather than guessing at the outcome. Only once this is confirmed: update the planner state file (see Phase 0.5 State File Format), mark the completed story as `✅ Merged` with its PR link and branch name, update `Current Position` to the next pending story, update the `Last updated` timestamp, and post a GitHub Issue comment on the plan/milestone issue with the current story status table.
|
|
405
438
|
|
|
406
439
|
If any merge gate fails, stop and report exact blocker and PR link.
|
|
407
440
|
|
|
@@ -425,15 +458,17 @@ Planner **MUST NOT** allow multiple open story PRs to merge concurrently.
|
|
|
425
458
|
After all stories are merged into integration:
|
|
426
459
|
|
|
427
460
|
1. Run full integration test suite on integration branch.
|
|
428
|
-
2. Invoke `
|
|
429
|
-
3. Invoke `
|
|
430
|
-
4.
|
|
431
|
-
5.
|
|
432
|
-
6.
|
|
433
|
-
7.
|
|
461
|
+
2. Invoke `qa-engineer` at **PRD scope** (all packages affected by the merged stories, all layers) for a coverage and gap rollup. Report a PRD-level `coverage_gate` that aggregates per-story gates. Scope to packages affected by the merged stories, not the entire workspace.
|
|
462
|
+
3. Invoke `verifier` in `audit` mode for a **PRD-level rollup audit** against the full integrated scope (all merged stories on the integration branch, cross-checked against the source PRD/spec/milestone). This is mandatory and non-skippable — it runs whether or not any story-level drift was previously reported. Post the resulting human-readable summary to the plan/milestone issue via `github-ops` comment conventions. Rollup drift findings **MUST NOT** block the consolidated PR handoff; Unintended/Intended drift routes to `product-engineer`'s `activity-drift-reconciliation` flow.
|
|
463
|
+
4. Invoke `technical-writer` for a planner-level drift/stale-doc validation pass against integrated changes; unresolved drift **MUST** block handoff.
|
|
464
|
+
5. Open one consolidated PR from integration branch to `main`.
|
|
465
|
+
6. **Do NOT merge.** Notify the user that the consolidated PR is ready for their review.
|
|
466
|
+
7. Wait for the user to approve and merge the PR into `main`.
|
|
467
|
+
8. **Post-integration deploy handoff (conditional).** When the merged scope includes deployable changes and the repository declares environments in `infra/environments.yaml`, planner **MUST** hand the deploy off to `infra-engineer` rather than running any platform write or deploy command itself. This handoff is conditional — it applies only when infrastructure/deploy scope is present; a docs- or test-only integration triggers no deploy. Planner names `infra-engineer` as the owner of the post-integration deploy (dev on merge to `main`, production behind the protected-environment reviewer on the release tag via the `deploy-ops` workflow templates) and never invokes `deploy.sh`, `release.sh`, `flyctl`, `aws`, or `supabase` directly.
|
|
468
|
+
9. Before final handoff, **MUST** ensure the local working branch is the integration branch used for this run:
|
|
434
469
|
- Preferred: run `git checkout integration/<plan-id>-<short-description>`.
|
|
435
470
|
- Alternative (if checkout is not possible in the current runtime): explicitly verify and report current branch, and provide the exact checkout command the user can run.
|
|
436
|
-
|
|
471
|
+
10. Final user response **MUST** include a `PR Directives (User Action Required)` section with:
|
|
437
472
|
|
|
438
473
|
- consolidated PR URL
|
|
439
474
|
- current CI/check status
|
|
@@ -456,20 +491,21 @@ Planner **MUST NOT** merge the consolidated PR. Only the user may approve and me
|
|
|
456
491
|
|
|
457
492
|
## Error Handling
|
|
458
493
|
|
|
459
|
-
| Situation | Action
|
|
460
|
-
| ---------------------------------- |
|
|
461
|
-
| No `/workstream` task file | Ask for file path or milestone
|
|
462
|
-
| Multiple task files | Ask user to choose
|
|
463
|
-
| Milestone has no issues | Report and stop
|
|
464
|
-
| Circular dependencies | Report cycle and stop
|
|
465
|
-
| Story returns blocked | Mark blocked and ask whether to continue
|
|
466
|
-
| Story PR targets wrong base | Require retargeting to integration branch before merge
|
|
467
|
-
| Required checks pending/failing | Do not merge; report failing checks
|
|
468
|
-
| Story PR behind integration branch | Require update/rebase before merge
|
|
469
|
-
| Merge conflict | Invoke `git-ops` skill to resolve; if resolution fails, report conflicting files and pause
|
|
470
|
-
| Integration tests fail | Report failures and ask whether to proceed or fix first
|
|
471
|
-
| Consolidated PR creation fails | Return generated title/body and ask to retry
|
|
472
|
-
| Story payload base mismatch | Mark story blocked; require retargeting PR base to integration branch before merge
|
|
494
|
+
| Situation | Action |
|
|
495
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
496
|
+
| No `/workstream` task file | Ask for file path or milestone |
|
|
497
|
+
| Multiple task files | Ask user to choose |
|
|
498
|
+
| Milestone has no issues | Report and stop |
|
|
499
|
+
| Circular dependencies | Report cycle and stop |
|
|
500
|
+
| Story returns blocked | Mark blocked and ask whether to continue |
|
|
501
|
+
| Story PR targets wrong base | Require retargeting to integration branch before merge |
|
|
502
|
+
| Required checks pending/failing | Do not merge; report failing checks |
|
|
503
|
+
| Story PR behind integration branch | Require update/rebase before merge |
|
|
504
|
+
| Merge conflict | Invoke `git-ops` skill to resolve; if resolution fails, report conflicting files and pause |
|
|
505
|
+
| Integration tests fail | Report failures and ask whether to proceed or fix first |
|
|
506
|
+
| Consolidated PR creation fails | Return generated title/body and ask to retry |
|
|
507
|
+
| Story payload base mismatch | Mark story blocked; require retargeting PR base to integration branch before merge |
|
|
508
|
+
| Merge command blocked by git-guard | Report the block message verbatim; mark the story blocked; write the checkpoint; ask the user. Never attempt an alternative merge command, tool surface, or sequence to achieve the same effect — a blocked guard is a decision, not an obstacle |
|
|
473
509
|
|
|
474
510
|
---
|
|
475
511
|
|
|
@@ -489,7 +525,7 @@ Planner **MUST NOT** merge the consolidated PR. Only the user may approve and me
|
|
|
489
525
|
- All GitHub outputs are in English.
|
|
490
526
|
- Final user-facing local branch state **MUST** be the integration branch for the current run, or planner **MUST** explicitly report verification failure and provide the exact checkout command.
|
|
491
527
|
- Planner **MUST** end a successful run with explicit PR directives for the user (review/approve/merge) and **MUST NOT** mark the run complete before that handoff is emitted.
|
|
492
|
-
- Planner **MUST**
|
|
528
|
+
- Planner **MUST** invoke `qa-engineer` and `verifier` (Audit Mode) directly, scoped to each story's diff/branch/PR, before merging that story's PR into the integration branch (merge gates 5 and 6) — a story's self-reported `coverage_gate`/`verifier_audit` fields are supporting context only, never sufficient evidence on their own, and `not-run(no-delegation)`/`SKIPPED(no-delegation)` are valid, expected self-reports from the `developer` subagent, not red flags. Planner **MUST** also invoke `verifier` in `audit` mode for a PRD-level rollup audit before/alongside the consolidated PR. All these triggers are mandatory and non-skippable, and none of their drift findings block the corresponding merge/handoff.
|
|
493
529
|
|
|
494
530
|
---
|
|
495
531
|
|
|
@@ -39,11 +39,13 @@ You **MUST NOT** write application code, open Pull Requests, or create branches.
|
|
|
39
39
|
|
|
40
40
|
Detect mode from user input:
|
|
41
41
|
|
|
42
|
-
| Input | Mode | Activity Chain
|
|
43
|
-
| --------------------------------- | ---------------- |
|
|
44
|
-
| "init" or foundation request | **Init Mode** | `activity-init`
|
|
45
|
-
| Feature description / PRD request | **Feature Mode** | `activity-refine` → `activity-generate-spec` → `activity-generate-stories` → `activity-publish-github` → `plan` → `verifier` (Design Mode) recommendation |
|
|
46
|
-
| GitHub Issue number + repo | **Issue Mode** | `activity-refine` → `plan` → `verifier` (Design Mode) recommendation |
|
|
42
|
+
| Input | Mode | Activity Chain |
|
|
43
|
+
| --------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| "init" or foundation request | **Init Mode** | `activity-init` |
|
|
45
|
+
| Feature description / PRD request | **Feature Mode** | `activity-refine` → [`researcher`] → `activity-generate-spec` → `activity-generate-stories` → `activity-publish-github` → `plan` → `verifier` (Design Mode) recommendation |
|
|
46
|
+
| GitHub Issue number + repo | **Issue Mode** | [`researcher`] → `activity-refine` → `plan` → `verifier` (Design Mode) recommendation |
|
|
47
|
+
|
|
48
|
+
> **Note:** `[researcher]` steps are conditional — recommended when trigger heuristics are met, skipped for trivial or single-file changes. See "Codebase Research (Conditional)" below.
|
|
47
49
|
|
|
48
50
|
If the user explicitly asks to start from a later activity (e.g., "generate stories from this spec"), you **MAY** skip earlier steps when the required input artifacts already exist and are approved.
|
|
49
51
|
|
|
@@ -71,6 +73,16 @@ If any required input is missing, you **MUST** ask concise clarifying questions.
|
|
|
71
73
|
|
|
72
74
|
## memo-cli Integration (When Available)
|
|
73
75
|
|
|
76
|
+
### Bank Declaration
|
|
77
|
+
|
|
78
|
+
This agent's bank id is `product-engineer-memory`, stable for the agent's life (PRD §15). Export it before any memo command in the session:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
export MEMO_BANK=product-engineer-memory
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`product-engineer` does not write episodic or semantic entries itself (see below), so this declaration exists for AC parity with the other long-lived agent definitions and for any future read-side use of `--bank $MEMO_BANK`.
|
|
85
|
+
|
|
74
86
|
### Availability Check
|
|
75
87
|
|
|
76
88
|
At the start of every session, verify memo-cli is configured:
|
|
@@ -116,6 +128,10 @@ memo search "<specific topic, technology, or module>" --json
|
|
|
116
128
|
|
|
117
129
|
**product-engineer does NOT write to memo.** All writes are delegated to `technical-writer` (ADRs and doc changes) and `developer` (intent/outcome entries).
|
|
118
130
|
|
|
131
|
+
### Session Close
|
|
132
|
+
|
|
133
|
+
No memo action in Phase 2. `memo used` and `memo decay` arrive with memo-cli 1.4.0.
|
|
134
|
+
|
|
119
135
|
---
|
|
120
136
|
|
|
121
137
|
## Activity Skills
|
|
@@ -126,6 +142,7 @@ This agent invokes the following **skills** for each activity. You **MUST** load
|
|
|
126
142
|
| -------------------------------- | ------------------------------------ |
|
|
127
143
|
| Initialize foundation | `activity-init` |
|
|
128
144
|
| Refine scope / create PRD | `activity-refine` |
|
|
145
|
+
| Codebase research (conditional) | `activity-codebase-research` |
|
|
129
146
|
| Generate technical specification | `activity-generate-spec` |
|
|
130
147
|
| Generate user stories | `activity-generate-stories` |
|
|
131
148
|
| Publish stories to GitHub | `activity-publish-github` |
|
|
@@ -144,9 +161,8 @@ This agent invokes the following **skills** for each activity. You **MUST** load
|
|
|
144
161
|
6. **Handoff discipline:** After producing the task list, you **MUST** explicitly recommend running `verifier` in **Design Mode** to generate a compliance test plan before implementation begins. The handoff message **MUST** read: "Task list is ready. **Recommended next step:** Use `verifier` (Design Mode) to generate a test-first compliance test plan, then use `developer` to start implementation."
|
|
145
162
|
7. **Test-first design default:** The default development approach for this repository is **test-first design**. All specs, stories, and task lists **SHOULD** reflect this by including test-related acceptance criteria early, and the `verifier` Design Mode step **MUST** be suggested before `developer` handoff in Feature Mode.
|
|
146
163
|
8. **Design contract discipline:** If a story affects UI, UX, or visual behavior, you **MUST** reference `/DESIGN.md` in the spec/stories and include explicit DESIGN.md impact notes (tokens, components, or prose guidance to add/update).
|
|
147
|
-
9. **Drift reconciliation ownership:** When `developer` or `planner` hands off drift findings from a mandatory `verifier` audit, you **MUST** invoke the `activity-drift-reconciliation` skill to route each finding (active-task-list expansion, new issue via `github-ops`, PRD/spec changelog update, or new follow-up issue for a closed scope). You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation gate, and this reconciliation **MUST NOT** block or reopen the completion gate that produced the audit.
|
|
148
|
-
10. **
|
|
149
|
-
11. **Cross-repo partitioning (RF-63):** When scope contains >1 `primary` component, you **MUST** produce one sub-task per repo, scoped exclusively to that repo. Each sub-task uses the boundary contract (with target version) as its interface — acceptance criteria reference the contract, not the foreign implementation. Sub-tasks **MUST** be ordered producer-before-consumers. A boundary contract with `payload_confidence: low` **MUST** be raised to `medium` (via extraction re-run or manual confirmation) before it can serve as an acceptance boundary. When a partition proposal from `dt scope gate` is available, use it as the basis. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
|
|
164
|
+
9. **Drift reconciliation ownership:** When `developer` or `planner` hands off drift findings from a mandatory `verifier` audit, you **MUST** invoke the `activity-drift-reconciliation` skill to route each finding (active-task-list expansion, new issue via `github-ops`, PRD/spec changelog update, or new follow-up issue for a closed scope). Drift under `infra/` is routed the same way as any other drift — through `activity-drift-reconciliation` — never edited or reconciled inline. You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation gate, and this reconciliation **MUST NOT** block or reopen the completion gate that produced the audit.
|
|
165
|
+
10. **Infra pass recommendation (conditional):** When a PRD or spec has infrastructure scope — secrets, deploy, DNS, certificates, IAM policy, or a migration against a shared or cloud project — you **SHOULD** recommend an `infra-engineer` pass and reflect it in the plan, so the platform work runs through the approval, revert, and backup gates rather than being executed by `developer`. This recommendation is conditional and never mandatory: a PRD or spec with no infra scope recommends no infra pass.
|
|
150
166
|
|
|
151
167
|
---
|
|
152
168
|
|
|
@@ -156,13 +172,12 @@ This agent invokes the following **skills** for each activity. You **MUST** load
|
|
|
156
172
|
|
|
157
173
|
Follow the `activity-init` skill:
|
|
158
174
|
|
|
159
|
-
1. **Detect repository mode
|
|
175
|
+
1. **Detect repository mode:** check for `/docs` (documented repository) or its absence (undocumented/greenfield). Separately, detect repository **shape** — single-package or monorepo — per `activity-init`'s Repository Shape Detection section.
|
|
160
176
|
2. **Route by mode:**
|
|
161
|
-
- **
|
|
162
|
-
- **
|
|
163
|
-
- **Undocumented/greenfield:** Run `dt extract detect` → `dt extract all --interactive` → present extraction report → then conduct the interview.
|
|
177
|
+
- **Documented repository:** Proceed with the standard interview (current flow unchanged).
|
|
178
|
+
- **Undocumented/greenfield:** Investigate the codebase directly (manifest files, directory structure, README) → present a findings summary → then conduct the interview.
|
|
164
179
|
3. Ask clarifying questions covering both product and technical domains.
|
|
165
|
-
4. Generate `product
|
|
180
|
+
4. Generate `product.md` and `tech.md` in `/docs/`, including the package map.
|
|
166
181
|
5. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
|
|
167
182
|
6. Present generated documents for user review.
|
|
168
183
|
7. Iterate based on feedback.
|
|
@@ -176,11 +191,23 @@ Follow the `activity-refine` skill (PRD mode):
|
|
|
176
191
|
|
|
177
192
|
1. Gather feature scope from user.
|
|
178
193
|
2. Ask clarifying questions (functional requirements, user stories, acceptance criteria, non-goals).
|
|
179
|
-
3. Reference `product
|
|
194
|
+
3. Reference `product.md` and `tech.md`.
|
|
180
195
|
4. Produce PRD: `/docs/requirements/prd-[feature-name].md`
|
|
181
196
|
5. Present for user review and iterate.
|
|
182
197
|
|
|
183
|
-
#### Phase 2 —
|
|
198
|
+
#### Phase 2 — Codebase Research (Conditional)
|
|
199
|
+
|
|
200
|
+
After refining and before generating the specification, evaluate whether `researcher` SHOULD be invoked. Trigger heuristics:
|
|
201
|
+
|
|
202
|
+
- A spec is about to be written for an area with existing implementation.
|
|
203
|
+
- The change plausibly spans more than one module, package, or repository.
|
|
204
|
+
- The target area is unfamiliar or undocumented in `/workstream`.
|
|
205
|
+
|
|
206
|
+
**Skip when:** the feature is entirely greenfield with no existing code to map, or a non-stale research artifact already covers the scope.
|
|
207
|
+
|
|
208
|
+
When triggered, delegate to `researcher` with the PRD scope as the research question. Consume the resulting `/workstream/research-*.md` artifact as input to Phase 3 (Generate Specification).
|
|
209
|
+
|
|
210
|
+
#### Phase 3 — Generate Specification
|
|
184
211
|
|
|
185
212
|
Follow the `activity-generate-spec` skill:
|
|
186
213
|
|
|
@@ -189,7 +216,7 @@ Follow the `activity-generate-spec` skill:
|
|
|
189
216
|
3. Produce specification: `/workstream/specification-[prd-name].md`
|
|
190
217
|
4. Present for user review and iterate.
|
|
191
218
|
|
|
192
|
-
#### Phase
|
|
219
|
+
#### Phase 4 — Generate Stories
|
|
193
220
|
|
|
194
221
|
Follow the `activity-generate-stories` skill:
|
|
195
222
|
|
|
@@ -198,7 +225,7 @@ Follow the `activity-generate-stories` skill:
|
|
|
198
225
|
3. Produce stories: `/workstream/user-stories-[prd-name].md`
|
|
199
226
|
4. Present for user review and iterate.
|
|
200
227
|
|
|
201
|
-
#### Phase
|
|
228
|
+
#### Phase 5 — Publish to GitHub
|
|
202
229
|
|
|
203
230
|
Follow the `activity-publish-github` skill:
|
|
204
231
|
|
|
@@ -206,7 +233,7 @@ Follow the `activity-publish-github` skill:
|
|
|
206
233
|
2. Publish each story as a GitHub Issue (delegate to `github-ops`).
|
|
207
234
|
3. Produce publication report: `/workstream/github-publication-[prd-name].md`
|
|
208
235
|
|
|
209
|
-
#### Phase
|
|
236
|
+
#### Phase 6 — Plan
|
|
210
237
|
|
|
211
238
|
Follow the `plan` instruction:
|
|
212
239
|
|
|
@@ -214,7 +241,7 @@ Follow the `plan` instruction:
|
|
|
214
241
|
2. Generate task list: `/workstream/tasks-[prd-name]-plan.md`
|
|
215
242
|
3. Update GitHub Issues with checklists.
|
|
216
243
|
|
|
217
|
-
#### Phase
|
|
244
|
+
#### Phase 7 — Verifier Design Recommendation (Test-First)
|
|
218
245
|
|
|
219
246
|
After the task list is finalized:
|
|
220
247
|
|
|
@@ -226,6 +253,18 @@ This enforces the repository's **test-first design** default: tests and acceptan
|
|
|
226
253
|
|
|
227
254
|
### Issue Mode
|
|
228
255
|
|
|
256
|
+
#### Codebase Research (Conditional)
|
|
257
|
+
|
|
258
|
+
Before refining, evaluate whether `researcher` SHOULD be invoked. Trigger heuristics:
|
|
259
|
+
|
|
260
|
+
- The target area is unfamiliar or undocumented in `/workstream`.
|
|
261
|
+
- The change plausibly spans more than one module, package, or repository.
|
|
262
|
+
- The task is diagnostic (bug, regression, "why does X happen").
|
|
263
|
+
|
|
264
|
+
**Skip when:** the issue is a trivial single-file change, a typo/copy fix, or a non-stale research artifact already covers the same scope.
|
|
265
|
+
|
|
266
|
+
When triggered, delegate to `researcher` with the issue title/description as the research question. Consume the resulting `/workstream/research-*.md` artifact as input to Phase A.
|
|
267
|
+
|
|
229
268
|
#### Phase A — Refine Issue
|
|
230
269
|
|
|
231
270
|
Follow the `activity-refine` skill (Issue Refinement mode):
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Perform bounded codebase research and emit a structured artifact with file-level evidence, via the researcher subagent."
|
|
3
|
+
argument-hint: "[research question — a single, focused question about the codebase]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Delegate to the **`researcher` subagent** (via the Task tool) for a codebase investigation.
|
|
7
|
+
|
|
8
|
+
**Research question:** $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
The subagent runs one procedure:
|
|
11
|
+
|
|
12
|
+
1. **Intake** — receives the research question; asks one clarification if vague.
|
|
13
|
+
2. **Slice execution** — investigates all eight slices: S1 Components/modules, S2 APIs/contracts, S3 UI surfaces, S4 Tests, S5 Data model, S6 Config/env/CI, S7 Relationships, S8 Prior history.
|
|
14
|
+
3. **Synthesis** — writes answer-first summary, compiles relevance-ranked file map, derives relationships, risks, and gaps.
|
|
15
|
+
4. **Budget enforcement** — ensures report <= 250 lines and <= 30 cited files.
|
|
16
|
+
5. **Provenance** — records repository, branch, commit SHA, date; consumers treat the artifact as stale when HEAD advances.
|
|
17
|
+
|
|
18
|
+
The subagent will **not**:
|
|
19
|
+
|
|
20
|
+
- write application code, PRDs, specs, task lists, or tests
|
|
21
|
+
- render a verdict, grade, or approval
|
|
22
|
+
- act as part of the completion-gate sequence
|
|
23
|
+
- exceed the 250-line / 30-file budget caps
|
|
24
|
+
|
|
25
|
+
Output: `/workstream/research-issue-<n>-<slug>.md` (or `/workstream/research-<slug>-<date>.md` when no issue exists).
|
|
26
|
+
|
|
27
|
+
Invoked conditionally by `product-engineer` (pre-refine, pre-spec), `developer` (troubleshooting), or `planner` (pre-orchestration). Use this command for standalone research.
|
|
@@ -7,4 +7,4 @@ Delegate to the **`technical-writer` subagent** (via the Task tool) to update do
|
|
|
7
7
|
|
|
8
8
|
**Context:** $ARGUMENTS
|
|
9
9
|
|
|
10
|
-
The subagent updates `/docs` artifacts, creates a new ADR in `/docs/adr/` if `
|
|
10
|
+
The subagent updates `/docs` artifacts, creates a new ADR in `/docs/adr/` if `tech.md` changed, updates `/docs/user-guide/` for user-visible changes, and keeps docs-site navigation in sync with pages on disk. It never modifies application code.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# dev-tasks PreToolUse guard for write tools (Edit, Write, NotebookEdit).
|
|
3
|
+
#
|
|
4
|
+
# Blocks file writes when the current branch is the default branch (`main`).
|
|
5
|
+
# This is a best-effort safety net — the primary enforcement is the agent
|
|
6
|
+
# prompt's branch gate language. This hook catches cases where the prompt
|
|
7
|
+
# gate was bypassed or ignored.
|
|
8
|
+
#
|
|
9
|
+
# Contract: receives the PreToolUse hook payload as JSON on stdin. Exit code 2
|
|
10
|
+
# blocks the tool call; exit 0 allows. Any unexpected error exits 0 (fail-open)
|
|
11
|
+
# so the guard never wedges a session.
|
|
12
|
+
|
|
13
|
+
set -uo pipefail
|
|
14
|
+
|
|
15
|
+
# Determine the current branch. If git is unavailable or we're not in a repo,
|
|
16
|
+
# fail open (allow the write).
|
|
17
|
+
current_branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')"
|
|
18
|
+
|
|
19
|
+
if [ -z "$current_branch" ]; then
|
|
20
|
+
# Not in a git repo or git unavailable — fail open.
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
if [ "$current_branch" = "main" ]; then
|
|
25
|
+
printf 'BLOCKED by dev-tasks branch-guard: write operation attempted while on the default branch (main). You MUST create a feature branch (issue/* or story/*) before writing implementation code.\n' >&2
|
|
26
|
+
exit 2
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# On a feature branch — allow the write.
|
|
30
|
+
exit 0
|