docs: rebrand to GSD Core and restructure docs with Diataxis (#605)
* chore: wire docs/agents config into AGENTS.md Agent skills section
Add the `## Agent skills` discovery block pointing the engineering
skills at the existing docs/agents/{issue-tracker,triage-labels,domain}.md
files (issue tracker, triage label mapping, single-context domain docs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: rebrand to GSD Core and restructure docs with Diataxis
Reorganise the root README and docs/ around the Diataxis framework
(tutorials, how-to guides, reference, explanation), add new how-to
guides and schema references (STATE.md / CONTEXT.md / PLAN.md /
planning artifacts), and cross-link the whole set. Update the lone
legacy gsd-build reference to open-gsd; keep internal get-shit-done/
filesystem paths unchanged (directory rename tracked separately in
open-gsd/gsd-core#604). Regenerate the ja-JP, ko-KR, pt-BR and zh-CN
localised trees to mirror the new structure.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: backfill changeset PR number (#605)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
148
docs/reference/context-md.md
Normal file
148
docs/reference/context-md.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# CONTEXT.md schema reference
|
||||
|
||||
A per-phase `CONTEXT.md` is GSD Core's carrier for implementation decisions captured during `/gsd:discuss-phase`. It is the primary upstream input for both the research and planning agents. This page documents its structure. See [docs index](../README.md).
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Every phase that has been through the discuss workflow produces one `CONTEXT.md` at:
|
||||
|
||||
```
|
||||
.planning/phases/<NN>-<slug>/<NN>-CONTEXT.md
|
||||
```
|
||||
|
||||
For example: `.planning/phases/03-post-feed/03-CONTEXT.md`.
|
||||
|
||||
The file is produced by `write_context` in `get-shit-done/workflows/discuss-phase.md` (or its PRD / ADR ingest express paths). It is never edited by hand during normal operation — the discuss-phase workflow writes it and downstream agents read it as a sealed source of truth.
|
||||
|
||||
---
|
||||
|
||||
## Frontmatter
|
||||
|
||||
`CONTEXT.md` carries no YAML frontmatter. Metadata is inline at the top of the body:
|
||||
|
||||
```markdown
|
||||
# Phase [X]: [Name] - Context
|
||||
|
||||
**Gathered:** [ISO date]
|
||||
**Status:** Ready for planning
|
||||
```
|
||||
|
||||
The `Status` field is always `Ready for planning` when the file is first written. It is not updated after creation.
|
||||
|
||||
---
|
||||
|
||||
## Block structure
|
||||
|
||||
The body is divided into named XML-style blocks. The blocks appear in a fixed order and are read by downstream agents by block name, not by line number.
|
||||
|
||||
| Block | Purpose | Populated by | Consumed by |
|
||||
|---|---|---|---|
|
||||
| `<domain>` | States the phase boundary — what this phase delivers and what is explicitly out of scope. Anchors the scope guardrail throughout planning and execution. | `discuss-phase` (from ROADMAP.md phase goal) | `gsd-planner`, `gsd-plan-checker` (scope compliance) |
|
||||
| `<spec_lock>` | Present only when a `*-SPEC.md` was found by the `check_spec` step. Lists locked requirement counts and scope boundaries; agents are directed to read `SPEC.md` directly for full requirements. | `discuss-phase` (conditional) | `gsd-planner` (reads SPEC.md rather than re-reading requirements here) |
|
||||
| `<decisions>` | Implementation decisions captured from the discussion, keyed with `D-NN` identifiers. Categories emerge from what was actually discussed rather than a fixed taxonomy. Includes a `Claude's Discretion` sub-section for areas the user delegated. | `discuss-phase` (interactive discussion) | `gsd-planner` (locked decisions must be implemented), `gsd-plan-checker` (Dimension 7 compliance) |
|
||||
| `<canonical_refs>` | Full relative paths to every spec, ADR, feature doc, or design doc relevant to this phase. Mandatory — every CONTEXT.md must have this section. Agents must read listed files before planning or implementing. | `discuss-phase` (accumulated from ROADMAP.md refs + user references during discussion + codebase scout) | `gsd-phase-researcher`, `gsd-planner` |
|
||||
| `<code_context>` | Reusable assets, established patterns, and integration points discovered during the `scout_codebase` step. Guides agents towards existing code rather than re-implementing. | `discuss-phase` (codebase scout) | `gsd-planner`, `gsd-phase-researcher` |
|
||||
| `<specifics>` | Concrete "I want it like X" references, product comparisons, or particular examples captured verbatim during discussion. | `discuss-phase` (freeform user input) | `gsd-planner` |
|
||||
| `<deferred>` | Ideas that arose in discussion but belong in other phases. Preserved so they are not lost. Includes a `Reviewed Todos` sub-section when todos were reviewed but not folded into scope. | `discuss-phase` (scope-creep redirect) | Not consumed by automated agents; human reference only |
|
||||
|
||||
---
|
||||
|
||||
## Decision identifier format
|
||||
|
||||
Every decision in `<decisions>` carries a sequential `D-NN` identifier:
|
||||
|
||||
```markdown
|
||||
### Layout style
|
||||
- **D-01:** Card-based layout, not timeline or list
|
||||
- **D-02:** Each card shows: author avatar, name, timestamp, full post content, reaction counts
|
||||
```
|
||||
|
||||
Identifiers are scoped to the phase. `D-01` in Phase 3 is unrelated to `D-01` in Phase 7. The plan-checker (Dimension 7) verifies that every `D-NN` is addressed by at least one task action in the generated plans.
|
||||
|
||||
---
|
||||
|
||||
## Canonical references
|
||||
|
||||
The `<canonical_refs>` block is **mandatory**. Agents that find it absent treat the CONTEXT.md as incomplete and surface a warning. Entries are grouped by topic and carry a full relative path plus a brief statement of what the file decides or defines:
|
||||
|
||||
```markdown
|
||||
<canonical_refs>
|
||||
## Canonical References
|
||||
|
||||
**Downstream agents MUST read these before planning or implementing.**
|
||||
|
||||
### Feed display
|
||||
- `docs/features/social-feed.md` — Feed requirements, post card fields, engagement display rules
|
||||
- `docs/decisions/adr-012-infinite-scroll.md` — Scroll strategy decision, virtualisation requirements
|
||||
|
||||
### Empty states
|
||||
- `docs/design/empty-states.md` — Empty state patterns, illustration guidelines
|
||||
|
||||
</canonical_refs>
|
||||
```
|
||||
|
||||
When a project has no external specs, the section states this explicitly:
|
||||
|
||||
```
|
||||
No external specs — requirements fully captured in decisions above
|
||||
```
|
||||
|
||||
Inline mentions like "see ADR-019" scattered in `<decisions>` are insufficient; agents need the full path in the dedicated section.
|
||||
|
||||
---
|
||||
|
||||
## Decision Coverage Gate relationship
|
||||
|
||||
The plan-checker's **Dimension 7: Context Compliance** enforces a coverage gate after planning:
|
||||
|
||||
1. Every `D-NN` identifier in `<decisions>` must appear in at least one plan task's `<action>` or rationale.
|
||||
2. No task may implement anything listed in `<deferred>` (scope creep).
|
||||
3. `Claude's Discretion` areas are exempted from this check — the planner may choose freely.
|
||||
|
||||
A CONTEXT.md where decisions survive into plans is considered compliant. A CONTEXT.md whose decisions are silently dropped or partially delivered triggers **Dimension 7b: Scope Reduction Detection**, which is always a BLOCKER.
|
||||
|
||||
---
|
||||
|
||||
## SPEC.md integration
|
||||
|
||||
When `/gsd:spec-phase` has been run before discussing a phase, the `check_spec` step finds the `*-SPEC.md` file and activates `<spec_lock>`:
|
||||
|
||||
```markdown
|
||||
<spec_lock>
|
||||
## Requirements (locked via SPEC.md)
|
||||
|
||||
**12 requirements are locked.** See `03-SPEC.md` for full requirements, boundaries, and acceptance criteria.
|
||||
|
||||
Downstream agents MUST read `03-SPEC.md` before planning or implementing. Requirements are not duplicated here.
|
||||
|
||||
**In scope (from SPEC.md):** [copied from SPEC.md Boundaries]
|
||||
**Out of scope (from SPEC.md):** [copied from SPEC.md Boundaries]
|
||||
|
||||
</spec_lock>
|
||||
```
|
||||
|
||||
When `<spec_lock>` is present, `<decisions>` contains only implementation decisions from the discussion — the "how", not the "what". Requirements are not duplicated between the two files.
|
||||
|
||||
---
|
||||
|
||||
## Footer
|
||||
|
||||
Every CONTEXT.md ends with an identity footer:
|
||||
|
||||
```markdown
|
||||
---
|
||||
|
||||
*Phase: XX-name*
|
||||
*Context gathered: [date]*
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [PLAN.md schema](plan-md.md)
|
||||
- [Planning artifacts](planning-artifacts.md)
|
||||
- [Discuss modes](../workflow-discuss-mode.md)
|
||||
- [docs index](../README.md)
|
||||
249
docs/reference/plan-md.md
Normal file
249
docs/reference/plan-md.md
Normal file
@@ -0,0 +1,249 @@
|
||||
# PLAN.md schema reference
|
||||
|
||||
A per-plan `PLAN.md` is GSD Core's executable unit of work — a structured document that tells an executor agent exactly what to build and how to verify it was built correctly. This page documents its structure. See [docs index](../README.md).
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Plans live inside phase directories at:
|
||||
|
||||
```
|
||||
.planning/phases/<NN>-<slug>/<NN>-<PP>-PLAN.md
|
||||
```
|
||||
|
||||
For example: `.planning/phases/03-post-feed/03-02-PLAN.md` (Phase 3, Plan 2).
|
||||
|
||||
Plans are produced by the `gsd-planner` agent (spawned by `/gsd:plan-phase`) and consumed by `execute-phase`. A phase typically contains between one and four plans; plans within a phase are assigned to execution waves so that independent work runs in parallel.
|
||||
|
||||
---
|
||||
|
||||
## YAML frontmatter
|
||||
|
||||
Every PLAN.md opens with a YAML frontmatter block between `---` delimiters.
|
||||
|
||||
### Annotated example
|
||||
|
||||
```yaml
|
||||
---
|
||||
phase: 03-post-feed
|
||||
plan: 02
|
||||
type: execute
|
||||
wave: 2
|
||||
depends_on: ["03-01"]
|
||||
files_modified:
|
||||
- src/components/PostFeed.tsx
|
||||
- src/components/PostCard.tsx
|
||||
- src/app/feed/page.tsx
|
||||
autonomous: true
|
||||
requirements: ["FEED-01", "FEED-03"]
|
||||
user_setup: []
|
||||
|
||||
must_haves:
|
||||
truths:
|
||||
- "User can scroll through posts from followed accounts"
|
||||
- "Each post shows author avatar, name, timestamp, and content"
|
||||
- "Empty state appears when no posts exist"
|
||||
artifacts:
|
||||
- path: "src/components/PostFeed.tsx"
|
||||
provides: "Scrollable post list"
|
||||
min_lines: 40
|
||||
- path: "src/components/PostCard.tsx"
|
||||
provides: "Individual post card"
|
||||
exports: ["PostCard"]
|
||||
key_links:
|
||||
- from: "src/components/PostFeed.tsx"
|
||||
to: "/api/feed"
|
||||
via: "fetch in useEffect"
|
||||
pattern: "fetch.*api/feed"
|
||||
---
|
||||
```
|
||||
|
||||
### Frontmatter field reference
|
||||
|
||||
| Field | Required | Type | Purpose |
|
||||
|---|---|---|---|
|
||||
| `phase` | Yes | string | Phase identifier, e.g. `03-post-feed`. |
|
||||
| `plan` | Yes | string | Plan number within the phase, e.g. `02`. |
|
||||
| `type` | Yes | `execute` or `tdd` | `execute` for standard plans; `tdd` for test-driven plans where tests are written before implementation. |
|
||||
| `wave` | Yes | integer | Execution wave. Plans in wave 1 run in parallel (no dependencies). Plans in wave 2+ wait for all plans in the previous wave to complete. Pre-computed at plan time by `gsd-planner`. |
|
||||
| `depends_on` | Yes | array of plan IDs | Plans this plan must wait for. Empty array = wave 1. Example: `["03-01"]` means this plan runs after Plan 01 in Phase 3. |
|
||||
| `files_modified` | Yes | array of paths | Every file this plan creates or modifies. Used by the plan-checker to detect same-wave file conflicts and by execute-phase for merge tracking. |
|
||||
| `autonomous` | Yes | boolean | `true` when all tasks are type `auto`. `false` when the plan contains any `checkpoint:*` task that requires human interaction. |
|
||||
| `requirements` | Yes | array of IDs | Requirement IDs from ROADMAP.md that this plan addresses. Every phase requirement ID must appear in at least one plan's `requirements` field. Empty arrays are a BLOCKER. |
|
||||
| `user_setup` | No | array of objects | External-service setup steps that Claude cannot automate (account creation, secret retrieval, dashboard configuration). When present, execute-phase generates a `USER-SETUP.md` checklist for the developer. |
|
||||
| `must_haves` | Yes | object | Goal-backward verification criteria. See below. |
|
||||
|
||||
---
|
||||
|
||||
## `must_haves` field
|
||||
|
||||
`must_haves` captures what must be observably true for the phase goal to be achieved. It is derived during planning and verified after execution by the `gsd-verifier` agent.
|
||||
|
||||
### Sub-fields
|
||||
|
||||
| Sub-field | Type | Purpose |
|
||||
|---|---|---|
|
||||
| `truths` | array of strings | Observable behaviours from the user's perspective. Each must be verifiable. Example: `"User can send a message"`, not `"WebSocket library installed"`. |
|
||||
| `artifacts` | array of objects | Files that must exist with substantive implementation (not stubs). |
|
||||
| `artifacts[].path` | string | File path relative to project root. |
|
||||
| `artifacts[].provides` | string | What capability this file delivers. |
|
||||
| `artifacts[].min_lines` | integer (optional) | Minimum line count to be considered non-stub. |
|
||||
| `artifacts[].exports` | array of strings (optional) | Expected named exports to verify. |
|
||||
| `artifacts[].contains` | string (optional) | Regex or literal pattern that must appear in the file. |
|
||||
| `key_links` | array of objects | Critical connections between artifacts — the wiring that makes the system work end-to-end. |
|
||||
| `key_links[].from` | string | Source file or component. |
|
||||
| `key_links[].to` | string | Target file, endpoint, or module. |
|
||||
| `key_links[].via` | string | Description of how they connect (e.g. `fetch in useEffect`, `Prisma query`, `import`). |
|
||||
| `key_links[].pattern` | string (optional) | Regex to verify the connection exists in source. |
|
||||
|
||||
---
|
||||
|
||||
## Body structure
|
||||
|
||||
After frontmatter, the plan body uses named XML-style blocks read by the executor agent.
|
||||
|
||||
### `<objective>`
|
||||
|
||||
States what the plan delivers and why it matters for the project:
|
||||
|
||||
```xml
|
||||
<objective>
|
||||
Implement the post feed as a scrollable card list.
|
||||
|
||||
Purpose: Core display feature for the social feed phase.
|
||||
Output: PostFeed and PostCard components wired to /api/feed.
|
||||
</objective>
|
||||
```
|
||||
|
||||
### `<execution_context>`
|
||||
|
||||
Lists workflow files the executor reads before starting. Always includes the execute-plan workflow; adds the checkpoints reference when the plan contains checkpoint tasks:
|
||||
|
||||
```xml
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/execute-plan.md
|
||||
@~/.claude/get-shit-done/templates/summary.md
|
||||
</execution_context>
|
||||
```
|
||||
|
||||
### `<context>`
|
||||
|
||||
References source files the executor needs to read. Includes project-level planning docs and any source files whose patterns or types the plan must replicate. Prior plan `SUMMARY.md` files are included only when there is a genuine dependency (imported types, shared decision) — not reflexively:
|
||||
|
||||
```xml
|
||||
<context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
@src/components/UserCard.tsx
|
||||
</context>
|
||||
```
|
||||
|
||||
### `<tasks>`
|
||||
|
||||
Contains one or more `<task>` elements. Every task element must carry `<name>`, `<files>`, `<read_first>`, `<action>`, `<verify>`, `<acceptance_criteria>`, and `<done>` for `type="auto"` tasks.
|
||||
|
||||
---
|
||||
|
||||
## Task types
|
||||
|
||||
| Type | Use | Autonomy |
|
||||
|---|---|---|
|
||||
| `auto` | Everything the executor can do independently. | Fully autonomous. |
|
||||
| `checkpoint:human-verify` | Visual or functional verification that requires a human to look at a running UI or service. | Pauses execution; presents to the developer; resumes on approval. |
|
||||
| `checkpoint:decision` | Implementation choices that arose during execution and require the developer's input. | Pauses execution; presents options; resumes on selection. |
|
||||
| `checkpoint:human-action` | Truly unavoidable manual steps (account creation, hardware interaction). Used sparingly. | Pauses execution; resumes on confirmation. |
|
||||
|
||||
Plans that contain any checkpoint task must set `autonomous: false` in frontmatter.
|
||||
|
||||
---
|
||||
|
||||
## `auto` task structure
|
||||
|
||||
```xml
|
||||
<task type="auto">
|
||||
<name>Task 1: Create PostCard component</name>
|
||||
<files>src/components/PostCard.tsx</files>
|
||||
<read_first>src/components/UserCard.tsx, src/types/post.ts</read_first>
|
||||
<action>Create PostCard component accepting a Post prop (id, authorId, content, createdAt,
|
||||
reactionCount). Render author avatar using UserAvatar from UserCard pattern. Show timestamp
|
||||
using date-fns formatDistanceToNow. Export as named export PostCard.</action>
|
||||
<verify>npx tsc --noEmit</verify>
|
||||
<acceptance_criteria>
|
||||
- src/components/PostCard.tsx exports named export PostCard
|
||||
- PostCard.tsx contains "reactionCount" prop usage
|
||||
- npx tsc --noEmit exits 0
|
||||
</acceptance_criteria>
|
||||
<done>PostCard renders post content with author and timestamp</done>
|
||||
</task>
|
||||
```
|
||||
|
||||
### Required fields for `auto` tasks
|
||||
|
||||
| Field | Rule |
|
||||
|---|---|
|
||||
| `<files>` | Every file the task creates or modifies. The executor writes only these files. |
|
||||
| `<read_first>` | Files the executor must read before touching anything — the file being modified, any source-of-truth pattern file, any file whose types or conventions must be replicated. |
|
||||
| `<action>` | Concrete instructions with exact identifiers, file paths, function signatures, and expected values. Never says "align X with Y" without specifying the target state. Never contains fenced code blocks or full implementations. |
|
||||
| `<verify>` | A runnable command or check that proves the task succeeded. Must distinguish pass from fail — `echo "done"` is not valid. |
|
||||
| `<acceptance_criteria>` | Verifiable conditions: grep-verifiable strings, command exit codes, observable behaviours. No subjective language ("looks correct", "properly configured"). |
|
||||
| `<done>` | A short measurable statement of the completed outcome. |
|
||||
|
||||
---
|
||||
|
||||
## Plan quality dimensions
|
||||
|
||||
The `gsd-plan-checker` agent reviews every PLAN.md across 12 dimensions before execution begins. A plan that fails any BLOCKER-severity check is returned to `gsd-planner` for revision (up to 3 iterations):
|
||||
|
||||
| Dimension | What it checks |
|
||||
|---|---|
|
||||
| **1 — Requirement Coverage** | Every phase requirement ID from ROADMAP.md appears in at least one plan's `requirements` frontmatter field and has covering task(s). |
|
||||
| **2 — Task Completeness** | Every `auto` task carries all required fields (`<files>`, `<action>`, `<verify>`, `<acceptance_criteria>`, `<done>`). No vague or empty fields. |
|
||||
| **3 — Dependency Correctness** | `depends_on` references are valid, acyclic, and consistent with wave numbers. Wave N plan depends only on plans in waves < N. |
|
||||
| **4 — Key Links Planned** | Artifacts in `must_haves.key_links` have corresponding tasks that implement the wiring — not just the artifact creation. |
|
||||
| **5 — Scope Sanity** | Plans stay within context budget: 2–3 tasks per plan (4 = warning, 5+ = BLOCKER), ≤ 8–10 files per plan (15+ = BLOCKER). |
|
||||
| **6 — Verification Derivation** | `must_haves.truths` are user-observable behaviours, not implementation details. Artifacts map to truths. Key links cover critical wiring. |
|
||||
| **7 — Context Compliance** | Every `D-NN` decision from CONTEXT.md is addressed by at least one task. No task implements anything from `<deferred>`. |
|
||||
| **7b — Scope Reduction Detection** | Task actions do not silently reduce a locked decision to a "v1", "stub", or "future enhancement" without delivering the full decision scope. Always a BLOCKER when found. |
|
||||
| **7c — Architectural Tier Compliance** | Tasks assign capabilities to the correct tier per the RESEARCH.md Architectural Responsibility Map (when present). Security-sensitive capabilities in the wrong tier are BLOCKERs. |
|
||||
| **8 — Nyquist Compliance** | When `workflow.nyquist_validation` is enabled and RESEARCH.md exists, every task has an `<automated>` verify command, no consecutive window of 3 tasks lacks coverage, and VALIDATION.md is present. |
|
||||
| **9 — Cross-Plan Data Contracts** | When plans share data pipelines, their transformations are compatible — no plan strips data that another plan needs in original form. |
|
||||
| **10 — CLAUDE.md Compliance** | Plans respect project-specific conventions, forbidden patterns, required tools, and security requirements from `./CLAUDE.md`. |
|
||||
| **11 — Research Resolution** | When RESEARCH.md exists, its `## Open Questions` section is marked `(RESOLVED)` before planning proceeds. |
|
||||
| **12 — Pattern Compliance** | When PATTERNS.md exists, tasks reference the correct analog patterns for each new or modified file. |
|
||||
|
||||
---
|
||||
|
||||
## Wave execution model
|
||||
|
||||
Wave numbers are pre-computed during planning. Execute-phase groups plans by wave number and runs each wave's plans in parallel:
|
||||
|
||||
```
|
||||
Wave 1: Plan 01, Plan 02, Plan 03 (all run simultaneously — no dependencies)
|
||||
Wave 2: Plan 04 (waits for Wave 1 to complete)
|
||||
Wave 3: Plan 05 (waits for Wave 2 to complete)
|
||||
```
|
||||
|
||||
Plans within a wave that modify overlapping files must not be in the same wave — the plan-checker's Dimension 3 flags this as a BLOCKER.
|
||||
|
||||
---
|
||||
|
||||
## Plan output
|
||||
|
||||
After a plan executes successfully, the executor writes a SUMMARY.md at:
|
||||
|
||||
```
|
||||
.planning/phases/<NN>-<slug>/<NN>-<PP>-SUMMARY.md
|
||||
```
|
||||
|
||||
The SUMMARY.md is the canonical record of what was built. Subsequent plans in the same phase may reference it when they have a genuine dependency on its types or decisions.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [CONTEXT.md schema](context-md.md)
|
||||
- [Planning artifacts](planning-artifacts.md)
|
||||
- [Features](../FEATURES.md)
|
||||
- [docs index](../README.md)
|
||||
225
docs/reference/planning-artifacts.md
Normal file
225
docs/reference/planning-artifacts.md
Normal file
@@ -0,0 +1,225 @@
|
||||
# Planning artifacts reference
|
||||
|
||||
The `.planning/` directory is GSD Core's shared memory for a project. Every workflow reads from it, writes to it, and leaves an auditable trail of decisions. This page maps every file, its purpose, and which command produces or consumes it. See [docs index](../README.md).
|
||||
|
||||
---
|
||||
|
||||
## Directory layout
|
||||
|
||||
```
|
||||
.planning/
|
||||
├── PROJECT.md # Project identity and core value
|
||||
├── ROADMAP.md # Milestone + phase listing with goals
|
||||
├── REQUIREMENTS.md # Numbered acceptance criteria
|
||||
├── STATE.md # Living position tracker
|
||||
├── config.json # Workflow and model configuration
|
||||
├── MILESTONES.md # Milestone archive (optional)
|
||||
├── BACKLOG.md # Deferred and future work (optional)
|
||||
├── LEARNINGS.md # Accumulated cross-phase learnings (optional)
|
||||
├── DECISIONS-INDEX.md # Rolling summary of prior decisions (optional)
|
||||
├── METHODOLOGY.md # Reusable interpretive frameworks (optional)
|
||||
├── HANDOFF.json # Machine-readable pause state (transient)
|
||||
├── codebase/ # Codebase maps (optional)
|
||||
│ ├── architecture.md
|
||||
│ ├── stack.md
|
||||
│ └── ...
|
||||
├── intel/ # Queryable symbol index (optional, intel.enabled)
|
||||
│ └── API-SURFACE.md
|
||||
└── phases/
|
||||
└── <NN>-<slug>/ # One directory per phase
|
||||
├── <NN>-CONTEXT.md # Implementation decisions (discuss-phase)
|
||||
├── <NN>-DISCUSSION-LOG.md # Human-readable discussion audit (discuss-phase)
|
||||
├── <NN>-RESEARCH.md # Technical research findings (plan-phase)
|
||||
├── <NN>-VALIDATION.md # Nyquist test-coverage strategy (plan-phase)
|
||||
├── <NN>-PATTERNS.md # Codebase analog map (plan-phase, optional)
|
||||
├── <NN>-<PP>-PLAN.md # Executable plan (plan-phase, one per plan)
|
||||
├── <NN>-<PP>-SUMMARY.md # Execution record (execute-phase, one per plan)
|
||||
├── <NN>-VERIFICATION.md # Phase goal verification report (verify-phase)
|
||||
├── <NN>-UAT.md # Persistent UAT session state (execute-phase)
|
||||
└── .continue-here.md # Resume instructions after pause (pause-work)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Root-level artifacts
|
||||
|
||||
### `PROJECT.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Canonical project identity: what it is, who it is for, core value, requirements, constraints, and key decisions. Updated throughout the project lifecycle as the product evolves. |
|
||||
| **Produced by** | `/gsd-new-project` (initial creation); updated by `/gsd-complete-milestone` as decisions are validated. |
|
||||
| **Consumed by** | All planning workflows; `gsd-phase-researcher`, `gsd-planner` (context); `discuss-phase` (prior decisions); `gsd-plan-checker` (project constraints). |
|
||||
|
||||
### `ROADMAP.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Milestone and phase listing with goals, requirement IDs, success criteria, and canonical references per phase. The single source of truth for what the project is building and in what order. |
|
||||
| **Produced by** | `/gsd-new-project` (initial creation); updated by `/gsd-phase --insert` and `/gsd-complete-milestone`. |
|
||||
| **Consumed by** | `/gsd-discuss-phase`, `/gsd-plan-phase`, `/gsd-execute-phase`; all orchestration commands that need phase information; `gsd-planner`, `gsd-plan-checker`, `gsd-phase-researcher`. |
|
||||
|
||||
### `REQUIREMENTS.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Numbered, checkable acceptance criteria for the project. Each requirement carries an ID (e.g., `AUTH-01`) that maps to roadmap phases. Marks requirements complete as phases are executed. |
|
||||
| **Produced by** | `/gsd-new-project` (initial creation); requirements marked complete by `execute-phase`. |
|
||||
| **Consumed by** | `gsd-planner` (plans must address all phase requirement IDs); `gsd-plan-checker` Dimension 1 (requirement coverage); `discuss-phase` (prior requirements). |
|
||||
|
||||
### `STATE.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Living position tracker — current phase and plan, progress metrics, accumulated decisions, session continuity notes. Read at the start of every workflow run. Updated after every significant action. |
|
||||
| **Produced by** | `/gsd-new-project` (initial creation); updated continuously by all phase workflows, `/gsd-pause-work`, `/gsd-resume-work`. |
|
||||
| **Consumed by** | All orchestration workflows; `/gsd-progress`; ad-hoc task execution via `/gsd-quick`; `gsd-planner` and `gsd-phase-researcher` (project decisions). |
|
||||
|
||||
See [STATE.md schema](state-md.md) for the full field reference.
|
||||
|
||||
### `config.json`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Workflow configuration: model profiles, research and plan-checker toggles, git branching strategy, Nyquist validation, parallelisation settings, and per-agent model overrides. |
|
||||
| **Produced by** | `/gsd-new-project` (initial creation); `/gsd-settings` (interactive editing). |
|
||||
| **Consumed by** | Every workflow and subagent — read at init time via `gsd-tools query config-get`. |
|
||||
|
||||
See [CONFIGURATION](../CONFIGURATION.md) for the complete schema.
|
||||
|
||||
### `MILESTONES.md` (optional)
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Historical record of completed milestones. Populated as each milestone is closed; provides an archival snapshot of what shipped and when. |
|
||||
| **Produced by** | `/gsd-complete-milestone`. |
|
||||
| **Consumed by** | `/gsd-audit-milestone`; human review. |
|
||||
|
||||
### `DECISIONS-INDEX.md` (optional)
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Bounded rolling summary of decisions captured in prior-phase CONTEXT.md files. When present, `discuss-phase` reads this single file instead of reading up to three prior CONTEXT.md files individually, saving context budget. |
|
||||
| **Produced by** | Generated when the number of prior phases exceeds the rolling-read threshold. |
|
||||
| **Consumed by** | `discuss-phase` (`load_prior_context` step). |
|
||||
|
||||
### `HANDOFF.json` (transient)
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Machine-readable pause state written when work is interrupted. Contains the resume point, in-progress context, and continuation instructions. Consumed exactly once — on resume. |
|
||||
| **Produced by** | `/gsd-pause-work`. |
|
||||
| **Consumed by** | `/gsd-resume-work`. |
|
||||
|
||||
---
|
||||
|
||||
## Per-phase artifacts
|
||||
|
||||
All per-phase files live under `.planning/phases/<NN>-<slug>/` where `NN` is the zero-padded phase number and `slug` is the hyphenated phase name.
|
||||
|
||||
### `<NN>-CONTEXT.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Implementation decisions captured before planning begins. Contains the phase boundary (`<domain>`), locked decisions with `D-NN` identifiers (`<decisions>`), canonical document references (`<canonical_refs>`), existing code insights (`<code_context>`), specific inspirations (`<specifics>`), and deferred ideas (`<deferred>`). |
|
||||
| **Produced by** | `/gsd-discuss-phase` (interactive discussion or PRD/ADR express paths). |
|
||||
| **Consumed by** | `gsd-phase-researcher` (what to investigate); `gsd-planner` (locked decisions); `gsd-plan-checker` Dimension 7 (context compliance). |
|
||||
|
||||
See [CONTEXT.md schema](context-md.md) for the full field reference.
|
||||
|
||||
### `<NN>-DISCUSSION-LOG.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Human-readable audit trail of the discuss-phase session: areas discussed, options presented, selections made, deferred ideas, and items left to Claude's discretion. Not consumed by automated workflows. |
|
||||
| **Produced by** | `/gsd-discuss-phase` (`git_commit` step). |
|
||||
| **Consumed by** | Human review; retrospectives. |
|
||||
|
||||
### `<NN>-RESEARCH.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Technical research findings produced before planning. Answers "What do I need to know to plan this phase well?" — covers domain analysis, patterns, risks, an Architectural Responsibility Map, and a Validation Architecture section (used by the Nyquist gate). |
|
||||
| **Produced by** | `/gsd-plan-phase` via `gsd-phase-researcher` agent. |
|
||||
| **Consumed by** | `gsd-planner` (planning inputs); `gsd-plan-checker` Dimension 7c (tier compliance), Dimension 8 (Nyquist), Dimension 11 (research resolution); `gsd-pattern-mapper` (file list source). |
|
||||
|
||||
### `<NN>-VALIDATION.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Nyquist-inspired validation strategy derived from the `## Validation Architecture` section of RESEARCH.md. Specifies automated test coverage requirements that plans must honour. |
|
||||
| **Produced by** | `/gsd-plan-phase` (Step 5.5, when `workflow.nyquist_validation` is enabled and RESEARCH.md contains a Validation Architecture section). |
|
||||
| **Consumed by** | `gsd-plan-checker` Dimension 8 (Check 8e gate — must exist before Nyquist checks proceed); `gsd-verifier`. |
|
||||
|
||||
### `<NN>-PATTERNS.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Codebase analog map produced by `gsd-pattern-mapper`. For each file to be created or modified this phase, identifies the closest existing analog, classifies the file's role and data flow, and extracts concrete code excerpts. Guides the planner towards consistent patterns. |
|
||||
| **Produced by** | `/gsd-plan-phase` via `gsd-pattern-mapper` agent (optional; skipped if `workflow.pattern_mapper: false`). |
|
||||
| **Consumed by** | `gsd-planner` (pattern guidance); `gsd-plan-checker` Dimension 12 (pattern compliance). |
|
||||
|
||||
### `<NN>-<PP>-PLAN.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Executable plan for a single unit of work within the phase. Contains YAML frontmatter (wave, dependencies, files, requirements, `must_haves`), an objective, context references, XML-structured tasks with `<read_first>`, `<action>`, `<verify>`, and `<acceptance_criteria>` fields, and verification criteria. |
|
||||
| **Produced by** | `/gsd-plan-phase` via `gsd-planner` agent. One file per plan — e.g., `03-02-PLAN.md` is Phase 3, Plan 2. |
|
||||
| **Consumed by** | `/gsd-execute-phase` (executor agent reads plan and runs tasks); `gsd-plan-checker` (pre-execution quality review); `gsd-verifier` (reads `must_haves` for post-execution verification). |
|
||||
|
||||
See [PLAN.md schema](plan-md.md) for the full field reference.
|
||||
|
||||
### `<NN>-<PP>-SUMMARY.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Execution record written after a plan completes. Documents what was built, deviations from the plan, a self-check against acceptance criteria, and the dependency graph for the phase. |
|
||||
| **Produced by** | `execute-phase` executor agent (written at the end of each plan's execution). |
|
||||
| **Consumed by** | `/gsd-progress` (phase status); `gsd-planner` (when a subsequent plan has a genuine dependency on prior plan output); `milestone-summary`. |
|
||||
|
||||
### `<NN>-VERIFICATION.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Phase goal verification report. Checks `must_haves.truths`, `must_haves.artifacts`, and `must_haves.key_links` from all plans against the actual codebase after execution. Records `status: passed | gaps_found | human_needed`. |
|
||||
| **Produced by** | `/gsd-verify-work` (or the verify step within `/gsd-execute-phase`). |
|
||||
| **Consumed by** | `plan-phase` closed-phase gate (a `status: passed` VERIFICATION.md marks the phase `Complete` and blocks replanning without `--force`); `/gsd-progress`; human review. |
|
||||
|
||||
### `<NN>-UAT.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Persistent UAT session tracking. Records each test case, expected observable behaviour, result, and developer response across a live UAT session. Carries YAML frontmatter (`status`, `phase`, `source`, timestamps). |
|
||||
| **Produced by** | `/gsd-audit-uat` (interactive UAT session). |
|
||||
| **Consumed by** | `/gsd-audit-uat` (resume a previous UAT session). |
|
||||
|
||||
### `.continue-here.md`
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Purpose** | Human-readable resume instructions written when work on a phase is paused. Contains context for resuming agents: critical anti-patterns, blocking issues, required reading, and the exact command to resume. |
|
||||
| **Produced by** | `/gsd-pause-work`. |
|
||||
| **Consumed by** | Any workflow that starts on a phase — `discuss-phase` and `plan-phase` both check for this file at entry and require the agent to demonstrate understanding of any `blocking` anti-patterns before proceeding. |
|
||||
|
||||
---
|
||||
|
||||
## Naming conventions
|
||||
|
||||
| Segment | Format | Example |
|
||||
|---|---|---|
|
||||
| Phase directory | `<NN>-<slug>` | `03-post-feed` |
|
||||
| Phase-level file | `<NN>-<ARTIFACT>.md` | `03-CONTEXT.md` |
|
||||
| Plan-level file | `<NN>-<PP>-<ARTIFACT>.md` | `03-02-PLAN.md` |
|
||||
| `NN` | Zero-padded phase number | `03` for Phase 3 |
|
||||
| `PP` | Zero-padded plan number within phase | `02` for Plan 2 |
|
||||
|
||||
When `project_code` is set in `config.json`, phase directories use the project code as a prefix: `CK-03-post-feed` for project code `CK`, Phase 3.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [STATE.md schema](state-md.md)
|
||||
- [CONTEXT.md schema](context-md.md)
|
||||
- [PLAN.md schema](plan-md.md)
|
||||
- [docs index](../README.md)
|
||||
201
docs/reference/state-md.md
Normal file
201
docs/reference/state-md.md
Normal file
@@ -0,0 +1,201 @@
|
||||
# STATE.md schema reference
|
||||
|
||||
`STATE.md` is GSD Core's living project-memory file — a single Markdown document that records where a project stands, what happened last, and what to run next. This page documents its structure. See [docs index](../README.md).
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Every project managed by GSD Core keeps one `STATE.md` at `.planning/STATE.md`. It is read at the start of every workflow and written after every significant action. The file combines:
|
||||
|
||||
- **YAML frontmatter** — machine-readable fields consumed by the status-line hook (`parseStateMd`) and the `gsd-tools state` commands.
|
||||
- **Markdown body** — human-readable sections covering current position, accumulated context, session continuity, and performance metrics.
|
||||
|
||||
The file is intentionally small (target: under 100 lines). It is a digest of the project's state, not an archive.
|
||||
|
||||
---
|
||||
|
||||
## YAML frontmatter
|
||||
|
||||
Frontmatter appears between `---` delimiters at the very start of the file. All fields except `gsd_state_version` and `status` are optional; fields may be absent when their data is not yet available.
|
||||
|
||||
### Annotated example
|
||||
|
||||
```yaml
|
||||
---
|
||||
gsd_state_version: '1.0'
|
||||
milestone: v2.0
|
||||
milestone_name: Code Quality
|
||||
status: executing
|
||||
|
||||
# Phase-lifecycle fields — all optional (added in v1.40.0, issue #2833)
|
||||
active_phase: "4.5"
|
||||
next_action: execute-phase
|
||||
next_phases: ["4.5"]
|
||||
|
||||
progress:
|
||||
total_phases: 17
|
||||
completed_phases: 10
|
||||
total_plans: 84
|
||||
completed_plans: 47
|
||||
percent: 59
|
||||
|
||||
# Additional fields written by syncStateFrontmatter
|
||||
current_phase: "4"
|
||||
current_phase_name: Observability
|
||||
current_plan: "3"
|
||||
last_updated: "2026-06-01T12:34:56.789Z"
|
||||
last_activity: "2026-06-01"
|
||||
stopped_at: "Phase 4 P3 execution complete"
|
||||
paused_at: null
|
||||
---
|
||||
```
|
||||
|
||||
### Field reference
|
||||
|
||||
| Field | Type | When populated | Purpose |
|
||||
|---|---|---|---|
|
||||
| `gsd_state_version` | string (`'1.0'`) | Always | Schema version; written on first `state.*` call by `syncStateFrontmatter`. |
|
||||
| `milestone` | string (e.g. `v2.0`) | When a milestone is configured | Current milestone version, read from the project's config. |
|
||||
| `milestone_name` | string | When a milestone is configured | Human-readable milestone label (e.g. `Code Quality`). |
|
||||
| `status` | string | Always | Current lifecycle stage. Normalised by `normalizeStateStatus()` — see [status values](#status-values). |
|
||||
| `active_phase` | string (e.g. `"4.5"`) | An orchestrator command is in flight on this phase | The phase number currently being processed. Set to `null` when between phases. |
|
||||
| `next_action` | string | Idle, with a recommended command | The slash command to run next: `discuss-phase`, `plan-phase`, `execute-phase`, or `verify-phase`. Set to `null` when an orchestrator is in flight or no recommendation is available. |
|
||||
| `next_phases` | YAML flow array (e.g. `["4.5"]`) | Goes with `next_action` | The phase ID(s) the `next_action` applies to (typically 1–2 entries). Set to `null` under the same conditions as `next_action`. |
|
||||
| `progress.total_phases` | integer | When phase data is available | Total number of phases in the current milestone, derived from ROADMAP.md and the phases directory. |
|
||||
| `progress.completed_phases` | integer | When phase data is available | Number of phases that have all plan summaries on disk (i.e. every plan completed). |
|
||||
| `progress.total_plans` | integer | When plan files exist | Sum of all plan files across phases in the current milestone. |
|
||||
| `progress.completed_plans` | integer | When summary files exist | Sum of completed plan summaries (one SUMMARY.md per executed plan). |
|
||||
| `progress.percent` | integer 0–100 | When progress data is available | Milestone progress in the **phase dimension** (`min(completed_plans/total_plans, completed_phases/total_phases)`). The status-line progress bar is only rendered when this field is present — its absence suppresses the bar. |
|
||||
| `current_phase` | string | When a phase is executing | Phase number extracted from the body `Current Phase:` field. |
|
||||
| `current_phase_name` | string | When a phase has a name | Phase name extracted from the body `Current Phase Name:` field. |
|
||||
| `current_plan` | string | When a plan is in progress | Plan number extracted from the body `Current Plan:` field. |
|
||||
| `last_updated` | ISO-8601 timestamp | Always (on write) | Timestamp of the last `syncStateFrontmatter` call; written by `realClock.nowIso()`. |
|
||||
| `last_activity` | string | When set in body | Date of the last activity, extracted from the body `Last Activity:` field. |
|
||||
| `stopped_at` | string | When a stop point was recorded | Description of the last completed action; scoped to the `## Session` body section to avoid matching archive prose. |
|
||||
| `paused_at` | string | When the project is paused | Freeform description of the pause point; absent or `null` when not paused. |
|
||||
|
||||
### Status values
|
||||
|
||||
`normalizeStateStatus()` in `get-shit-done/bin/lib/state-document.cjs` maps raw body text to these canonical values:
|
||||
|
||||
| Canonical value | Matched text (case-insensitive) |
|
||||
|---|---|
|
||||
| `discussing` | contains `discussing` |
|
||||
| `planning` | contains `planning` or `ready to plan` |
|
||||
| `executing` | contains `executing`, `in progress`, or `ready to execute` |
|
||||
| `verifying` | contains `verif` |
|
||||
| `completed` | contains `complete` or `done` |
|
||||
| `paused` | contains `paused` or `stopped`, or `paused_at` is present |
|
||||
| `unknown` | none of the above |
|
||||
|
||||
When an orchestrator command is in flight, the convention (issue #2833) is to write the lifecycle stage directly to `status`:
|
||||
|
||||
| Command | `status` while in flight |
|
||||
|---|---|
|
||||
| `/gsd-discuss-phase` | `discussing` |
|
||||
| `/gsd-plan-phase` | `planning` |
|
||||
| `/gsd-execute-phase` | `executing` |
|
||||
| `/gsd-verify-work` | `verifying` |
|
||||
|
||||
---
|
||||
|
||||
## Status-line rendering scenes
|
||||
|
||||
`formatGsdState()` in `hooks/gsd-statusline.js` reads the parsed frontmatter and emits the **first matching scene**. If no new lifecycle fields apply, rendering falls through to the original format byte-for-byte unchanged from v1.38.x.
|
||||
|
||||
| Scene | Trigger | Display example |
|
||||
|---|---|---|
|
||||
| **1. Phase active** | `active_phase` is populated | `v2.0 [██░░░░░░░░] 20% · Phase 4.5 executing` |
|
||||
| **2. Idle, next recommended** | `active_phase` is null AND both `next_action` and `next_phases` are populated | `v2.0 [██░░░░░░░░] 20% · next execute-phase 4.5` |
|
||||
| **3. Milestone complete** | `percent` is `100` OR `completed_phases == total_phases` | `v2.0 [██████████] 100% · milestone complete` |
|
||||
| **4. Default fallback** | None of the above match | `v1.9 Code Quality · executing · ph 1/5` (existing format) |
|
||||
|
||||
**Scene priority:** when both `active_phase` and `next_action` are populated, Scene 1 wins — an orchestrator is in flight, so a "next recommendation" would be misleading. This priority is enforced by check order in `formatGsdState()` and covered by the `"scene priority"` suite in `tests/enh-2833-phase-lifecycle-statusline.test.cjs`.
|
||||
|
||||
The progress bar (`[██░░░░░░░░] 20%`) is appended to the milestone segment only when `progress.percent` is present in frontmatter; absent means no bar.
|
||||
|
||||
---
|
||||
|
||||
## Frontmatter parsing constraints
|
||||
|
||||
The status-line hook uses regex-based parsing (no full YAML library), so the following constraints apply. They are tested in `tests/enh-2833-phase-lifecycle-statusline.test.cjs`.
|
||||
|
||||
1. **Frontmatter must start at the very first character of the file.** Anything — including comments — above the opening `---` invalidates the match. The opening `---` line must be exactly that, with no trailing spaces.
|
||||
|
||||
2. **Comments inside nested blocks are not supported.** The `progress:` block parser requires the next line to be `[ \t]+\w+:`. Inserting a `# comment` between `progress:` and its first key breaks the match and the bar disappears. Any documentation belongs in the `STATE.md` body, not inside frontmatter blocks.
|
||||
|
||||
3. **`next_phases` primary format is single-line flow.** The parser first tries `next_phases: ["4.5", "4.6"]`. Block sequences (`- 4.5\n- 4.6`) are also parsed but are less reliable for status-line rendering. Prefer single-line flow for `next_phases` to keep the regex-based parser predictable. If many candidate phases need recording for documentation purposes, store them in the `STATE.md` body.
|
||||
|
||||
If a future change replaces the regex parser with a full YAML library, these constraints can be relaxed and the tests updated accordingly.
|
||||
|
||||
---
|
||||
|
||||
## Markdown body sections
|
||||
|
||||
The body (everything after the closing `---`) follows the template in `get-shit-done/templates/state.md`. The standard sections are:
|
||||
|
||||
### Project Reference
|
||||
|
||||
Points to `.planning/PROJECT.md`. Contains:
|
||||
- **Core value** — the one-liner from `PROJECT.md`'s Core Value section.
|
||||
- **Current focus** — which phase is active.
|
||||
|
||||
### Current Position
|
||||
|
||||
Where the project stands right now:
|
||||
|
||||
| Field | Format |
|
||||
|---|---|
|
||||
| `Phase:` | `X of Y (Phase name)` |
|
||||
| `Plan:` | `A of B in current phase` |
|
||||
| `Status:` | Free text, e.g. `Ready to execute`, `Executing Phase 4`, `Phase complete — ready for verification` |
|
||||
| `Last activity:` | ISO date (`YYYY-MM-DD`) when handler-written; narrative prose when executor-authored |
|
||||
| `Progress:` | Visual bar, e.g. `[████░░░░░░] 40%` |
|
||||
|
||||
The `Status:` and `Last activity:` fields in this section are updated by GSD handlers when the existing value is a known template default (Knuth invariant: executor-authored values are preserved). The full list of known handler defaults is in `KNOWN_TEMPLATE_DEFAULTS` inside `get-shit-done/bin/lib/state-document.cjs`.
|
||||
|
||||
### Performance Metrics
|
||||
|
||||
Execution velocity tracking:
|
||||
- Total plans completed, average duration per plan.
|
||||
- Per-phase breakdown table (`Phase | Plans | Total | Avg/Plan`).
|
||||
- Recent trend: Improving / Stable / Degrading.
|
||||
|
||||
Updated after each plan completion.
|
||||
|
||||
### Accumulated Context
|
||||
|
||||
**Decisions** — a summary of recent decisions affecting current work (full log lives in `PROJECT.md`). Added via `gsd-tools state add-decision`.
|
||||
|
||||
**Pending Todos** — count and reference to `.planning/todos/pending/`. Captured via `/gsd-capture`.
|
||||
|
||||
**Blockers/Concerns** — issues affecting future work, prefixed with the originating phase. Added via `gsd-tools state add-blocker`; resolved via `gsd-tools state resolve-blocker`.
|
||||
|
||||
### Session Continuity
|
||||
|
||||
Enables instant session resumption:
|
||||
- `Last session:` — ISO-8601 timestamp of the last session.
|
||||
- `Stopped at:` — description of the last completed action.
|
||||
- `Resume file:` — path to a `.continue-here*.md` file if one exists, otherwise `None`.
|
||||
|
||||
---
|
||||
|
||||
## Backward compatibility
|
||||
|
||||
The phase-lifecycle fields (`active_phase`, `next_action`, `next_phases`, and `progress.percent` for the bar) are **additive and opt-in per project**:
|
||||
|
||||
- A `STATE.md` with none of the lifecycle fields populated renders **byte-for-byte identically** to v1.38.x and earlier.
|
||||
- Adding any lifecycle field is opt-in — the renderer degrades gracefully when fields are absent.
|
||||
- The progress bar is opt-in even when the `progress` block exists: only `progress.percent` triggers the bar; `total_phases` and `completed_phases` alone do not.
|
||||
|
||||
The `formatGsdState #2833 backward compatibility` test suite in `tests/enh-2833-phase-lifecycle-statusline.test.cjs` locks this guarantee; any change that breaks legacy `STATE.md` rendering will fail the suite.
|
||||
|
||||
---
|
||||
|
||||
## Related
|
||||
|
||||
- [Planning artifacts](planning-artifacts.md)
|
||||
- [Configuration](../CONFIGURATION.md)
|
||||
- [The phase loop](../explanation/the-phase-loop.md)
|
||||
- [docs index](../README.md)
|
||||
Reference in New Issue
Block a user