aiblueprint-cli 1.4.99 → 1.4.100

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 (96) hide show
  1. package/agents-config/skills/agents-manager/SKILL.md +2 -2
  2. package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
  3. package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
  4. package/agents-config/skills/apex/SKILL.md +120 -118
  5. package/agents-config/skills/apex/agents/openai.yaml +10 -0
  6. package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
  7. package/agents-config/skills/apex/scripts/apex-state.py +740 -0
  8. package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
  9. package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
  10. package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
  11. package/agents-config/skills/apex/steps/step-00-init.md +85 -231
  12. package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
  13. package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
  14. package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
  15. package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
  16. package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
  17. package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
  18. package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
  19. package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
  20. package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
  21. package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
  22. package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
  23. package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
  24. package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
  25. package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
  26. package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
  27. package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
  28. package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
  29. package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
  30. package/agents-config/skills/commit/agents/openai.yaml +10 -0
  31. package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
  32. package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
  33. package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
  34. package/agents-config/skills/environments-manager/SKILL.md +1 -1
  35. package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
  36. package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
  37. package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
  38. package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
  39. package/agents-config/skills/environments-manager/references/claude.md +1 -1
  40. package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
  41. package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
  42. package/agents-config/skills/grill-me/SKILL.md +25 -4
  43. package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
  44. package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
  45. package/agents-config/skills/hooks-manager/SKILL.md +19 -9
  46. package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
  47. package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
  48. package/agents-config/skills/hooks-manager/references/codex.md +23 -0
  49. package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
  50. package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
  51. package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
  52. package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
  53. package/agents-config/skills/hooks-manager/references/router.md +32 -0
  54. package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
  55. package/agents-config/skills/merge/agents/openai.yaml +10 -0
  56. package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
  57. package/agents-config/skills/oneshot/SKILL.md +4 -0
  58. package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
  59. package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
  60. package/agents-config/skills/prompt-creator/agents/openai.yaml +7 -0
  61. package/agents-config/skills/prompt-creator/assets/codex-icon.svg +16 -0
  62. package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
  63. package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
  64. package/agents-config/skills/skill-manager/SKILL.md +45 -3
  65. package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
  66. package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
  67. package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
  68. package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
  69. package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
  70. package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
  71. package/agents-config/skills/use-artifacts/SKILL.md +102 -51
  72. package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
  73. package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
  74. package/agents-config/skills/use-delegate/SKILL.md +4 -0
  75. package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
  76. package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
  77. package/agents-config/skills/use-goal/SKILL.md +70 -9
  78. package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
  79. package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
  80. package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
  81. package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
  82. package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
  83. package/package.json +1 -1
  84. package/agents-config/skills/apex/templates/00-context.md +0 -55
  85. package/agents-config/skills/apex/templates/01-analyze.md +0 -10
  86. package/agents-config/skills/apex/templates/02-plan.md +0 -10
  87. package/agents-config/skills/apex/templates/03-execute.md +0 -10
  88. package/agents-config/skills/apex/templates/04-validate.md +0 -10
  89. package/agents-config/skills/apex/templates/05-examine.md +0 -10
  90. package/agents-config/skills/apex/templates/06-resolve.md +0 -10
  91. package/agents-config/skills/apex/templates/07-tests.md +0 -10
  92. package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
  93. package/agents-config/skills/apex/templates/09-finish.md +0 -10
  94. package/agents-config/skills/apex/templates/10-verify.md +0 -9
  95. package/agents-config/skills/apex/templates/README.md +0 -195
  96. package/agents-config/skills/apex/templates/step-complete.md +0 -7
@@ -1,247 +1,20 @@
1
1
  ---
2
2
  name: step-00b-economy
3
- description: Economy mode overrides - no subagents, direct tool usage to save tokens
4
- load_condition: economy_mode = true
3
+ description: Apply a low-budget APEX policy without weakening safety, scope control, or minimum evidence.
5
4
  ---
