@homericintelligence/athena-opencode 0.4.4 → 0.5.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.
Files changed (136) hide show
  1. package/README.md +30 -17
  2. package/package.json +2 -2
  3. package/plugin.js +20 -5
  4. package/skills/TECHNICAL_ENGLISH.md +78 -0
  5. package/skills/_cli.py +26 -18
  6. package/skills/_support/docs/dependency-resolution.md +192 -0
  7. package/skills/_support/docs/policies/development.md +117 -0
  8. package/skills/_support/docs/policies/evidence-integrity.md +40 -0
  9. package/skills/_support/docs/principles/README.md +542 -0
  10. package/skills/_support/docs/principles/details/p001-kiss.md +114 -0
  11. package/skills/_support/docs/principles/details/p002-yagni.md +109 -0
  12. package/skills/_support/docs/principles/details/p003-dry.md +126 -0
  13. package/skills/_support/docs/principles/details/p004-solid.md +165 -0
  14. package/skills/_support/docs/principles/details/p005-modularity.md +123 -0
  15. package/skills/_support/docs/principles/details/p006-principle-of-least-astonishment.md +115 -0
  16. package/skills/_support/docs/principles/details/p007-subtraction-over-addition.md +113 -0
  17. package/skills/_support/docs/principles/details/p008-understand-before-subtracting.md +115 -0
  18. package/skills/_support/docs/principles/details/p009-general-mechanisms-over-special-cases.md +108 -0
  19. package/skills/_support/docs/principles/details/p010-scope-fidelity.md +117 -0
  20. package/skills/_support/docs/principles/details/p011-minimal-coherent-change.md +128 -0
  21. package/skills/_support/docs/principles/details/p012-evidence-before-modification.md +115 -0
  22. package/skills/_support/docs/principles/details/p013-avoid-hasty-abstractions.md +112 -0
  23. package/skills/_support/docs/principles/details/p014-preserve-unrequested-behavior.md +110 -0
  24. package/skills/_support/docs/principles/details/p015-architecture-conformance.md +124 -0
  25. package/skills/_support/docs/principles/details/p016-separation-of-concerns.md +125 -0
  26. package/skills/_support/docs/principles/details/p017-high-cohesion-low-coupling.md +130 -0
  27. package/skills/_support/docs/principles/details/p018-information-hiding.md +128 -0
  28. package/skills/_support/docs/principles/details/p019-explicit-contracts.md +134 -0
  29. package/skills/_support/docs/principles/details/p020-executable-architecture.md +130 -0
  30. package/skills/_support/docs/principles/details/p021-evolutionary-and-reversible-design.md +126 -0
  31. package/skills/_support/docs/principles/details/p022-test-behavior-not-implementation.md +129 -0
  32. package/skills/_support/docs/principles/details/p023-parameterized-table-driven-testing.md +129 -0
  33. package/skills/_support/docs/principles/details/p024-boundary-value-testing.md +128 -0
  34. package/skills/_support/docs/principles/details/p025-property-based-testing-for-invariants.md +133 -0
  35. package/skills/_support/docs/principles/details/p026-regression-before-repair.md +134 -0
  36. package/skills/_support/docs/principles/details/p027-deterministic-and-hermetic-tests.md +128 -0
  37. package/skills/_support/docs/principles/details/p028-test-failure-paths.md +133 -0
  38. package/skills/_support/docs/principles/details/p029-generalize-error-policy-preserve-specific-cause.md +131 -0
  39. package/skills/_support/docs/principles/details/p030-nearest-responsible-error-boundary.md +133 -0
  40. package/skills/_support/docs/principles/details/p031-propagate-rather-than-swallow.md +131 -0
  41. package/skills/_support/docs/principles/details/p032-handle-once-preserve-causality.md +137 -0
  42. package/skills/_support/docs/principles/details/p033-state-safe-failure-semantics.md +140 -0
  43. package/skills/_support/docs/principles/details/p034-fail-fast.md +132 -0
  44. package/skills/_support/docs/principles/details/p035-fail-secure-fail-closed.md +137 -0
  45. package/skills/_support/docs/principles/details/p036-graceful-degradation.md +137 -0
  46. package/skills/_support/docs/principles/details/p037-idempotency-before-retry.md +139 -0
  47. package/skills/_support/docs/principles/details/p038-bounded-retry.md +145 -0
  48. package/skills/_support/docs/principles/details/p039-bounded-waiting.md +151 -0
  49. package/skills/_support/docs/principles/details/p040-bounded-resources.md +138 -0
  50. package/skills/_support/docs/principles/details/p041-backpressure-and-load-shedding.md +141 -0
  51. package/skills/_support/docs/principles/details/p042-fault-isolation-bulkheads.md +140 -0
  52. package/skills/_support/docs/principles/details/p043-circuit-breakers.md +148 -0
  53. package/skills/_support/docs/principles/details/p044-atomicity-where-possible.md +141 -0
  54. package/skills/_support/docs/principles/details/p045-compensation-where-atomicity-is-impossible.md +163 -0
  55. package/skills/_support/docs/principles/details/p046-resumability.md +138 -0
  56. package/skills/_support/docs/principles/details/p047-observability-is-part-of-correctness.md +134 -0
  57. package/skills/_support/docs/principles/details/p048-secure-by-design.md +132 -0
  58. package/skills/_support/docs/principles/details/p049-secure-by-default.md +126 -0
  59. package/skills/_support/docs/principles/details/p050-least-privilege.md +123 -0
  60. package/skills/_support/docs/principles/details/p051-complete-mediation.md +124 -0
  61. package/skills/_support/docs/principles/details/p052-separation-of-duties.md +129 -0
  62. package/skills/_support/docs/principles/details/p053-validate-at-trust-boundaries.md +126 -0
  63. package/skills/_support/docs/principles/details/p054-defense-in-depth.md +135 -0
  64. package/skills/_support/docs/principles/details/p055-minimize-attack-surface.md +133 -0
  65. package/skills/_support/docs/principles/details/p056-secrets-stay-out-of-code-and-context.md +137 -0
  66. package/skills/_support/docs/principles/details/p057-supply-chain-integrity.md +135 -0
  67. package/skills/_support/docs/principles/details/p058-bounded-agent-authority.md +137 -0
  68. package/skills/_support/docs/principles/details/p059-data-is-not-instruction.md +130 -0
  69. package/skills/_support/docs/principles/details/p060-constrain-sub-agents.md +136 -0
  70. package/skills/_support/docs/principles/details/p061-separate-decision-from-high-impact-execution.md +131 -0
  71. package/skills/_support/docs/principles/details/p062-human-approval-for-irreversible-or-high-risk-actions.md +129 -0
  72. package/skills/_support/docs/principles/details/p063-requirement-to-code-traceability.md +116 -0
  73. package/skills/_support/docs/principles/details/p064-requirement-to-test-traceability.md +116 -0
  74. package/skills/_support/docs/principles/details/p065-verify-before-claiming-completion.md +129 -0
  75. package/skills/_support/docs/principles/details/p066-preserve-existing-work.md +114 -0
  76. package/skills/_support/docs/principles/details/p067-no-test-cheating.md +126 -0
  77. package/skills/_support/docs/principles/details/p068-no-validation-bypass.md +119 -0
  78. package/skills/_support/docs/principles/details/p069-independent-review-for-high-risk-changes.md +129 -0
  79. package/skills/_support/docs/principles/details/p070-code-health-must-not-regress.md +116 -0
  80. package/skills/_support/docs/principles/details/p071-consistency-over-personal-preference.md +117 -0
  81. package/skills/_support/docs/principles/details/p072-technical-evidence-over-preference.md +122 -0
  82. package/skills/_support/docs/principles/details/p073-optimize-only-with-evidence.md +123 -0
  83. package/skills/_support/docs/principles/details/p074-prefer-existing-mechanisms.md +121 -0
  84. package/skills/_support/docs/principles/details/p075-make-invalid-states-hard-to-represent.md +128 -0
  85. package/skills/_support/docs/principles/details/p076-parse-then-validate-then-operate.md +133 -0
  86. package/skills/_support/docs/principles/details/p077-separate-policy-from-mechanism.md +112 -0
  87. package/skills/_support/docs/principles/details/p078-single-source-of-truth.md +131 -0
  88. package/skills/_support/docs/principles/details/p079-explicit-ownership-and-lifetimes.md +124 -0
  89. package/skills/_support/docs/principles/details/p080-make-concurrency-deliberate.md +122 -0
  90. package/skills/_support/docs/principles/details/p081-forward-progress-with-safety.md +125 -0
  91. package/skills/_support/docs/principles/details/p082-design-for-cancellation.md +133 -0
  92. package/skills/_support/docs/principles/details/p083-irreversible-actions-last.md +124 -0
  93. package/skills/_support/docs/principles/details/p084-prefer-local-reasoning.md +131 -0
  94. package/skills/_support/docs/principles/details/p085-explicit-is-better-than-implicit.md +123 -0
  95. package/skills/_support/docs/principles/details/p086-readability-counts.md +113 -0
  96. package/skills/_support/docs/principles/details/p087-comments-explain-why-code-explains-what.md +120 -0
  97. package/skills/_support/docs/principles/details/p088-delete-dead-code.md +125 -0
  98. package/skills/_support/docs/principles/details/p089-delete-obsolete-configuration-and-dependencies.md +125 -0
  99. package/skills/_support/docs/principles/details/p090-prefer-negative-code.md +134 -0
  100. package/skills/_support/docs/principles/details/p091-test-driven-development.md +149 -0
  101. package/skills/_support/docs/review/README.md +59 -0
  102. package/skills/_support/docs/review/behavior-first-testing.md +73 -0
  103. package/skills/_support/docs/review/common.md +365 -0
  104. package/skills/_support/docs/review/design-docs.md +74 -0
  105. package/skills/_support/docs/review/issue-planning.md +220 -0
  106. package/skills/_support/docs/review/language-routing.md +141 -0
  107. package/skills/_support/docs/review/repository-scorecard.md +170 -0
  108. package/skills/advise/SKILL.md +102 -40
  109. package/skills/advise/scripts/list_retrievable_skills.py +3 -3
  110. package/skills/brainstorm/SKILL.md +167 -76
  111. package/skills/change-review/SKILL.md +99 -43
  112. package/skills/change-review/references/scope-resolution.md +70 -41
  113. package/skills/change-review/scripts/resolve_scope.py +119 -73
  114. package/skills/finalize-plan/SKILL.md +208 -100
  115. package/skills/git-worktrees/SKILL.md +108 -59
  116. package/skills/git-worktrees/scripts/prepare_worktree.py +16 -10
  117. package/skills/issue-review/SKILL.md +143 -47
  118. package/skills/learn/SKILL.md +284 -162
  119. package/skills/myrmidon-swarm/SKILL.md +136 -61
  120. package/skills/plan-issue/SKILL.md +129 -47
  121. package/skills/pr-review/SKILL.md +170 -71
  122. package/skills/pr-review/references/criteria.md +61 -14
  123. package/skills/pr-review/references/delivery.md +159 -80
  124. package/skills/pr-review/references/evidence.md +268 -139
  125. package/skills/pr-review/references/prevalidated.md +91 -48
  126. package/skills/pr-review/scripts/collect_evidence.py +211 -140
  127. package/skills/pr-review/scripts/diff_context.py +6 -4
  128. package/skills/pr-review/scripts/materialize_snapshot.py +112 -120
  129. package/skills/pr-review/scripts/pr_identity.py +27 -15
  130. package/skills/pr-review/scripts/resolve_pr.py +53 -31
  131. package/skills/repo-review/SKILL.md +209 -87
  132. package/skills/systematic-debugging/SKILL.md +195 -131
  133. package/skills/systematic-debugging/scripts/repository_evidence.py +9 -4
  134. package/skills/test-driven-development/SKILL.md +134 -53
  135. package/skills/tidy/SKILL.md +97 -33
  136. package/skills/tidy/scripts/run_tidy.py +3 -3
