diff --git a/.github/workflows/publish-cue.yml b/.github/workflows/publish-cue.yml index ba13022..f4556e9 100644 --- a/.github/workflows/publish-cue.yml +++ b/.github/workflows/publish-cue.yml @@ -23,7 +23,7 @@ jobs: - name: Validate examples run: | for f in examples/*.yaml; do - cue vet schema/prd.cue "$f" -d '#PRDDocument' + cue vet prd.cue "$f" -d '#PRDDocument' done - name: Login to CUE Central Registry uses: cue-labs/registry-login-action@66d40052b0206031343e17173425fa10508968d0 # v1.0.3 diff --git a/AGENTS.md b/AGENTS.md index 99de289..cf61886 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ module/ ← installable module (what users get) SKILL.md ← orchestration skill references/ ← reviewer protocol and shared refs commands/prd-review.md ← command entry point -schema/ ← CUE schema (published to CUE registry) +prd.cue ← CUE schema (published to CUE registry) cue.mod/ ← CUE module definition examples/ ← example PRD YAML files .github/workflows/ ← CI (CUE registry publish) @@ -36,7 +36,7 @@ Follow the existing agent files as a template when adding new ones. ## Working on the schema -The CUE schema at `schema/prd.cue` is published to the CUE Central +The CUE schema at `prd.cue` is published to the CUE Central Registry via the `publish-cue.yml` workflow on tag push. The module definition at `cue.mod/module.cue` controls the module path and language version. diff --git a/README.md b/README.md index d7c6378..58c1d11 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ OpenCode. ## What's in the box -- **CUE schema** (`schema/prd.cue`) — validates PRD YAML documents. Enforces structure for stakeholders, functional +- **CUE schema** (`prd.cue`) — validates PRD YAML documents. Enforces structure for stakeholders, functional requirements, acceptance criteria, workflows, and lifecycle state. - **prd-review skill** (`module/skills/prd-review/`) — a Lola skill that checks CUE schema conformance, then dispatches 5 specialist review agents (`module/agents/prd-*.md`) against a PRD family and emits a BLOCKED / NEEDS REVISION / @@ -39,7 +39,7 @@ See `examples/` for the full field set. Requires [CUE](https://cuelang.org/docs/introduction/installation/). ```bash -cue vet schema/prd.cue your-prd.yaml +cue vet prd.cue -d '#PRDDocument' your-prd.yaml ``` ## Running the Review Council @@ -81,7 +81,7 @@ module/ ← installable Lola module agents/ ← standalone review agent definitions (prd-guard, prd-adversary, ...) skills/prd-review/ ← orchestration skill (schema check + agent dispatch + verdict) commands/ ← command entry points -schema/ ← CUE schema (published to registry) +prd.cue ← CUE schema (published to registry) cue.mod/ ← CUE module definition examples/ ← example PRD YAML files ``` diff --git a/module/AGENTS.md b/module/AGENTS.md index a46d9cc..b4302e4 100644 --- a/module/AGENTS.md +++ b/module/AGENTS.md @@ -25,4 +25,4 @@ PRDs are structured YAML validated against a CUE schema. The document model uses - PRDs do not name unmade implementation choices in Draft state — but naming an external compatibility constraint the business has already committed to (a required data model, wire format, or certification) is expected, not a defect. - Requirements describe behavior, not implementation. - Each agent owns its own scope — findings from different agents may overlap in location but are not deduplicated. -- PRD content is only reviewed for behavior and quality after it passes CUE schema conformance (`schema/prd.cue`, `#PRDDocument`) — structural violations block before the 5 review agents run. +- PRD content is only reviewed for behavior and quality after it passes CUE schema conformance (`prd.cue`, `#PRDDocument`) — structural violations block before the 5 review agents run. diff --git a/module/skills/prd-review/SKILL.md b/module/skills/prd-review/SKILL.md index 724f4aa..6665e64 100644 --- a/module/skills/prd-review/SKILL.md +++ b/module/skills/prd-review/SKILL.md @@ -34,7 +34,12 @@ Example: ``` /prd-review prds/my-feature.yaml prds/my-feature-phase1.yaml /prd-review --serial prds/my-feature.yaml prds/my-feature-phase1.yaml -/prd-review --schema schema/prd.cue prds/my-feature.yaml prds/my-feature-phase1.yaml +``` + +`--schema ` is optional — only needed if the registry is +unreachable and you want a local fallback: +``` +/prd-review --schema prd.cue prds/my-feature.yaml prds/my-feature-phase1.yaml ``` If no paths are given, ask for them before proceeding. @@ -74,15 +79,17 @@ catch (they read for behavior and quality, not structural validity). `module/AGENTS.md`). 2. Otherwise, resolve the schema, registry first: - **Registry** (primary): the schema is published to the CUE Central - Registry at the module path in this module's own - `cue.mod/module.cue` (`github.com/unbound-force/intake-kit@v0`, - definition `#PRDDocument` in the `prds` package under the `schema` - directory, imported as - `github.com/unbound-force/intake-kit/schema:prds`). Attempt to - resolve and vet against it. If the module isn't published yet, the - version doesn't exist, or the registry is unreachable (offline, - airgapped, no `cue login`), this attempt fails — that is expected - and not an error; fall through to the next option. + Registry from this module's `cue.mod/module.cue` + (`github.com/unbound-force/intake-kit@v0`, definition + `#PRDDocument` in the `prds` package at the module root). The + caller needs no local CUE module of their own — vet directly + against the registry import like the following command: + ``` + cue vet github.com/unbound-force/intake-kit@:prds -d '#PRDDocument' + ``` + If the module isn't published yet, the registry is unreachable, + this attempt fails — that is expected and not an error; fall + through to the next option. - **`--schema `** (fallback): if given, vet against that local file's `#PRDDocument` definition instead. - **Neither resolves**: skip this phase and note in the final report: @@ -91,7 +98,7 @@ catch (they read for behavior and quality, not structural validity). gracefully, same as the missing-binary case above. 3. For every provided PRD file, against whichever schema source resolved: ``` - cue vet -d '#PRDDocument' + cue vet -d '#PRDDocument' ``` 4. If every file passes (exit 0), proceed to Phase 1. 5. If any file fails, stop — do not dispatch the 5 agents. Emit the same diff --git a/schema/prd.cue b/prd.cue similarity index 100% rename from schema/prd.cue rename to prd.cue