Loading...
Loading...
Writes agent outputs to numbered thread stage files. Called by agents after domain work completes. Maps agent type to stages, updates frontmatter status, and records completion metadata. Stage 1 (1-input.md) is never written by this skill.
npx skill4agent add bellabe/lean-os sys-executing-threadsthreads/{domain}/{thread-name}/
├── 1-input.md # Goal context (written by sys-activating-goals, NEVER by this skill)
├── 2-hypothesis.md # Approach, assumptions, expected outcomes
├── 3-implication.md # If hypothesis true, what follows
├── 4-decision.md # Chosen course of action
├── 5-actions.md # Execution steps and status
└── 6-learning.md # Outcomes, insights, improvements| Type | Stages Written | Agents |
|---|---|---|
| planning | 2, 3, 4 | mkt-strategist, sls-strategist |
| execution | 5, 6 | mkt-campaign-manager, sls-outbound-manager, cst-advocacy-manager |
| spec | 2, 3, 4, 5 | prd-engineer, prd-growth-engineer |
| full-cycle | 2, 3, 4, 5, 6 | ops-manager |
| lifecycle | 2, 4, 5, 6 | cst-success-manager, cst-expansion-manager, cst-retention-manager |
| content | 2, 5 | mkt-content-manager, sls-enablement-manager |
| inbound | 2, 3, 5 | mkt-inbound-manager |
| partnership | 2, 4, 5, 6 | sls-partner-manager |
thread_path: threads/{domain}/{thread-name}
agent_name: {agent that produced the output}
agent_type: planning | execution | spec | full-cycle | lifecycle | content | inbound | partnership
outputs:
hypothesis: | # Stage 2 content (if in agent's stages)
...
implication: | # Stage 3 content
...
decision: | # Stage 4 content
...
actions: | # Stage 5 content
...
learning: | # Stage 6 content
...1. Confirm thread_path exists
2. Confirm 1-input.md exists (thread was properly activated)
3. Read 1-input.md frontmatter for thread_id and goal_id1. Look up agent_type in mapping table
2. Get list of stage numbers to write
3. Confirm agent provided content for each stage1. Create stage file with frontmatter:
- status: completed
- completed_by: {agent_name}
- completed_at: {YYYY-MM-DD}
2. Write agent output as file body
3. Save file1. Confirm all mapped stages have status: completed
2. Return summary of stages written---
status: completed
completed_by: mkt-strategist
completed_at: 2026-02-01
---4-decision.md---
status: completed
decided_by: mkt-strategist
decided_at: 2026-02-01
---5-actions.md---
status: completed
started_at: 2026-02-01
completed_at: 2026-02-01
---execution_summary:
thread_path: threads/{domain}/{thread-name}
agent: {agent_name}
type: {agent_type}
stages_written: [2, 3, 4] # example for planning type
completed_at: 2026-02-01
status: all_stages_written | partialsys-activating-goalssys-tracking-goals6-learning.md1-input.md