From 1aa4300f4adaa5e65de256d15f6409b8356a38bf Mon Sep 17 00:00:00 2001 From: John Lianoglou Date: Mon, 30 Nov 2026 00:13:13 -0500 Subject: [PATCH 1/3] docs: remove principle wording carried over from a downstream constitution The README template, the two modernization fixture READMEs and an old implementation plan's verification commands still quoted principle names taken from a downstream project's constitution. The template now describes the package level in its own words, the fixtures match it, and the plan's grep patterns no longer name those principles. Refs #46, #36, #35 --- .../2026-05-26-product-constitution-workflow-integration.md | 4 ++-- .../skills/product-development/templates/README.md.tmpl | 2 +- .../fixtures/modernization/expected/docs/product/README.md | 2 +- .../tests/fixtures/modernization/start/docs/product/README.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/superpowers/plans/2026-05-26-product-constitution-workflow-integration.md b/docs/superpowers/plans/2026-05-26-product-constitution-workflow-integration.md index 90e2be9..c43f922 100644 --- a/docs/superpowers/plans/2026-05-26-product-constitution-workflow-integration.md +++ b/docs/superpowers/plans/2026-05-26-product-constitution-workflow-integration.md @@ -618,7 +618,7 @@ 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/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 ``` @@ -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/requirements.md +rg -n "constitution-grill|future work|five constitutional principles" skills/product-development/SKILL.md skills/product-development/references/requirements.md ``` Expected output: diff --git a/plugins/product-development/skills/product-development/templates/README.md.tmpl b/plugins/product-development/skills/product-development/templates/README.md.tmpl index 6d1434f..2d5869d 100644 --- a/plugins/product-development/skills/product-development/templates/README.md.tmpl +++ b/plugins/product-development/skills/product-development/templates/README.md.tmpl @@ -34,7 +34,7 @@ Step definitions (automation code that implements both platform and surface scen ### Package level (`/packages/*/`) -Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages carry the "one domain model, many surfaces" principle into code. +Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages keep one shared domain model in code, so every surface uses the same types and rules. ## Stages diff --git a/plugins/product-development/skills/product-development/tests/fixtures/modernization/expected/docs/product/README.md b/plugins/product-development/skills/product-development/tests/fixtures/modernization/expected/docs/product/README.md index b67addc..252b951 100644 --- a/plugins/product-development/skills/product-development/tests/fixtures/modernization/expected/docs/product/README.md +++ b/plugins/product-development/skills/product-development/tests/fixtures/modernization/expected/docs/product/README.md @@ -34,7 +34,7 @@ Step definitions (automation code that implements both platform and surface scen ### Package level (`/packages/*/`) -Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages carry the "one domain model, many surfaces" principle into code. +Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages keep one shared domain model in code, so every surface uses the same types and rules. ## Stages diff --git a/plugins/product-development/skills/product-development/tests/fixtures/modernization/start/docs/product/README.md b/plugins/product-development/skills/product-development/tests/fixtures/modernization/start/docs/product/README.md index 20ca751..3b3e4b9 100644 --- a/plugins/product-development/skills/product-development/tests/fixtures/modernization/start/docs/product/README.md +++ b/plugins/product-development/skills/product-development/tests/fixtures/modernization/start/docs/product/README.md @@ -25,7 +25,7 @@ Step definitions (automation code that implements both platform and surface scen ### Package level (`/packages/*/`) -Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages carry the "one domain model, many surfaces" principle into code. +Shared types, schemas, hooks, and domain models. Documentation at this level is code-level: READMEs, JSDoc/TSDoc, and inline documentation. Packages keep one shared domain model in code, so every surface uses the same types and rules. ## Artifact flow From 07fa1c266d8f7f974e0a0fd7ea9dc97e0b36a64d Mon Sep 17 00:00:00 2001 From: John Lianoglou Date: Mon, 30 Nov 2026 00:13:13 -0500 Subject: [PATCH 2/3] docs(product-development): route approved scenarios to promotion and defer upgrade checks Workflow selection sent a change with approved stories to BDD Scenarios even after its scenarios were approved, so a promotion-ready change matched two rows. BDD Scenarios now starts only when no scenarios exist yet, and the Promotion row names every artifact that must be approved. Setup's post-init profile check runs before an upgrading 0.1.0 project's constitution and vision gain front matter, so it fails on an ordinary upgrade. On an upgrade, Setup now runs only index generation and the check runs after the modernization guide's setup, with --pending for the feature folders not yet converted. Refs #36, #46, #35 --- .../skills/product-development/SKILL.md | 4 ++-- .../product-development/references/initialization.md | 2 ++ .../tests/lifecycle-review-handoff.bats | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/product-development/skills/product-development/SKILL.md b/plugins/product-development/skills/product-development/SKILL.md index b7cac19..9d16ef1 100644 --- a/plugins/product-development/skills/product-development/SKILL.md +++ b/plugins/product-development/skills/product-development/SKILL.md @@ -389,10 +389,10 @@ Not every feature starts at the beginning. Match the entry point to the current | PRD or TRD drafted, not yet approved | Requirements: finish its review and approval | | PRD and TRD approved, no stories yet | User Stories | | Stories drafted, not yet approved, or without acceptance criteria | User Stories: finish them | -| Stories approved, with acceptance criteria defined | BDD Scenarios | +| Stories approved, with acceptance criteria defined, no scenarios yet | BDD Scenarios | | Scenarios drafted, not yet approved | BDD Scenarios: finish their review and approval | | Discovery suggests the work may evolve an existing feature | Discovery and Design: classify the work first | -| Approved change in `shaping/`, not yet ratified | Promotion | +| Approved change in `shaping/` (PRD, TRD, stories and scenarios all approved), not yet ratified | Promotion | | Ratified change in `features/{feature}/changes/`, handoff not sent | Handoff | | Handoff sent, needs implementation | Implementation | | A check lists open questions that hold a change | Open-question triage | diff --git a/plugins/product-development/skills/product-development/references/initialization.md b/plugins/product-development/skills/product-development/references/initialization.md index 8f50a30..64ad772 100644 --- a/plugins/product-development/skills/product-development/references/initialization.md +++ b/plugins/product-development/skills/product-development/references/initialization.md @@ -84,6 +84,8 @@ After running the script: python3 "/scripts/okf-profile.py" check docs/product ``` + On a project upgrading from 0.1.0, run only `index` here. Its constitution and vision have no front matter until the modernization guide's setup adds it, and its feature folders are still in the 0.1.0 layout, so the check fails until then. Run the check after that step, with one `--pending` for each feature folder not yet converted ([modernization.md](modernization.md#how-it-runs)). + Run them with a `python3` that has PyYAML: the project's dev shell if it provides one, a virtual environment with PyYAML installed, or `nix-shell -p 'python3.withPackages (ps: [ ps.pyyaml ])'`. Without PyYAML, `okf-profile.py` exits 2 and writes nothing. Setup is unfinished until `docs/product/index.md` exists, even with every scaffold file in place; Workflow Selection resumes it at this step. 2. Review the generated files and adjust wording if needed diff --git a/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats b/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats index 223e25a..9cf4587 100644 --- a/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats +++ b/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats @@ -313,7 +313,9 @@ drop_row() { grep -qxF '| PRD or TRD drafted, not yet approved | Requirements: finish its review and approval |' "$skill" grep -qxF '| PRD and TRD approved, no stories yet | User Stories |' "$skill" grep -qxF '| Stories drafted, not yet approved, or without acceptance criteria | User Stories: finish them |' "$skill" - grep -qxF '| Stories approved, with acceptance criteria defined | BDD Scenarios |' "$skill" + grep -qxF '| Stories approved, with acceptance criteria defined, no scenarios yet | BDD Scenarios |' "$skill" + # Approved scenarios route to Promotion only, not back to BDD. + grep -qxF '| Approved change in `shaping/` (PRD, TRD, stories and scenarios all approved), not yet ratified | Promotion |' "$skill" grep -qxF '| Scenarios drafted, not yet approved | BDD Scenarios: finish their review and approval |' "$skill" refute_grep -qF '| PRD exists, needs decomposition |' "$skill" refute_grep -qF '| Stories exist, needs testable criteria |' "$skill" @@ -322,6 +324,14 @@ drop_row() { grep -qx '\*\*Trigger:\*\* User stories have acceptance criteria defined.' "$skill" } +@test "setup on a 0.1.0 upgrade generates indexes and defers the profile check to modernization's setup" { + local text + text=$(sed -n '/^## Post-initialization$/,/^## /p' "$SCRIPT_DIR/references/initialization.md" | tr -s '\n ' ' ') + grep -q 'On a project upgrading from 0.1.0, run only `index` here' <<< "$text" + grep -qF '](modernization.md#how-it-runs)' <<< "$text" + grep -q 'one `--pending` for each feature folder not yet converted' <<< "$text" +} + @test "the lifecycle map and workflow selection place the handoff before implementation" { local skill="$SCRIPT_DIR/SKILL.md" map map=$(sed -n '/^## Lifecycle Map/,/^## Stages/p' "$skill") From f00092124b5ca7c7932214a77143587133327347 Mon Sep 17 00:00:00 2001 From: John Lianoglou Date: Mon, 30 Nov 2026 00:16:08 -0500 Subject: [PATCH 3/3] docs(product-development): regenerate indexes before the upgrade's profile check Adding front matter to an upgrading project's constitution and vision moves them into the root index's Documents section, so the index generated at Setup is stale by the time the profile check runs. The upgrade step now regenerates the indexes, then checks, both with --pending for the feature folders not yet converted. Refs #36, #46, #35 --- .../skills/product-development/references/initialization.md | 2 +- .../product-development/tests/lifecycle-review-handoff.bats | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/product-development/skills/product-development/references/initialization.md b/plugins/product-development/skills/product-development/references/initialization.md index 64ad772..8293335 100644 --- a/plugins/product-development/skills/product-development/references/initialization.md +++ b/plugins/product-development/skills/product-development/references/initialization.md @@ -84,7 +84,7 @@ After running the script: python3 "/scripts/okf-profile.py" check docs/product ``` - On a project upgrading from 0.1.0, run only `index` here. Its constitution and vision have no front matter until the modernization guide's setup adds it, and its feature folders are still in the 0.1.0 layout, so the check fails until then. Run the check after that step, with one `--pending` for each feature folder not yet converted ([modernization.md](modernization.md#how-it-runs)). + On a project upgrading from 0.1.0, run only `index` here. Its constitution and vision have no front matter until the modernization guide's setup adds it, and its feature folders are still in the 0.1.0 layout, so the check fails until then. After that step, regenerate the indexes and then run the check, both with one `--pending` for each feature folder not yet converted; the front matter moves the constitution and vision into the root index, so the earlier index is stale ([modernization.md](modernization.md#how-it-runs)). Run them with a `python3` that has PyYAML: the project's dev shell if it provides one, a virtual environment with PyYAML installed, or `nix-shell -p 'python3.withPackages (ps: [ ps.pyyaml ])'`. Without PyYAML, `okf-profile.py` exits 2 and writes nothing. Setup is unfinished until `docs/product/index.md` exists, even with every scaffold file in place; Workflow Selection resumes it at this step. diff --git a/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats b/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats index 9cf4587..66ec8fb 100644 --- a/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats +++ b/plugins/product-development/skills/product-development/tests/lifecycle-review-handoff.bats @@ -330,6 +330,7 @@ drop_row() { grep -q 'On a project upgrading from 0.1.0, run only `index` here' <<< "$text" grep -qF '](modernization.md#how-it-runs)' <<< "$text" grep -q 'one `--pending` for each feature folder not yet converted' <<< "$text" + grep -q 'regenerate the indexes and then run the check' <<< "$text" } @test "the lifecycle map and workflow selection place the handoff before implementation" {