Gates & conformance
A way declares a gated flow — and can't claim gates it doesn't enforce.
The unit ways packages is not a prompt or a skill — it's a gated, multi-phase process. The
manifest declares it under spec.flow:
spec:
flow:
phases:
- { id: prd, label: PRD }
- { id: plan, label: Planning }
- { id: build, label: Implementation }
gates:
- { id: prd, afterPhase: prd, approval: user, enforcement: blocking }
- { id: plan, afterPhase: plan, approval: user, enforcement: blocking }
- { id: scans, afterPhase: build, approval: auto, check: "npm test" }
generates:
- { name: PRD.md, pathTemplate: "docs/prds/{slug}/PRD.md", producedInPhase: prd, gate: prd }
- { name: PLAN.md, pathTemplate: "docs/prds/{slug}/PLAN.md", producedInPhase: plan, gate: plan }
state: .ways/state.json- Phases — the ordered stages of the flow.
- Gates — checkpoints between phases:
approval: user(a human says OK) orauto(a named check passes);enforcement: blockingoradvisory. - Generates — the documents each phase must produce, with path templates.
- State — where progress lives, so gate status is inspectable, resumable, and auditable. One
.ways/state.jsonper worktree — see State files.
Conformance: claims are checked
ways conformance applies rules a way must pass beyond schema validity — a way earns the
conformant tier or it doesn't install (ways add refuses non-conformant ways):
| Rule | Guarantees |
|---|---|
namespaced-name | metadata.name is ns/name (e.g. incu/dev) — the cross-way collision key |
auto-gate-check | every approval: auto gate names a resolvable check |
generates-map | every generated doc maps to a declared phase and gate |
state-pointer | the flow declares a state contract pointer |
slot-ids-unique | slot ids are unique within needs (no ambiguous duplicate) |
contract-resolves | every slot contract reference exists in its catalog — an unknown ref fails, with the near-miss named (typo lint) |
hard-user-gate | at least one approval: user + enforcement: blocking gate exists |
One rule is a warning, not a tier-breaker: needs-not-alias flags a way still declaring slots
under the deprecated capabilitySlots alias and hints the rename to spec.needs — the way stays
conformant.
That last rule is the point: a "gated way" without a real human gate is not conformant. The contract encodes the discipline — no code before plan approval, no silent merges — instead of trusting a README to say it.
Validation tiers
A way climbs a ladder of verifiable claims: schema-valid → conformant → doctor-clean → (later,
with the registry) reviewed and verified-publisher tiers. Each tier is checkable by tooling — none
is self-declared.