Skip to content

My5t3r10us/cesizen / .agents/skills/apex

Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with optional parallel subagents, self-validation, and adversarial review. Use when implementing features, fixing bugs, or making code changes that benefit from structured workflow.

steps/step-00b-save.md

View on GitHub
---
name: step-00b-save
description: Setup save output structure for APEX workflow
returns_to: step-00-init.md
---

# Step 0b: Save Mode Setup

## MANDATORY EXECUTION RULES (READ FIRST):

- πŸ›‘ NEVER start analysis or implementation
- βœ… ALWAYS run the setup script to create output structure
- βœ… ALWAYS capture the generated `{task_id}` from the script output
- πŸ“‹ YOU ARE A SETUP MANAGER, not an implementer
- 🚫 FORBIDDEN to start any analysis work

## CONTEXT BOUNDARIES:

- Variables available: `{feature_name}`, `{task_description}`, all flag variables, `{branch_name}`
- This sub-step sets: `{task_id}`, `{output_dir}`
- Return to step-00-init.md after completion

## YOUR TASK:

Create the output directory structure and initialize all output files for the APEX workflow.

---

## OUTPUT STRUCTURE:

When save_mode is enabled, all outputs go to the PROJECT directory:

```
.claude/output/apex/{task-id}/
β”œβ”€β”€ 00-context.md        # Params, user request, timestamp
β”œβ”€β”€ 01-analyze.md        # Analysis findings
β”œβ”€β”€ 02-plan.md           # Implementation plan
β”œβ”€β”€ 03-execute.md        # Execution log
β”œβ”€β”€ 04-validate.md       # Validation results
β”œβ”€β”€ 02b-tasks/           # Task breakdown (if -k or -m)
β”‚   β”œβ”€β”€ README.md
β”‚   └── task-NN-*.md
β”œβ”€β”€ 05-examine.md        # Review findings (if -x)
β”œβ”€β”€ 06-resolve.md        # Resolution log (if -x)
β”œβ”€β”€ 07-tests.md          # Test analysis (if -t)
β”œβ”€β”€ 08-run-tests.md      # Test runner log (if -t)
β”œβ”€β”€ 10-verify.md         # Feature verification (if -v)
└── 09-finish.md         # PR creation (if -pr)
```

## EXECUTION SEQUENCE:

### 1. Run Template Setup Script

```bash
bash {skill_dir}/scripts/setup-templates.sh \
  "{feature_name}" \
  "{task_description}" \
  "{auto_mode}" \
  "{examine_mode}" \
  "{save_mode}" \
  "{test_mode}" \
  "{economy_mode}" \
  "{branch_mode}" \
  "{pr_mode}" \
  "{interactive_mode}" \
  "{tasks_mode}" \
  "{verify_mode}" \
  "{branch_name}" \
  "{original_input}"
```

**Note:** Pass `{feature_name}` (without number prefix), NOT `{task_id}`.

The script:
- Auto-generates `{task_id}` = `NN-{feature_name}` (next available number)
- Creates `.claude/output/apex/{task_id}/` directory
- Initializes `00-context.md` with configuration and progress table
- Pre-creates all step files from templates
- Only creates files for enabled steps (examine, tests, PR)
- Outputs the generated `{task_id}`

### 2. Capture Output Variables

From the script output, set:
- `{task_id}` = the generated ID (e.g., `01-add-auth-middleware`)
- `{output_dir}` = `.claude/output/apex/{task_id}`

### 3. Return

β†’ Return to step-00-init.md with `{task_id}` and `{output_dir}` set

---

## SAVE OUTPUT PATTERN (for all subsequent steps):

Each step uses this pattern:

1. `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "{step_num}" "{step_name}" "in_progress"`
2. Append findings/outputs to the pre-created step file
3. `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "{step_num}" "{step_name}" "complete"`

---

## SUCCESS METRICS:

βœ… Output directory created
βœ… `{task_id}` generated and captured
βœ… `{output_dir}` set
βœ… All template files initialized

## FAILURE MODES:

❌ Not capturing `{task_id}` from script output
❌ Starting analysis before returning

---

## RETURN:

After setup complete, return to `./step-00-init.md` to continue initialization.

<critical>
Remember: This sub-step ONLY creates the output structure. Return immediately after setting {task_id} and {output_dir}.
</critical>
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why β€” repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" β€” or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself β€” your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall