@ai-content-space/loopx 0.1.0 → 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 (43) hide show
  1. package/README.md +26 -26
  2. package/package.json +6 -2
  3. package/plugins/loopx/.codex-plugin/plugin.json +6 -6
  4. package/plugins/loopx/scripts/plugin-install.test.mjs +25 -8
  5. package/plugins/loopx/skills/autopilot/SKILL.md +90 -0
  6. package/plugins/loopx/skills/build/SKILL.md +118 -0
  7. package/plugins/loopx/skills/clarify/SKILL.md +219 -0
  8. package/plugins/loopx/skills/plan/SKILL.md +238 -0
  9. package/plugins/loopx/skills/{loopx-review → review}/SKILL.md +9 -4
  10. package/skills/ai-slop-cleaner/SKILL.md +114 -0
  11. package/skills/autopilot/SKILL.md +90 -0
  12. package/skills/autoresearch/SKILL.md +68 -0
  13. package/skills/build/SKILL.md +118 -0
  14. package/skills/clarify/SKILL.md +219 -0
  15. package/skills/deep-interview/SKILL.md +461 -0
  16. package/skills/deepsearch/SKILL.md +38 -0
  17. package/skills/plan/SKILL.md +238 -0
  18. package/skills/ralph/SKILL.md +271 -0
  19. package/skills/ralplan/SKILL.md +49 -0
  20. package/skills/{loopx-review → review}/SKILL.md +9 -4
  21. package/src/autopilot-runtime.mjs +152 -0
  22. package/src/build-runtime.mjs +146 -0
  23. package/src/cli.mjs +43 -7
  24. package/src/codex-exec-runtime.mjs +97 -0
  25. package/src/install-discovery.mjs +7 -7
  26. package/src/plan-runtime.mjs +456 -0
  27. package/src/runtime-maintenance.mjs +36 -8
  28. package/src/workflow.mjs +825 -123
  29. package/templates/architecture.md +3 -3
  30. package/templates/development-plan.md +1 -1
  31. package/templates/execution-record.md +1 -1
  32. package/templates/plan.md +4 -4
  33. package/templates/review-report.md +1 -1
  34. package/templates/spec.md +38 -2
  35. package/templates/test-plan.md +1 -1
  36. package/plugins/loopx/skills/loopx-autopilot/SKILL.md +0 -30
  37. package/plugins/loopx/skills/loopx-build/SKILL.md +0 -25
  38. package/plugins/loopx/skills/loopx-clarify/SKILL.md +0 -25
  39. package/plugins/loopx/skills/loopx-plan/SKILL.md +0 -25
  40. package/skills/loopx-autopilot/SKILL.md +0 -30
  41. package/skills/loopx-build/SKILL.md +0 -25
  42. package/skills/loopx-clarify/SKILL.md +0 -25
  43. package/skills/loopx-plan/SKILL.md +0 -25
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: clarify
3
+ description: Comprehensive loopx clarify skill for requirements, boundaries, and design-ready specs.
4
+ ---
5
+
6
+ # loopx Clarify
7
+
8
+ <Purpose>
9
+ `clarify` is loopx's full pre-implementation clarification skill. It combines:
10
+
11
+ - the Socratic pressure and ambiguity control of `deep-interview`
12
+ - the design-shaping discipline of `brainstorming`
13
+
14
+ Its job is not just to ask questions. Its job is to turn a vague or overloaded request into a written clarify spec that is:
15
+
16
+ - explicit about intent
17
+ - explicit about non-goals and decision boundaries
18
+ - concrete enough to hand to `plan`
19
+ - structured enough that downstream execution does not re-discover the task from scratch
20
+ </Purpose>
21
+
22
+ <Use_When>
23
+ - The request is broad, ambiguous, or mixes problem, solution, and implementation detail.
24
+ - The user needs help defining scope, non-goals, acceptance criteria, or tradeoffs before planning.
25
+ - A design direction exists only implicitly and would otherwise be invented during implementation.
26
+ - The task will later be handed to `plan`, `build`, or `autopilot`, and you want a high-signal spec first.
27
+ </Use_When>
28
+
29
+ <Do_Not_Use_When>
30
+ - The task already has concrete file/symbol targets and clear acceptance criteria.
31
+ - A complete and approved spec/plan already exists for the same task.
32
+ - The user explicitly asks to skip clarification and execute immediately.
33
+ </Do_Not_Use_When>
34
+
35
+ <Why_This_Exists>
36
+ Most implementation drift happens before coding begins. Teams often think they need “more planning,” when the real problem is weaker intent clarity, hidden assumptions, fuzzy boundaries, or a design shape that was never made explicit. `clarify` exists to solve those upstream failures before `plan` or `build` magnifies them.
37
+ </Why_This_Exists>
38
+
39
+ <Core_Principles>
40
+ - Ask one question at a time.
41
+ - Prefer the highest-leverage unresolved question, not broad coverage.
42
+ - Keep digging on the same thread until one assumption, one boundary, or one tradeoff becomes clearer.
43
+ - Treat every answer as a claim to pressure-test, not a final truth to copy down.
44
+ - Make `Non-goals` and `Decision Boundaries` mandatory gates.
45
+ - Do not stop at “requirements”; shape the solution enough that the next stage has a coherent starting design.
46
+ </Core_Principles>
47
+
48
+ <Profiles>
49
+ - **Standard (`--standard`, default)**:
50
+ - default loopx clarify mode
51
+ - target threshold: `<= 0.20`
52
+ - max rounds: `15`
53
+ - **Deep (`--deep`)**:
54
+ - higher-rigor clarify mode with heavier pressure-testing and design shaping
55
+ - target threshold: `<= 0.10`
56
+ - max rounds: `25`
57
+
58
+ If no flag is provided, use **Standard**.
59
+ </Profiles>
60
+
61
+ <Runtime_State_Machine>
62
+ `clarify` must maintain these runtime fields in `.loopx/workflows/<slug>/state.json` and mirror them in the clarify spec frontmatter:
63
+
64
+ - `clarify_current_round` / `current_round`: starts at `0`; increments after each user-answer round.
65
+ - `clarify_ambiguity_score` / `ambiguity_score`: starts at `1`; must be `<= clarify_target_ambiguity_threshold` before handoff.
66
+ - `clarify_non_goals_resolved` / `non_goals_resolved`: `true` only after non-goals are explicit.
67
+ - `clarify_decision_boundaries_resolved` / `decision_boundaries_resolved`: `true` only after human-vs-agent decision boundaries are explicit.
68
+ - `clarify_pressure_pass_complete` / `pressure_pass_complete`: `true` only after at least one prior answer has been revisited with explicit pressure.
69
+
70
+ The `clarify -> plan` gate is blocked until all of the following are true:
71
+
72
+ - `unresolved_ambiguity_count` is `0`
73
+ - `clarify_current_round` is between `1` and `clarify_max_rounds`
74
+ - `clarify_ambiguity_score` is at or below the selected profile threshold
75
+ - non-goals are resolved
76
+ - decision boundaries are resolved
77
+ - pressure pass is complete
78
+
79
+ Do not mark a clarify spec handoff-ready by prose alone. Update the frontmatter fields so the runtime can enforce the same readiness decision.
80
+ </Runtime_State_Machine>
81
+
82
+ <Execution_Policy>
83
+ - Explore repo context before asking the user about internals.
84
+ - Prefer evidence-backed clarification in brownfield work:
85
+ - “I found X in Y. Should this clarify spec preserve that pattern?”
86
+ - Ask about intent and boundaries before implementation detail.
87
+ - Stay on the same thread when the answer is still weak instead of rotating dimensions just for coverage.
88
+ - Revisit at least one earlier answer with an explicit assumption, evidence, or tradeoff follow-up before crystallizing.
89
+ - If the task is too large for one coherent spec, decompose it before pretending it is ready.
90
+ - Keep user effort low: do not ask for facts that can be discovered directly.
91
+ </Execution_Policy>
92
+
93
+ <Dimensions>
94
+ - **Intent**: why the user wants this
95
+ - **Outcome**: what end state they actually want
96
+ - **Scope**: how far the change should go
97
+ - **Constraints**: what must remain true
98
+ - **Success Criteria**: how completion will be judged
99
+ - **Context**: how this fits the existing codebase (brownfield only)
100
+ </Dimensions>
101
+
102
+ <Pressure_Patterns>
103
+ When an answer is still weak, prefer one of these next:
104
+
105
+ 1. Ask for a concrete example or counterexample.
106
+ 2. Expose the hidden assumption that makes the answer true.
107
+ 3. Force a boundary:
108
+ - what should not happen
109
+ - what should be deferred
110
+ - what should be rejected
111
+ 4. If the answer is still describing symptoms, reframe toward root cause.
112
+ </Pressure_Patterns>
113
+
114
+ <Design_Shaping>
115
+ `clarify` should not stop at “what do you want?” Once the intent is understandable, it should also shape the task enough that the downstream plan is not starting from zero.
116
+
117
+ When there is a real design choice:
118
+
119
+ - propose 2-3 viable approaches
120
+ - lead with the recommended one
121
+ - explain tradeoffs briefly
122
+ - right-size the design to the task
123
+
124
+ The goal is not to produce a full architecture doc here. The goal is to make the clarify spec design-ready.
125
+ </Design_Shaping>
126
+
127
+ <Process>
128
+
129
+ ## 1. Explore Context
130
+
131
+ - Read relevant files, docs, and current patterns first.
132
+ - Classify the work as brownfield or greenfield.
133
+ - For brownfield work, collect concrete evidence before questioning.
134
+
135
+ ## 2. Interview
136
+
137
+ - Ask one question per round.
138
+ - After each answered round, update `current_round`, the ambiguity register, and `ambiguity_score`.
139
+ - Target the weakest unresolved dimension.
140
+ - Keep `Non-goals` and `Decision Boundaries` explicit from early in the process.
141
+ - Respect the selected profile:
142
+ - `standard`: stop only when the clarify spec is handoff-ready or `15` rounds are exhausted
143
+ - `deep`: stop only when the clarify spec is handoff-ready or `25` rounds are exhausted
144
+
145
+ ## 3. Pressure-Test
146
+
147
+ - Apply explicit follow-up pressure to at least one earlier answer.
148
+ - Set `pressure_pass_complete: true` only after the pressure follow-up is answered and reflected in the spec.
149
+ - Do not crystallize while assumptions are still hidden or boundaries are still fuzzy.
150
+ - In `deep`, expect more persistence on the same thread before moving on.
151
+
152
+ ## 4. Shape the Design
153
+
154
+ - Where needed, propose a small set of options.
155
+ - Recommend one approach.
156
+ - Clarify what that approach implies for scope and downstream execution.
157
+
158
+ ## 5. Write the Clarify Spec
159
+
160
+ Write the output to the loopx runtime namespace:
161
+
162
+ - `.loopx/specs/clarify-<slug>-<timestamp>.md`
163
+
164
+ The clarify spec should include:
165
+
166
+ - metadata
167
+ - runtime readiness frontmatter:
168
+ - `current_round`
169
+ - `ambiguity_score`
170
+ - `non_goals_resolved`
171
+ - `decision_boundaries_resolved`
172
+ - `pressure_pass_complete`
173
+ - `unresolved_ambiguity_count`
174
+ - intent
175
+ - desired outcome
176
+ - in-scope
177
+ - out-of-scope / non-goals
178
+ - decision boundaries
179
+ - constraints
180
+ - success criteria
181
+ - assumptions exposed and resolved
182
+ - brownfield evidence vs inference
183
+ - design direction / preferred approach
184
+ - explicit next handoff recommendation
185
+
186
+ ## 6. Handoff
187
+
188
+ After the clarify spec is ready:
189
+
190
+ - hand off to `plan` by default
191
+ - hand off to `build` only if the user explicitly wants direct execution and the task is already concrete enough
192
+ - hand off to `autopilot` only when the scope is sufficiently tight for a bounded end-to-end run
193
+
194
+ `clarify` itself does not implement the feature.
195
+
196
+ </Process>
197
+
198
+ <Readiness_Gates>
199
+ - `Non-goals` are explicit
200
+ - `Decision Boundaries` are explicit
201
+ - At least one pressure-pass follow-up has revisited an earlier answer
202
+ - A written clarify spec exists
203
+ - The task is small enough and clear enough for real downstream handoff
204
+ - The selected profile threshold is met:
205
+ - `standard`: weighted ambiguity `<= 0.20`
206
+ - `deep`: weighted ambiguity `<= 0.10`
207
+ </Readiness_Gates>
208
+
209
+ <Must_Not_Decide_Automatically>
210
+ - approval to move from clarify into plan
211
+ - implementation details that were never clarified or grounded
212
+ - widening the task because a broader redesign sounds cleaner
213
+ </Must_Not_Decide_Automatically>
214
+
215
+ <Output_Contract>
216
+ - primary artifact: a loopx clarify spec
217
+ - secondary artifact: an explicit ambiguity register and next-step recommendation
218
+ - preferred handoff: `plan`
219
+ </Output_Contract>