6
5
 
7
- # Economy Mode Overrides
6
+ # Low-budget policy
8
7
 
9
- **This file is ONLY loaded when `-e` or `--economy` flag is active.**
8
+ `-e` sets `{budget_policy}` to `low`.
10
9
 
11
- These instructions OVERRIDE the default behavior in all steps to save tokens by avoiding subagent launches.
10
+ - Keep analysis narrow: inspect the most relevant files and commands first.
11
+ - Prefer the main agent for tightly coupled work.
12
+ - Use at most one subagent at a time, and only when separate context avoids greater cost or provides independent review.
13
+ - Prefer targeted checks before broad suites; run broader checks when risk or project rules require them.
14
+ - Summarize large outputs into artifacts and keep only decisive evidence in context.
15
+ - Use the harness-selected model unless a cheaper role-specific route is available and adequate.
16
+ - Stop expanding exploration after the task contract is supported by sufficient evidence.
12
17
 
13
- ---
14
-
15
- <why_economy_mode>
16
- **Purpose:** Reduce token usage for users with limited Claude Code plans.
17
-
18
- **Trade-offs:**
19
- - ✅ Uses ~70% fewer tokens
20
- - ✅ Faster execution (no agent overhead)
21
- - ⚠️ Less thorough exploration
22
- - ⚠️ No parallel research
23
- - ⚠️ May miss some context
24
-
25
- **When to use:**
26
- - Limited monthly token budget
27
- - Simple, well-defined tasks
28
- - Familiar codebase
29
- - Quick fixes or small features
30
- </why_economy_mode>
31
-
32
- ---
33
-
34
- <override_rules>
35
-
36
- ## CRITICAL: Apply These Overrides to ALL Steps
37
-
38
- **When `{economy_mode}` = true, these rules OVERRIDE the default instructions:**
39
-
40
- ---
41
-
42
- ### Override 1: No Subagent Launches
43
-
44
- **DEFAULT behavior (when economy_mode = false):**
45
- ```
46
- Launch parallel agents:
47
- - Agent 1: explore-codebase
48
- - Agent 2: explore-docs
49
- - Agent 3: websearch
50
- ```
51
-
52
- **ECONOMY behavior (when economy_mode = true):**
53
- ```
54
- Use direct tools instead:
55
- - Glob to find files
56
- - Grep to search content
57
- - Read to examine files
58
- - find-docs only if current technical docs are necessary
59
- - exa-search only if broader online research is necessary
60
- ```
61
-
62
- **NEVER launch sub-agents in economy mode.**
63
-
64
- ---
65
-
66
- ### Override 2: Direct Tool Usage Pattern
67
-
68
- Instead of launching exploration agents, use this pattern:
69
-
70
- ```
71
- 1. Glob to find relevant files:
72
- - Glob: "**/*auth*" or "**/*{keyword}*"
73
- - Glob: "src/**/*.ts" for specific areas
74
-
75
- 2. Grep to find specific code:
76
- - Grep: "function login" or "class Auth"
77
- - Grep: pattern in specific directory
78
-
79
- 3. Read to examine found files:
80
- - Read the most relevant 3-5 files
81
- - Focus on files matching the task
82
-
83
- 4. Online research ONLY if:
84
- - Library documentation needed
85
- - Unknown API or pattern
86
- - Limit to 1-2 searches max
87
- - Use /Users/melvynx/.agents/skills/find-docs/SKILL.md for technical docs
88
- - Use /Users/melvynx/.agents/skills/exa-search/SKILL.md for broader web research
89
- ```
90
-
91
- ---
92
-
93
- ### Override 3: Reduced Exploration Scope
94
-
95
- **DEFAULT:** Explore comprehensively, find all related code
96
- **ECONOMY:** Focus on most likely locations only
97
-
98
- ```
99
- Economy exploration strategy:
100
- 1. Start with obvious paths (src/auth/, src/api/, etc.)
101
- 2. Search for exact keywords from task
102
- 3. Read only files directly related to task
103
- 4. Skip "nice to have" context
104
- 5. Stop exploring when you have enough to proceed
105
- ```
106
-
107
- ---
108
-
109
- ### Override 4: Skip Optional Steps
110
-
111
- **In economy mode, skip or minimize:**
112
- - Extensive documentation research (use existing knowledge)
113
- - Web searches for common patterns (use best practices you know)
114
- - Multiple rounds of exploration (one round is enough)
115
- - Deep pattern analysis (quick scan is sufficient)
116
-
117
- **Always do:**
118
- - Find the files to modify
119
- - Understand existing patterns (quick read)
120
- - Identify dependencies
121
- - Create the plan
122
-
123
- ---
124
-
125
- ### Override 5: Leaner Validation
126
-
127
- **DEFAULT:** Launch code-reviewer agent for adversarial review
128
- **ECONOMY:** Self-review without subagent
129
-
130
- ```
131
- Economy validation:
132
- 1. Run typecheck and lint (required)
133
- 2. Run affected tests (required)
134
- 3. Quick self-review checklist:
135
- - [ ] No obvious bugs
136
- - [ ] Follows existing patterns
137
- - [ ] Error handling present
138
- - [ ] No security issues
139
- 4. Skip adversarial review agent
140
- ```
141
-
142
- ---
143
-
144
- ### Override 6: Test Mode Adjustments
145
-
146
- **If both `{economy_mode}` and `{test_mode}` are true:**
147
-
148
- ```
149
- Economy test strategy:
150
- 1. Analyze tests with Glob + Grep (not explore-codebase agent)
151
- 2. Read 1-2 similar test files for patterns
152
- 3. Create essential tests only:
153
- - 1 happy path test
154
- - 1 error case test
155
- - Skip edge cases unless critical
156
- 4. Run tests directly (no agent)
157
- ```
158
-
159
- </override_rules>
160
-
161
- ---
162
-
163
- <step_specific_overrides>
164
-
165
- ## Step-by-Step Economy Overrides
166
-
167
- ### Step 01: Analyze (Economy)
168
- ```
169
- INSTEAD OF: 3 parallel exploration agents
170
- DO:
171
- 1. Glob "**/*{keyword}*" for task-related files
172
- 2. Grep for specific patterns in src/
173
- 3. Read top 3-5 most relevant files
174
- 4. Skip online research unless stuck. If needed, use find-docs for technical docs and exa-search for broader web research.
175
- ```
176
-
177
- ### Step 02: Plan (Economy)
178
- ```
179
- Same as default - planning doesn't use agents
180
- ```
181
-
182
- ### Step 03: Execute (Economy)
183
- ```
184
- Same as default - execution doesn't use agents
185
- ```
186
-
187
- ### Step 04: Validate (Economy)
188
- ```
189
- INSTEAD OF: Comprehensive validation
190
- DO:
191
- 1. Run typecheck + lint
192
- 2. Run only affected tests
193
- 3. Quick manual review
194
- 4. Skip coverage analysis
195
- ```
196
-
197
- ### Step 05: Examine (Economy)
198
- ```
199
- INSTEAD OF: code-reviewer agent
200
- DO:
201
- 1. Self-review with checklist:
202
- - Security: no injection, no secrets
203
- - Logic: handles errors, edge cases
204
- - Quality: follows patterns, readable
205
- 2. Note any concerns
206
- 3. Move to resolve if issues found
207
- ```
208
-
209
- ### Step 07: Tests (Economy)
210
- ```
211
- INSTEAD OF: Deep test analysis with agents
212
- DO:
213
- 1. Glob for existing test files
214
- 2. Read 1 similar test file
215
- 3. Create minimal test coverage
216
- 4. Focus on critical paths only
217
- ```
218
-
219
- ### Step 08: Run Tests (Economy)
220
- ```
221
- Same as default - test running doesn't use agents
222
- ```
223
-
224
- </step_specific_overrides>
225
-
226
- ---
227
-
228
- <economy_indicator>
229
- **When economy mode is active, start each step with:**
230
-
231
- ```
232
- ⚡ ECONOMY MODE - Using direct tools, no subagents
233
- ```
234
-
235
- This reminds both Claude and the user that economy mode is active.
236
- </economy_indicator>
237
-
238
- ---
18
+ Low budget never relaxes authority, secret handling, destructive-action boundaries, introduced-regression handling, or required proof.
239
19
 
