agents-templated 2.2.12 → 2.2.13

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.
Files changed (54) hide show
  1. package/README.md +32 -5
  2. package/bin/cli.js +49 -0
  3. package/lib/orchestrator.js +562 -0
  4. package/lib/workflow.js +470 -1
  5. package/package.json +1 -1
  6. package/templates/.claude/agents/README.md +15 -1
  7. package/templates/.claude/agents/architect.md +79 -106
  8. package/templates/.claude/agents/backend-specialist.md +79 -0
  9. package/templates/.claude/agents/build-error-resolver.md +78 -119
  10. package/templates/.claude/agents/code-reviewer.md +79 -116
  11. package/templates/.claude/agents/compatibility-checker.md +79 -79
  12. package/templates/.claude/agents/configuration-validator.md +79 -85
  13. package/templates/.claude/agents/database-migrator.md +79 -83
  14. package/templates/.claude/agents/dependency-auditor.md +79 -92
  15. package/templates/.claude/agents/deployment-specialist.md +91 -0
  16. package/templates/.claude/agents/doc-updater.md +78 -130
  17. package/templates/.claude/agents/e2e-runner.md +78 -122
  18. package/templates/.claude/agents/frontend-specialist.md +79 -0
  19. package/templates/.claude/agents/load-tester.md +79 -80
  20. package/templates/.claude/agents/performance-profiler.md +79 -103
  21. package/templates/.claude/agents/performance-specialist.md +91 -0
  22. package/templates/.claude/agents/planner.md +81 -87
  23. package/templates/.claude/agents/qa-specialist.md +92 -0
  24. package/templates/.claude/agents/refactor-cleaner.md +79 -137
  25. package/templates/.claude/agents/release-ops-specialist.md +80 -0
  26. package/templates/.claude/agents/security-reviewer.md +80 -138
  27. package/templates/.claude/agents/tdd-guide.md +79 -98
  28. package/templates/.claude/agents/test-data-builder.md +79 -0
  29. package/templates/CLAUDE.md +7 -0
  30. package/templates/README.md +34 -5
  31. package/templates/agent-docs/ARCHITECTURE.md +6 -0
  32. package/templates/agents/commands/README.md +79 -0
  33. package/templates/agents/commands/SCHEMA.md +21 -1
  34. package/templates/agents/commands/test-data.md +56 -0
  35. package/agents/commands/README.md +0 -64
  36. package/agents/commands/SCHEMA.md +0 -22
  37. package/agents/commands/arch-check.md +0 -58
  38. package/agents/commands/audit.md +0 -58
  39. package/agents/commands/debug-track.md +0 -58
  40. package/agents/commands/docs.md +0 -58
  41. package/agents/commands/fix.md +0 -58
  42. package/agents/commands/learn-loop.md +0 -58
  43. package/agents/commands/perf.md +0 -58
  44. package/agents/commands/plan.md +0 -58
  45. package/agents/commands/pr.md +0 -58
  46. package/agents/commands/problem-map.md +0 -58
  47. package/agents/commands/release-ready.md +0 -58
  48. package/agents/commands/release.md +0 -58
  49. package/agents/commands/risk-review.md +0 -58
  50. package/agents/commands/scope-shape.md +0 -58
  51. package/agents/commands/task.md +0 -58
  52. package/agents/commands/test.md +0 -58
  53. package/agents/commands/ux-bar.md +0 -58
  54. package/agents/rules/planning.mdc +0 -69
