Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

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/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
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ After running the script:
python3 "<skill-dir>/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. 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.

2. Review the generated files and adjust wording if needed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -322,6 +324,15 @@ 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"
grep -q 'regenerate the indexes and then run the check' <<< "$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")
Expand Down