240
- <success_metrics>
241
- Economy mode is successful when:
242
- - No sub-agent launches
243
- - Direct Glob/Grep/Read usage instead
244
- - Fewer than 3 WebSearch calls total
245
- - Implementation still correct and working
246
- - Tests pass (if test_mode enabled)
247
- </success_metrics>
20
+ Set `{budget_policy}=low` and `{budget_applied}=true`, then return to `step-00-init.md`.
@@ -1,170 +1,21 @@
1
1
  ---
2
2
  name: step-00b-interactive
3
- description: Interactively configure APEX workflow flags
4
- returns_to: step-00-init.md
3
+ description: Configure APEX intent policies interactively when the user requests the menu.
5
4
  ---
6
5
 
7
- # Step 0b: Interactive Configuration
6
+ # Interactive policy configuration
8
7
 
9
- ## MANDATORY EXECUTION RULES (READ FIRST):
8
+ Show the current policy values, then ask only about policies the user wants to change:
10
9
 
11
- - 🛑 NEVER skip the interactive menu
12
- - 🛑 NEVER assume user preferences
13
- - ✅ ALWAYS use AskUserQuestion for flag selection
14
- - ✅ ALWAYS update all flag variables before returning
15
- - 📋 YOU ARE A CONFIGURATOR, not an implementer
16
- - 💬 FOCUS on flag configuration only
17
- - 🚫 FORBIDDEN to start any workflow steps
10
+ - interaction: `standard` or `low`;
11
+ - review: `risk-based` or `adversarial`;
12
+ - artifacts: `minimal` or `verbose`;
13
+ - test authoring: `risk-based`, `on`, or `off`;
14
+ - proof: `risk-based` or `runtime`;
15
+ - budget: `low` or `standard`;
16
+ - orchestration: `auto`, `prefer-parallel`, or `direct`;
17
+ - delivery: branch and pull-request requests.
18
18
 
