Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
1112e2b
feat(product-development): add idea and shaping stages and the glossa…
prometheas Nov 29, 2026
b2ee925
feat(product-development): add feature directories, changes and delta…
prometheas Nov 29, 2026
3cb9ae5
feat(product-development): track open questions by what they block (#53)
prometheas Nov 30, 2026
cd5ade6
feat(product-development): map change states to project boards (#52)
prometheas Nov 30, 2026
79bd856
feat(product-development): add the OKF v0.3 profile, index generator …
prometheas Nov 30, 2026
99dedb8
feat(product-development): slim the vision into a core plus companion…
prometheas Nov 30, 2026
1bab0b4
feat(product-development): add ratification, triage and handoff workf…
prometheas Nov 30, 2026
893fe93
feat(product-development): canonize shipped changes into the feature …
prometheas Nov 30, 2026
b252a75
feat(product-development): link code to features with @feature tags (…
prometheas Nov 30, 2026
34d359b
feat(product-development): add the modernization guide for 0.1.0 spec…
prometheas Nov 30, 2026
19ec5e8
feat(product-development): add the retrofit guide for codebases witho…
prometheas Nov 30, 2026
2d2d10d
fix(product-development): resolve release review findings (#61)
prometheas Nov 30, 2026
1a5fdb0
fix(product-development): resolve release re-check findings (#62)
prometheas Nov 30, 2026
fc684c2
fix(product-development): resolve second release review findings (#63)
prometheas Nov 30, 2026
d0e154d
fix(product-development): keep code span text in heading anchors (#64)
prometheas Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Vendored upstream files keep their whitespace byte for byte.
plugins/product-development/skills/product-development/tests/vendor/okf/LICENSE.md -whitespace
plugins/product-development/skills/product-development/tests/vendor/okf/validate.py -whitespace
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.direnv/

__pycache__/
*.pyc
11 changes: 11 additions & 0 deletions CONTEXT-MAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Context Map

Each plugin that defines its own domain language keeps a `CONTEXT.md` beside its skill. This map lists them.

## Contexts

- [Product Development](./plugins/product-development/skills/product-development/CONTEXT.md): how a product's intent is written down, approved, changed and kept true, from foundation documents through feature specs

## Relationships

None yet. Add a relationship when one context's terms depend on another's.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ installs, see `docs/development.md`.

| Plugin | Scope | Docs |
| --- | --- | --- |
| `product-development` | Product definition: from constitution and vision through PRD/TRD, user stories, scenarios, and the implementation plan. | [`plugins/product-development/README.md`](plugins/product-development/README.md) |
| `product-development` | Product definition: from constitution and vision through PRD/TRD, user stories, scenarios, and the implementation handoff; keeps feature specs true once changes ship. | [`plugins/product-development/README.md`](plugins/product-development/README.md) |
| `delivery-engineering` | Engineering delivery: turning an approved plan into merged, shipped, and coordinated work. | [`plugins/delivery-engineering/README.md`](plugins/delivery-engineering/README.md) |
| `branch-guard` | Nudges agents away from directly editing a repository's protected branch. | [`plugins/branch-guard/README.md`](plugins/branch-guard/README.md) |
| `okf-bundle` | Author, migrate, and check Open Knowledge Format v0.2 bundles. | [`plugins/okf-bundle/README.md`](plugins/okf-bundle/README.md) |

`product-development` and `delivery-engineering` meet at one hand-off: `product-development` ends at an approved
implementation plan; `delivery-engineering` starts there.
`product-development` and `delivery-engineering` meet at one hand-off: `product-development` ends at the handoff of a
ratified change; `delivery-engineering` starts there and plans in the PR body.
Once the change ships, `product-development` canonizes it into the feature spec.

## Getting Started

Expand Down
16 changes: 16 additions & 0 deletions docs/adr/0001-stage-directories-carry-authority.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Stage directories carry authority

The product-development skill files product documents into three stages, `ideas/`, `shaping/` and `features/`, and a document's stage, the authority it carries, comes from the directory it sits in, not from a status field. A status field drifts once code ships unless someone remembers to update it; a path moves in the same pull request as the work, so an agent reading the tree always sees the authority a document has.

The path settles authority, not every lifecycle state. Some change states also depend on recorded events. Merging the promotion PR marks a change Ratified. The project's ship signal, recorded in the feature log, marks it Shipped. Ratified and Shipped share a path, so a reader tells them apart by those records, not by the directory.

## Considered options

- **A `status:` field in front matter.** Rejected: nothing forces it to change when the work moves on, and agents trust whatever it says. A spec marked approved, or a draft never marked approved, misleads every later reader.
- **One directory with a tag per maturity level.** Rejected for the same drift risk, and because agents would have to read every document to learn which ones carry requirements. With stage directories, an `AGENTS.md` per stage tells agents when to read it and when to stay out.

## Consequences

- Promotion is a move. Merging a change's promotion PR ratifies it and moves it into `features/`; the merge is the approval record.
- Code alone never admits a spec to `features/`. Behavior found only in code enters through `shaping/` or `ideas/` and is ratified like any other change.
- The Foundation Gate blocks drafting a PRD, not ideas or shaping, so early intent has a home before the foundation documents exist.
22 changes: 22 additions & 0 deletions docs/adr/0002-deltas-with-base-text-canonized-at-ship.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Deltas with base text, canonized at ship

The product-development skill describes each feature twice over. The feature spec says what the feature does now and holds shipped behavior only. A change says what one bounded addition or revision will do, including the feature's first version. A change carries deltas: each delta lists the spec units it adds, modifies or removes, named by stable ID (`FR-12`) or as a whole scenario file. A modified or removed unit records its base text, the content the change was written against. The deltas reach the feature spec at canonization, after the change ships, not when it is ratified.

Base text is what makes parallel changes safe. Without it, two changes that edit one requirement can't tell that the other exists, and whichever is applied second overwrites the first. OpenSpec, which uses a similar delta model, documents exactly this failure: the second archive silently drops the first change's edits. Here two checks prevent it. The overlap check, when a promotion PR is prepared and again just before it merges, finds other in-flight changes that touch the same spec units or add a unit with the same ID, so the maintainer can order or combine them. The base check, at canonization and again just before the canonization PR merges, compares each recorded base text with the latest feature spec; if the spec has drifted, the delta is rebased first and the maintainer confirms any change in meaning.

Canonizing at ship keeps the feature spec true. A ratified change that never ships, ships late or ships differently never puts unshipped behavior into the spec.

## Considered options

- **Edit the PRD and TRD in place, with a changelog table.** Rejected: the document can't hold an approved change that hasn't shipped without mixing it into shipped behavior, and history ends up in tables nobody reads.
- **Apply deltas when the change is ratified.** Rejected: the spec would describe behavior that hasn't shipped, and a dropped or deferred requirement would have to be backed out of it.
- **Deltas without base text, as a list of new versions.** Rejected: nothing detects that the spec changed under a delta, so parallel changes overwrite each other silently.
- **Line diffs against the spec.** Rejected: diffs break on unrelated edits and give no unit to reason about. Units with stable IDs survive moves and reformatting.

## Consequences

- Every PRD and TRD describes a change, including the first version. A change record is dated history, so planning tense is correct in it. The feature spec and delta text use durable tense, since canonization applies delta text word for word.
- Spec units need stable IDs, unique within their feature and never reused. Scenario files are units as whole files.
- A change keeps its own stories and scenarios until canonization, so an expectation that hasn't shipped never sits beside shipped ones.
- The archive keeps each change's ratified deltas, so the reason for every spec unit stays traceable to the change that wrote it.
- Each feature's log records ratification, the ship signal and canonization, replacing changelog tables.
21 changes: 21 additions & 0 deletions docs/adr/0003-product-documents-form-one-okf-bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Product documents form one OKF bundle

The product-development skill treats `docs/product/` as one Open Knowledge Format (OKF) v0.3 bundle. `docs/product/index.md` is the bundle root and declares `okf_version: "0.3"`. Every directory gets a generated `index.md`; below the root these are plain listings without front matter. Each feature directory is a self-contained subtree with its own `log.md`, and a feature's metadata lives in the front matter of its feature spec overview, `<feature-id>-spec.md`.

A document's `type` comes from a closed list: `constitution`, `vision`, `research-note`, `idea`, `shaping`, `feature-spec-overview`, `feature-spec-facet`, `prd`, `trd`, `delta`, `story`, `delivery-plan`, `open-questions`. Values are lowercase kebab-case. What a facet spec covers, such as a workflow, a contract or a user type, goes in open `tags`. A closed type list lets checks and agents rely on a fixed set of document kinds; open tags let each product describe its facets in its own words.

OKF `status` follows from the document's path: `draft` in `ideas/` and `shaping/`, `stable` for ratified changes and feature specs, and `deprecated` for archived changes. The path is the authority, as ADR 0001 (stage directories carry authority) records; `status` mirrors it for OKF consumers, and a check fails when the two disagree.

## Considered options

- **No OKF profile.** Rejected: agents would keep navigating by directory listings alone, and nothing would check that a document's kind and readiness match where it sits.
- **One bundle per feature.** Rejected: foundation documents, ideas and shaping would sit outside every bundle, and links between features would cross bundle boundaries.
- **An open `type` vocabulary.** Rejected: checks and agents can't rely on a kind they don't know, and near-duplicate types drift apart.
- **Front matter on every Markdown file.** Rejected: OKF v0.3 does not require it. A file without a `type` is not a concept, so `README.md` and `AGENTS.md` keep their roles, and `.feature` files stay assets.

## Consequences

- ADRs, engineering references and test code stay outside `docs/product/`; links to them are external links, which OKF consumers accept even when broken.
- `index.md` and `log.md` are reserved names at every level. Only the bundle-root `index.md` carries front matter.
- Moving a document between stages changes its `status` in the same pull request.
- The profile reference, `references/okf-profile.md` in the skill, describes the index generator and the profile checks, `scripts/okf-profile.py`. The profile checks stay separate from generic OKF conformance, which the upstream validator checks.
32 changes: 26 additions & 6 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ consumers.
## Development Environment

This repository includes a pinned Nix dev shell for local validation. The shell
uses a fixed Nixpkgs commit and provides `python313`, `bats`, and `node`.
uses a fixed Nixpkgs commit and provides `python313`, `bats`, `jq`, and `node`.
`python313` gives the tests stdlib `tomllib` support without adding a PyPI TOML
parser dependency.
parser dependency. `jq` stands in for the `--jq` filters of `gh` in the board-mapping
suite.

With direnv:

Expand Down Expand Up @@ -91,9 +92,16 @@ The init script scaffolds `docs/product/` from templates:
| --- | --- |
| `docs/product/README.md` | Three-tier documentation hierarchy, artifact flow diagram, boundary rule for scenario placement, directory structure reference |
| `docs/product/AGENTS.md` | Agent guidance for organizing product docs, feature workflow checklist, specification evolution conventions |
| `docs/product/features/` | Empty directory ready for the first feature |
| `docs/product/ideas/AGENTS.md` | `ideas/` stage guidance: no requirements authority, read only when named or through idea discovery |
| `docs/product/shaping/AGENTS.md` | `shaping/` stage guidance: tentative context for the change being shaped, promotion rule |
| `docs/product/features/AGENTS.md` | `features/` stage guidance: requirements, admitted only by a merged promotion PR |
| `docs/product/open-questions.md` | Product-wide open questions and the generated open-questions index (`scripts/open-questions.py`) |

Files that already exist are never overwritten.
Files that already exist are never overwritten. Each file renders to a temp
file beside it and is published with a hard link, so a concurrent run or a file
created meanwhile is never replaced, and a failed render leaves nothing behind.
An existing stage directory keeps
its content and gains an `AGENTS.md` only if it has none.

The script inspects the target project before prompting:

Expand Down Expand Up @@ -130,6 +138,16 @@ should reflect the target project's domain.
nix develop -c bats tests/marketplace-package.bats
nix develop -c bats plugins/product-development/tests/plugin-package.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/init.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/feature-evolution.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/open-questions.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/board-mapping.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/okf-profile.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/vision-anatomy.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/canonization.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/feature-tags.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/modernization.bats
nix develop -c bats plugins/product-development/skills/product-development/tests/retrofit.bats
nix develop -c bats plugins/delivery-engineering/tests/plugin-package.bats
nix develop -c bats plugins/okf-bundle/tests/plugin-package.bats
nix develop -c bats plugins/branch-guard/tests
Expand All @@ -141,10 +159,12 @@ git diff --check
```text
agent-plugins/
├── README.md
├── CONTEXT-MAP.md ← points to each plugin's glossary (CONTEXT.md)
├── .agents/plugins/marketplace.json
├── .claude-plugin/marketplace.json
├── .github/plugin/marketplace.json
├── docs/
│ └── adr/ ← architecture decision records
├── tests/marketplace-package.bats
└── plugins/
├── product-development/
Expand Down Expand Up @@ -178,5 +198,5 @@ agent-plugins/
```

Reference files are loaded by the agent only when it enters the corresponding
workflow, keeping context focused. The `phase-*` reference filenames remain for
compatibility.
workflow, keeping context focused. Each reference file is named for its
workflow.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This is a docs and skill-resource change. No runtime feature code is expected. T
- Point to `references/product-vision.md`.
- Modify `skills/product-development/references/initialization.md`
- Explain post-init Foundation Gate requirement.
- Modify `skills/product-development/references/phase-2-requirements.md`
- Modify `skills/product-development/references/requirements.md`
- Legacy compatibility path for the Requirements workflow.
- Make approved `docs/product/constitution.md` and approved, versioned `docs/product/vision.md` required before the first PRD.
- Add PRD vision alignment checks.
Expand Down Expand Up @@ -125,7 +125,7 @@ This is a docs and skill-resource change. No runtime feature code is expected. T

- Modify: `skills/product-development/SKILL.md`
- Modify: `skills/product-development/references/initialization.md`
- Modify: `skills/product-development/references/phase-2-requirements.md`
- Modify: `skills/product-development/references/requirements.md`

**Steps:**

Expand Down Expand Up @@ -191,7 +191,7 @@ This is a docs and skill-resource change. No runtime feature code is expected. T

Clarify that vision is not scaffolded because it requires project-specific interrogation.

- [ ] **Step 7: Update `references/phase-2-requirements.md`**
- [ ] **Step 7: Update `references/requirements.md`**

Required input list must include:

Expand All @@ -210,7 +210,7 @@ This is a docs and skill-resource change. No runtime feature code is expected. T
- [ ] **Step 8: Commit**

```bash
git add skills/product-development/SKILL.md skills/product-development/references/initialization.md skills/product-development/references/phase-2-requirements.md
git add skills/product-development/SKILL.md skills/product-development/references/initialization.md skills/product-development/references/requirements.md
git commit -m "docs: require foundation stage before first PRD"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ git commit -m "docs: update initialization foundation guidance"

**Files:**

- Modify: `skills/product-development/references/phase-2-requirements.md`
- Modify: `skills/product-development/references/requirements.md`

**Goal:**

Expand Down Expand Up @@ -618,8 +618,8 @@ If this is the first PRD and either foundation document is missing, unapproved,
Run:

```bash
rg -n "five constitutional principles|Safety Is Non-Negotiable|Privacy By Default|Local-First Core" skills/product-development/references/phase-2-requirements.md
rg -n "PASS/RISK/FAIL/N/A|FAIL against the constitution|version metadata" skills/product-development/references/phase-2-requirements.md
rg -n "five constitutional principles|Principle \| Status" skills/product-development/references/requirements.md
rg -n "PASS/RISK/FAIL/N/A|FAIL against the constitution|version metadata" skills/product-development/references/requirements.md
```

Expected output:
Expand All @@ -630,7 +630,7 @@ Expected output:
**Commit:**

```bash
git add skills/product-development/references/phase-2-requirements.md
git add skills/product-development/references/requirements.md
git commit -m "docs: make constitution alignment dynamic"
```

Expand All @@ -643,7 +643,7 @@ git commit -m "docs: make constitution alignment dynamic"
- `skills/product-development/references/product-constitution.md`
- `skills/product-development/references/product-vision.md`
- `skills/product-development/references/initialization.md`
- `skills/product-development/references/phase-2-requirements.md`
- `skills/product-development/references/requirements.md`
- `skills/product-development/templates/README.md.tmpl`
- `skills/product-development/templates/AGENTS.md.tmpl`
- `skills/product-development/scripts/init.sh`
Expand Down Expand Up @@ -675,7 +675,7 @@ Expected output: both hashes are `cc34e8b2794ade47bb516394755561e60683150124ad21

```bash
rg -n "references/product-constitution.md|source/product-constitution-guide.md|product-constitution-guide.md" skills/product-development/SKILL.md skills/product-development/references/product-constitution.md
rg -n "constitution-grill|future work|five constitutional principles|Safety Is Non-Negotiable" skills/product-development/SKILL.md skills/product-development/references/phase-2-requirements.md
rg -n "constitution-grill|future work|five constitutional principles" skills/product-development/SKILL.md skills/product-development/references/requirements.md
```

Expected output:
Expand Down Expand Up @@ -715,7 +715,7 @@ git add \
skills/product-development/references/source/product-constitution-guide.md \
skills/product-development/references/product-vision.md \
skills/product-development/references/initialization.md \
skills/product-development/references/phase-2-requirements.md \
skills/product-development/references/requirements.md \
skills/product-development/templates/README.md.tmpl \
skills/product-development/templates/AGENTS.md.tmpl \
skills/product-development/scripts/init.sh \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Update `skills/product-development/references/initialization.md`:
- Clarify that vision is produced by grilling, not scaffolding.
- Include the `grill-with-docs` recommendation behavior.

Update `skills/product-development/references/phase-2-requirements.md`:
Update `skills/product-development/references/requirements.md`:

- Treat this filename as a legacy compatibility path for the Requirements workflow.
- Make approved `docs/product/constitution.md` and approved, versioned `docs/product/vision.md` required inputs for the first PRD.
Expand Down
Loading