Execute
Execute the development of the active session.
# /session:execute
Execute the development of the active session.
**Aliases:** `/execute`
---
## Workflow Detection
**[MANDATORY]** Before executing, determine the workflow type:
1. Check session path:
- `stories/*` → STORY workflow
- `tasks/*` → TASK workflow
- No session files → TWEAK workflow
2. Read `progress.md` (if exists) for current phase
3. Adapt execution based on workflow type
---
## Syntax
/session:execute [--from-phase
---
## Behavior
Continues workflow execution from the current phase (or from a specific phase).
---
## Flow by Workflow
### TWEAK
Does not use /session:execute Development is direct without phases.
### TASK
/session:execute
- Read requirements.md
- Implement changes
- Call subagents if needed
- Validate
- Build passes?
- Tests pass?
- Update progress.md
- Ready for commit
### STORY
/session:execute
- Read progress.md (current phase)
- Execute next phase:
- Call corresponding subagent
- Wait for result
- Validate gate (if applicable)
- Update progress.md
- Repeat until complete or blocker
---
## Example: TASK
🚀 EXECUTING: improve-search
Reading requirements.md... ✓ 3 ACs defined
─────────────────────────────────────────
📋 EXECUTION PLAN
- Optimize query in SearchService
- Add index in DB
- Update tests
─────────────────────────────────────────
Starting implementation...
[backend-developer] Optimizing SearchService... ✓ Query optimized
[backend-developer] Verifying build... ✓ Build successful
─────────────────────────────────────────
📊 PROGRESS: 66%
- Optimize query
- Add index
- Update tests
Continue with tests? [Yes/Pause]
---
## Example: STORY
🚀 EXECUTING: new-products-entity
Session: stories/2026-01-11-new-products-entity Iteration: 02-scope-change
─────────────────────────────────────────
📊 CURRENT STATE
Completed phase: backend-validator [PASS] Current phase: api-tester
─────────────────────────────────────────
Starting Phase 9: api-tester...
[api-tester] Running API tests... ├─ POST /api/v1/products ✓ ├─ GET /api/v1/products ✓ ├─ GET /api/v1/products/:id ✓ ├─ PATCH /api/v1/products/:id ✓ └─ DELETE /api/v1/products/:id ✓
[api-tester] Result: 5/5 tests passed
─────────────────────────────────────────
✓ GATE PASSED: api-tester
Next phase: frontend-developer Continue? [Yes/Pause]
---
## Options
| Option | Description |
|--------|-------------|
| `--from-phase <phase>` | Start from specific phase |
| `--skip-gates` | Skip gate validation (not recommended) |
| `--dry-run` | Show what would be done without executing |
---
## Error Handling
### Failed Gate
❌ GATE FAILED: backend-validator
Errors found:
- TypeScript error in products.ts:45
- Test failing: products.test.ts
Options: [1] Call backend-developer to fix [2] Fix manually [3] Pause execution
### Blocker
🚫 BLOCKER DETECTED
The api-tester subagent reported: "API endpoint /products returns 500"
Options: [1] Create new iteration (blocked) [2] Call backend-developer [3] Pause and review manually
---
## Related Commands
| Command | Action |
|---------|--------|
| `/session:status` | View current state |
| `/session:scope-change` | If there's a scope change |
| `/session:close` | When finished |
Maintain Execute?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Execute on getagentictools](https://getagentictools.com/loops/nextspark-js-session-execute?ref=badge) npx agentictools info loops/nextspark-js-session-execute The second line is the CLI lookup for this page — handy in READMEs and docs.