@@ -1,93 +1,168 @@
1
1
  ---
2
2
  name: myrmidon-swarm
3
3
  license: BSD-3-Clause
4
- description: Coordinate complex work through dependency-aware subagents in isolated worktrees, with a sequential fallback. Requires the Mnemosyne knowledge backend through advise and fails closed when it cannot be prepared.
4
+ description: Coordinate complex work with dependency-aware subagents in isolated worktrees. Use sequential work if the host cannot delegate. This skill requires the Mnemosyne knowledge backend through advise. Stop if the backend cannot be prepared.
5
5
  argument-hint: <task description>
6
6
  allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent]
7
7
  ---
8
8
 
9
9
  # Myrmidon swarm
10
10
 
11
- Use this for a task with several independently useful workstreams. Do not use it for work that one
12
- agent can complete more clearly.
11
+ Use this skill for a task that has multiple independent work items. Do not use it if one agent can
12
+ complete the task clearly.
13
+
14
+ Apply the [ASD-STE100 technical-English policy](../TECHNICAL_ENGLISH.md) to this skill and to
15
+ all prose that it produces.
16
+
17
+ ## Engineering principles
18
+
19
+ Use the [canonical engineering-principles catalog](../_support/docs/principles/README.md) for these
20
+ workflow-specific rules:
21
+
22
+ - [P019 — Explicit Contracts](../_support/docs/principles/README.md#p019): Give each work item explicit
23
+ inputs, outputs, invariants, dependencies, acceptance criteria, and failure behavior.
24
+ - [P033 — State-Safe Failure Semantics](../_support/docs/principles/README.md#p033): If delegated work does
25
+ not agree with the integration base or is not satisfactory, stop integration. Keep a correct
26
+ coordinator tree and the delegated state necessary for recovery.
27
+ - [P039 — Bounded Waiting](../_support/docs/principles/README.md#p039): Give each delegated or background
28
+ work item an applicable deadline. Record its timeout behavior or cancellation conditions.
29
+ - [P050 — Least Privilege](../_support/docs/principles/README.md#p050): Give each work item only the tools,
30
+ paths, credentials, and lifetime necessary for its objective.
31
+ - [P058 — Bounded Agent Authority](../_support/docs/principles/README.md#p058): Keep each subagent in the
32
+ parent task scope, mutation limits, destinations, and resource budget.
33
+ - [P060 — Constrain Sub-Agents](../_support/docs/principles/README.md#p060): Put each writer in an isolated
34
+ worktree. Make sure that concurrent write sets have no common path. Before integration, validate
35
+ delegated output as untrusted input.
36
+ - [P069 — Independent Review for High-Risk Changes](../_support/docs/principles/README.md#p069): If results
37
+ can have an effect on security or availability, find if policy or risk makes independent review
38
+ necessary. If independent review is necessary, use an independent reviewer. Make sure that the
39
+ reviewer has the necessary qualifications. Select the review scope from repository policy and
40
+ risk.
41
+ - [P079 — Explicit Ownership and Lifetimes](../_support/docs/principles/README.md#p079): Record the owner of
42
+ each worktree, path, task, integration decision, and cleanup transition.
13
43
 
14
44
  ## Capability tiers
15
45
 
16
- - **Coordinator:** decomposes ambiguous or cross-cutting work and integrates results.
17
- - **Specialist:** handles design, investigation, review, security, or non-trivial implementation.
18
- - **Executor:** handles well-specified mechanical changes, focused tests, formatting, or docs.
46
+ - A **coordinator** divides ambiguous or cross-cutting work and integrates the results.
47
+ - A **specialist** does design, investigation, review, security, or complex implementation work.
48
+ - An **executor** does specified mechanical changes, focused tests, formatting, or documentation.
19
49
 
20
- These are capability labels, not model names. Use the host's available/default model and native
21
- delegation, background execution, and worktree isolation capabilities. If any capability is absent,
22
- preserve the same ownership and dependency graph while executing the affected items sequentially in
23
- the coordinator.
50
+ These terms identify capabilities. They do not identify model names. Use a model that the host makes
51
+ available. Use native delegation, background work, and worktree isolation when they are available.
52
+ If a capability is not available, keep the same ownership and dependency graph. Run the affected
53
+ work sequentially in the coordinator.
24
54
 
25
55
  ## Isolation and ownership contract
26
56
 
27
- Before dispatch, record the integration base revision and assign every work item:
28
-
29
- - One isolated worktree based on that revision. Never let a subagent edit the coordinator's active
30
- worktree or reuse a worktree owned by another agent. Use the tested
31
- `../git-worktrees/scripts/prepare_worktree.py` helper by its absolute path resolved from this skill
32
- directory while retaining the target repository as the current working directory. Supply an exact
33
- non-overlapping `--path`, its trusted `--path-root`, and `--start-point <integration-SHA>` when the
34
- host does not provide native worktree isolation.
35
- - An explicit file and directory ownership set. Concurrent write sets must not overlap. Shared files
36
- belong to the coordinator or to one designated integration item after dependent work completes.
37
- - A bounded objective, dependencies, acceptance criteria, validation commands, and mutation limits.
38
- - A delivery format the host can integrate, such as a reviewed commit, patch, or complete read-only
39
- report. The coordinator remains responsible for the final result.
40
-
41
- Read-only agents may inspect overlapping evidence, but they must not edit it. If safe isolation
42
- cannot be established, stop delegation and use the sequential fallback.
57
+ Before you start subagents, record the integration base revision. For each work item:
58
+
59
+ - Create one isolated worktree from the integration base revision. Do not let a subagent edit the
60
+ active worktree of the coordinator. Do not reuse a worktree that another agent owns. If the host
61
+ does not supply worktree isolation, use the tested
62
+ `../git-worktrees/scripts/prepare_worktree.py` helper. Resolve its absolute path from this skill
63
+ directory. Keep the target repository as the current working directory. Supply an exact,
64
+ non-overlapping `--path`, its trusted `--path-root`, and
65
+ `--start-point <integration-SHA>`.
66
+ - Assign an explicit set of files and directories. Do not let concurrent write sets overlap. After
67
+ dependent work is complete, assign shared files to the coordinator or to one integration item.
68
+ - Record a bounded objective, dependencies, acceptance criteria, validation commands, mutation
69
+ limits, granted capabilities, and a suitable stop condition. The stop condition can be a deadline,
70
+ a timeout, or a cancellation condition.
71
+ - Select a delivery format that the host can integrate. Examples are a reviewed commit, a patch, or
72
+ a complete read-only report. The coordinator remains responsible for the final result.
73
+
74
+ Read-only agents can inspect the same evidence, but they must not edit it. If the coordinator cannot
75
+ establish safe isolation, stop delegation. In that case, use the sequential fallback.
43
76
 
44
77
  ## Workflow
45
78
 
46
- 1. Invoke `advise` with the task description and apply relevant prior knowledge.
79
+ 1. Use `advise` to apply relevant prior knowledge to the task description.
47
80
  2. Read `AGENTS.md`, build metadata, task runners, and the files closest to the request.
48
- 3. Decompose the work. For each item record scope, tier, files, dependencies, acceptance criteria,
49
- verification, and whether it writes state.
50
- 4. Present the plan when user approval is required by the host or task. Otherwise begin safe,
51
- in-scope work.
52
- 5. Group dependency-independent items into a wave. Start their isolated subagents as background or
53
- concurrent tasks when the host supports it, up to the host's safe concurrency limit. Wait for the
54
- complete wave before dispatching work that depends on it.
55
- 6. Give each subagent its recorded worktree, ownership set, and bounded prompt. Require it to stop
56
- on overlap, unexpected scope, a changed integration base, or unsafe mutation rather than
57
- expanding its assignment.
58
- 7. If background execution or delegation is unavailable, run the same items sequentially in the
59
- coordinator. Do not weaken scope, isolation, validation, or evidence requirements.
60
- 8. Review each result and its diff or evidence before integration. Reject unrelated edits and stale
61
- results. Integrate accepted results sequentially onto the coordinator branch, resolving shared
62
- integration files only after their producers finish.
63
- 9. After every integration, run focused checks for the affected boundary. After the final
64
- integration, run the repository-defined complete relevant validation from the combined tree.
65
- 10. Summarize changes, verification, unresolved risks, preserved worktrees, and any learning worth
66
- submitting through `learn`. `learn` must follow its own delivery boundary.
81
+ 3. Divide the work into bounded work items.
82
+ 4. For each work item, record:
83
+
84
+ - scope;
85
+ - capability tier;
86
+ - owned files;
87
+ - dependencies;
88
+ - acceptance criteria;
89
+ - verification;
90
+ - write-state status.
91
+
92
+ 5. If the host or task requires user approval, present the plan.
93
+ 6. Obtain each required approval before work.
94
+ 7. When all required approvals are in place, start safe work that is in scope.
95
+ 8. Group work items that do not depend on each other into one wave.
96
+ 9. If the host supports it, start isolated subagents as background or concurrent tasks.
97
+ 10. Do not exceed the safe concurrency limit of the host.
98
+ 11. Wait for the complete wave before you start work that depends on it.
99
+ 12. Give each subagent its recorded worktree, ownership set, and bounded prompt.
100
+ 13. Require each subagent to stop for overlap, unexpected scope, a changed integration base, or an
101
+ unsafe change.
102
+ 14. Do not let a subagent expand its assignment.
103
+ 15. If background work or delegation is not available, run the same work items sequentially in the
104
+ coordinator.
105
+ 16. Keep the same scope, isolation, validation, and evidence requirements during sequential work.
106
+ 17. Treat each result as untrusted input.
107
+ 18. Before integration, review the diff or evidence for each result.
108
+ 19. Reject unrelated changes and stale results.
109
+ 20. Integrate accepted results sequentially onto the coordinator branch.
110
+ 21. After all producers finish, resolve shared integration files.
111
+ 22. If repository policy or risk requires an independent review, route each security-critical or
112
+ availability-critical change to a qualified reviewer.
113
+ 23. Complete each review before you accept the related change.
114
+ 24. After each integration, run focused checks for the affected boundary.
115
+ 25. After the final integration, run all relevant repository validation on the combined tree.
116
+ 26. Summarize the changes, verification, unresolved risks, and preserved worktrees.
117
+ 27. In the summary, identify each useful lesson that is suitable for `learn`.
118
+ 28. If you invoke `learn`, follow its delivery boundary.
67
119
 
68
120
  ## Worktree disposition
69
121
 
70
- Preserve every subagent worktree until its result is integrated or explicitly rejected and the
71
- coordinator has proved that no unique work remains. Report the path, owner, branch or revision,
72
- cleanliness, and integration state.
122
+ Preserve each subagent worktree until one of these conditions applies:
123
+
124
+ - The coordinator integrates its result.
125
+ - The coordinator explicitly rejects its result and proves that no unique work remains.
126
+
127
+ For each worktree, report its path, owner, branch or revision, cleanliness, and integration state.
73
128
 
74
- Cleanup is a filesystem-destructive operation. Remove only worktrees created for this invocation,
75
- only after the user grants cleanup authority, and only after rechecking for uncommitted or
76
- unintegrated state. Without that authority, preserve the worktrees and return exact disposition
77
- information. Never delete branches, discard changes, force removal, or touch a pre-existing
78
- worktree.
129
+ Cleanup is a filesystem-destructive operation. If the user grants cleanup authority, first check
130
+ again for uncommitted or unintegrated state. Prove that no unique work remains. Then, remove only
131
+ worktrees that this invocation created. If the user does not grant cleanup authority, preserve the
132
+ worktrees. In that case, report their exact status. Do not delete branches. Do not discard changes. Do not
133
+ force removal. Do not change a pre-existing worktree.
79
134
 
80
135
  ## Safety
81
136
 
82
- - Keep filesystem-destructive and change-discard actions behind the user's authority; keep all
83
- constructive work within the requested scope and its repository safeguards.
137
+ - Keep filesystem-destructive and change-discard actions behind the user's authority.
138
+ - Keep constructive work within the requested scope and repository safeguards.
84
139
  - Preserve existing user changes and all pre-existing worktrees.
85
140
  - Never claim a subagent ran or a check passed without evidence.
86
- - Prefer the smallest number of agents that creates real parallel value.
141
+ - Use the minimum number of agents that can do independent work in parallel.
142
+
143
+ ## Failed approaches
144
+
145
+ - Do not let specialists write outside their worktrees or file sets.
146
+ - Do not reuse a worktree that another agent owns.
147
+ - Do not merge results without the disposition contract.
148
+ - Do not remove worktrees without the disposition contract.
149
+ - Do not remove worktrees without user cleanup authority.
150
+ - Do not report swarm status without results, evidence, and worktree status for each specialist.
151
+ - Do not expand a subagent assignment beyond its bounded prompt. Stop if assignments overlap.
87
152
 
88
153
  ## Status format
89
154
 
90
- Report each work item with its tier, dependency wave, worktree, owned paths, execution mode
91
- (concurrent or sequential fallback), status, result, integration revision, and verification. The
92
- final summary must distinguish completed work from recommendations and unresolved blockers and
93
- must list every preserved or removed worktree.
155
+ For each work item, report:
156
+
157
+ - capability tier;
158
+ - dependency wave;
159
+ - worktree;
160
+ - owned paths;
161
+ - execution mode, which is concurrent or sequential fallback;
162
+ - status;
163
+ - result;
164
+ - integration revision;
165
+ - verification.
166
+
167
+ In the final summary, distinguish completed work from recommendations and unresolved blockers. List
168
+ each preserved or removed worktree.
@@ -1,70 +1,152 @@
1
1
  ---
2
2
  name: plan-issue
3
3
  license: BSD-3-Clause
4
- description: Draft or publish one canonical implementation plan for a GitHub or GitLab issue after architecture and knowledge review. Use when an issue needs an executable, behavior-first plan; `--draft` is read-only.
4
+ description: Draft or publish one canonical implementation plan for a GitHub or GitLab issue. Use this skill after architecture and knowledge review when an issue needs an executable, behavior-first plan. The `--draft` mode is read-only.
5
5
  argument-hint: "[--draft] ISSUE_NUMBER_OR_URL"
6
6
  allowed-tools: [Read, Bash, Grep, Glob, Agent]
7
7
  ---
8
8
 
9
9
  # Plan an issue
10
10
 
11
- Why: turn current issue requirements into the smallest architecture-aligned,
12
- behavior-verifiable plan before implementation begins.
11
+ Use this skill to create the smallest architecture-aligned plan for the current issue requirements.
12
+ Include behavior-first verification in the plan. Create the plan before implementation starts.
13
13
 
14
- Use the shared [issue-planning contract](../../docs/review/issue-planning.md),
15
- [review contract](../../docs/review/common.md),
16
- [language routing](../../docs/review/language-routing.md), and
17
- [behavior-first testing](../../docs/review/behavior-first-testing.md).
14
+ Apply the [ASD-STE100 technical-English policy](../TECHNICAL_ENGLISH.md) to this skill and to
15
+ all prose that it produces.
16
+
17
+ Use the shared [issue-planning contract](../_support/docs/review/issue-planning.md),
18
+ [review contract](../_support/docs/review/common.md),
19
+ [language routing](../_support/docs/review/language-routing.md), and
20
+ [behavior-first testing](../_support/docs/review/behavior-first-testing.md).
21
+
22
+ ## Engineering principles
23
+
24
+ Use the canonical [engineering-principles catalog](../_support/docs/principles/README.md) for these
25
+ decisions:
26
+
27
+ - [P010 Scope Fidelity](../_support/docs/principles/README.md#p010):
28
+ - Do not include work that is not in the issue.
29
+ - [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063):
30
+ - For each plan step, record a link to the applicable issue requirement.
31
+ - [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012):
32
+ - Before you put files or abstractions in the plan, examine repository evidence.
33
+ - [P015 Architecture Conformance](../_support/docs/principles/README.md#p015):
34
+ - When you make the plan, obey established architecture boundaries and dependency directions.
35
+ - [P001 KISS — Keep It Simple, Stupid](../_support/docs/principles/README.md#p001):
36
+ - Select the minimum solution that obeys all current requirements.
37
+ - [P002 YAGNI — You Ain't Gonna Need It](../_support/docs/principles/README.md#p002):
38
+ - If a capability has no specified current requirement, do not add it.
39
+ - [P074 Prefer Existing Mechanisms](../_support/docs/principles/README.md#p074):
40
+ - If an applicable existing mechanism is available, use it.
41
+ - [P008 Understand Before Subtracting](../_support/docs/principles/README.md#p008):
42
+ - Before you plan a removal or consolidation, examine the mechanism's purpose, consumers, and
43
+ contracts.
18
44
 
19
45
  ## Scope and delivery
20
46
 
21
- `--draft` is read-only. A requested plan without it may publish only the
22
- actor-owned canonical-plan issue comment described by the issue-planning
23
- contract; it does not expand scope to implementation, labels, assignments, commits,
24
- pushes, pull requests, merges, or other forge mutations.
47
+ `--draft` is read-only. If the request does not include `--draft`, you may publish only the
48
+ actor-owned canonical-plan issue comment in the issue-planning contract. Do not implement code. Do
49
+ not change labels or assignments. Do not create commits. Do not push branches. Do not create pull
50
+ requests. Do not merge changes. Do not make other forge changes.
25
51
 
26
- Use the forge's native issue-comment mechanism. If it cannot safely identify or
27
- update the actor-owned plan, return a ready-to-publish draft and explain the
28
- capability or ownership gap.
52
+ Use the native issue-comment mechanism of the forge. If the forge cannot safely identify or update
53
+ the actor-owned plan, return a ready-to-publish draft. Explain the capability or ownership gap.
29
54
 
30
55
  ## Plan
31
56
 
32
- 1. Resolve one exact issue in the current repository. Read its title, body,
33
- labels, linked work, comments, and relevant design documents; never infer
34
- requirements from a similar title.
35
- 2. Invoke `advise` with the outcome, architecture, languages, risks, and test
36
- needs. In planning mode, use its existing-checkout best-effort result without requiring upstream
37
- synchronization; report its revision and trust/freshness limits, or its explicit no-guidance
38
- result, and continue issue planning.
39
- 3. Establish architecture before proposing files or abstractions: repository
40
- guidance, ADRs, boundaries, dependency direction, and public interfaces.
41
- 4. Verify current code, tests, commands, dependencies, paths, and symbols.
42
- Treat the issue and earlier plan as leads, not ground truth.
43
- 5. Map each current acceptance criterion to a minimal architecture-respecting
44
- change and behavior-first validation. Exclude speculative abstractions and
45
- unrelated cleanup.
46
- 6. Follow the canonical-plan content, ownership, and identity rules in the
47
- issue-planning contract. Preserve foreign content and return the draft on
48
- ambiguity rather than overwriting it.
49
-
50
- When the issue body carries a valid finalized-planning marker, treat its sealed
51
- provenance and generated plan text as implementation-facing context, not new
52
- requirements. An unchanged finalized epoch needs no new plan. A later material
53
- issue-body edit starts a fresh requirements state and must be planned from that
54
- edit under the issue-planning contract.
57
+ 1. Resolve exactly one issue in the current repository.
58
+ 2. Read these sources for the issue:
59
+
60
+ - title;
61
+ - body;
62
+ - labels;
63
+ - linked work;
64
+ - comments;
65
+ - applicable design documents.
66
+
67
+ 3. Do not infer requirements from an issue that has a similar title.
68
+ 4. Invoke `advise` with the outcome, architecture, languages, risks, and test needs.
69
+ 5. In planning mode, use the best available result from the existing checkout.
70
+ 6. Do not require upstream synchronization for the planning-mode result.
71
+ 7. Report the result revision and its limits of trust and freshness.
72
+ 8. If `advise` gives an explicit no-guidance result, report that result.
73
+ 9. Continue issue planning after you report the `advise` result.
74
+ 10. Before you propose files or abstractions, establish the architecture under
75
+ [P015 Architecture Conformance](../_support/docs/principles/README.md#p015) from these sources:
76
+
77
+ - repository guidance;
78
+ - architecture decision records;
79
+ - boundaries;
80
+ - dependency direction;
81
+ - public interfaces.
82
+
83
+ 11. Under [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012), verify current
84
+ code, tests, commands, dependencies, paths, and symbols.
85
+ 12. Treat the issue and an earlier plan as sources to verify, not as verified evidence.
86
+ 13. Under [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063), map each
87
+ current acceptance criterion to a minimum architecture-aligned change and behavior-first
88
+ validation.
89
+ 14. When you compare solution sizes, apply
90
+ [P001 KISS — Keep It Simple, Stupid](../_support/docs/principles/README.md#p001) and
91
+ [P002 YAGNI — You Ain't Gonna Need It](../_support/docs/principles/README.md#p002).
92
+ 15. Prefer an applicable existing mechanism under
93
+ [P074 Prefer Existing Mechanisms](../_support/docs/principles/README.md#p074).
94
+ 16. Do not include speculative abstractions or unrelated cleanup.
95
+ 17. Before you delete or consolidate a mechanism, apply
96
+ [P008 Understand Before Subtracting](../_support/docs/principles/README.md#p008).
97
+ 18. Follow the canonical-plan content, ownership, and identity rules in the issue-planning contract.
98
+ 19. Preserve all content that another actor owns.
99
+ 20. If ownership or identity is ambiguous, return the draft.
100
+ 21. Do not overwrite content with ambiguous ownership or identity.
101
+
102
+ Activate these shared profiles only for the specified surface:
103
+
104
+ - For changed behavior, activate
105
+ [P022 Test Behavior, Not Implementation](../_support/docs/principles/README.md#p022).
106
+ - For error contracts, activate
107
+ [P029 Generalize Error Policy; Preserve Specific Cause](../_support/docs/principles/README.md#p029).
108
+ - For security or a new trust boundary, activate
109
+ [P048 Secure by Design](../_support/docs/principles/README.md#p048).
110
+
111
+ If the issue body has a valid finalized-planning marker, use only its sealed provenance as
112
+ implementation context. Use the generated plan text for the same purpose. Do not treat them as new
113
+ requirements. If the finalized epoch is unchanged, do not create a new plan. If a later material
114
+ edit changes the issue body, start a new requirements state. Plan from that edit under the
115
+ issue-planning contract.
55
116
 
56
117
  For a material architecture decision, include or cite a
57
- [design record](../../docs/review/design-docs.md) that leads with why, then its
58
- block diagram and high-level design before clear component details. Do not
59
- create a durable design artifact for a simple change without a repository need.
118
+ [design record](../_support/docs/review/design-docs.md). Start the design record with the reason for the
119
+ decision. Then, give the block diagram and high-level design before clear component details. Do not
120
+ create a durable design artifact for a simple change unless the repository needs it.
121
+
122
+ Name only validation commands that you find in the repository. Do not claim that a command passed
123
+ if you did not run it. Do not create a prose-string test to make the plan appear verifiable.
124
+ Immediately before publication, resolve the canonical identity again. If the requirements, marker,
125
+ comment, or plan content changed, withhold the update.
60
126
 
61
- Name only repository-discovered validation commands; never claim an unrun
62
- command passed or create a prose-string test to make the plan look verifiable.
63
- Immediately before publication, re-resolve the canonical identity and withhold
64
- the update if the requirements, marker, comment, or plan content drifted.
127
+ ## Failed approaches
128
+
129
+ - Do not plan from the issue title alone.
130
+ - Do not infer requirements from a similar issue.
131
+ - Do not include an assumption before you verify paths, symbols, and commands in current repository
132
+ evidence. Cite the evidence as `file:line`.
133
+ - Do not start implementation during planning.
134
+ - Do not deliver changes beyond the canonical-plan comment.
135
+ - Do not claim that a validation command passed if you did not run it.
136
+ - Do not overwrite content from another actor if ownership is ambiguous.
65
137
 
66
138
  ## Result
67
139
 
68
- Return the issue, architecture decision, Mnemosyne revision or no-guidance status and relevant
69
- guidance, plan action or draft, requirement mapping, validation plan, and every unresolved decision.
70
- If published, return the forge URL or comment identity; otherwise state why publication was withheld.
140
+ Return these items:
141
+
142
+ - issue identity;
143
+ - architecture decision;
144
+ - Mnemosyne revision or no-guidance status;
145
+ - applicable guidance;
146
+ - plan action or draft;
147
+ - requirement mapping;
148
+ - validation plan;
149
+ - each unresolved decision.
150
+
151
+ If you publish the plan, return the forge URL or comment identity. If you withhold publication,
152
+ state the reason.