Recently Written · git

ideamine

An idea inbox for Claude Code: /idea saves ideas at zero tokens; Claude triages them and routes each to the cheapest model that can build it.

git clone https://github.com/equwal/ideamine

Log | Files | Refs


skills/pipeline/SKILL.md (6121 bytes)

1 ---
2 name: pipeline
3 description: Run the six-agent development pipeline (researcher → story-writer → project-manager → engineers → e2e-tester + validator) for a feature request. Use when the user invokes /pipeline or asks to build a feature "through the pipeline" or "with the agent system".
4 ---
5 
6 # Agent Pipeline Orchestration
7 
8 You (the main session) are the orchestrator. The project-manager agent plans but cannot
9 spawn agents — you dispatch every agent, pass artifacts between phases by file path, and
10 enforce the iteration cap. Do not do the phases' work yourself; delegate each to its agent.
11 
12 ## Setup
13 
14 1. The target project is the current working directory unless the user says otherwise.
15 2. Create `.pipeline/` and `.pipeline/reports/` in the target project. If the project is
16    a git repo and `.pipeline/` is not ignored, add it to `.git/info/exclude`.
17 3. Constants for this run: `MAX_ROUNDS = 3`. Artifacts:
18    - `.pipeline/research.md`, `.pipeline/storyboard.md`, `.pipeline/plan.md`
19    - `.pipeline/reports/engineer-<task>.md`, `.pipeline/reports/integration-<round>.md`,
20      `.pipeline/test-report.md`, `.pipeline/validation-report.md`
21 4. Parallel engineering uses git worktrees, which require a git repo. If the target is
22    not one, ask the user whether to `git init`; if declined, engineers run sequentially
23    in place, there is no integrator step, and checkpoints/rollback are unavailable.
24 
25 ## Phase 1 — Research
26 
27 Spawn `researcher` (run_in_background: false) with: project root, the user's request as
28 focus hint, and the research.md output path. On return, skim the report's Open Questions —
29 if any block understanding the user's request, ask the user now, before storyboarding.
30 
31 ## Phase 2 — Storyboard
32 
33 Spawn `story-writer` with: mode=write, the user's request verbatim, research.md path,
34 storyboard.md output path.
35 
36 **Gate 1:** present the storyboard's Intent section (including every chosen
37 interpretation) and a one-line-per-story list to the user, and get explicit approval
38 before Phase 3. If the user corrects an interpretation, send the story-writer back
39 (SendMessage) with the correction and re-run this gate.
40 
41 ## Phase 3 — Plan
42 
43 Spawn `project-manager` with: mode=plan, both artifact paths, plan.md output path,
44 iteration 1 of MAX_ROUNDS. On return, read plan.md yourself and check:
45 
46 - Escalations section empty? If not, resolve with the user before continuing.
47 - Do same-wave tasks declare heavy scope overlap (same core files)? Send the PM back
48   once to merge those tasks or sequence them with a dependency — light overlap is fine,
49   the integrator resolves it.
50 
51 **Gate 2:** present the plan summary (tasks, file scopes, waves, escalations) and get
52 explicit approval. This is the last checkpoint before any code changes.
53 
54 ## Phase 4 — Engineering (worktrees)
55 
56 Round setup (git repos only): require a clean working tree — if dirty, ask the user
57 (commit / stash / proceed without checkpoints). On round 1, record
58 `BASELINE_SHA = git rev-parse HEAD` and keep it for the whole run.
59 
60 For each wave in order:
61 
62 1. Per task: `git worktree add .pipeline/worktrees/<task> -b pipeline/<task>` (off
63    current HEAD).
64 2. Spawn one `engineer` per task — all in a single message so they run in parallel.
65    Each gets: task_id, its worktree path and branch, plan.md and research.md paths, and
66    its report path (in the main checkout's `.pipeline/reports/`).
67 3. Wait for the wave. If an engineer reports `blocked`, do not improvise a fix —
68    collect it for the replan, and skip any later-wave task that depends on it
69    (collect those too).
70 4. Spawn `integrator` with: the wave's branch list (plan order), the working branch
71    name, plan.md path, engineer report paths, and the integration report path. It
72    merges each branch into the working branch, resolves conflicts, repairs cross-task
73    API breaks, proves build/tests green, and removes merged worktrees and branches.
74 5. If the integrator escalates (conflict or API break needing redesign), stop
75    dispatching waves and go to Phase 6 with its report among the failures.
76 6. The next wave branches off the integrated HEAD.
77 
78 Non-git fallback: run the wave's engineers sequentially in the project directory and
79 skip the integrator.
80 
81 ## Phase 5 — Test + Validate (parallel)
82 
83 Spawn both in a single message:
84 
85 - `e2e-tester`: plan, storyboard, engineer + integration report paths, test-report.md
86   output path.
87 - `validator`: storyboard, research, plan, engineer report paths, BASELINE_SHA,
88   validation-report.md output path.
89 
90 ## Phase 6 — Verdict loop
91 
92 Read both reports (plus the integration report if it escalated).
93 
94 - **Both pass:** report to the user: what was built (from validator's Intent Coverage),
95   test verdict, artifact locations, checkpoint commits. Done.
96 - **Any failure and rounds remain:** spawn `project-manager` with mode=replan, the
97   failure reports, and iteration N+1. Its Failure Classification section routes the work:
98   - **Spec defects:** spawn `story-writer` with mode=revise (prior storyboard + failure
99     report paths), re-run Gate 1 for the changed stories, then have the PM plan against
100     the revised storyboard. Spec detours share MAX_ROUNDS — no extra counter.
101   - **Code defects:** repeat Phases 4–5 for the new plan (failed work only).
102 - **Failures at MAX_ROUNDS, or PM escalates:** stop. Present the user: what passed, what
103   failed (with the tester's reproductions), the PM's escalations, and options — including
104   rollback to a checkpoint (`git reset --hard`), which requires the user's explicit
105   consent and is never automatic.
106 
107 ## Rules
108 
109 - Every agent gets file paths, not pasted content — artifacts are the shared memory.
110 - Never skip a phase because it "seems unnecessary"; the user opted into the pipeline.
111 - No code changes before Gate 2 approval.
112 - Git ownership: engineers commit only on their own `pipeline/<task>` branch; the
113   integrator owns merges into the working branch; you make no commits beyond what this
114   skill describes. Plain commit messages, no co-author lines.
115 - Between phases, give the user a one-line status (phase done, headline finding).