@homericintelligence/athena-opencode 0.5.0 → 0.5.2

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 (146) 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 +33 -22
  6. package/skills/_plugin.json +1 -0
  7. package/skills/_support/docs/dependency-resolution.md +203 -0
  8. package/skills/_support/docs/policies/development.md +131 -0
  9. package/skills/_support/docs/policies/evidence-integrity.md +40 -0
  10. package/skills/_support/docs/principles/README.md +565 -0
  11. package/skills/_support/docs/principles/details/p001-kiss.md +114 -0
  12. package/skills/_support/docs/principles/details/p002-yagni.md +109 -0
  13. package/skills/_support/docs/principles/details/p003-dry.md +126 -0
  14. package/skills/_support/docs/principles/details/p004-solid.md +165 -0
  15. package/skills/_support/docs/principles/details/p005-modularity.md +123 -0
  16. package/skills/_support/docs/principles/details/p006-principle-of-least-astonishment.md +115 -0
  17. package/skills/_support/docs/principles/details/p007-subtraction-over-addition.md +113 -0
  18. package/skills/_support/docs/principles/details/p008-understand-before-subtracting.md +115 -0
  19. package/skills/_support/docs/principles/details/p009-general-mechanisms-over-special-cases.md +108 -0
  20. package/skills/_support/docs/principles/details/p010-scope-fidelity.md +117 -0
  21. package/skills/_support/docs/principles/details/p011-minimal-coherent-change.md +128 -0
  22. package/skills/_support/docs/principles/details/p012-evidence-before-modification.md +115 -0
  23. package/skills/_support/docs/principles/details/p013-avoid-hasty-abstractions.md +112 -0
  24. package/skills/_support/docs/principles/details/p014-preserve-unrequested-behavior.md +110 -0
  25. package/skills/_support/docs/principles/details/p015-architecture-conformance.md +124 -0
  26. package/skills/_support/docs/principles/details/p016-separation-of-concerns.md +125 -0
  27. package/skills/_support/docs/principles/details/p017-high-cohesion-low-coupling.md +130 -0
  28. package/skills/_support/docs/principles/details/p018-information-hiding.md +128 -0
  29. package/skills/_support/docs/principles/details/p019-explicit-contracts.md +134 -0
  30. package/skills/_support/docs/principles/details/p020-executable-architecture.md +130 -0
  31. package/skills/_support/docs/principles/details/p021-evolutionary-and-reversible-design.md +126 -0
  32. package/skills/_support/docs/principles/details/p022-test-behavior-not-implementation.md +129 -0
  33. package/skills/_support/docs/principles/details/p023-parameterized-table-driven-testing.md +129 -0
  34. package/skills/_support/docs/principles/details/p024-boundary-value-testing.md +128 -0
  35. package/skills/_support/docs/principles/details/p025-property-based-testing-for-invariants.md +133 -0
  36. package/skills/_support/docs/principles/details/p026-regression-before-repair.md +134 -0
  37. package/skills/_support/docs/principles/details/p027-deterministic-and-hermetic-tests.md +128 -0
  38. package/skills/_support/docs/principles/details/p028-test-failure-paths.md +133 -0
  39. package/skills/_support/docs/principles/details/p029-generalize-error-policy-preserve-specific-cause.md +131 -0
  40. package/skills/_support/docs/principles/details/p030-nearest-responsible-error-boundary.md +133 -0
  41. package/skills/_support/docs/principles/details/p031-propagate-rather-than-swallow.md +131 -0
  42. package/skills/_support/docs/principles/details/p032-handle-once-preserve-causality.md +137 -0
  43. package/skills/_support/docs/principles/details/p033-state-safe-failure-semantics.md +140 -0
  44. package/skills/_support/docs/principles/details/p034-fail-fast.md +132 -0
  45. package/skills/_support/docs/principles/details/p035-fail-secure-fail-closed.md +137 -0
  46. package/skills/_support/docs/principles/details/p036-graceful-degradation.md +137 -0
  47. package/skills/_support/docs/principles/details/p037-idempotency-before-retry.md +139 -0
  48. package/skills/_support/docs/principles/details/p038-bounded-retry.md +145 -0
  49. package/skills/_support/docs/principles/details/p039-bounded-waiting.md +151 -0
  50. package/skills/_support/docs/principles/details/p040-bounded-resources.md +138 -0
  51. package/skills/_support/docs/principles/details/p041-backpressure-and-load-shedding.md +141 -0
  52. package/skills/_support/docs/principles/details/p042-fault-isolation-bulkheads.md +140 -0
  53. package/skills/_support/docs/principles/details/p043-circuit-breakers.md +148 -0
  54. package/skills/_support/docs/principles/details/p044-atomicity-where-possible.md +141 -0
  55. package/skills/_support/docs/principles/details/p045-compensation-where-atomicity-is-impossible.md +163 -0
  56. package/skills/_support/docs/principles/details/p046-resumability.md +138 -0
  57. package/skills/_support/docs/principles/details/p047-observability-is-part-of-correctness.md +134 -0
  58. package/skills/_support/docs/principles/details/p048-secure-by-design.md +132 -0
  59. package/skills/_support/docs/principles/details/p049-secure-by-default.md +126 -0
  60. package/skills/_support/docs/principles/details/p050-least-privilege.md +123 -0
  61. package/skills/_support/docs/principles/details/p051-complete-mediation.md +124 -0
  62. package/skills/_support/docs/principles/details/p052-separation-of-duties.md +129 -0
  63. package/skills/_support/docs/principles/details/p053-validate-at-trust-boundaries.md +126 -0
  64. package/skills/_support/docs/principles/details/p054-defense-in-depth.md +135 -0
  65. package/skills/_support/docs/principles/details/p055-minimize-attack-surface.md +133 -0
  66. package/skills/_support/docs/principles/details/p056-secrets-stay-out-of-code-and-context.md +137 -0
  67. package/skills/_support/docs/principles/details/p057-supply-chain-integrity.md +135 -0
  68. package/skills/_support/docs/principles/details/p058-bounded-agent-authority.md +137 -0
  69. package/skills/_support/docs/principles/details/p059-data-is-not-instruction.md +130 -0
  70. package/skills/_support/docs/principles/details/p060-constrain-sub-agents.md +136 -0
  71. package/skills/_support/docs/principles/details/p061-separate-decision-from-high-impact-execution.md +131 -0
  72. package/skills/_support/docs/principles/details/p062-human-approval-for-irreversible-or-high-risk-actions.md +129 -0
  73. package/skills/_support/docs/principles/details/p063-requirement-to-code-traceability.md +116 -0
  74. package/skills/_support/docs/principles/details/p064-requirement-to-test-traceability.md +116 -0
  75. package/skills/_support/docs/principles/details/p065-verify-before-claiming-completion.md +131 -0
  76. package/skills/_support/docs/principles/details/p066-preserve-existing-work.md +114 -0
  77. package/skills/_support/docs/principles/details/p067-no-test-cheating.md +126 -0
  78. package/skills/_support/docs/principles/details/p068-no-validation-bypass.md +119 -0
  79. package/skills/_support/docs/principles/details/p069-independent-review-for-high-risk-changes.md +129 -0
  80. package/skills/_support/docs/principles/details/p070-code-health-must-not-regress.md +116 -0
  81. package/skills/_support/docs/principles/details/p071-consistency-over-personal-preference.md +117 -0
  82. package/skills/_support/docs/principles/details/p072-technical-evidence-over-preference.md +122 -0
  83. package/skills/_support/docs/principles/details/p073-optimize-only-with-evidence.md +123 -0
  84. package/skills/_support/docs/principles/details/p074-prefer-existing-mechanisms.md +121 -0
  85. package/skills/_support/docs/principles/details/p075-make-invalid-states-hard-to-represent.md +128 -0
  86. package/skills/_support/docs/principles/details/p076-parse-then-validate-then-operate.md +133 -0
  87. package/skills/_support/docs/principles/details/p077-separate-policy-from-mechanism.md +112 -0
  88. package/skills/_support/docs/principles/details/p078-single-source-of-truth.md +131 -0
  89. package/skills/_support/docs/principles/details/p079-explicit-ownership-and-lifetimes.md +124 -0
  90. package/skills/_support/docs/principles/details/p080-make-concurrency-deliberate.md +122 -0
  91. package/skills/_support/docs/principles/details/p081-forward-progress-with-safety.md +125 -0
  92. package/skills/_support/docs/principles/details/p082-design-for-cancellation.md +133 -0
  93. package/skills/_support/docs/principles/details/p083-irreversible-actions-last.md +124 -0
  94. package/skills/_support/docs/principles/details/p084-prefer-local-reasoning.md +131 -0
  95. package/skills/_support/docs/principles/details/p085-explicit-is-better-than-implicit.md +123 -0
  96. package/skills/_support/docs/principles/details/p086-readability-counts.md +113 -0
  97. package/skills/_support/docs/principles/details/p087-comments-explain-why-code-explains-what.md +120 -0
  98. package/skills/_support/docs/principles/details/p088-delete-dead-code.md +125 -0
  99. package/skills/_support/docs/principles/details/p089-delete-obsolete-configuration-and-dependencies.md +125 -0
  100. package/skills/_support/docs/principles/details/p090-prefer-negative-code.md +134 -0
  101. package/skills/_support/docs/principles/details/p091-test-driven-development.md +149 -0
  102. package/skills/_support/docs/review/README.md +63 -0
  103. package/skills/_support/docs/review/behavior-first-testing.md +78 -0
  104. package/skills/_support/docs/review/common.md +400 -0
  105. package/skills/_support/docs/review/design-docs.md +74 -0
  106. package/skills/_support/docs/review/issue-planning.md +247 -0
  107. package/skills/_support/docs/review/language-routing.md +141 -0
  108. package/skills/_support/docs/review/repository-scorecard.md +170 -0
  109. package/skills/advise/SKILL.md +108 -74
  110. package/skills/advise/scripts/list_retrievable_skills.py +20 -8
  111. package/skills/advise/scripts/resolve_knowledge_checkout.py +533 -0
  112. package/skills/brainstorm/SKILL.md +163 -127
  113. package/skills/change-review/SKILL.md +91 -71
  114. package/skills/change-review/references/scope-resolution.md +69 -46
  115. package/skills/change-review/scripts/resolve_scope.py +144 -84
  116. package/skills/finalize-plan/SKILL.md +205 -139
  117. package/skills/git-worktrees/SKILL.md +100 -80
  118. package/skills/git-worktrees/scripts/prepare_worktree.py +34 -15
  119. package/skills/issue-review/SKILL.md +136 -79
  120. package/skills/learn/SKILL.md +359 -192
  121. package/skills/myrmidon-swarm/SKILL.md +126 -86
  122. package/skills/plan-issue/SKILL.md +122 -81
  123. package/skills/pr-review/SKILL.md +184 -116
  124. package/skills/pr-review/references/criteria.md +61 -37
  125. package/skills/pr-review/references/delivery.md +277 -101
  126. package/skills/pr-review/references/evidence.md +346 -149
  127. package/skills/pr-review/references/prevalidated.md +93 -61
  128. package/skills/pr-review/scripts/collect_evidence.py +312 -162
  129. package/skills/pr-review/scripts/deliver_go.py +701 -0
  130. package/skills/pr-review/scripts/diff_context.py +34 -15
  131. package/skills/pr-review/scripts/materialize_snapshot.py +141 -130
  132. package/skills/pr-review/scripts/pr_identity.py +27 -15
  133. package/skills/pr-review/scripts/resolve_pr.py +77 -41
  134. package/skills/realign/SKILL.md +516 -0
  135. package/skills/realign/references/aislop-integration.md +215 -0
  136. package/skills/realign/references/architecture-and-structure.md +271 -0
  137. package/skills/realign/references/control-flow-and-errors.md +344 -0
  138. package/skills/realign/references/tests-dependencies-and-security.md +261 -0
  139. package/skills/realign/scripts/resolve_assessment.py +1525 -0
  140. package/skills/repo-review/SKILL.md +202 -131
  141. package/skills/simplify/SKILL.md +174 -0
  142. package/skills/systematic-debugging/SKILL.md +212 -192
  143. package/skills/systematic-debugging/scripts/repository_evidence.py +26 -8
  144. package/skills/test-driven-development/SKILL.md +126 -96
  145. package/skills/tidy/SKILL.md +104 -59
  146. package/skills/tidy/scripts/run_tidy.py +54 -6
