@yunhozz/arc 0.0.0-stage → 0.1.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 (125) hide show
  1. package/MANIFEST.sha256 +96 -0
  2. package/README.md +61 -2
  3. package/bin/arc.mjs +3 -0
  4. package/claude/agents/arc-coder.md +67 -0
  5. package/claude/agents/arc-planner.md +74 -0
  6. package/claude/agents/arc-qa.md +68 -0
  7. package/claude/agents/arc-reviewer.md +65 -0
  8. package/claude/agents/arc-scouter.md +63 -0
  9. package/claude/skill/SKILL.md +370 -0
  10. package/claude/skill/hooks/git-policy.json +208 -0
  11. package/claude/skill/hooks/role-git-guard.mjs +98 -0
  12. package/claude/skill/models.toml +64 -0
  13. package/claude/skill/references/commit.md +77 -0
  14. package/claude/skill/references/git-recovery.md +46 -0
  15. package/claude/skill/references/handoff-prep.md +102 -0
  16. package/claude/skill/references/handoff.md +100 -0
  17. package/claude/skill/references/limits.md +42 -0
  18. package/claude/skill/references/planning.md +250 -0
  19. package/claude/skill/references/superpowers/LICENSE +21 -0
  20. package/claude/skill/references/superpowers/brainstorming/SKILL.md +225 -0
  21. package/claude/skill/references/superpowers/brainstorming/builder-check-prompt.md +23 -0
  22. package/claude/skill/references/superpowers/brainstorming/scripts/frame-template.html +213 -0
  23. package/claude/skill/references/superpowers/brainstorming/scripts/helper.js +167 -0
  24. package/claude/skill/references/superpowers/brainstorming/scripts/server.cjs +723 -0
  25. package/claude/skill/references/superpowers/brainstorming/scripts/start-server.sh +209 -0
  26. package/claude/skill/references/superpowers/brainstorming/scripts/stop-server.sh +120 -0
  27. package/claude/skill/references/superpowers/brainstorming/visual-companion.md +299 -0
  28. package/claude/skill/references/superpowers/provenance.json +26 -0
  29. package/claude/skill/references/superpowers/test-driven-development/SKILL.md +330 -0
  30. package/claude/skill/references/superpowers/test-driven-development/writing-good-tests.md +198 -0
  31. package/claude/skill/references/superpowers/writing-plans/SKILL.md +204 -0
  32. package/claude/skill/references/verification.md +125 -0
  33. package/claude/skill/references/visual-companion.md +16 -0
  34. package/claude/skill/scripts/apply-models.py +31 -0
  35. package/claude/skill/scripts/model_config.py +211 -0
  36. package/codex/agents/arc-coder.toml +37 -0
  37. package/codex/agents/arc-planner.toml +38 -0
  38. package/codex/agents/arc-qa.toml +24 -0
  39. package/codex/agents/arc-reviewer.toml +25 -0
  40. package/codex/agents/arc-scouter.toml +37 -0
  41. package/codex/skill/SKILL.md +356 -0
  42. package/codex/skill/models.toml +64 -0
  43. package/codex/skill/references/commit.md +100 -0
  44. package/codex/skill/references/git-recovery.md +64 -0
  45. package/codex/skill/references/handoff-prep.md +153 -0
  46. package/codex/skill/references/handoff-worktree.md +93 -0
  47. package/codex/skill/references/handoff.md +181 -0
  48. package/codex/skill/references/limits.md +43 -0
  49. package/codex/skill/references/planning.md +287 -0
  50. package/codex/skill/references/superpowers/LICENSE +21 -0
  51. package/codex/skill/references/superpowers/brainstorming/SKILL.md +225 -0
  52. package/codex/skill/references/superpowers/brainstorming/builder-check-prompt.md +23 -0
  53. package/codex/skill/references/superpowers/brainstorming/scripts/frame-template.html +213 -0
  54. package/codex/skill/references/superpowers/brainstorming/scripts/helper.js +167 -0
  55. package/codex/skill/references/superpowers/brainstorming/scripts/server.cjs +723 -0
  56. package/codex/skill/references/superpowers/brainstorming/scripts/start-server.sh +209 -0
  57. package/codex/skill/references/superpowers/brainstorming/scripts/stop-server.sh +120 -0
  58. package/codex/skill/references/superpowers/brainstorming/visual-companion.md +299 -0
  59. package/codex/skill/references/superpowers/provenance.json +26 -0
  60. package/codex/skill/references/superpowers/test-driven-development/SKILL.md +330 -0
  61. package/codex/skill/references/superpowers/test-driven-development/writing-good-tests.md +198 -0
  62. package/codex/skill/references/superpowers/writing-plans/SKILL.md +204 -0
  63. package/codex/skill/references/verification.md +163 -0
  64. package/codex/skill/references/visual-companion.md +23 -0
  65. package/codex/skill/scripts/apply-models.py +207 -0
  66. package/codex/skill/scripts/model_config.py +362 -0
  67. package/install.command +5 -0
  68. package/lib/cli/choices.mjs +47 -0
  69. package/lib/cli/completion.mjs +53 -0
  70. package/lib/cli/index.mjs +55 -0
  71. package/lib/cli/preset.mjs +29 -0
  72. package/lib/cli/progress.mjs +10 -0
  73. package/lib/cli/root.mjs +20 -0
  74. package/lib/cli/uninstall.mjs +17 -0
  75. package/lib/installer/acquisition.mjs +77 -0
  76. package/lib/installer/global-config.mjs +43 -0
  77. package/lib/installer/install.mjs +28 -0
  78. package/lib/installer/language.mjs +13 -0
  79. package/lib/installer/limits.mjs +21 -0
  80. package/lib/installer/manifest.mjs +37 -0
  81. package/lib/installer/package-references.mjs +32 -0
  82. package/lib/installer/plan.mjs +62 -0
  83. package/lib/installer/preset.mjs +26 -0
  84. package/lib/installer/runtime-config.mjs +85 -0
  85. package/lib/installer/shell-completion.mjs +29 -0
  86. package/lib/installer/stage-cleanup.mjs +40 -0
  87. package/lib/installer/superpowers.mjs +113 -0
  88. package/lib/installer/targets.mjs +55 -0
  89. package/lib/installer/transaction.mjs +91 -0
  90. package/lib/installer/uninstall.mjs +32 -0
  91. package/lib/limits.mjs +13 -0
  92. package/lib/models/config.mjs +58 -0
  93. package/lib/models/index.mjs +2 -0
  94. package/lib/models/profiles.mjs +111 -0
  95. package/lib/policy/claude-hook.mjs +40 -0
  96. package/lib/policy/render.mjs +74 -0
  97. package/lib/policy/role-policy.json +577 -0
  98. package/lib/safe-fs/index.mjs +67 -0
  99. package/lib/safe-fs/native.mjs +54 -0
  100. package/native/binding.c +157 -0
  101. package/native/binding.gyp +1 -0
  102. package/package.json +43 -4
  103. package/prebuilds/darwin-arm64/arc_safe_fs.node +0 -0
  104. package/prebuilds/darwin-x64/arc_safe_fs.node +0 -0
  105. package/prebuilds/index.json +64 -0
  106. package/prebuilds/linux-arm64-gnu/arc_safe_fs.node +0 -0
  107. package/prebuilds/linux-x64-gnu/arc_safe_fs.node +0 -0
  108. package/scripts/build-native.mjs +36 -0
  109. package/scripts/check-installer-parity.mjs +59 -0
  110. package/scripts/update-manifest.mjs +28 -0
  111. package/scripts/update-role-policy.mjs +15 -0
  112. package/scripts/update-superpowers.mjs +4 -0
  113. package/scripts/vendor-toml.mjs +40 -0
  114. package/vendor/toml/LICENSE +24 -0
  115. package/vendor/toml/dist/date.js +156 -0
  116. package/vendor/toml/dist/error.js +67 -0
  117. package/vendor/toml/dist/extract.js +293 -0
  118. package/vendor/toml/dist/index.js +34 -0
  119. package/vendor/toml/dist/parse.js +164 -0
  120. package/vendor/toml/dist/primitive.js +151 -0
  121. package/vendor/toml/dist/stringify.js +219 -0
  122. package/vendor/toml/dist/struct.js +156 -0
  123. package/vendor/toml/dist/util.js +57 -0
  124. package/vendor/toml/package.json +6 -0
  125. package/vendor/toml/provenance.json +35 -0