@@ -1,58 +0,0 @@
1
- # /plan
2
-
3
- ## A. Intent
4
- Build a deterministic implementation plan with scoped phases and acceptance checks.
5
-
6
- ## B. When to Use
7
- - Use when a feature or change request is approved for planning before coding starts.
8
- - Do not use for post-incident debugging; use /debug-track instead.
9
-
10
- ## C. Context Assumptions
11
- - Problem statement and objective are available.
12
- - Primary stakeholders and delivery window are known.
13
- - Scope boundaries can be explicitly defined.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `objective` | string | "Ship onboarding v2" |
19
- | `constraints` | string[] | ["2-week deadline", "no schema rewrite"] |
20
- | `references` | artifact | PRD link, issue URL, screenshot |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] objective is non-empty and testable
24
- - [ ] constraints are explicit and non-contradictory
25
- - [ ] required references are accessible
26
-
27
- ## F. Execution Flow
28
- 1. Collect requirements and constraints.
29
- 2. Split work into ordered phases and milestones.
30
- 3. Attach measurable acceptance criteria per phase.
31
- 4. Decision point ->
32
- - condition A -> phase risk > threshold -> add mitigation gate
33
- - condition B -> otherwise -> continue with baseline plan.
34
- 5. Assemble plan artifacts and dependency map.
35
- 6. Emit final plan package.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "plan_id": "string",
42
- "phases": ["array","of","strings"],
43
- "risk_level": "low | medium | high",
44
- "notes": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - any guard in section E fails
54
- - acceptance criteria cannot be made measurable
55
-
56
- ## J. Safety Constraints
57
- - Hard block: no hidden scope expansion beyond declared boundaries
58
- - Warn only: allow proceed with warning when estimate confidence is low
@@ -1,58 +0,0 @@
1
- # /pr
2
-
3
- ## A. Intent
4
- Prepare a deterministic pull request package with implementation and validation evidence.
5
-
6
- ## B. When to Use
7
- - Use after code changes and validation are complete and review package is needed.
8
- - Do not use when critical findings are still unresolved.
9
-
10
- ## C. Context Assumptions
11
- - Change set exists.
12
- - Validation evidence is available.
13
- - Linked issue/task context is known.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `change_summary` | string | "add retry policy to webhook worker" |
19
- | `linked_items` | string[] | ["ISSUE-18", "TASK-42"] |
20
- | `validation_evidence` | artifact | test report, benchmark output, screenshot |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] change summary is complete
24
- - [ ] linked items are resolvable
25
- - [ ] validation evidence is present
26
-
27
- ## F. Execution Flow
28
- 1. Collect changed files and linked references.
29
- 2. Summarize intent, impact, and scope.
30
- 3. Attach validation and risk evidence.
31
- 4. Decision point ->
32
- - condition A -> critical blocker open -> abort PR package
33
- - condition B -> no blocker -> continue.
34
- 5. Build reviewer checklist and rollout notes.
35
- 6. Emit PR payload.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "title": "string",
42
- "files_changed": ["array","of","strings"],
43
- "risk_assessment": "low | medium | high",
44
- "blockers": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - validation evidence missing for critical changes
54
- - open critical findings remain unresolved
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block if critical issues remain
58
- - Warn only: warn when non-critical follow-up items are deferred
@@ -1,58 +0,0 @@
1
- # /problem-map
2
-
3
- ## A. Intent
4
- Frame the real user problem and guarantee a clear problem statement before planning.
5
-
6
- ## B. When to Use
7
- - Use at the start of a feature cycle when pain points are unclear or broad.
8
- - Do not use for implementation details or code-level debugging.
9
-
10
- ## C. Context Assumptions
11
- - User objective is available.
12
- - Stakeholder context can be collected.
13
- - Outcome can be stated as a measurable problem.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `user_problem` | string | "onboarding drop-off at step 2" |
19
- | `signals` | string[] | ["support tickets", "analytics"] |
20
- | `evidence_artifact` | artifact | funnel screenshot, issue links |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] problem statement is concrete
24
- - [ ] signals support the stated pain
25
- - [ ] scope remains problem-focused
26
-
27
- ## F. Execution Flow
28
- 1. Collect user pain signals and context.
29
- 2. Synthesize candidate problem statements.
30
- 3. Validate statement against evidence.
31
- 4. Decision point ->
32
- - condition A -> weak evidence -> request stronger signals
33
- - condition B -> strong evidence -> continue.
34
- 5. Produce framed problem and success criteria.
35
- 6. Emit problem map package.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "problem_id": "string",
42
- "core_pains": ["array","of","strings"],
43
- "urgency": "low | medium | high",
44
- "unknowns": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - problem statement remains vague
54
- - evidence contradicts proposed framing
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block on fabricated assumptions presented as facts
58
- - Warn only: warn when evidence quality is limited
@@ -1,58 +0,0 @@
1
- # /release-ready
2
-
3
- ## A. Intent
4
- Validate pre-release readiness gates and guarantee deploy prerequisites are satisfied.
5
-
6
- ## B. When to Use
7
- - Use after implementation/tests/risk review and before final release decision.
8
- - Do not use to execute deployment itself.
9
-
10
- ## C. Context Assumptions
11
- - Release candidate exists.
12
- - All required gate outputs are available.
13
- - Rollout and rollback plans are drafted.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `candidate_version` | string | "v2.4.0-rc1" |
19
- | `gate_artifacts` | string[] | ["test", "risk-review", "perf-scan"] |
20
- | `release_artifact` | artifact | release checklist, migration plan |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] mandatory gates are present
24
- - [ ] critical blockers are resolved
25
- - [ ] rollback steps are executable
26
-
27
- ## F. Execution Flow
28
- 1. Collect gate evidence for candidate.
29
- 2. Validate checklist completion.
30
- 3. Verify rollout and rollback readiness.
31
- 4. Decision point ->
32
- - condition A -> missing mandatory gate -> block readiness
33
- - condition B -> all gates complete -> continue.
34
- 5. Assemble readiness summary and open items.
35
- 6. Emit release-ready report.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "readiness_id": "string",
42
- "gate_status": ["array","of","strings"],
43
- "readiness_risk": "low | medium | high",
44
- "blocker": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - mandatory gate missing or failed
54
- - rollback execution path is unverified
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block when release checklist is incomplete on critical items
58
- - Warn only: warn when non-critical items are deferred
@@ -1,58 +0,0 @@
1
- # /release
2
-
3
- ## A. Intent
4
- Generate deterministic release decision package with rollout and rollback readiness.
5
-
6
- ## B. When to Use
7
- - Use when deciding whether to ship to production.
8
- - Do not use before release-ready checks are complete.
9
-
10
- ## C. Context Assumptions
11
- - Release candidate is identified.
12
- - Pre-release checks are completed.
13
- - Rollback strategy is defined.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `version` | string | "v2.4.0" |
19
- | `gate_results` | string[] | ["tests-pass", "risk-review-pass"] |
20
- | `release_artifacts` | artifact | release notes draft, migration plan |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] version is valid and unique
24
- - [ ] required gates are complete
25
- - [ ] rollback plan exists
26
-
27
- ## F. Execution Flow
28
- 1. Collect gate outputs and release artifacts.
29
- 2. Validate rollout and rollback prerequisites.
30
- 3. Classify release risk.
31
- 4. Decision point ->
32
- - condition A -> high unresolved risk -> block release
33
- - condition B -> acceptable risk -> continue.
34
- 5. Build release decision and communication payload.
35
- 6. Emit release package.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "release_id": "string",
42
- "gates": ["array","of","strings"],
43
- "release_risk": "low | medium | high",
44
- "rollback_status": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - required gate missing or failed
54
- - rollback plan is undefined
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block on unresolved high-severity release risks
58
- - Warn only: warn when rollout is phased due to uncertainty
@@ -1,58 +0,0 @@
1
- # /risk-review
2
-
3
- ## A. Intent
4
- Perform deterministic release risk review with mitigation and rollback readiness.
5
-
6
- ## B. When to Use
7
- - Use before merge or release approval on non-trivial changes.
8
- - Do not use as a substitute for running tests.
9
-
10
- ## C. Context Assumptions
11
- - Change set is available.
12
- - Validation evidence exists.
13
- - Deployment context is known.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `change_set` | string | "payment retry + queue changes" |
19
- | `validation_status` | string[] | ["unit pass", "integration pass"] |
20
- | `deployment_artifact` | artifact | rollout plan, env config snapshot |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] change set is fully described
24
- - [ ] validation status is current
25
- - [ ] rollback path is defined
26
-
27
- ## F. Execution Flow
28
- 1. Inspect behavior deltas and blast radius.
29
- 2. Rank risks by impact and likelihood.
30
- 3. Validate mitigations and rollback readiness.
31
- 4. Decision point ->
32
- - condition A -> high unresolved risk -> block recommendation
33
- - condition B -> acceptable risk -> continue.
34
- 5. Build release risk summary and actions.
35
- 6. Emit risk review report.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "review_id": "string",
42
- "risks": ["array","of","strings"],
43
- "risk_level": "low | medium | high",
44
- "recommendation": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - high-severity risk has no mitigation
54
- - rollback readiness is undefined
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block on unresolved high-severity risks
58
- - Warn only: warn when medium risks are accepted with owner
@@ -1,58 +0,0 @@
1
- # /scope-shape
2
-
3
- ## A. Intent
4
- Constrain delivery scope to the smallest high-value reversible release.
5
-
6
- ## B. When to Use
7
- - Use after problem framing and before architectural design.
8
- - Do not use when requirements are already contractually frozen.
9
-
10
- ## C. Context Assumptions
11
- - Problem map exists.
12
- - Candidate feature list exists.
13
- - Delivery constraints are known.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `scope_goal` | string | "ship MVP in 2 weeks" |
19
- | `candidate_items` | string[] | ["email login", "social login", "tutorial"] |
20
- | `constraint_artifact` | artifact | timeline doc, staffing snapshot |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] scope goal is explicit
24
- - [ ] candidate items are ranked
25
- - [ ] out-of-scope list can be produced
26
-
27
- ## F. Execution Flow
28
- 1. Rank candidate items by value and effort.
29
- 2. Draft in-scope and out-of-scope sets.
30
- 3. Check scope against constraints.
31
- 4. Decision point ->
32
- - condition A -> scope exceeds constraints -> trim to MVP
33
- - condition B -> feasible scope -> continue.
34
- 5. Build scope rationale and tradeoffs.
35
- 6. Emit scope decision package.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "scope_id": "string",
42
- "scope_in": ["array","of","strings"],
43
- "confidence": "low | medium | high",
44
- "scope_out": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - scope cannot satisfy constraints
54
- - no explicit out-of-scope definition is produced
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block on hidden scope creep
58
- - Warn only: warn when deferred items carry significant risk
@@ -1,58 +0,0 @@
1
- # /task
2
-
3
- ## A. Intent
4
- Convert approved plans into deterministic, execution-ready task batches.
5
-
6
- ## B. When to Use
7
- - Use when a plan exists and work must be distributed to implementers.
8
- - Do not use before planning is complete.
9
-
10
- ## C. Context Assumptions
11
- - An approved plan exists.
12
- - Owners and execution context are known.
13
- - Dependencies can be sequenced.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `plan_id` | string | "plan-2026-04-03" |
19
- | `task_scope` | string[] | ["api", "ui", "tests"] |
20
- | `source_artifacts` | artifact | plan file path or issue board URL |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] plan exists and is approved
24
- - [ ] task scope maps to explicit plan items
25
- - [ ] dependency order is resolvable
26
-
27
- ## F. Execution Flow
28
- 1. Read plan outputs and dependency graph.
29
- 2. Split work into atomic tasks.
30
- 3. Assign execution order and ownership metadata.
31
- 4. Decision point ->
32
- - condition A -> blocking dependency found -> move item to blocked queue
33
- - condition B -> no blockers -> keep in active queue.
34
- 5. Build task package with acceptance checks.
35
- 6. Emit task list and execution order.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "task_batch_id": "string",
42
- "tasks": ["array","of","strings"],
43
- "priority": "low | medium | high",
44
- "blocker": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - plan_id is missing or invalid
54
- - critical dependency cannot be resolved
55
-
56
- ## J. Safety Constraints
57
- - Hard block: no task emission without traceability to a plan item
58
- - Warn only: warn when owner assignment is temporary
@@ -1,58 +0,0 @@
1
- # /test
2
-
3
- ## A. Intent
4
- Run deterministic validation and gate release readiness based on test evidence.
5
-
6
- ## B. When to Use
7
- - Use when validating behavior after implementation or before merge/release.
8
- - This command now includes quality-gate behavior; do not use /quality-gate.
9
-
10
- ## C. Context Assumptions
11
- - Test targets are defined.
12
- - Required environments are available.
13
- - Pass/fail criteria are explicit.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `test_scope` | string | "api regression" |
19
- | `test_suites` | string[] | ["unit", "integration", "critical-flow"] |
20
- | `evidence_artifact` | artifact | test report path or CI run URL |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] test scope is non-empty
24
- - [ ] critical test suites are executable
25
- - [ ] pass criteria are declared
26
-
27
- ## F. Execution Flow
28
- 1. Collect test targets and runtime config.
29
- 2. Execute suites in deterministic order.
30
- 3. Aggregate results and failures.
31
- 4. Decision point ->
32
- - condition A -> critical failures present -> gate = blocked
33
- - condition B -> no critical failures -> gate = pass.
34
- 5. Build validation evidence and remediation list.
35
- 6. Emit test and gate report.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "test_run_id": "string",
42
- "results": ["array","of","strings"],
43
- "gate_status": "low | medium | high",
44
- "blocker": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - critical test suite cannot run
54
- - result schema cannot be produced
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block when critical flow tests fail
58
- - Warn only: warn when flaky tests are excluded with justification
@@ -1,58 +0,0 @@
1
- # /ux-bar
2
-
3
- ## A. Intent
4
- Assess UX quality bar and guarantee core interaction states are defined before build.
5
-
6
- ## B. When to Use
7
- - Use when UX quality and accessibility need pre-implementation validation.
8
- - Do not use as a replacement for visual design exploration.
9
-
10
- ## C. Context Assumptions
11
- - Scope and architecture are available.
12
- - Primary user flows are identified.
13
- - Design references exist.
14
-
15
- ## D. Required Inputs
16
- | Input | Type | Example |
17
- |---------------------|------------|----------------------------------|
18
- | `ux_goal` | string | "reduce checkout friction" |
19
- | `flows` | string[] | ["cart", "payment", "confirmation"] |
20
- | `design_artifact` | artifact | wireframes, Figma link, screenshots |
21
-
22
- ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
- - [ ] critical flows are enumerated
24
- - [ ] interaction states include loading/error/empty
25
- - [ ] accessibility checks are defined
26
-
27
- ## F. Execution Flow
28
- 1. Review flows and interaction states.
29
- 2. Evaluate accessibility and usability risks.
30
- 3. Score UX gaps by severity.
31
- 4. Decision point ->
32
- - condition A -> critical UX gap -> block readiness
33
- - condition B -> manageable gaps -> continue.
34
- 5. Build prioritized improvement list.
35
- 6. Emit UX quality package.
36
-
37
- ## G. Output Schema
38
-
39
- ```json
40
- {
41
- "ux_review_id": "string",
42
- "ux_gaps": ["array","of","strings"],
43
- "severity": "low | medium | high",
44
- "blocker": "string | null"
45
- }
46
- ```
47
-
48
- ## H. Output Target
49
- - Default delivery: stdout
50
- - Override flag: --output=<target>
51
-
52
- ## I. Stop Conditions <- abort with error message, never emit partial output
53
- - critical flow lacks defined interaction states
54
- - accessibility baseline is not addressed
55
-
56
- ## J. Safety Constraints
57
- - Hard block: hard block on unaddressed critical accessibility failures
58
- - Warn only: warn when medium UX issues are deferred
@@ -1,69 +0,0 @@
1
- ---
2
- title: "Planning Discipline"
3
- description: "Every feature discussion or implementation must produce a reusable prompt plan file in .github/prompts/"
4
- version: "1.0.0"
5
- tags: ["planning", "workflow", "documentation", "prompts"]
6
- alwaysApply: true
7
- ---
8
-
9
- ## Purpose
10
-
11
- Ensure every feature discussion, design decision, or implementation produces a reusable prompt plan stored in `.github/prompts/`. Plans persist across sessions and serve as living context for future work — they are never discarded.
12
-
13
- ## When to Apply
14
-
15
- This rule is always active. Trigger when:
16
-
17
- - User asks to implement a new feature
18
- - A design or architecture decision is being made
19
- - A significant refactor is planned
20
- - A bug fix requires non-trivial investigation or systemic changes
21
- - A discussion produces decisions that affect future work
22
-
23
- ## Plan File Convention
24
-
25
- **Location:** `.github/prompts/`
26
- **Filename:** `YYYY-MM-DD-{feature-slug}.prompt.md`
27
- **Format:** VS Code reusable prompt (`.prompt.md` — usable as an `@workspace` prompt in Copilot Chat)
28
-
29
- ## Required Sections
30
-
31
- Each plan file must contain:
32
-
33
- ```
34
- ---
35
- agent: agent
36
- description: One-line summary of what this plan covers.
37
- ---
38
-
39
- ## Context
40
- Brief background — what problem are we solving and why now.
41
-
42
- ## Decision
43
- What we decided to do and the reasoning behind it (not just what, but why).
44
-
45
- ## Steps
46
- Numbered implementation steps in dependency order.
47
-
48
- ## Acceptance Criteria
49
- Concrete, testable outcomes that define "done".
50
-
51
- ## Status
52
- - [ ] Not started / [ ] In progress / [x] Complete
53
- Blockers (if any):
54
- ```
55
-
56
- ## Workflow
57
-
58
- 1. At the start of any feature discussion or implementation, create the plan file immediately.
59
- 2. Use the filename convention: `YYYY-MM-DD-{feature-slug}.prompt.md`.
60
- 3. Fill out **Context**, **Decision**, and **Steps** before starting implementation.
61
- 4. Update **Status** and **Acceptance Criteria** incrementally as work progresses.
62
- 5. Mark the plan complete when implementation is verified and accepted.
63
-
64
- ## Guardrails
65
-
66
- - Do not skip plan creation for "small" features — small decisions accumulate into undocumented technical debt.
67
- - Plans are never deleted — they form a historical record of architectural decisions.
68
- - Plan files must not contain secrets, credentials, or PII.
69
- - If a plan changes significantly mid-implementation, update it in place rather than creating a new one.