用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/guangzan/monorail --skill rail-build命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Ask which rail skill or flow fits. Router over the rail pack.
Configure a repo for rail skills — all docs under docs/monorail/ (work tracker + domain). Run once per repo before other rail engineering skills.
Align on a plan or design — light grilling with domain docs by default; map mode for foggy multi-session efforts. Light mode writes docs/monorail/<slug>/align.md then auto-continues the planning chain (spec → slice).
正在显示 SKILL.md
| name | rail-build |
| description | Implement docs/monorail tasks serially in one session — drive rail-tdd at agreed seams, then commit. |
| disable-model-invocation | true |
Implement tasks from docs/monorail/<feature>/tasks/. One session, serial run: after a task goes green, continue to the next frontier task in the same session — no fresh session, no check-ins or questions between tasks. Defaults: run to queue-clear, one commit per task on the current branch. The skill never asks about run length or commit policy — the user states any deviation (review pause, no-commit, narrower run) in their command and the agent honors it.
If docs/monorail/work-tracker.md is missing, tell the user to run /rail-setup and stop.
spec.md. If spec.md is missing, stop and suggest /rail-spec. Confirm blockers are done (blocker tasks show Status: done). If the task shows Status: claimed but its ## Comments has no matching Run <date>: start line (a stale claim from a crashed run), recover it: revert to Status: open with a ## Comments note before working — a stale claimed silently blocks the frontier./rail-slice re-split or /rail-align — do not hard-code a giant task.Status: claimed on the task file before coding.## Testing Decisions: the scout's job is to confirm those seams hold against the code, not to re-derive or re-ask. If scout contradicts the spec (a seam is missing, wrong, or overlaps unlisted code), do not re-derive seams and do not keep coding — stop per §4 and report; otherwise proceed on the spec's seams. If dispatch is delayed until the orchestrator context is heavy, write the synthesis to a scratch note so the implementer brief is not degraded./rail-tdd at the task's Seams: line (set at slice time from the spec's code-anchored ## Testing Decisions). Do not start TDD until scout has returned (or the sequential fallback finished).Status: done when the task's behaviour is covered (TDD complete at the task's Seams:) and typecheck / relevant tests are green — and append the done-gate block under ## Comments (see §3.2). Do not run /rail-review as part of build — review is opt-in (see /rail-review).## User Stories entry in spec.md is covered by a done task (or explicitly out of scope) — report any uncovered story instead of claiming the queue is clear — then say the feature's implementation queue is clear (human decides merge/ship; a new feature starts at /rail-align).Frontier (implementation): Status: open, every listed blocker is Status: done, not claimed; lowest NN wins (see docs/monorail/work-tracker.md).
Never run two tasks in the same working tree concurrently — serial runs are strictly sequential. For actual parallelism use worktrees (Parallel builds below).
The default is one prolonged session: green tasks keep coming — one working tree, one commit per task, no new sessions. A serial run is throughput, not parallelism; parallel execution still requires worktrees (next section).
A serial run is the default once build starts — ask nothing: no up-front question about run length or commit policy, no check-ins mid-run. Run to queue-clear and one commit per task are the defaults; the user can narrow or override them anytime ("just this task", "stop after task k", "don't commit", "pause between tasks") — honor that statement, never prompt for it.
Fit check (before the run):
spec.md) so one scout + one seam confirmation covers the runBlocked by edges, not by NN.Seams: line was set at slice time from the spec's ## Testing Decisions (code-anchored and confirmed at spec time); the scout re-verifies them against the code. No seam questions mid-run — a scout contradiction stops the run per §4.Claim each task (Status: claimed) before coding. In a serial run the claim rides in that task's single commit — no separate claim commits. Parallel builds commit claim edits before forking worktrees (see below).
Under each task's ## Comments, append Run <date>: start — <base commit>; when the task is done, append a done-gate block:
done — <commits>
- seams used: <from the task's `Seams:`>
- typecheck: green
- relevant tests: green (which)
- acceptance criteria: met (or itemised open gaps)
These lines are the resume map after /rail-pass or a crash, and they make Status: done audit-able — a done with no done-gate block is not credible. A claimed task with no matching Run … start line is a stale claim; recover it to open (Process §1).
For each task in order:
spec.md, What to build, Acceptance criteria, the task's Seams: line (and Touchpoints: if present) pasted in full, and "TDD at these seams — red before green; do not touch other tasks' files; read-only on the tracker". If the harness cannot spawn sub-agents, implement the task yourself — sequentially. Never dispatch two implementers on the same tree. For a trivial task, implement it inline in the main session — no sub-agent overhead.Status: done, append the done-gate block, commit that task, continue. Never pause between tasks to ask "continue?" — the run is the go-ahead; the only stop between tasks is a review pause the user requested in their command.done on red.claimed with a ## Comments note (or revert to open), stop, suggest /rail-debug. Completed work stays committed — never roll back./rail-pass. The ## Comments run lines resume the run./rail-align, leave claimed/open, never done).done, what's next).done still means green at the task's Seams:, per task — a partially implemented task is not done. Run the full suite once at the end of the run.
A serial run does not replace Parallel builds below (true concurrency still needs one worktree per task — one serial run per worktree).
The default is one serial run in the current worktree. To run more than one /rail-build at once, isolation is a git worktree, not "more sessions".
Hard rule: never two build writers on the same working tree — whether two Cursor sessions, two sub-agents, or any mix. Same-cwd concurrent builds are forbidden; stop and set up worktrees instead.
Status: open, blockers done).Status: claimed) on the primary worktree.rail/build/<feature>-<NN>.worktrees/<feature>-<NN> (create .worktrees/ if needed; do not commit build artifacts from it)git worktree add <path> -b rail/build/<feature>-<NN> <integration-ref>/rail-build per worktree (cwd = that worktree). The task is already claimed — verify claimed, do not claim a different task.Status: done and commit on that task's branch when the solo done gate passes.Parallel builds do not mean dispatching implementation sub-agents on one tree — a serial run dispatches them strictly sequentially; parallel means separate worktrees (usually separate sessions). Keep scout's same-tree implementation ban.
Parent agent stays the orchestrator. Scout is read-only — sub-agents must not edit files, claim tasks, or start implementation.
Send a single message with up to three Agent/Task tool calls (explore / general-purpose). If the harness cannot spawn parallel sub-agents, run the three scopes sequentially — do not skip a scope that applies.
| Sub-agent | Scope | Return |
|---|---|---|
| Code map | Paths, types, and call chains named or implied by the task / What to build | Relevant files + how they connect (under ~300 words) |
| Test / seam precedents | Existing tests and public boundaries near those paths | Candidate seams and nearby test patterns to reuse (under ~300 words) |
| Domain docs | docs/monorail/CONTEXT.md (if present), ADRs under docs/monorail/adr/ that touch this area, plus any repo coding-standards docs | Binding terms, constraints, and standards that apply (under ~200 words) |
Omit a sub-agent only when its inputs clearly do not exist (e.g. no CONTEXT.md and no ADRs — skip Domain docs and note that). Always run Code map and Test / seam precedents when any code exists in the repo.
Each scout prompt must include: absolute paths to the task file and spec.md, the task's What to build (or equivalent) and Seams: line pasted in full, and "read-only — do not modify the repo".
After all scouts return: synthesize, then compare against the spec's ## Testing Decisions. Matching seams → proceed. Divergence (a spec seam is missing, wrong, or overlaps unlisted code) → stop per §4 and report — never re-derive the seams yourself and never ask. Then continue at step 5.
Do not dispatch implementation or fix sub-agents in parallel on the same working tree during build — that is out of scope for scout. For multi-task throughput, use Parallel builds (worktrees) above.
/rail-debug (fresh session only if the run's context is already heavy)/rail-pass; do not push on — the ## Comments run lines resume the run/rail-align (update align.md or map); when alignment is durable again the planning chain auto-continues (/rail-spec → /rail-slice). Leave the task Status: claimed or revert to open with a ## Comments note; do not mark done