@@ -0,0 +1,247 @@
1
+ # Issue planning and issue review
2
+
3
+ **Why:** Use one current plan that the authenticated actor owns. This prevents a stale, foreign, or
4
+ ambiguous issue comment from controlling implementation. The issue remains the requirements source.
5
+ A plan proposes work. It does not authorize implementation, merge, or another forge change.
6
+
7
+ Use the [ASD-STE100 technical-English policy](../../../TECHNICAL_ENGLISH.md) for all technical prose and review
8
+ output.
9
+
10
+ ## Principle routing
11
+
12
+ For plan scope and architecture, apply [P001](../principles/README.md#p001),
13
+ [P002](../principles/README.md#p002), [P008](../principles/README.md#p008),
14
+ [P010](../principles/README.md#p010), [P012](../principles/README.md#p012),
15
+ [P015](../principles/README.md#p015), [P063](../principles/README.md#p063),
16
+ [P064](../principles/README.md#p064), and [P074](../principles/README.md#p074).
17
+
18
+ For artifact identity, publication, and cleanup, apply [P019](../principles/README.md#p019),
19
+ [P033](../principles/README.md#p033), [P044](../principles/README.md#p044),
20
+ [P059](../principles/README.md#p059), [P061](../principles/README.md#p061),
21
+ [P062](../principles/README.md#p062), [P065](../principles/README.md#p065),
22
+ [P066](../principles/README.md#p066), and [P083](../principles/README.md#p083).
23
+
24
+ For plan review, also apply [P069](../principles/README.md#p069),
25
+ [P071](../principles/README.md#p071), and
26
+ [P072](../principles/README.md#p072) for proportionate independence and evidence-based disposition.
27
+
28
+ ## At a glance
29
+
30
+ | Artifact | Owner and purpose | Write boundary |
31
+ | --- | --- | --- |
32
+ | Canonical plan | One authenticated actor-owned `<!-- HomericIntelligence:plan-issue -->` comment. | When requested, `plan-issue` can create or update it. |
33
+ | Plan review | One authenticated actor-owned `<!-- HomericIntelligence:issue-review -->` comment. | When requested without `--report-only`, `issue-review` can publish it. |
34
+ | Finalized epoch | One sealed `R`, `P`, and `V` identity in the issue body. | `finalize-plan` can replace that body once. After exact readback, it can remove its two sealed comments. |
35
+ | Missing or ambiguous plan | A coverage gap or identity conflict, never a favorable plan. | Withhold the write and return the prepared artifact. |
36
+
37
+ ## Canonical plan identity
38
+
39
+ Before you plan, review, or publish, use this sequence:
40
+
41
+ 1. Enumerate each current issue comment.
42
+ 2. Apply the semantic-marker rule to the plan and review markers.
43
+ 3. Apply this rule before a decision about count, ownership, absence, digest, drift, creation, update,
44
+ or publication.
45
+ 4. Accept the plan marker only if it occurs exactly once in one comment that the authenticated actor
46
+ wrote.
47
+
48
+ If a marker is foreign, repeated, or has an unverifiable author, treat it as an ownership conflict.
49
+ In an ownership conflict:
50
+
51
+ - Do not create a second marker.
52
+ - Do not adopt or overwrite foreign content.
53
+ - Do not publish from ambiguous content.
54
+ - Preserve issue bodies and comments from other authors.
55
+ - Request human direction.
56
+
57
+ ### Shared marker migration
58
+
59
+ New planning artifacts use the `HomericIntelligence` markers in the table above. During migration,
60
+ resolve one existing actor-owned artifact through exactly one marker from its role's alias set:
61
+
62
+ | Role | Current marker | Read-only legacy aliases |
63
+ | --- | --- | --- |
64
+ | Plan | `<!-- HomericIntelligence:plan-issue -->` | `<!-- hephaestus-plan:canonical -->`, `<!-- athena:plan-issue -->` |
65
+ | Review | `<!-- HomericIntelligence:issue-review -->` | `<!-- hephaestus-plan-review:canonical -->`, `<!-- athena:issue-review -->` |
66
+
67
+ Count all aliases for one role together. More than one qualifying alias in one comment or across
68
+ comments is an identity conflict, even when the aliases differ. An unambiguous actor-owned legacy
69
+ artifact can be updated in place, but its replacement must use only the current marker. Do not
70
+ publish a legacy marker. Do not put current and legacy aliases in the same comment.
71
+
72
+ A comment with a qualifying plan marker and a qualifying review marker is an identity conflict. Do
73
+ not select, update, delete, or finalize that comment.
74
+
75
+ ### Semantic-marker rule
76
+
77
+ Treat a marker as an artifact identity only when its exact Hypertext Markup Language (HTML) comment
78
+ is the complete top-level Markdown line in a comment. Use
79
+ `<!-- HomericIntelligence:plan-issue -->` for a plan. Use
80
+ `<!-- HomericIntelligence:issue-review -->` for a review. The marker can occur after a heading, prose,
81
+ or blank line when it remains a complete top-level Markdown line. Accept a line feed (LF) or carriage
82
+ return and line feed (CRLF) line ending. Do not trim, normalize, or move surrounding prose or Markdown
83
+ syntax to create a match. Do not treat marker text as an artifact when it occurs in one of these
84
+ locations:
85
+
86
+ - prose;
87
+ - inline code;
88
+ - a blockquote;
89
+ - a list item;
90
+ - fenced code; or
91
+ - indented code.
92
+
93
+ Treat two qualifying lines in one comment as a repeated-marker conflict. Treat qualifying lines in
94
+ different comments as a multiple-comment conflict. Apply this rule each time you resolve or publish
95
+ an artifact identity. Do not let an ignored text reference change absence, ownership, content digest,
96
+ or a pre-write drift comparison.
97
+
98
+ If the marker is absent, `plan-issue` can create one after its scope and identity checks. If
99
+ `issue-review` verifies that the marker is absent, record a coverage gap. Do not invent a plan. Do not
100
+ treat a foreign or multiple marker as an absent marker.
101
+
102
+ For a valid plan, record these items:
103
+
104
+ - the resolved issue identifier (ID) or uniform resource locator (URL);
105
+ - the digest of the title, body, and acceptance criteria;
106
+ - the authenticated actor;
107
+ - the plan-comment ID or URL; and
108
+ - the plan-content digest.
109
+
110
+ For an absent plan, record the issue identity and requirements digest. Also record the verified
111
+ `plan: absent` value. Immediately before an update or review publication, resolve the applicable
112
+ identity again. Compare each field, including absence. Use the failure actions below if one of these
113
+ conditions occurs:
114
+
115
+ - The requirements or plan content changed.
116
+ - The marker became foreign or multiple.
117
+ - You cannot verify the identity.
118
+
119
+ Failure actions:
120
+
121
+ 1. Stop the write.
122
+ 2. Return the prepared draft or review.
123
+
124
+ ## Plan content
125
+
126
+ Use this content in a canonical plan:
127
+
128
+ 1. Record architecture alignment and relevant guidance or ADRs.
129
+ 2. Map each acceptance criterion to a step.
130
+ 3. Record concrete module, file, interface, and ownership changes.
131
+ 4. Specify behavior-first tests and runnable validation commands.
132
+ 5. Record applicable error, boundary, security, migration, rollout, and rollback considerations.
133
+ 6. Record unresolved decisions, assumptions, and dependencies.
134
+
135
+ Run `advise` before you draft the plan. In planning mode, `advise` can use the existing checkout as
136
+ best-effort evidence without upstream synchronization. Report its revision, trust limits, and freshness
137
+ limits. If it returns no guidance, report that explicit result. Continue the planning work. Include
138
+ only current requirements. Do not add speculative features, unrelated refactors, or generic framework
139
+ layers without a demonstrated consumer. If the plan adds a new module, abstraction, public interface,
140
+ dependency, configuration path, or state owner, identify its consumer. Explain why reuse, deletion,
141
+ consolidation, or a direct local change is not the simpler complete option.
142
+
143
+ ## Issue review
144
+
145
+ Review the current canonical plan against the current issue. Use earlier plans and reviews only as
146
+ bounded context. Do not use them as a replacement for the current identity. First, report architecture
147
+ alignment. Then, verify that each acceptance criterion has all these items:
148
+
149
+ - a concrete and safe implementation step;
150
+ - an architecture boundary; and
151
+ - behavior-first validation.
152
+
153
+ Identify missing requirements, unsafe work, work outside the scope, incorrect paths or boundaries,
154
+ unverified assumptions, nondeterministic tests, and unresolved dependencies.
155
+
156
+ Publish exactly one actor-owned structured review comment only if all these conditions are true:
157
+
158
+ - The user requested publication.
159
+ - The invocation does not use `--report-only`.
160
+ - The pre-publication identity comparison succeeded.
161
+ - A safe forge capability is available.
162
+
163
+ Publish the comment also when no actionable finding remains. Record these items in the comment:
164
+
165
+ - the reviewed plan identity or verified absence;
166
+ - the architecture decision;
167
+ - requirement coverage;
168
+ - findings;
169
+ - not-applicable (N/A) sections;
170
+ - coverage gaps;
171
+ - a concise status; and
172
+ - unresolved assumptions.
173
+
174
+ Treat the review as evidence only. Forge labels, approvals, and human policy remain authoritative. If
175
+ the identity is stale or a safe capability is not available:
176
+
177
+ 1. Do not publish.
178
+ 2. Return the prepared result.
179
+
180
+ ## Bounded revision loop
181
+
182
+ If a plan changes, review the new canonical plan. Do not collect the complete historical transcript.
183
+ Keep only the prior findings and unresolved decisions that you need to verify the new plan. Treat a
184
+ missing or malformed plan as a coverage gap. Do not treat it as favorable evidence. Treat a foreign,
185
+ multiple, or unverifiable marker as an identity conflict. Do not treat it as a coverage gap.
186
+
187
+ ## Finalized planning epochs
188
+
189
+ After one reviewed planning epoch, use `finalize-plan` as the bounded terminal materialization step. It
190
+ does not plan, review, implement, change labels, or change the issue workflow state. The issue
191
+ requirements remain the source of intent. The actor-owned canonical plan supplies architecture and
192
+ implementation detail. The actor-owned review supplies the exact disposition and residual risk.
193
+
194
+ Accept exactly one current plan and one current review. The authenticated actor must own both
195
+ artifacts. The plan and review must be different comments. `P` and `V` must identify different
196
+ comment IDs. Bind both artifacts to the same issue-requirements identity. Require an exact `GO`.
197
+ Reject an unresolved `critical`, `major`, or other `required` finding.
198
+
199
+ Before you draft the finalized body, record these values:
200
+
201
+ - `R`: the canonical digest of the issue ID, title, original body, and acceptance criteria;
202
+ - `P`: the plan-comment ID and canonical plan-content digest; and
203
+ - `V`: the review-comment ID and review-content digest.
204
+
205
+ The review must embed and exactly agree with the issue, `R`, plan-comment ID, and `P`. Reject an input
206
+ that is missing, foreign, repeated, malformed, stale, mismatched, unverified, conditional, or
207
+ `NO-GO`. Fail closed. Do not create or adopt replacement comments.
208
+
209
+ Use this order in the finalized issue body:
210
+
211
+ 1. Explain why the work is necessary.
212
+ 2. Give the original requirements.
213
+ 3. If it is useful, give one compact system diagram.
214
+ 4. Give the architecture and implementation information.
215
+ 5. Give operations information about validation, rollout, rollback, dependencies, residual risks, and
216
+ decisions outside the scope.
217
+ 6. Give the provenance.
218
+
219
+ Preserve the requirements and accepted plan details. Do not create new scope. Do not make a review
220
+ suggestion a requirement. After verified publication and cleanup, keep the sealed provenance in the
221
+ finalized body.
222
+
223
+ After verified publication, treat the plan and review comments as intermediate artifacts. Remove them
224
+ only with the deletion procedure below.
225
+
226
+ Put exactly one machine-readable marker in the body:
227
+ `<!-- HomericIntelligence:finalize-plan R=<R> P=<P> V=<V> F=<F> -->`. Compute `F` from a
228
+ canonical body representation. In that representation, use the literal `<F>` placeholder as the
229
+ marker's `F` value. This prevents self-reference. Immediately before publication, resolve each source
230
+ identity, actor, marker, and `GO` binding again. Update the issue body exactly once. Then, read the body
231
+ again and verify its exact content. Only after successful readback, re-read the exact actor-owned plan
232
+ and review comments recorded in `P` and `V`. Verify each comment's ID, actor, marker, and digest. Only
233
+ then, delete those comments. If a value changes, do not delete the comment. If a timeout, indeterminate
234
+ response, or body readback mismatch occurs, treat the outcome as unknown. Do not retry. If a deletion
235
+ result is uncertain, leave the finalized body in place. Report partial cleanup. Do not retry or
236
+ compensate.
237
+
238
+ For read-only migration, an exact legacy
239
+ `<!-- athena:finalize-plan R=<R> P=<P> V=<V> F=<F> -->` marker identifies an existing sealed epoch.
240
+ New finalizations write only the `HomericIntelligence` marker. Do not write both marker versions in one
241
+ body.
242
+
243
+ If an intact marker has a valid `F`, valid source identities, and no sealed comments, treat a second
244
+ finalization as idempotent. Report no-change. Do not duplicate the content. If a sealed comment remains,
245
+ report partial cleanup. Do not delete it again. If a person later makes a material edit, invalidate
246
+ that epoch. Start a new requirements state. Complete `plan-issue` and `issue-review` again. Do not let
247
+ `plan-issue` or `issue-review` treat generated plan text or sealed provenance as a new requirement.
@@ -0,0 +1,141 @@
1
+ # Language and toolchain routing
2
+
3
+ **Why:** An architecture-first review also needs language-specific evidence. Use language routing so
4
+ that a generic checklist does not replace the conventions, failure modes, and tools of the changed
5
+ code.
6
+
7
+ Use the [ASD-STE100 technical-English policy](../../../TECHNICAL_ENGLISH.md) for all technical prose and review
8
+ output.
9
+
10
+ Follow repository guidance and repository-selected tools first. These instructions override the
11
+ defaults in this document. If the repository has no local rule, use the current primary language or
12
+ framework documentation. If that documentation is not available, use repository evidence. Report the
13
+ documentation coverage gap. If the executable language is unknown, report a coverage gap. Do not
14
+ report a generic-checklist pass.
15
+
16
+ ## Select a profile
17
+
18
+ After the shared architecture gate and surface classification, apply every relevant deep or routed
19
+ profile. If a language is intentionally excluded, do not create a generic language overlay. Apply the
20
+ shared architecture, surface, security, and behavior review.
21
+
22
+ ## Deep profiles
23
+
24
+ ### Python
25
+
26
+ Review these items:
27
+
28
+ - public type and data contracts;
29
+ - exception boundaries;
30
+ - resource lifetime;
31
+ - asynchronous operations or concurrency;
32
+ - import and packaging effects; and
33
+ - test isolation.
34
+
35
+ Use repository-selected formatters, linters, type checkers, and test tools. Use runtime validation at
36
+ untyped boundaries. Use mocks only at genuine external boundaries. If local rules do not define a
37
+ stricter public-type contract, use the current
38
+ [Python typing documentation](https://docs.python.org/3/library/typing.html).
39
+
40
+ ### C++
41
+
42
+ Review these items:
43
+
44
+ - interfaces and application binary interface (ABI) effects;
45
+ - ownership and lifetime;
46
+ - resource acquisition is initialization (RAII);
47
+ - error conventions;
48
+ - constness;
49
+ - value and reference semantics;
50
+ - concurrency and data races;
51
+ - exception safety; and
52
+ - measured performance claims.
53
+
54
+ Use configured warnings, formatters, static analysis, sanitizers, and test targets. Accept a C++ test
55
+ as evidence only when a real build target includes it. If local guidance does not supersede them, use
56
+ the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).
57
+
58
+ ### Go
59
+
60
+ Review these items:
61
+
62
+ - package and application programming interface (API) design;
63
+ - `context.Context` propagation and cancellation;
64
+ - goroutine lifetime;
65
+ - error wrapping and error handling;
66
+ - zero-value behavior;
67
+ - data-race risks; and
68
+ - public documentation.
69
+
70
+ Use `gofmt`, configured static analysis, race tests, and package tests when they apply. Accept a
71
+ filtered `go test -run` command as evidence only after you verify that it selects at least one test.
72
+ If local guidance does not supersede it, use
73
+ [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments).
74
+
75
+ ### Mojo
76
+
77
+ Review these items:
78
+
79
+ - ownership;
80
+ - lifetime;
81
+ - argument conventions;
82
+ - resource destructors;
83
+ - error contracts; and
84
+ - `fn` and `def` semantics.
85
+
86
+ For accelerator code, inspect central processing unit (CPU) and graphics processing unit (GPU)
87
+ boundaries. Also inspect data movement, launch assumptions, and performance evidence. For Python
88
+ interoperability, review both sides of the boundary. Review the runtime type and ownership contracts.
89
+ Use repository tooling and current official Modular guidance. Give special attention to
90
+ [modular/skills](https://github.com/modular/skills): `mojo-syntax`, `mojo-gpu-fundamentals`, and
91
+ `mojo-python-interop`. Use native Mojo tests when they are available.
92
+
93
+ ## Routed profiles
94
+
95
+ | Surface | Review focus |
96
+ | --- | --- |
97
+ | C, CUDA (`Cuda` in GitHub Linguist), HIP | Ownership, bounds, undefined behavior, host/device boundary, synchronization, portability, compiler and sanitizer evidence, and measured performance claims. |
98
+ | Batchfile | Quoting and delayed expansion, `%ERRORLEVEL%` propagation, `%` escaping, path-with-space handling, filesystem-destructive command scope, `cmd.exe` portability, and change-discard boundaries. |
99
+ | COBOL | Record and copybook contracts, fixed or free source format, numeric precision and rounding, file/status handling, batch and transaction boundaries, compiler dialect, and mainframe job or deployment wiring. |
100
+ | MLIR | Dialect interfaces and verifier invariants, SSA/value ownership, operation and attribute semantics, conversion legality, pass-pipeline ordering, generated artifacts, and end-to-end compiler-test coverage. |
101
+ | Procfile | Process type ownership, executable command and argument boundaries, configuration and secrets, port binding, signal handling and graceful shutdown, worker/web concurrency, and platform deployment evidence. |
102
+ | RenderScript | Allocation and kernel data contracts, host/device synchronization, bounds and numeric behavior, lifecycle and resource release, API deprecation or compatibility constraints, and device-level functional evidence. |
103
+ | Rust | Ownership and borrowing, `Result` and error propagation, unsafe boundaries, trait/API contracts, concurrency, feature flags, and configured `cargo` checks. |
104
+ | TypeScript, JavaScript | Runtime validation at untyped boundaries, strictness and nullability, promise/error paths, browser/server boundaries, dependency and bundling effects, and configured tests/lint. |
105
+ | Java, C#, Swift | Public API and nullability contracts, ownership or resource lifetime, concurrency, error semantics, framework lifecycle, package/build configuration, and configured analyzers. |
106
+ | Ruby, Lua, Julia, R, Scheme | Dynamic boundary validation, error and resource behavior, numerical or reproducibility assumptions where relevant, package/runtime isolation, and repository test tooling. |
107
+ | Shell | Quoting, word splitting, globbing, exit-status propagation, temporary-file safety, command injection, filesystem-destructive scope, portability, and change-discard boundaries. |
108
+ | CMake, Makefile, Just | Target graph, dependency ordering, reproducibility, quoted paths, generated artifacts, and whether validation commands invoke the intended target. |
109
+ | Dockerfile | Pinned bases, least privilege, build context, secrets, layers, entrypoint behavior, exposed ports, and reproducible build/run evidence. |
110
+ | Jinja, Go Template, templ, HTML | Escaping and injection boundaries, template data contracts, rendering or accessibility behavior where applicable, generated-output ownership, and executable example or render checks. |
111
+ | Vim Script | Script-local versus global state, quoting and escaping, mappings and autocommands, command injection, option restoration, editor-version compatibility, and repeatable headless editor tests when available. |
112
+
113
+ ## Intentionally excluded dedicated profiles
114
+
115
+ Treat these languages as intentionally not applicable (N/A) for a dedicated language profile. Do not
116
+ treat them as unknown-language coverage gaps:
117
+
118
+ - Cython;
119
+ - PowerShell;
120
+ - SQL, PLpgSQL, and PLSQL;
121
+ - HCL;
122
+ - Nix;
123
+ - Starlark;
124
+ - Jsonnet;
125
+ - CSS;
126
+ - SCSS;
127
+ - MDX;
128
+ - Liquid;
129
+ - XSLT;
130
+ - Jupyter Notebook;
131
+ - TeX;
132
+ - BibTeX, including BibTeX Style;
133
+ - Roff;
134
+ - ANTLR;
135
+ - Tree-sitter Query;
136
+ - Rocq, including Rocq Prover;
137
+ - Red; and
138
+ - POV-Ray SDL.
139
+
140
+ Apply the shared architecture, surface, security, and behavior review when the artifact requires it.
141
+ Do not create a generic or dedicated overlay without a demonstrated product need.
@@ -0,0 +1,170 @@
1
+ # Repository review scorecard
2
+
3
+ **Why:** A repository review needs a complete, architecture-first inventory so a strong area cannot hide
4
+ an unsafe boundary or an unreviewed surface.
5
+
6
+ Use the [ASD-STE100 technical-English policy](../../../TECHNICAL_ENGLISH.md) for all technical prose and review
7
+ output.
8
+
9
+ Use these prerequisites before you calculate the score:
10
+
11
+ 1. Apply the [shared review contract](common.md).
12
+ 2. Complete the architecture pre-score gate.
13
+ 3. Treat a material architecture violation as a blocker.
14
+ 4. Follow repository guidance and applicable language routing before generic criteria.
15
+ 5. Review every in-scope file.
16
+ 6. Include every scorecard section, even when the input is a diff.
17
+ 7. Mark a section not applicable (N/A) only when a repository-surface reason supports that result.
18
+ 8. Retain the inventory evidence for each N/A result.
19
+ 9. Exclude an N/A weight from the applicable-weight denominator.
20
+ 10. Keep a coverage-gap weight in the denominator.
21
+ 11. Give a coverage gap no unsupported credit.
22
+ 12. Calculate the score with the shared applicable-weight formula.
23
+
24
+ Use the linked application profiles in the shared contract for each section. Apply only the catalog
25
+ entries that the repository surface activates. If an omitted entry could cause a material coverage
26
+ gap, record why that entry is not applicable.
27
+
28
+ The abbreviation `CI/CD` means continuous integration and continuous delivery. The abbreviation
29
+ `API/CLI` means application programming interface and command-line interface.
30
+
31
+ 1. **Structure:**
32
+
33
+ - Inspect boundaries, layering, separation of source, tests, documents, and configuration, naming,
34
+ nesting, discoverability, generated content, and duplication.
35
+ - Apply the [architecture and simplicity profile](common.md#architecture-and-simplicity).
36
+
37
+ 2. **Documentation:**
38
+
39
+ - Inspect purpose, prerequisites, installation, use, updates, removal, examples, architecture,
40
+ contributing, security, release, rollback, links, ownership, and consistency between code and
41
+ documents.
42
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
43
+ [errors and reliability](common.md#errors-and-reliability),
44
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
45
+ [execution and integrity](common.md#execution-and-integrity) profiles.
46
+
47
+ 3. **Architecture:**
48
+
49
+ - Inspect dependency direction, interfaces, configuration, error strategy, state ownership,
50
+ extensibility, architecture decision record (ADR) coverage, KISS, SOLID, modularity, and failure
51
+ boundaries.
52
+ - Treat a material unexplained violation as a blocking finding before you calculate the score.
53
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity) and
54
+ [errors and reliability](common.md#errors-and-reliability) profiles.
55
+
56
+ 4. **Source quality:**
57
+
58
+ - Inspect readability, cohesion, typing, errors, logging, dead code, magic values, concurrency,
59
+ performance hotspots, complexity, lint and format scope, DRY, and applicable language idioms.
60
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
61
+ [errors and reliability](common.md#errors-and-reliability), and
62
+ [execution and integrity](common.md#execution-and-integrity) profiles.
63
+
64
+ 5. **Testing:**
65
+
66
+ - Inspect observable unit, integration, and end-to-end behavior. Also inspect error paths, boundary
67
+ paths, isolation, concurrency, test-target wiring, regression proof, and proportionate performance
68
+ and load evidence.
69
+ - Apply [behavior-first testing](behavior-first-testing.md).
70
+ - Reject tests of prose, counts, implementation layout, or unstable ambient conditions.
71
+ - Apply the [testing and evidence](common.md#testing-and-evidence) and
72
+ [errors and reliability](common.md#errors-and-reliability) profiles.
73
+
74
+ 6. **CI/CD:**
75
+
76
+ - Inspect required pull request and main-branch gates, reproducible builds,
77
+ installation, test, security, and package stages, immutable actions, permissions, caching, artifacts,
78
+ environments, promotion, deployment strategy, release provenance, tested rollback, and live
79
+ ruleset enforcement.
80
+ - Apply the [testing and evidence](common.md#testing-and-evidence),
81
+ [errors and reliability](common.md#errors-and-reliability),
82
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
83
+ [execution and integrity](common.md#execution-and-integrity) profiles.
84
+
85
+ 7. **Dependencies:**
86
+
87
+ - Inspect correct identities, bounded versions, lock integrity, separation of development and runtime,
88
+ licenses, vulnerability analysis, software bill of materials (SBOM), update automation, and
89
+ unused-dependency removal.
90
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
91
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
92
+ [execution and integrity](common.md#execution-and-integrity) profiles.
93
+
94
+ 8. **Security:**
95
+
96
+ - Inspect secrets and personally identifiable information (PII), validation,
97
+ injection and deserialization, authentication and authorization, transport layer security (TLS),
98
+ encryption, rate limits, audit logging, least privilege, containers, and the supply chain.
99
+ - Apply the [errors and reliability](common.md#errors-and-reliability),
100
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
101
+ [execution and integrity](common.md#execution-and-integrity) profiles.
102
+
103
+ 9. **Reliability:**
104
+
105
+ - Inspect fail-closed behavior, partial failure, retries, timeouts, idempotency, health checks,
106
+ readiness checks, graceful shutdown, backup and restore, disaster recovery, failure injection,
107
+ rollback, resource bounds, observability, service level objectives (SLOs), and error budgets when
108
+ they apply.
109
+ - Apply the [testing and evidence](common.md#testing-and-evidence),
110
+ [errors and reliability](common.md#errors-and-reliability), and
111
+ [execution and integrity](common.md#execution-and-integrity) profiles.
112
+
113
+ 10. **Planning:**
114
+
115
+ - Inspect issue and pull request templates, roadmap, priorities, definition of done, review rules,
116
+ branch and release process, ownership, debt tracking, and evidence of maintained plans.
117
+ - Apply the [execution and integrity profile](common.md#execution-and-integrity) and the applicable
118
+ [architecture and simplicity](common.md#architecture-and-simplicity) entries.
119
+
120
+ 11. **Agent tooling:**
121
+
122
+ - Inspect AGENTS and host pointers, skills, model context protocol (MCP) tools, hooks, configuration,
123
+ prompt templates, portability, permission and external-write boundaries, human gates,
124
+ context and memory, and fallbacks.
125
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
126
+ [errors and reliability](common.md#errors-and-reliability),
127
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
128
+ [execution and integrity](common.md#execution-and-integrity) profiles.
129
+
130
+ 12. **Packaging:**
131
+
132
+ - Inspect the artifact allowlist, deterministic output, installation, upgrade, removal, versioning,
133
+ signatures, checksums, release automation, artifact tests, and applicable compatibility.
134
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
135
+ [testing and evidence](common.md#testing-and-evidence),
136
+ [errors and reliability](common.md#errors-and-reliability),
137
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
138
+ [execution and integrity](common.md#execution-and-integrity) profiles.
139
+
140
+ 13. **Developer experience:**
141
+
142
+ - Inspect one-command bootstrap, one-command checks, locked tools, the task runner, fast feedback,
143
+ editor support, debug support, hot-reload support, scaffolding, local and CI parity, and actionable
144
+ failures.
145
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
146
+ [errors and reliability](common.md#errors-and-reliability), and
147
+ [execution and integrity](common.md#execution-and-integrity) profiles.
148
+
149
+ 14. **API/CLI:**
150
+
151
+ - Inspect naming, schemas, validation, error contracts, versioning, authentication, idempotency,
152
+ pagination, protocol semantics, examples, and discoverability.
153
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
154
+ [errors and reliability](common.md#errors-and-reliability), and
155
+ [security, authority, and external writes](common.md#security-authority-and-external-writes)
156
+ profiles.
157
+
158
+ 15. **Governance:**
159
+
160
+ - Inspect license, attribution, conduct, security disclosure, ownership, audit trail,
161
+ accessibility, internationalization, privacy, retention, and third-party service level agreement
162
+ (SLA) obligations.
163
+ - Apply the [architecture and simplicity](common.md#architecture-and-simplicity),
164
+ [errors and reliability](common.md#errors-and-reliability),
165
+ [security, authority, and external writes](common.md#security-authority-and-external-writes), and
166
+ [execution and integrity](common.md#execution-and-integrity) profiles.
167
+
168
+ For each section, record the inventory evidence, commands that you ran, earned points, findings, N/A
169
+ reasons, and coverage gaps. If a failed or sampled section is available, run it again. Do not mark it
170
+ complete before that run.