19
- ## CONTEXT BOUNDARIES:
19
+ Explain that implementation autonomy does not silently authorize unrelated Git, deployment, provider, or communication actions.
20
20
 
21
- - Variables available: All current flag values from step-00-init
22
- - This sub-step updates: All flag variables based on user selection
23
- - Return to step-00-init.md after completion
24
-
25
- ## YOUR TASK:
26
-
27
- Present an interactive menu for the user to enable/disable workflow flags.
28
-
29
- ---
30
-
31
- ## EXECUTION SEQUENCE:
32
-
33
- ### 1. Display Current Configuration
34
-
35
- Show current flag values:
36
- ```
37
- **Current APEX Configuration:**
38
-
39
- | Flag | Status | Description |
40
- |------|--------|-------------|
41
- | Auto (`-a`) | {auto_mode ? "✓ ON" : "✗ OFF"} | Skip confirmations |
42
- | Examine (`-x`) | {examine_mode ? "✓ ON" : "✗ OFF"} | Adversarial review |
43
- | Save (`-s`) | {save_mode ? "✓ ON" : "✗ OFF"} | Save outputs to files |
44
- | Test (`-t`) | {test_mode ? "✓ ON" : "✗ OFF"} | Include test steps |
45
- | Verify (`-v`) | {verify_mode ? "✓ ON" : "✗ OFF"} | Launch & verify feature |
46
- | Economy (`-e`) | {economy_mode ? "✓ ON" : "✗ OFF"} | No subagents |
47
- | Branch (`-b`) | {branch_mode ? "✓ ON" : "✗ OFF"} | Verify/create branch |
48
- | PR (`-pr`) | {pr_mode ? "✓ ON" : "✗ OFF"} | Create pull request |
49
- | Teams (`-m`) | {teams_mode ? "✓ ON" : "✗ OFF"} | Agent Teams parallel execution |
50
- ```
51
-
52
- ### 2. Ask for Flag Changes
53
-
54
- Use AskUserQuestion with multiSelect:
55
- ```yaml
56
- questions:
57
- - header: "Configure"
58
- question: "Select flags to TOGGLE (currently shown flags will flip their state):"
59
- options:
60
- - label: "Auto mode"
61
- description: "{auto_mode ? 'Disable' : 'Enable'} - skip confirmations"
62
- - label: "Examine mode"
63
- description: "{examine_mode ? 'Disable' : 'Enable'} - adversarial review at end"
64
- - label: "Save mode"
65
- description: "{save_mode ? 'Disable' : 'Enable'} - save outputs to .claude/output/"
66
- - label: "Test mode"
67
- description: "{test_mode ? 'Disable' : 'Enable'} - include test creation/runner"
68
- - label: "Verify mode"
69
- description: "{verify_mode ? 'Disable' : 'Enable'} - launch app and verify feature works"
70
- multiSelect: true
71
- ```
72
-
73
- ### 3. Ask for Additional Flags
74
-
75
- Use AskUserQuestion with multiSelect:
76
- ```yaml
77
- questions:
78
- - header: "More"
79
- question: "Select additional flags to TOGGLE:"
80
- options:
81
- - label: "Economy mode"
82
- description: "{economy_mode ? 'Disable' : 'Enable'} - no subagents, save tokens"
83
- - label: "Branch mode"
84
- description: "{branch_mode ? 'Disable' : 'Enable'} - verify/create git branch"
85
- - label: "PR mode"
86
- description: "{pr_mode ? 'Disable' : 'Enable'} - create pull request at end"
87
- - label: "Teams mode"
88
- description: "{teams_mode ? 'Disable' : 'Enable'} - Agent Teams parallel execution"
89
- - label: "Done - keep current"
90
- description: "No more changes, proceed with workflow"
91
- multiSelect: true
92
- ```
93
-
94
- ### 4. Apply Changes
95
-
96
- For each selected flag, toggle its value:
97
- ```
98
- IF "Auto mode" selected → {auto_mode} = !{auto_mode}
99
- IF "Examine mode" selected → {examine_mode} = !{examine_mode}
100
- IF "Save mode" selected → {save_mode} = !{save_mode}
101
- IF "Test mode" selected → {test_mode} = !{test_mode}
102
- IF "Verify mode" selected → {verify_mode} = !{verify_mode}
103
- IF "Economy mode" selected → {economy_mode} = !{economy_mode}
104
- IF "Branch mode" selected → {branch_mode} = !{branch_mode}
105
- IF "PR mode" selected → {pr_mode} = !{pr_mode}
106
- IF "Teams mode" selected → {teams_mode} = !{teams_mode}
107
- ```
108
-
109
- **Special rules:**
110
-
111
- If Teams mode enabled, auto-enable tasks mode (teams requires task breakdown):
112
- ```
113
- IF {teams_mode} = true → {tasks_mode} = true
114
- ```
115
-
116
- If PR mode enabled, auto-enable branch mode:
117
- ```
118
- IF {pr_mode} = true → {branch_mode} = true
119
- ```
120
-
121
- ### 5. Show Final Configuration
122
-
123
- Display updated configuration:
124
- ```
125
- **Updated APEX Configuration:**
126
-
127
- | Flag | Status |
128
- |------|--------|
129
- | Auto | {auto_mode ? "✓ ON" : "✗ OFF"} |
130
- | Examine | {examine_mode ? "✓ ON" : "✗ OFF"} |
131
- | Save | {save_mode ? "✓ ON" : "✗ OFF"} |
132
- | Test | {test_mode ? "✓ ON" : "✗ OFF"} |
133
- | Verify | {verify_mode ? "✓ ON" : "✗ OFF"} |
134
- | Economy | {economy_mode ? "✓ ON" : "✗ OFF"} |
135
- | Branch | {branch_mode ? "✓ ON" : "✗ OFF"} |
136
- | PR | {pr_mode ? "✓ ON" : "✗ OFF"} |
137
- | Teams | {teams_mode ? "✓ ON" : "✗ OFF"} |
138
- ```
139
-
140
- ### 6. Return
141
-
142
- → Return to step-00-init.md with all flags updated
143
-
144
- ---
145
-
146
- ## SUCCESS METRICS:
147
-
148
- ✅ Current configuration displayed
149
- ✅ User able to toggle any flag
150
- ✅ All selected flags properly toggled
151
- ✅ PR mode auto-enables branch mode
152
- ✅ Final configuration shown
153
-
154
- ## FAILURE MODES:
155
-
156
- ❌ Not showing current flag states
157
- ❌ Forgetting to toggle selected flags
158
- ❌ Not enabling branch_mode when pr_mode selected
159
- ❌ Starting workflow instead of returning
160
- ❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
161
-
162
- ---
163
-
164
- ## RETURN:
165
-
166
- After configuration complete, return to `./step-00-init.md` to continue initialization.
167
-
168
- <critical>
169
- Remember: This sub-step ONLY handles flag configuration. Return immediately after updating flags.
170
- </critical>
21
+ Apply the selected policies, set `{interactive_applied}=true`, and return to `step-00-init.md` for the remaining policy routes.
@@ -1,125 +1,24 @@
1
1
  ---