@@ -0,0 +1,43 @@
1
+ # Subagent limits
2
+
3
+ Before the first subagent creation, Orchestrator reads this reference and the adjacent
4
+ `../limits.toml` (installed at `skills/arc/limits.toml`). Require version = 1,
5
+ `max_total_subagents` and `max_concurrent_subagents` as positive safe integers.
6
+ Installation defaults are max_total_subagents = 100 and max_concurrent_subagents = 5.
7
+ A missing, malformed or unreadable policy blocks new creation; report it rather than assuming defaults.
8
+ Freeze these settings for one ARC coordination session/tree; reinstalling affects new sessions.
9
+
10
+ ## Counting and reservations
11
+
12
+ Maintain a session ledger of instance IDs, parent IDs, pending reservations, creation outcomes,
13
+ and active/completed state. The Orchestrator itself is excluded. All created descendants,
14
+ including nested or non-ARC agents, count toward the total. A completed agent never refunds
15
+ the cumulative budget. Follow-up/resume of the same instance does not increment total;
16
+ a fresh instance, retry that creates a new instance, or replacement does increment it.
17
+ Waiting, blocked, running and idle resumable instances consume concurrency until their
18
+ completion/termination is confirmed. Obey any lower actual runtime capacity, including
19
+ native retention of completed instances; ARC counts do not prove that a native slot is free.
20
+
21
+ Before any parallel dispatch, reserve the entire proposed batch in the ledger:
22
+ created + pending reservations + proposed <= max_total_subagents, and
23
+ active + pending reservations + proposed <= max_concurrent_subagents and available runtime capacity.
24
+ Record a reservation before each creation call. Confirmed creation converts it into a created,
25
+ active ID. Release a reservation only when failure proves that no instance was created.
26
+ An uncertain result keeps its reservation and capacity until reconciled; never retry blindly.
27
+ Serialize work when a batch does not fit. There are no reserved role slots.
28
+
29
+ ## Continuation and exhaustion
30
+
31
+ Preserve the ledger through continuation, resume and context compaction; reconcile actual instance
32
+ IDs before dispatch. Ledger loss must never reset counters to zero. If reconstruction is incomplete,
33
+ hold creation and report the unknown budget; use a conservative bound only with sufficient evidence.
34
+ Completion frees confirmed active capacity, never the total-created budget. Exhaustion holds new
35
+ creation and requires reporting remaining work and budgets. It never authorizes skipping required
36
+ QA or Reviewer, role freshness, approval, ownership, dependency or same-file edit gates.
37
+
38
+ This cumulative guard and ARC scheduling are prompt-level policy, not hard runtime enforcement.
39
+ Policy text tests prove package consistency, not actual agent compliance or native runtime support.
40
+ Native Codex `[agents].max_concurrent_threads_per_session` and Claude
41
+ `settings.json.env.CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` constrain their own platform sessions.
42
+ Independent sessions, accounts and platforms do not share this ARC ledger; Agent Teams and hosted APIs
43
+ are outside this contract. Native application must be checked in a supported new session separately.
@@ -0,0 +1,287 @@
1
+ # Planning contract
2
+
3
+ Read before design/plan-depth decisions, spec/plan drafting and approval, and the first spec/plan save.
4
+
5
+ ## Authorization and scope
6
+
7
+ An explicit execution request is authorization only for its sufficiently specified scope. Confirm execution intent,
8
+ expected outcome, constraints, document depth, and verification risk, with no unresolved material behavior, method,
9
+ or risk decision requiring the user. The request itself or a description explicitly referenced by the user must
10
+ supply that scope. Record authorization evidence, scope, acceptance criteria, constraints, and depth in the brief or
11
+ canonical record. Routine execution and check choices may be recorded by Orchestrator; added product behavior or
12
+ material scope cannot be claimed as already approved. A restatement, role handoff, or restart does not create an
13
+ approval requirement for the same scope.
14
+
15
+ Silence, ambiguous assent, approval of other work, and unspecified blanket improvement requests are not authorization.
16
+ Planner's new material choices are not automatically approved. Ask for the missing material decision; roles route
17
+ questions to Orchestrator. Required written specs and plans still require their individual approval in the order below.
18
+
19
+ For material changes to scope, method, or risk, hold affected work and explain the missing decision or evidence and
20
+ remaining work. Target changes, unclear ownership, unexpected state, unresolved failures, or missing required inputs
21
+ also hold affected work under [handoff](handoff.md) and [git-recovery](git-recovery.md). Distinguish new authorization
22
+ needs from execution issues within existing scope: ordinary corrections and reverification do not require duplicate
23
+ approval after failure. Revalidate affected gates after resolution.
24
+
25
+ ### Probe scope
26
+
27
+ A probe-only scope completes with findings, evidence, limits, and remaining uncertainty answering the approved question;
28
+ a well-supported infeasibility result can complete it. Probe-only authorization does not authorize product retention
29
+ or subsequent implementation. Record question, method/scope, criteria, and constraints; a sufficiently specific probe
30
+ request can supply that approval. Match checks to probe purpose/risk and do not report probe evidence as product proof.
31
+
32
+ If the user explicitly requests both a probe and implementation and the whole scope is sufficiently specified,
33
+ classify the entire scope. When the entire scope meets Bounded conditions, the probe is an internal investigation
34
+ with no new approval boundary at its report. Unknown implementation is not blanket authorization: hold affected
35
+ implementation if findings materially change scope, method, or risk, or leave a new material decision. Reassess depth
36
+ and obtain any required design/spec/plan approvals before that implementation. A probe-only request remains separate.
37
+
38
+ ## Formal drafting boundary
39
+
40
+ Initial design proposals and brainstorming may precede execution-target choice. Formal spec or plan drafting includes a
41
+ complete draft before saving, even when returned only in chat. Before formal drafting and saving, Orchestrator supplies
42
+ and records the actual absolute workspace/repository, branch or detached HEAD, HEAD, changes and ownership,
43
+ explicit choice and preparation evidence, and absolute document paths inside that target. Planner drafts for that
44
+ verified workspace; Orchestrator saves directly in the selected target. Missing or mismatched evidence stops the
45
+ affected drafting or save and is reported to Orchestrator. Planned scope and intended paths are not actual preparation.
46
+ Initial target preparation does not authorize Coder; the complete handoff gate still applies.
47
+
48
+
49
+ ## Planner drafting preparation and consolidated feedback
50
+
51
+ Before formal drafting, Orchestrator performs a preflight of relevant policy, reference, profile, test, parity and
52
+ manifest surfaces and conflicts. Provide one complete brief with actual absolute workspace/repository, branch or
53
+ detached HEAD, HEAD, change state and ownership, explicit target choice and preparation evidence, approved preceding
54
+ design/spec/plan versions, scope and exclusions, design/plan depth, dependencies and shared contracts, acceptance
55
+ criteria, required QA/focused checks and evidence, hold conditions and open decisions. Resolve missing or conflicting
56
+ required evidence first or hold that stage.
57
+
58
+ Planner returns a complete proportional draft and self-review for the current approval stage. Orchestrator integrates,
59
+ saves, reviews and obtains approval. Orchestrator checks once with a fixed checklist: scope and evidence; targets,
60
+ ownership and paths; policy surfaces and conflicts; task boundaries, dependencies and acceptance criteria; checks,
61
+ evidence and holds; roles, approval and commit boundaries; draft completeness. Gather all substantive omissions into
62
+ one consolidated follow-up request to Planner. Do not split requests by omission or author the missing plan yourself.
63
+
64
+ Initial design, required spec approval, and formal plan drafting/approval remain separate ordered stages.
65
+ Allow additional Planner calls for substantive omissions or user-approved scope/evidence changes. There is no fixed
66
+ call cap; never accept an incomplete draft to minimize calls. Do not add call-count conditions to Planner profiles.
67
+
68
+ ## Design and planning
69
+
70
+ `brainstorming` and `writing-plans` are instructions for existing roles, not extra agents. This ARC controls
71
+ routing/approval gates even if a called skill names another executor. Follow local ARC reference instructions and user
72
+ constraints; report missing required local references before that stage. Integrate means save, route, and obtain approval;
73
+ never author.
74
+
75
+ When the request or task brief is in Korean, Planner writes spec and plan titles and explanatory prose in Korean unless
76
+ the user explicitly requests another language. Preserve identifiers, skill/API names, code, paths, commands, and
77
+ literal values exactly. Orchestrator preserves the agreed language when saving and integrating Planner output.
78
+
79
+ Assess and record design and plan depth separately from verification risk; risk determines the required checks and
80
+ review, not the design path or plan approval gates. Bounded or document omission does not imply low risk, and
81
+ architectural depth does not add QA/Reviewer at every stage; apply existing risk-scaled QA/Reviewer and specific
82
+ approved obligations separately.
83
+
84
+ 1. Before software feature, design, or behavior changes, Orchestrator assigns Planner the local `brainstorming`
85
+ skill with
86
+ the brief/evidence. Planner explores context and proposes the spike/bounded/architectural path (Orchestrator
87
+ decides), design/options,
88
+ trade-offs, acceptance criteria, assumptions, and focused questions. Orchestrator integrates, announces scope,
89
+ routes user
90
+ answers/revisions back, and obtains approvals; Orchestrator never runs brainstorming or writing-plans itself
91
+ (SKILL.md Role gate);
92
+ the direct path uses only a scope record.
93
+ 2. Spike: apply Probe scope above; distinguish probe-only authorization from a sufficiently specified combined scope.
94
+ Bounded: approve a short design before Coder or a Orchestrator direct edit (Planner's design
95
+ before Coder; a direct edit uses only an approved scope record). Architectural: approve
96
+ design, then Planner returns complete spec draft and self-review findings; Orchestrator integrates, saves,
97
+ self-reviews, and obtains written-spec approval
98
+ before implementation planning. Planner is read-only and cannot request approval.
99
+ 3. After approved design/spec and before Coder, Orchestrator assesses plan depth separately from file count, LOC,
100
+ or bounded
101
+ scope. Architectural work always uses local `writing-plans` and requires written plan approval, regardless of
102
+ locality, risk, or size. For bounded work, skip planning only for one local change with no dependent stages,
103
+ cross-component shared state, lifecycle, or integration-order concerns and one focused verification path; otherwise
104
+ require a draft. A bounded label or “no plan” request does not bypass this judgment.
105
+ “Orchestrator's recorded plan-depth judgment” means this assessment, including whether a Bounded written spec is
106
+ required, recorded in the brief/handoff record.
107
+ 4. Record dependencies and any bounded plan-depth rationale in the brief. Planner follows local `writing-plans`,
108
+ returning its complete proportional draft, assumptions/open decisions, verification requirements, and self-review.
109
+ Orchestrator integrates, saves to the user's path or `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`,
110
+ self-reviews,
111
+ then obtains plan approval before Coder.
112
+ 5. Every Coder first start and restart requires all applicable design/spec/plan approvals and passing
113
+ the common handoff gate in SKILL.md and handoff.md, with approved artifacts, brief, and relevant findings.
114
+ Non-behavior
115
+ configuration/documentation may skip inapplicable design/planning stages, but still requires the handoff gate.
116
+ A Orchestrator direct edit requires its approved scope record and the same gate conditions before the first edit.
117
+
118
+ When a Bounded written spec is required by Orchestrator's recorded plan-depth judgment, record that necessity and scope
119
+ and
120
+ use the approved short design as its basis. Planner returns a proportional complete spec draft and self-review;
121
+ Orchestrator integrates, saves, self-reviews, and obtains individual written-spec approval before dependent plan
122
+ drafting
123
+ and execution preparation. This applies that judgment, not a new spec-necessity rule.
124
+
125
+ Design, spec, plan, and brainstorming drafts are authored only by Planner.
126
+ Orchestrator must not substitute an independently authored spec or plan for Planner's complete draft.
127
+ If the draft has substantive
128
+ omissions, return them to Planner for completion; if Planner fails or is unavailable, stop and report,
129
+ never draft instead. Design approval alone does not change ownership.
130
+
131
+ ## Top-level plan tasks
132
+
133
+ The Planner profile holds the full top-level task rules. Orchestrator checks each plan draft for: per task ID and title,
134
+ implementation goal/scope and target files, preceding tasks and dependencies, acceptance criteria, required QA/focused
135
+ checks and evidence before acceptance, and hold conditions; each task independently implementable, verifiable and
136
+ acceptable, with changes that cannot be independently verified (including policy/profile/tests/manifest sharing one
137
+ contract) in one task from the outset; and final overall plan verification stated separately from task acceptance
138
+ prerequisites, with scope and timing. Never list Reviewer as a per-task required check (Reviewer timing: SKILL.md
139
+ Risk-scaled execution). RED/GREEN and individual
140
+ commands do not create commit units; one task is one focused commit under commit.md, which also covers no-change, hold
141
+ and resume. Do not combine different approved tasks into one commit during execution; if inseparability appears later,
142
+ stop affected work and have Orchestrator handle revised scope, planning and applicable approvals.
143
+ These requirements apply to
144
+ required plans; existing plan-omission paths gain no new plan obligation.
145
+
146
+ ### Dependency and readiness record
147
+
148
+ After plan approval and before the first Coder assignment, Orchestrator records all top-level task IDs in the
149
+ accessible canonical handoff record, linked to the approved plan version. For each task record explicit and implicit
150
+ predecessors, required inputs, outputs and shared contracts, owned files, conflicting shared resources, required
151
+ checks/QA path, ready/held status and reasons. Record the initial ready batch and capacity/serialization reasons.
152
+ Analyze shared APIs, contracts, generated artifacts and resources even when tasks edit different files. Unresolved
153
+ shared contracts or insufficient dependency information block the affected tasks; same-file concurrent Coder edits
154
+ are blocked even for different lines. Do not infer independence from file separation or plan listing order.
155
+
156
+ A task is ready only when all applicable approvals and execution preparation are complete, required inputs/contracts
157
+ are available and settled, predecessors have required evidence and Orchestrator acceptance plus verified focused
158
+ commits (or accepted no-change records), ownership/resources do not conflict, its required check/QA path is available,
159
+ and a subagent slot exists under both the configured ARC full-tree cap shared by all roles and any lower actual runtime
160
+ limit. Report runtime limits. Start all ready independent tasks with fresh Coders concurrently within capacity;
161
+ record each hold or serialization reason instead of silently following list order. Preserve existing risk gates.
162
+
163
+ Update the map on completion, check evidence, acceptance, commit, slot return and new conflicts. Completion reports
164
+ alone do not release dependents. Reevaluate newly ready tasks immediately without waiting for unrelated batch members;
165
+ failed or ambiguous predecessors hold their dependent chain, while unaffected ready tasks may proceed. Dispatch still
166
+ passes handoff.md for each task; commits and shared Git mutations follow commit.md. This record does not authorize
167
+ Orchestrator to rewrite Planner's approved task boundaries or waive approvals.
168
+
169
+ For example, with A → B → C and independent D and two slots, start A and D. After A's required checks,
170
+ Orchestrator acceptance and verified commit, start B while D continues if capacity and gates allow.
171
+ If A fails, hold B and C; D may continue if unaffected.
172
+
173
+ ### Document-save evidence gates
174
+
175
+ Before the first architectural spec save, first required Bounded written spec save, or first plan save, read this
176
+ reference and record accessible evidence in the shared brief/canonical handoff record.
177
+ Saving creates a reviewable file; it is not approval or a Git commit.
178
+
179
+ **Spec save:** Verify the approved design scope and approval evidence, accessible Planner's complete spec draft and
180
+ self-review findings, Orchestrator's integration/save/review responsibility, and intended absolute save path.
181
+ For a required Bounded written spec, also verify Orchestrator's recorded plan-depth judgment, approved short design,
182
+ spec-necessity rationale and scope, and Planner's proportional complete draft and self-review. Saving or approving
183
+ the short design does not replace the required spec's drafting, self-review, or individual approval.
184
+ Architectural and required Bounded specs enter as approved versions in the applicable document set; complete
185
+ individual written-spec approval before dependent plan drafting. This gate
186
+ permits saving for review and does not require written-spec approval; it requires valid execution-target choice and actual preparation. Do not describe an
187
+ uncommitted file as committed.
188
+
189
+ **Plan save:** Verify the approved design and, when required, approved written-spec version and approval evidence,
190
+ Orchestrator's plan-depth judgment, applicable plan list and dependencies, accessible Planner's complete plan draft and
191
+ self-review findings, Orchestrator's integration/save/review responsibility, and intended absolute save path.
192
+ If evidence is missing or mismatched in either gate, stop the affected save and report to Orchestrator for resolution.
193
+
194
+ ### Complete planning-document set
195
+
196
+ The applicable document set means all specs and plans required for the current approved execution scope, not future
197
+ project work. Orchestrator records scope, design/plan depth, absolute document paths and coverage, approved
198
+ versions/status,
199
+ plan dependencies and execution order, skipped stages with rationale, and documents still awaiting writing or approval
200
+ in the shared brief. The set is complete only when every required document is written and individually approved and
201
+ no unresolved scope or dependency decision requires another document. Do not omit required documents from the list.
202
+
203
+ A required plan does not itself require a written spec. Bounded uses Orchestrator's recorded plan-depth judgment to
204
+ determine
205
+ whether a written spec is required; do not infer one from plan necessity. Spec steps apply only to Architectural and
206
+ required Bounded specs, and plan steps only to required plans. These gates add no new spec obligation to Spike,
207
+ Bounded plan-skip, or non-behavior documentation/configuration paths; preserve existing omission rationales.
208
+
209
+ Normal order: initial design approval → execution-target choice → target preparation and verification →
210
+ formal spec drafting (when required), saving and self-review → written-spec approval → formal plan drafting
211
+ (when required), saving and self-review → individual plan approvals → complete applicable set → existing-commit
212
+ verification and one batch docs commit of remaining approved documents → final Git verification → Coder handoff.
213
+ Written-spec approval precedes dependent plan drafting. On document-omission paths skip only the inapplicable document
214
+ steps; preserve target choice, preparation, state/ownership checks and Coder gates.
215
+
216
+ While documents are being written, reviewed, or approved, do not stage documents or commit planning documents.
217
+ Selection and initial target preparation happen before formal drafting; document completion is a staging/commit gate,
218
+ not an initial preparation gate. An incomplete set or missing applicable approval blocks document commit and Coder,
219
+ not the initial choice request. No early Coder work is authorized by approval of only some documents.
220
+
221
+ This ARC explicitly defers the local `brainstorming` instruction to commit the spec before written-spec review:
222
+ save and self-review the spec, obtain written-spec approval without committing it, then write and obtain approval for
223
+ all applicable plans. Commit the spec only in the final batch preparation. Do not modify external skills.
224
+ `writing-plans` implementation-step commit instructions
225
+ are not permission for document commits during planning or for starting Coder.
226
+
227
+ | Path | Applicable approvals and preparation |
228
+ |------|--------------------------------------|
229
+ | Spike probe | Approve the feasibility question, probe method/scope, acceptance criteria, and constraints. Do not force specs/plans for still-unknown implementation; no new spec obligation is added by this gate. If Coder executes the probe, pass the common handoff gate after probe approval. Read-only Orchestrator/Planner investigation without Coder does not trigger that gate. |
230
+ | Bounded, plan skipped | Approve the short design and record the existing plan-skip criteria/rationale; this gate adds no new spec obligation. Complete applicable approvals, select the target, prepare any actual approved documents, or record valid document absence, then pass the common gate. |
231
+ | Bounded, plan required | Approve the short design and every required plan; write a spec only when Orchestrator's recorded plan-depth judgment requires it, then obtain its individual written-spec approval before dependent plan drafting. Select and prepare the target before formal drafting; complete all applicable artifacts before one docs batch and the common gate. |
232
+ | Architectural | Approve design, then written spec, then every required plan using `writing-plans`; select and prepare the target before formal drafting; complete the document set before batch preparation, final verification, and the common gate. |
233
+ | Non-behavior documentation/configuration | Record scope, acceptance criteria, and why design/planning stages are inapplicable; this gate adds no new spec obligation. Still select the target, verify Git state, prepare actual approved documents or record absence, and pass the common gate. |
234
+
235
+ Apply Authorization and scope above to probe-only and combined requests; preserve required design/spec/plan gates.
236
+ These gates add no new spec obligation for Spike, Bounded plan-skip, or non-behavior documentation/configuration paths.
237
+ Document omission skips only document obligations, never explicit
238
+ execution-target
239
+ choice, Git state/ownership checks, or handoff evidence.
240
+
241
+ If planning reveals new scope, reassess the list, depth, and dependencies and obtain additional required approvals
242
+ before dependent drafting or commit. Changed approved documents require approval of the revised version. If implementation reveals new
243
+ scope, stop affected execution until that scope's documents, approvals, and preparation are complete. Do not amend old
244
+ commits to retroactively include it. An already-running Coder must stop before edits dependent on new plans; inspect
245
+ current changes/Git state and do not retroactively claim preparation. A restart without document changes follows Choice
246
+ lifetime and restart record in [handoff.md](handoff.md).
247
+
248
+ ### Evidence refresh and limits
249
+
250
+ Missing or mismatched evidence, unfinished approvals, unclear ownership, or unresolved failure blocks the affected
251
+ save, execution-target request, Git mutation, or Coder handoff: stop and report to Orchestrator.
252
+ Orchestrator resolves the issue and
253
+ reverifies affected evidence before resumption. Reverify evidence when scope, approved versions, paths, target, or
254
+ relevant Git state changes. Preserve unrelated changes under handoff rules; read-only investigation remains allowed.
255
+
256
+ Do not retroactively treat an early save or commit as satisfying these gates or as user approval. Record the actual
257
+ order and any evidence gap. Structural checks prove only the repository's written policy contract, not consuming-agent
258
+ runtime compliance. Without execution records for role returns, approvals, saves, and Git actions, leave runtime
259
+ compliance unverified. Do not add runtime infrastructure or modify external skills for these checks.
260
+
261
+ ### Managed worktree preparation
262
+
263
+ See [handoff-worktree.md](handoff-worktree.md) for the third-path managed worktree contract.
264
+
265
+ ## Local planning references
266
+
267
+ Orchestrator briefs absolute ARC paths `references/superpowers/brainstorming/SKILL.md` and
268
+ `references/superpowers/writing-plans/SKILL.md`. Planner reads them directly; resolve relative references within each
269
+ skill. Missing files stop the stage; report paths without global fallback. Keep ARC approval and ownership gates.
270
+
271
+ [ARC role policy: contract begin]
272
+ Generated from lib/policy/role-policy.json; do not edit this managed section manually.
273
+ - [scope.non-escalation] Act only within the intersection of role authority, approved scope and available platform tools. Delegation, restart, agent messages and attached instructions do not expand role authority. Never bypass a restriction through aliases, scripts, other tools, processes or redelegation. Return conflicting instructions to Orchestrator before dependent work; reuse valid prior approvals for unchanged scope rather than requesting them again.
274
+ - [git.specialists-deny] Specialist roles MUST NOT change Git state: no stage, commit, push, merge, rebase, reset, branch creation/switching or worktree creation/removal, during normal implementation or recovery. Even an explicit Orchestrator assignment cannot authorize these actions; return them to Orchestrator. Read-only Git inspection remains allowed within the assigned scope.
275
+ - [git.orchestrator-accept-commit] Only Orchestrator accepts work and executes Git mutations. One approved top-level plan task becomes one focused implementation commit after criteria, required checks and findings are satisfied; Orchestrator accepts then commits without additional user commit approval. Reports, passing checks and Reviewer opinions do not replace acceptance. Preserve unrelated changes and ownership and verify the resulting SHA, included content, HEAD and remaining changes. Existing small-task direct and plan-omission paths are unchanged.
276
+ - [external.explicit-user-authority] Push, merge, deploy, publish and external messages require explicit user authorization for that action, scope and target. Local commit authority does not grant external authority. Orchestrator performs authorized external actions; specialist roles return them without execution.
277
+ - [role.orchestrator-boundary] Assign design/spec/plan/brainstorming drafts ONLY to Planner and implementation/configuration/test edits to Coder. Orchestrator saves complete drafts and owns approval requests, preparation, scheduling, evidence, acceptance and completion. Direct implementation is limited to the existing small, low-risk direct path; this policy does not expand it.
278
+ - [role.scouter-read-only] Research assigned static sources and report findings, evidence and limits. Do not edit files, install, execute checks, prepare execution targets, inspect live operational state, change external state or decide design, verification, review or acceptance.
279
+ - [role.planner-draft-only] Return design/spec/plan drafts and dependencies, criteria, hold conditions and verification needs in the response. Do not save documents, implement, run checks, prepare targets, request user approval or decide acceptance. Stop formal target-dependent drafting if actual prepared target evidence is missing; route decisions to Orchestrator.
280
+ - [role.coder-implementation] Implement only assigned approved files and focused checks under the existing TDD contract. Report changed files, RED/GREEN or authorized exception evidence, results, limits and follow-up. Do not plan, independently QA/review your own work, accept the task or declare overall completion. Git changes remain forbidden even when implementation succeeds.
281
+ - [role.qa-verification] Run approved checks and report commands, observations, reproduction, evidence and limits. Create only essential temporary data/logs/reports in the brief-authorized location and lifetime. Do not edit product source, tests, fixtures or configuration to pass checks, deploy or accept work. Persistent product-state checks require explicit scope and cleanup ownership. Return failures for Coder correction and required QA recheck.
282
+ - [role.reviewer-independent] Independently inspect the assigned final changes and evidence and report actionable findings and limits. Remain read-only; do not execute QA tests, edit files, perform Git mutations or decide acceptance.
283
+ - [review.significant-no-plan] For significant/high-risk work without a plan: Coder → QA and required QA rechecks → Reviewer of the final full change → Orchestrator acceptance. Do not omit Reviewer merely because no plan exists. This creates no new plan obligation.
284
+ - [review.significant-plan] For significant/high-risk plan work: each task uses Coder → fresh QA as required → Orchestrator acceptance and focused commit. After all tasks are accepted and required QA is complete, Reviewer reviews the final full change once. Reviewer is NOT a per-task or per-commit required gate. Preserve required checks and necessary finding rechecks.
285
+ - [review.final-plan-recheck] For final overall Reviewer findings on plan work, including behavior findings, use Coder → Reviewer without QA reassignment; repeat until resolved. This exception applies only to that final plan stage. Preserve required QA and QA failure rechecks before initial final review and outside this exception.
286
+ - [platform.codex] Role restrictions are prompt-level contracts, not a filesystem sandbox. No documented role-specific Git hook or generic per-agent tool allowlist is assumed. Existing shell capabilities are retained because static read access after shell reduction has not been verified; Coder and QA need shell for approved checks.
287
+ [ARC role policy: contract end]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jesse Vincent
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation)."
4
+ ---
5
+
6
+ # Brainstorming
7
+
8
+ You are very good at building. You build what you believe your human
9
+ partner wants, and that belief is usually thinner than it feels. This
10
+ skill is for finding out what they actually want, and why, before
11
+ anything gets built.
12
+
13
+ People often haven't finished working out what they want. Good questions
14
+ help them think it through. When you understand the why, you make the
15
+ hundred decisions they never mention the way they would have made them.
16
+
17
+ ## First: What Do You Actually Know?
18
+
19
+ Before you reply, ask yourself: what do I know about what they want, and
20
+ why?
21
+
22
+ - **Everything that matters is in the request** ("make the icon cornflower
23
+ blue"). This is a quick, clear task. Do it, and say what you did.
24
+ - **Something non-trivial is missing.** Start the conversation.
25
+
26
+ ## Your First Message
27
+
28
+ Your first message is two things, in this order:
29
+
30
+ 1. One line letting them know that if they'd rather skip the questions and
31
+ have you just start, they can say so. If they take you up on it, this
32
+ skill is done: state any significant how-it-gets-made choice
33
+ (platform, language, medium) in one plain line, then do what they
34
+ asked through the normal workflow.
35
+ 2. One open question that gets them describing. Ask about a real moment
36
+ or a concrete picture: "What's the moment you find yourself wishing
37
+ this existed?" or "Tell me about the people who'll be in the room."
38
+
39
+ That's the whole message.
40
+
41
+ ## The Conversation
42
+
43
+ Each message ends with one question: a single sentence with no list of
44
+ example answers hanging off it. Use plain language, pitched just a little
45
+ above where your human partner is. Match their vocabulary; never use
46
+ process jargon.
47
+
48
+ Be clear and concise. Lead with what matters. Avoid jargon. When you
49
+ report what you found, give them the most important findings and offer
50
+ the rest.
51
+
52
+ **Get them describing.** Open questions come first. Their own words carry
53
+ intent that your options can't. Offer a short menu only when they're
54
+ stuck. When they say "just guess" or "what do you think?", propose
55
+ something concrete.
56
+
57
+ **How it gets made.** Every project rests on choices about medium, tools,
58
+ materials, and resources: the platform, programming language, and
59
+ libraries for an app; the medium for a piece of art. Find out early which
60
+ of those choices they want to make, which they're handing to you, and what
61
+ they already have to work with. Someone with strong views or skills will
62
+ want to talk it through. Someone counting on you needs sensible defaults,
63
+ said in plain words. When there's existing work, build on what it already
64
+ uses. Any choice you make goes in the design as your call, never as
65
+ something they agreed to.
66
+
67
+ **Ground to cover.** This is territory, not a script. Never read these
68
+ out as questions:
69
+
70
+ - what kind of thing this is, and what makes it special
71
+ - why now, and what success looks like to them
72
+ - goals, non-goals, and anti-goals (what would make this a failure even
73
+ if it technically works)
74
+ - prior art: what they've seen elsewhere, loved or hated
75
+ - current state: what exists now, what they've tried
76
+ - the details they care about
77
+
78
+ **Questions that work** anchor in specifics: "Walk me through the last
79
+ time...", "If it could only do one of these well, which?", "What would
80
+ make you wince if I got it wrong?" A guess they can correct ("I'm
81
+ guessing this is because X keeps biting you?") often beats a question.
82
+
83
+ **Offer recon.** Once you have a bit of grounding and looking would help,
84
+ offer to go look: their codebase or project, their own files and data,
85
+ or the web. Say what you'd look for. They decide whether you go.
86
+
87
+ **Think wide privately.** Before you propose anything, come up with
88
+ several ideas and drop the weak ones, including any that fight what
89
+ they've told you about why. Show the comparison only when it helps them
90
+ decide.
91
+
92
+ **Show, don't tell.** Offer the visual companion (below) whenever seeing
93
+ would help more than reading:
94
+
95
+ - something they'll look at: a screen, a page, a printout, a sign
96
+ - a layout or arrangement: of a screen, a room, a schedule
97
+ - a flow or a sequence of steps
98
+ - options that would look different from each other
99
+ - a structure that's easier to see than read: a diagram, a timeline, a map
100
+
101
+ Once they've accepted, use it for mockups to react to, side-by-side
102
+ options, and throwaway prototypes they can click.
103
+
104
+ **Spike to feel things out.** Agentic work is waterfall, but very, very
105
+ fast. A quick throwaway build is often the cheapest way to learn what
106
+ they want or whether something works. Offer one when it would help.
107
+ When they just want to spike, get out of the way. Spikes get no tests
108
+ or minimal ones, aren't bulletproof, and skip the plan, implementation,
109
+ and review process. Bring what the spike taught you back into the
110
+ conversation.
111
+
112
+ ## Play It Back
113
+
114
+ Play back as you go. As soon as you understand one part well enough to
115
+ describe it (what it's for and who it serves, say, or how one piece
116
+ behaves), describe that part back in about 200-300 words, then return to
117
+ questions about the next part. Playback and questions alternate through
118
+ the whole conversation; the last chunk covers whatever is left.
119
+
120
+ Mark anything you're guessing as your guess; only what they said goes in
121
+ as theirs. End each chunk by asking what's wrong or missing.
122
+
123
+ Before you send a chunk, check it: does it describe something they'll
124
+ look at, like a page, a screen, a schedule, or a printout? If so, and
125
+ they haven't seen the visual companion offer yet, send the offer instead
126
+ (its own message, below) and hold the chunk for the next message. Once
127
+ they've accepted, put a mockup next to the description.
128
+
129
+ ## Size the Work
130
+
131
+ Once you understand what they want, pick a size and say it in plain
132
+ words. They can override it.
133
+
134
+ | Size | The full description | Then |
135
+ |------|----------------------|------|
136
+ | A quick, clear task | the request itself | do it |
137
+ | A small change | in chat | build it through the normal workflow |
138
+ | A project with a written design | a written design document | a full plan (for software: superpowers:writing-plans) |
139
+
140
+ If it grows mid-task, stop, say so, and step up a size.
141
+
142
+ If this is really several independent projects, say so, agree on an
143
+ order, and brainstorm them one at a time.
144
+
145
+ ## The Written Design
146
+
147
+ For a project, write a plain document a talented builder in the domain
148
+ could plan from without going back to your human partner. Cover:
149
+
150
+ - intent and the why
151
+ - goals, non-goals, anti-goals
152
+ - constraints
153
+ - the parts of the how they decided, as they decided them
154
+ - what's left to the builder
155
+
156
+ **Where it goes:** in a software repo,
157
+ `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`, committed.
158
+ Otherwise, ask. Your human partner's preferences override both.
159
+
160
+ **Builder check:** dispatch a fresh subagent with
161
+ `builder-check-prompt.md` in this directory. When you tell your human
162
+ partner you're writing it up, say a reviewer will read it first and you
163
+ may come back once with a few questions. Don't hand over the document
164
+ until the check is back. Sort what the builder asks into three piles:
165
+
166
+ - **Answered already** by the conversation or the project: put the answer
167
+ in the document.
168
+ - **Minor:** a sensible builder could settle it without changing what gets
169
+ built. Settle it yourself and mark it in the document as your call.
170
+ - **Theirs:** only your human partner can answer it, and the answer changes
171
+ what gets built.
172
+
173
+ Bring the "theirs" pile in one message, most important first. Update the
174
+ document with their answers, then hand it over with a short list of the
175
+ calls you made so they can check those while reading. That's the only
176
+ round of questions the check produces. Without a subagent tool, read the
177
+ document as that builder yourself.
178
+
179
+ <HARD-GATE>
180
+ Nothing gets built until your human partner approves the full
181
+ description: in chat for a small change, the document for a project.
182
+ Building includes writing product code, scaffolding, installing
183
+ dependencies, creating projects, and invoking an implementation skill.
184
+ Reading and exploring are fine.
185
+
186
+ Two exceptions. If they opted out of the questions, the skill is done
187
+ and the gate goes with it. A spike they said yes to may be built; it
188
+ stays labeled throwaway, and keeping what it produced is a new request
189
+ that comes back through this gate.
190
+
191
+ After a project's document is approved, the next step is the plan. For
192
+ software, invoke superpowers:writing-plans and no other skill.
193
+ </HARD-GATE>
194
+
195
+ ## Red Flags
196
+
197
+ | Thought | Reality |
198
+ |---------|---------|
199
+ | "I'll offer options to save them effort" | Options steer. Ask them to describe it first. |
200
+ | "I'll fill in sensible defaults" | Good. Say them out loud. A default they never heard is one they couldn't reject. |
201
+ | "I should explain the process first" | Ask your question. The process shows itself. |
202
+ | "They said 'sounds good' to the idea" | Approval covers what you showed them. A description you haven't written isn't approved. |
203
+ | "The spike works, I'll keep building on it" | Keeping it is a new request. Back through the gate. |
204
+
205
+ ## Visual Companion
206
+
207
+ A browser tab for showing mockups, diagrams, and prototypes. It's a
208
+ tool, not a mode: accepting it doesn't send every question to the
209
+ browser.
210
+
211
+ **Offer it just-in-time.** Offer it the first time one of the moments
212
+ above comes up, never upfront. The offer is its own message with nothing
213
+ else in it:
214
+
215
+ > "This might be easier if I show you. Want me to open a browser tab with some mockups?"
216
+
217
+ If they decline, stay in text and don't offer again unless they raise it.
218
+
219
+ **Per question, ask: would they understand this better by seeing it?**
220
+ Mockups, layouts, diagrams, and side-by-side designs go in the browser.
221
+ Requirements, scope, tradeoffs, and conceptual choices stay in text. A
222
+ question about a UI topic isn't automatically a visual question.
223
+
224
+ If they accept, read `visual-companion.md` in this directory before
225
+ starting the server.
@@ -0,0 +1,23 @@
1
+ # Builder Check Prompt
2
+
3
+ Dispatch a fresh general-purpose subagent with this prompt once the
4
+ written design exists. Fill in the domain and the document path.
5
+
6
+ ```
7
+ You are a talented [DOMAIN, e.g. "software engineer", "event planner",
8
+ "bakery consultant"]. You've been handed a design document and asked to
9
+ put together a plan to build what it describes. You will not be able to
10
+ talk to the person who wrote it.
11
+
12
+ Read [DOCUMENT_PATH].
13
+
14
+ Report only the questions you'd still need answered before you could plan
15
+ this well: places where you'd have to guess and a wrong guess would
16
+ matter. For each, give the question and why the answer changes the plan.
17
+ Rank them by importance.
18
+
19
+ Skip anything the document explicitly leaves to the builder, and anything
20
+ you could reasonably decide yourself. Skip nitpicks about wording.
21
+
22
+ If nothing important is left, say "nothing important left".
23
+ ```