workplan-scaffold
Skill2 starsChanged 8 months agoApache-2.0View on GitHub
Encodes the pre-planning protocol from AGENTS.md: create a workplan doc before any multi-phase session execution, scaffold it with scripts/scaffold_workplan.py, and commit it before Phase 1 runs. USE FOR: any session with ≥3 phases or ≥2 agent delegations; any session spanning more than one day; creating an auditable plan history in git. DO NOT USE FOR: single-phase tasks with no delegation; quick one-off commits with no sub-agent orchestration.
In this repository27 other files it gives its agents.
- adopt-test-2/AGENTS.mdAGENTS.md
- adopt-test-3/AGENTS.mdAGENTS.md
- adopt-test/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- {{cookiecutter.project_slug}}/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .github/agents/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-file-authoringSkill
- conventional-commitSkill
- corpus-sweepSkill
- deep-research-sprintSkill
- delegation-routingSkill
- phase-gate-sequenceSkill
- prompt-archaeologySkill
- pr-review-replySkill
- pr-review-triageSkill
- rate-limit-resilienceSkill
- research-epic-planningSkill
- secondary-research-sprintSkill
- session-managementSkill
- session-retrospectiveSkill
- skill-authoringSkill
- source-cachingSkill
- sprint-planningSkill
- transcript-extractionSkill
- validate-before-commitSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Create a workplan before executing any phase when the session meets one or more of these criteria:
- Distinctive: line 31
Use the scaffold script to create a correctly named, pre-filled workplan:
- Distinctive: line 42
If the file already exists, the script exits with an error rather than overwriting.
- Distinctive: line 50
Every committed workplan must include the following sections:
- Distinctive: line 84
When a deliverable involves a technology where a prominent prohibited alternative exists (heavier library, deprecated tool, framework …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workplan Scaffold
This skill enacts the Algorithms Before Tokens axiom from MANIFESTO.md: the plan is encoded once as a committed document and referenced by every subsequent delegation — never re-derived from scratch mid-session. Workplan discipline is governed by AGENTS.md § Agent Communication → docs/plans/. When this skill and those documents conflict, the primary documents take precedence.
1. When to Create a Workplan
Create a workplan before executing any phase when the session meets one or more of these criteria:
| Criterion | Threshold |
| Number of phases | ≥ 3 |
| Number of agent delegations | ≥ 2 |
| Session spans multiple calendar days | Yes |
| Any change that renames or restructures committed files | Yes |
For single-phase, single-agent tasks with low risk, the scratchpad ## Session Start section is sufficient. The workplan is the plan of record; the scratchpad is live inter-agent memory.
2. Scaffold the Workplan
Use the scaffold script to create a correctly named, pre-filled workplan:
uv run python scripts/scaffold_workplan.py <brief-slug>
# Example:
uv run python scripts/scaffold_workplan.py add-research-skill
# Creates: docs/plans/2026-03-07-add-research-skill.mdNaming convention: docs/plans/YYYY-MM-DD-<brief-slug>.md — date-first for chronological sorting.
If the file already exists, the script exits with an error rather than overwriting. Use the existing file.
The canonical template is docs/plans/2026-03-06-formalize-workflows.md.
3. Required Workplan Structure
Every committed workplan must include the following sections:
# Workplan: <Title>
**Branch**: `<branch>`
**Date**: YYYY-MM-DD
**Orchestrator**: <Agent Name>
---
## Objective
<!-- One paragraph: what this session accomplishes and why -->
---
## Phase Plan
### Phase 1 — <Name> ⬜
**Agent**: <Agent Name>
**Deliverables**: <list>
**Depends on**: —
**Gate**: <acceptance test for this phase>
**Status**: ⬜ pending
### Phase 2 — <Name> ⬜
...
---3.1 Deliverable Specification Conventions
When a deliverable involves a technology where a prominent prohibited alternative exists (heavier library, deprecated tool, framework mismatch), explicitly name the prohibition alongside the chosen technology in the deliverable spec.
Format: use X (do NOT install Y — reason)
Canonical example (Phase 4, MCP web-dashboard sprint 2026-03-28):
Deliverables:
- Chart component using LayerCake (do NOT install svelte-chartjs or chart.js — 56 KB overhead)Why this matters: Abstract deliverable specs like "use LayerCake" are insufficient guardrail. Implementers default to familiar libraries they have used before. Without an explicit prohibition, an engineer who knows chart.js well will reach for it — the constraint is invisible unless named.
When to apply: Any time the delivery spec involves a technology choice and the following are both true:
- There is a more popular or familiar alternative that would violate a constraint (size, license, framework compatibility, deprecation)
- The constraint is not obvious from the technology name alone
Anti-pattern: Deliverables: implement charting feature — implementer unknown library preference, no guard against prohibited alternatives.
Good pattern: Deliverables: implement charting using LayerCake (do NOT install chart.js or recharts — both import full D3 bundle, +120 KB) — constraint is self-documenting.
Acceptance Criteria
- <criterion 1>
- <criterion 2>
**Status markers**: `⬜` pending, `✅` done. Update in-place as phases complete and commit the update.
---
## 4. Phase Ordering Prerequisite Check
Before committing the workplan, audit phase ordering against the constraints in [`AGENTS.md` § Sprint Phase Ordering Constraints](../../../AGENTS.md#sprint-phase-ordering-constraints). This check prevents the primary source of re-review debt: implementation phases starting before the research or docs that should inform them.
### 4.1 Tag Every Research and Documentation Issue
In the phase plan, add an `informs:` annotation to every research and guidance-documentation issue so dependencies are visible:
```markdown
- #242 `Scratchpad Architecture Maturation` — effort: XL — **informs: [Phase 5, Phase 11]**
- #246 `Research: scripts documentation` — effort: XL — **informs: [Phase 8]**Issues that are purely retrospective (documenting work already done) do not need an informs: tag. All others must have one.
4.2 Cross-Cutting Research Gate Check
List every research issue tagged informs: [≥ 2 phases]. Confirm all three:
- It is placed in Phase 2 (the earliest executable phase after planning) — not mid-sprint
- Every implementation phase it informs has an explicit
Depends on: Phase N Researchentry - It is not annotated as "parallel with" any phase it informs
If any check fails, reorder the phase plan before committing. Parallel-with annotations on cross-cutting research are the primary way gate constraints collapse in practice.
4.3 Documentation Gate Check
List every documentation issue tagged as guidance-providing (not retrospective). Confirm:
- It is placed before the earliest implementation phase that uses its guidance
- The phases that depend on it have explicit
Depends on:entries - If both research and guidance docs are both needed upfront: apply the chicken-and-egg rule from
AGENTS.md§ Sprint Phase Ordering Constraints and record the decision in the Objective section
4.4 Submit Workplan for Review
After committing the workplan (§ 5 below), do not begin Phase 1 until the workplan has been reviewed by the Review agent. Delegate with this prompt:
Review
docs/plans/<slug>.md. Check: (1) cross-cutting research is in Phase 2 and gates all phases it informs — not marked parallel; (2) guidance-providing documentation phases precede the phases that use them; (3) every dependent implementation phase has an explicitDepends on:annotation. Return APPROVED or REQUEST CHANGES — [phase number: specific issue].
Log the verdict under ## Workplan Review Output in the scratchpad. Phase 1 does not begin until APPROVED.
5. Commit Before Phase 1
The workplan must be committed before Phase 1 executes. This creates an auditable plan history in git that is independent of the ephemeral .tmp/ scratchpad.
git add docs/plans/YYYY-MM-DD-<slug>.md
git commit -m "docs(plans): add workplan for <slug>"Why commit first: If the session is interrupted or compacted, the plan survives in git history. Uncommitted plans are lost on context reset.
6. Mirror in Scratchpad
After committing the workplan, write an ## Orchestration Plan section in the active scratchpad (.tmp/<branch-slug>/<today>.md) that mirrors the phase list and links to the committed file. This gives delegated agents a single orientation point:
## Orchestration Plan
Workplan: docs/plans/YYYY-MM-DD-<slug>.md
| Phase | Agent | Status |
|-------|-------|--------|
| 1 — <Name> | <Agent> | ⬜ |
| 2 — <Name> | <Agent> | ⬜ |7. Update as Phases Complete
After each phase, update both the workplan and the scratchpad mirror:
- In
docs/plans/YYYY-MM-DD-<slug>.md: change⬜to✅for the completed phase. - Commit the update:
git commit -m "docs(plans): mark phase N complete — <slug>". - Update the scratchpad
## Orchestration Plantable.
8. Session Self-Loop Handoff
After writing and committing the workplan, write the following line in the scratchpad before delegating Phase 1:
✓ Plan reviewed — begin executionThis serves as the signal that the planning gate is closed and execution may start.
Guardrails
- Never start Phase 1 without a committed workplan when the session meets the threshold criteria above.
- Never use heredoc or terminal writes for workplan content — always use
create_fileorreplace_string_in_filetools. - Do not re-derive the plan interactively mid-session; reference the committed workplan file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