2
2
  name: step-00b-save
3
- description: Setup save output structure for APEX workflow
4
- returns_to: step-00-init.md
3
+ description: Configure APEX artifact detail while preserving the always-on minimal run record.
5
4
  ---
6
5
 
7
- # Step 0b: Save Mode Setup
6
+ # Artifact policy
8
7
 
9
- ## MANDATORY EXECUTION RULES (READ FIRST):
8
+ Minimal machine-readable state is always written under `.agents/apex/runs/<run-id>/`.
10
9
 
11
- - 🛑 NEVER start analysis or implementation
12
- - ✅ ALWAYS run the setup script to create output structure
13
- - ✅ ALWAYS capture the generated `{task_id}` from the script output
14
- - 📋 YOU ARE A SETUP MANAGER, not an implementer
15
- - 🚫 FORBIDDEN to start any analysis work
10
+ With `-s`, set `{artifact_policy}=verbose` and additionally preserve useful human-readable analysis, plans, command summaries, review findings, and proof galleries in `{run_dir}/artifacts/`.
16
11
 
17
- ## CONTEXT BOUNDARIES:
12
+ Without `-s`, keep `{artifact_policy}=minimal`: write only the run state, event log, checkpoints, task graph, evidence index, and artifacts required to support claims.
18
13
 
19
- - Variables available: `{feature_name}`, `{task_description}`, all flag variables, `{branch_name}`
20
- - This sub-step sets: `{task_id}`, `{output_dir}`
21
- - Return to step-00-init.md after completion
14
+ For every artifact, record:
22
15
 
23
- ## YOUR TASK:
16
+ - stable ID and type;
17
+ - producing phase or task;
18
+ - repository revision and environment;
19
+ - timestamp and relative path;
20
+ - whether a later change invalidated it.
24
21
 
25
- Create the output directory structure and initialize all output files for the APEX workflow.
22
+ Never copy secrets, credentials, full environment files, or unnecessary personal data into artifacts.
26
23
 
27
- ---
28
-
29
- ## OUTPUT STRUCTURE:
30
-
31
- When save_mode is enabled, all outputs go to the PROJECT directory:
32
-
33
- ```
34
- .claude/output/apex/{task-id}/
35
- ├── 00-context.md # Params, user request, timestamp
36
- ├── 01-analyze.md # Analysis findings
37
- ├── 02-plan.md # Implementation plan
38
- ├── 03-execute.md # Execution log
39
- ├── 04-validate.md # Validation results
40
- ├── 02b-tasks/ # Task breakdown (if -k or -m)
41
- │ ├── README.md
42
- │ └── task-NN-*.md
43
- ├── 05-examine.md # Review findings (if -x)
44
- ├── 06-resolve.md # Resolution log (if -x)
45
- ├── 07-tests.md # Test analysis (if -t)
46
- ├── 08-run-tests.md # Test runner log (if -t)
47
- ├── 10-verify.md # Feature verification (if -v)
48
- └── 09-finish.md # PR creation (if -pr)
49
- ```
50
-
51
- ## EXECUTION SEQUENCE:
52
-
53
- ### 1. Run Template Setup Script
54
-
55
- ```bash
56
- bash {skill_dir}/scripts/setup-templates.sh \
57
- "{feature_name}" \
58
- "{task_description}" \
59
- "{auto_mode}" \
60
- "{examine_mode}" \
61
- "{save_mode}" \
62
- "{test_mode}" \
63
- "{economy_mode}" \
64
- "{branch_mode}" \
65
- "{pr_mode}" \
66
- "{interactive_mode}" \
67
- "{tasks_mode}" \
68
- "{verify_mode}" \
69
- "{branch_name}" \
70
- "{original_input}"
71
- ```
72
-
73
- **Note:** Pass `{feature_name}` (without number prefix), NOT `{task_id}`.
74
-
75
- The script:
76
- - Auto-generates `{task_id}` = `NN-{feature_name}` (next available number)
77
- - Creates `.claude/output/apex/{task_id}/` directory
78
- - Initializes `00-context.md` with configuration and progress table
79
- - Pre-creates all step files from templates
80
- - Only creates files for enabled steps (examine, tests, PR)
81
- - Outputs the generated `{task_id}`
82
-
83
- ### 2. Capture Output Variables
84
-
85
- From the script output, set:
86
- - `{task_id}` = the generated ID (e.g., `01-add-auth-middleware`)
87
- - `{output_dir}` = `.claude/output/apex/{task_id}`
88
-
89
- ### 3. Return
90
-
91
- → Return to step-00-init.md with `{task_id}` and `{output_dir}` set
92
-
93
- ---
94
-
95
- ## SAVE OUTPUT PATTERN (for all subsequent steps):
96
-
97
- Each step uses this pattern:
98
-
99
- 1. `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "{step_num}" "{step_name}" "in_progress"`
100
- 2. Append findings/outputs to the pre-created step file
101
- 3. `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "{step_num}" "{step_name}" "complete"`
102
-
103
- ---
104
-
105
- ## SUCCESS METRICS:
106
-
107
- ✅ Output directory created
108
- ✅ `{task_id}` generated and captured
109
- ✅ `{output_dir}` set
110
- ✅ All template files initialized
111
-
112
- ## FAILURE MODES:
113
-
114
- ❌ Not capturing `{task_id}` from script output
115
- ❌ Starting analysis before returning
116
-
117
- ---
118
-
119
- ## RETURN:
120
-
121
- After setup complete, return to `./step-00-init.md` to continue initialization.
122
-
123
- <critical>
124
- Remember: This sub-step ONLY creates the output structure. Return immediately after setting {task_id} and {output_dir}.
125
- </critical>
24
+ Set `{artifact_applied}=true` and return to `step-00-init.md`.