Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aa0eb4f
evidence: open the arc that executes the whole-repository review
darko-mijic Nov 3, 2026
8503030
docs: correct the handbook, registry, recipe catalog, skill and walkt…
darko-mijic Nov 3, 2026
d46f634
fix(validate): close honesty and carrier gaps from the whole-reposito…
darko-mijic Nov 3, 2026
acc0bd5
fix(runner): dispatch shared contract keys by phase and refuse an uns…
darko-mijic Nov 3, 2026
61e8776
test: bind the body-grammar and structural-anchor regression suites a…
darko-mijic Nov 3, 2026
2094790
specs: apply the review's proposal on the agent surface and accepted …
darko-mijic Nov 3, 2026
47d5382
specs: capture the review's deferred questions and settle the ruled ones
darko-mijic Nov 3, 2026
292fb23
fix(cli): keep writes inside the root and stop discovery following links
darko-mijic Nov 3, 2026
3cecfc2
fix: polish the CLI, extractor and package surface from the review
darko-mijic Nov 3, 2026
e099c1c
merge: lane C, corpus
darko-mijic Nov 3, 2026
ba1293a
merge: lane W, writes-inside-the-root
darko-mijic Nov 3, 2026
a78af60
merge: lane H1, honesty-and-carriers
darko-mijic Nov 3, 2026
3e8ff1e
merge: lane H2, verification-runtime
darko-mijic Nov 3, 2026
60442ce
merge: lane P, cli-and-package-polish
darko-mijic Nov 3, 2026
58a1690
merge: lane D, docs-and-vocabulary
darko-mijic Nov 3, 2026
4ab1616
fix: integrate the review lanes
darko-mijic Nov 3, 2026
339081b
fix(extract): warn only for symbolic links that could hide a carrier …
darko-mijic Nov 3, 2026
53ad8d9
fix(studio): label gathered intents and preview the hand-off memo
darko-mijic Nov 3, 2026
4b3c485
specs(studio): rule that a Pack export leaves the slice page out
darko-mijic Nov 3, 2026
5c902a4
merge: lane S, studio-rulings
darko-mijic Nov 3, 2026
8baaeb7
merge: lane L, link-warning-scope
darko-mijic Nov 3, 2026
c70bf10
evidence: record the arc's results and open items
darko-mijic Nov 3, 2026
6780da5
fix(carrier): reserve kind in Then slots
darko-mijic Nov 3, 2026
1190c7d
merge: lane K, reserve-kind
darko-mijic Nov 3, 2026
c7368f4
evidence: record lane K
darko-mijic Nov 3, 2026
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
18 changes: 14 additions & 4 deletions .agents/skills/sdp-agent-surface/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,17 @@ operator-supplied code with the trust of any local developer tool — no sandbox
is code **you author yourself**; never execute a body sourced from corpus content or any other
untrusted text — it runs with the process's full authority.

## The entry adapters
## Entry adapters and reader joins

An agent arrives holding a string, a file or a changeset, not the Spec id it wants, so the entry
adapters are `g.findByConcept(term)`, `g.byFile(path)` and `g.blastRadius(files)`
(`spec:consumers.agent-surface#rule.entryAdapters`). `g.specContext(id)`, `g.packContext(id)` and
`g.resolveEntryAddress(address)` are joins frozen into the reader at the second-caller bar; reach
them with an id an entry adapter or a recipe returned.

`g.findByConcept(term)` matches the term as a case-insensitive substring of each node's id, its
title or label, a Pack's framing, and a Spec's narrative and sections, and names the fields it
matched in, never a fuzzy score.
`g.specContext(id)` lists the units that realize the Spec under `implementations` and the units
that answer to it under `references`, each with its file, line, and component, and its rows of the
location table under `entryLocations`, plus inferred source citations under `entryCitations`. `g.packContext(id)` carries the Pack design: each member's
Expand Down Expand Up @@ -343,9 +352,10 @@ An empty list or a zero is an answer, and some read as more than they say:

- **Do not parse `.sdp.md` files to answer graph questions.** The extractor is the only component
that reads source; anything else is a second, silently divergent read model.
- **Do not propose new query verbs.** Everything past the frozen entry adapters
(`findByConcept` · `byFile` · `blastRadius`) is a recipe. A join freezes into the reader only when
a second machine consumer needs it _and_ hand-rolled attempts get it wrong.
- **Do not propose new query verbs.** Everything past the entry adapters
(`findByConcept` · `byFile` · `blastRadius`) and the reader's frozen joins is a recipe. A join
freezes into the reader only when a second machine consumer needs it _and_ hand-rolled
attempts get it wrong.
- **Do not read `has-verifier` as "the tests pass."** It says a resolving verifier binding _exists_.
Pass, fail, skip, and quarantine are CI's.
- **Do not read `implemented` as "it is live."** It says a code anchor binds to the Spec. Runtime
Expand Down
9 changes: 5 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ self-hosting/example checks → preflight correctly, so prefer it after engine e
The `check:example` step reports 0 errors and 0 warnings. The unbound `defined` example stays
visible in the Design Review verifier bindings and recipe 10, declared versus enabled verifiers.

The `check:self-hosting` step emits two kinds of intentional warning: `honesty/gaps`, one per
owner-ratified ready Spec without a resolving verifier binding, and `conformance/prose-mentions`,
one per mentioning Spec and target pair with no declared relation either way (recipe 22 lists the
pairs). The self-hosting oracle pins both sets; they are expected, not a regression.
The `check:self-hosting` step emits one kind of intentional warning: `honesty/gaps`, one per
owner-ratified ready Spec, decisions aside, without a resolving verifier binding. The self-hosting
oracle pins that set and pins that no prose mention lacks a declared relation (recipe 22's
`unbacked` stays empty), so a `conformance/prose-mentions` warning, like any other new warning, is
a regression.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ Libar Software Delivery Protocol is a typed, executable, self-validating meta-mo
delivery: author `Spec` documents in the repository, derive one graph, and check conformance and
honesty.

**Carrier rule:** Specs and Packs default to Markdown; the TS DSL survives as import source and a
lawful per-ID option, while behavior and example Specs may use Gherkin canonically per ID (the
carrier ruling, MD-18, the Pack syntax ruling, MD-25, and the Gherkin carrier option, MD-27).
You write Specs as Markdown files (`*.sdp.md`) and group them into Packs. `sdp` derives one graph
from those files and from anchors in your code, then checks it.

Read the [concept](docs/concept/README.md), the [ubiquitous language](CONTEXT.md), and the
[checkout-v1 walkthrough](examples/checkout-v1/README.md).
Expand Down Expand Up @@ -57,6 +56,13 @@ fails with `xcode-select: error: tool 'sdp' requires Xcode`. The checked-in pnpm
disables pnpm 11's dependency auto-reconciliation for repository scripts, so the supported
`pnpm sdp` / `pnpm sdp:q` forms do not rewrite an npm-installed dependency tree.

## Carriers

A carrier is the file that holds a Spec or a Pack. Specs and Packs default to Markdown; the
TypeScript DSL survives as import source and a lawful per-ID option, and behavior and example Specs
may use Gherkin canonically per ID (the carrier ruling, MD-18, the Pack syntax ruling, MD-25, and
the Gherkin carrier option, MD-27).

## Installed CLI (adopter repositories)

Pin the Protocol to a full commit SHA in your adopter's `package.json`:
Expand Down Expand Up @@ -145,10 +151,11 @@ diagrams, `gherkin` the Gherkin-shaped read view, and `studio` the static Spec S
JavaScript query body against a freshly derived graph. Run `sdp --help` for the complete option
contract. Adopters own their root and exclusion policy.

The Studio's phase 1 adds static SVG diagrams, the architecture and tests lenses, all Spec-page
panels, registers, the owner queue and a glossary. A base graph adds a design diff; CTRF reports
add external run evidence. The composing panel hands off scoped proposals, every Pack downloads
as one HTML file, and pages print as documents. Open `generated/spec-studio/index.html` through
The Studio is a static page set: five lenses (Packs, capabilities, architecture, tests and
evidence), static SVG diagrams, every Spec-page panel, registers, the owner queue, the roadmap and a
glossary. A base graph adds a design diff; CTRF reports add external run evidence. The composing
panel hands off scoped proposals, every Pack downloads as one HTML file, and pages print as
documents. Open `generated/spec-studio/index.html` through
`file://` or a static host. `studio --watch` rebuilds on carrier changes, with no server; source
and input edits start no cycle. Copy a base graph outside `generated/` before using `--base`.
Run `stamp` after building to record publishing metadata. The reusable
Expand Down
7 changes: 5 additions & 2 deletions check-git-install.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ try {
const version = run(cli, ["--version"], consumer).trim();
assert.ok(version.includes(commit), `${version} does not name ${commit}`);
const manifest = JSON.parse(readFileSync(join(installed, "package.json"), "utf8"));
for (const surface of Object.values(manifest.exports)) {
for (const path of Object.values(surface)) assert.ok(existsSync(join(installed, path)), path);
// Conditions nest (the root export pairs each of import and require with its own types).
const exportedPaths = (target) =>
typeof target === "string" ? [target] : Object.values(target).flatMap(exportedPaths);
for (const path of exportedPaths(manifest.exports)) {
assert.ok(existsSync(join(installed, path)), path);
}
const recipe = readFileSync(join(installed, "dist/recipes/25-address-resolution.js"), "utf8");
writeFileSync(
Expand Down
4 changes: 2 additions & 2 deletions check-temporal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
// (session/wave/fold handles, ISO dates, numbered plan-file refs) are banned from every delivery
// artifact — tracked files and nonignored untracked files. An ignored agent workspace is not a
// delivery artifact and never reaches the sweep: enumeration honours `.gitignore`, so no exemption
// is written for one. Only the temporal-by-genre artifacts are exempt: the dated decision diary,
// is written for one. Only temporal-by-genre artifacts are exempt, never the decision registry:
// the per-session plan done-records, the archived reviews, the dated exploration records (verbatim
// exhibits, diary-dated like DECISIONS), the restored lineage documents (verbatim historical
// exhibits), the tracked orchestration drafts/plans/evidence under `.omo/` — plus the
Expand All @@ -17,7 +17,7 @@ import { fileURLToPath } from "node:url";
const pattern =
"Session[ -][0-9]|Wave[- ][A-Z]|Fold-[A-Z]|deferredInSession|plans/[0-9]+|20[0-9]{2}-[0-9]{2}-[0-9]{2}";
const expression = new RegExp(pattern, "u");
const excludedFiles = ["docs/concept/DECISIONS.md", "package-lock.json"];
const excludedFiles = ["package-lock.json"];
const excludedDirectories = [
"plans/",
"reviews/",
Expand Down
6 changes: 4 additions & 2 deletions docs/agent-surface/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ reason and expected input. Missing required input is never answered as empty, ex
`files`, which reads as an empty change list.
The samples name this repository's corpus, so every body runs as written here. The recipe check
executes each one unchanged. Recipes report absent subjects in their documented result shape.
Most use `found: false`; the design diff, context bundle, perspective filter and key-family register report an absent
Pack in `diagnostics`. A value that is not JSON, JSON that is not an object (null, an array, a
Recipes 3, 5, 9, 14, 19, 21, 27, 29, 34 and 39 answer an absent subject with `found: false`. The
design diff, context bundle, perspective filter, key-family register, example-space coverage,
rule-key proposal, entry citations, roadmap, design slice and roadmap memo (recipes 35, 36, 37,
41, 44, 48, 51, 53, 54 and 55) report an absent Pack in `diagnostics`. A value that is not JSON, JSON that is not an object (null, an array, a
string, a number or a boolean), or a file that cannot be read is refused before the body runs,
with exit 1 and one line on stderr.

Expand Down
8 changes: 4 additions & 4 deletions docs/concept/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ positions and are never reused.
| MD-15 | the `.sdp.ts` extension | durable | The extension law is re-pointed, not repealed: carrier extensions identify Specs without test-glob collisions. MD-28 applies the same law to the Gherkin option. | [Spec](../../specs/decisions/sdp-ts-extension.sdp.md) (`spec:decisions.sdp-ts-extension`) |
| MD-16 | carried evidence | durable | Promoted evidence must carry the evidence it represents. | [Spec](../../specs/decisions/carried-evidence.sdp.md) (`spec:decisions.carried-evidence`) |
| MD-17 | point-per-example | durable | Each example is one bound point. | [Spec](../../specs/decisions/point-per-example.sdp.md) (`spec:decisions.point-per-example`) |
| MD-18 | the carrier ruling | durable | Specs and Packs default to Markdown; the TS DSL survives as import source and a lawful per-ID option. MD-25 completes the Pack syntax deferral; MD-27 adds a Gherkin option for behavior and example Specs; MD-28 settles that option's canonical suffix as `.sdp.gherkin`. The surviving law is one canonical surface per ID, no mixing. | [Spec](../../specs/decisions/carrier-ruling.sdp.md) (`spec:decisions.carrier-ruling`) |
| MD-18 | the carrier ruling | durable | Specs and Packs default to Markdown; the TS DSL survives as import source and a lawful per-ID option. MD-25 completes the Pack syntax deferral; MD-27 adds a Gherkin option for behavior and example Specs; MD-28 settles that option's canonical suffix as `.sdp.gherkin`. The surviving law is one canonical surface per ID, no mixing. | [Spec](../../specs/decisions/carrier-ruling.sdp.md) (`spec:decisions.carrier-ruling`); narrowed by [Spec](../../specs/decisions/pack-markdown-carrier.sdp.md) (`spec:decisions.pack-markdown-carrier`) and [Spec](../../specs/decisions/gherkin-carrier-option.sdp.md) (`spec:decisions.gherkin-carrier-option`) |
| MD-19 | the prose-ownership law | durable | Prose belongs to typed graph owners. | [Spec](../../specs/decisions/prose-ownership.sdp.md) (`spec:decisions.prose-ownership`) |
| MD-20 | the strict consumer-exclusion contract | durable | Consumer exclusions are explicit root-relative paths. | [Spec](../../specs/decisions/exclusion-contract.sdp.md) (`spec:decisions.exclusion-contract`) |
| MD-21 | the envelope-grammar ownership posture | durable | The Protocol owns the envelope contract, not the YAML library. | [Spec](../../specs/decisions/envelope-grammar-posture.sdp.md) (`spec:decisions.envelope-grammar-posture`) |
| MD-22 | the agent front door | durable | The CLI's one evaluation sink and the exported reader are two entrances over one seam, deriving the graph in process on every invocation. | [Spec](../../specs/decisions/agent-front-door.sdp.md) (`spec:decisions.agent-front-door`) |
| MD-23 | verification posture, not realization | durable | `verification.mode` states intended posture; enabled-verifier realization remains derived. | [Spec](../../specs/decisions/verification-posture-not-realization.sdp.md) (`spec:decisions.verification-posture-not-realization`) |
| MD-24 | the example realization posture | durable | Examples normally carry verification evidence rather than build-backlog work; implementation remains a direct binding-derived fact. | [Spec](../../specs/decisions/example-realization-posture.sdp.md) (`spec:decisions.example-realization-posture`) |
| MD-25 | the Pack syntax ruling | durable | Packs gain a Markdown manifest carrier closed to id · specs · modelRefs with H1 title and prose framing; the TS manifest stays a lawful per-ID option. | [Spec](../../specs/decisions/pack-markdown-carrier.sdp.md) (`spec:decisions.pack-markdown-carrier`) |
| MD-25 | the Pack syntax ruling | durable | Packs gain a Markdown manifest carrier closed to id · specs · modelRefs with H1 title and prose framing; the TS manifest stays a lawful per-ID option. | [Spec](../../specs/decisions/pack-markdown-carrier.sdp.md) (`spec:decisions.pack-markdown-carrier`); narrowed by [Spec](../../specs/decisions/roadmap-priority.sdp.md) (`spec:decisions.roadmap-priority`) |
| MD-26 | the decision readiness posture | durable | Registry-ratified decision records state `ready`; operational backlog and verifier-gap signals exclude kind `decision` while preserving an explicit count. | [Spec](../../specs/decisions/decision-readiness-posture.sdp.md) (`spec:decisions.decision-readiness-posture`) |
| MD-27 | the Gherkin carrier option | durable | Behavior and example Spec IDs may select a graph-aware Gherkin carrier; Markdown stays default, execution stays behind generated contracts and anchored handlers, and no lifecycle taxonomy is imported. MD-28 settles the canonical suffix as `.sdp.gherkin`. | [Spec](../../specs/decisions/gherkin-carrier-option.sdp.md) (`spec:decisions.gherkin-carrier-option`) |
| MD-27 | the Gherkin carrier option | durable | Behavior and example Spec IDs may select a graph-aware Gherkin carrier; Markdown stays default, execution stays behind generated contracts and anchored handlers, and no lifecycle taxonomy is imported. MD-28 settles the canonical suffix as `.sdp.gherkin`. | [Spec](../../specs/decisions/gherkin-carrier-option.sdp.md) (`spec:decisions.gherkin-carrier-option`); narrowed by [Spec](../../specs/decisions/sdp-gherkin-extension.sdp.md) (`spec:decisions.sdp-gherkin-extension`) and [Spec](../../specs/decisions/carrier-universality.sdp.md) (`spec:decisions.carrier-universality`) |
| MD-28 | the `.sdp.gherkin` extension | durable | Canonical Gherkin carriers use `.sdp.gherkin`; bare `.feature` stays non-canonical import-source territory so Protocol files stay outside default Cucumber globs. | [Spec](../../specs/decisions/sdp-gherkin-extension.sdp.md) (`spec:decisions.sdp-gherkin-extension`) |
| MD-29 | the carrier universality bound | durable | Gherkin remains honest for behavior and example Specs; universality is per-ID carriers plus a generated read projection, with Markdown still the default. | [Spec](../../specs/decisions/carrier-universality.sdp.md) (`spec:decisions.carrier-universality`) |
| MD-30 | structural anchors confer nothing | deleted | `component` and `uses` author narrow CodeNode structure while leaving realization, readiness, and delivery facts untouched; replaced by MD-38, which restates what survives. | deleted; its text reads in git at `90c75dd` (`specs/decisions/structural-anchor-semantics.sdp.md`) |
| MD-31 | adopted registrars are committed | durable | A registrar imported by tracked authored code is committed and byte-checked; unadopted registrar siblings remain ignored and regenerable. | [Spec](../../specs/decisions/adopted-registrars-committed.sdp.md) (`spec:decisions.adopted-registrars-committed`) |
| MD-32 | the shipped projections stay frozen | durable | The shipped Design Review, census, Mermaid, and Gherkin projections are settled read models; re-specifying them is refused; a decision that supersedes it replaces it whole, and a decision that refines it narrows it for one projection or rendering, each passing the ADR test. Each record that refines it carves out the renderings its relation's reason names: open-section entries render as a list, an open question shows its key, the Pack page presents the Pack's design (MD-39), the Design Review lists referencing units and the census its References table (MD-37), and the census renders role, layer and context tables beside the Design Review's unit attributes (MD-38). | [Spec](../../specs/decisions/shipped-projections-frozen.sdp.md) (`spec:decisions.shipped-projections-frozen`); narrowed by [Spec](../../specs/decisions/authored-entry-order.sdp.md) (`spec:decisions.authored-entry-order`), [Spec](../../specs/decisions/question-key-rendering.sdp.md) (`spec:decisions.question-key-rendering`), [Spec](../../specs/decisions/pack-design-page.sdp.md) (`spec:decisions.pack-design-page`), [Spec](../../specs/decisions/anchor-binding-grain.sdp.md) (`spec:decisions.anchor-binding-grain`), and [Spec](../../specs/decisions/architectural-annotation.sdp.md) (`spec:decisions.architectural-annotation`) |
| MD-33 | planning truths live in ruled graph homes | durable | Each planning-truth type has one ruled home in the graph, the briefs index shape is retired as a carrier of law, and a refusal is replaced whole by a decision that supersedes it or narrowed by one that refines it, either passing the ADR test; a decision refines the Spec whose question it settles, which names it through `decidedBy`. | [Spec](../../specs/decisions/planning-truths-placement.sdp.md) (`spec:decisions.planning-truths-placement`) |
| MD-33 | planning truths live in ruled graph homes | durable | Each planning-truth type has one ruled home in the graph, the briefs index shape is retired as a carrier of law, and a refusal is replaced whole by a decision that supersedes it or narrowed by one that refines it, either passing the ADR test; a decision refines the Spec whose question it settles, which names it through `decidedBy`. | [Spec](../../specs/decisions/planning-truths-placement.sdp.md) (`spec:decisions.planning-truths-placement`); narrowed by [Spec](../../specs/decisions/roadmap-priority.sdp.md) (`spec:decisions.roadmap-priority`) and [Spec](../../specs/decisions/roadmap-over-plans.sdp.md) (`spec:decisions.roadmap-over-plans`) |
| MD-34 | architectural significance rides existing primitives | deleted | Specs carrying architectural significance are linked by the existing relations and no pattern vocabulary is admitted; replaced by MD-38, which restates what survives and returns the CodeNode-grain role. | deleted; its text reads in git at `90c75dd` (`specs/decisions/architectural-significance-rides-primitives.sdp.md`) |
| MD-35 | source commentary never enters the graph | deleted | Comment prose authors no graph content and law-carrying comments promote into Specs; replaced by MD-36, which restates that half and reverses the identity half. | deleted; its text reads in git at `90c75dd` (`specs/decisions/jsdoc-graph-extraction-refused.sdp.md`) |
| MD-36 | the comment form | durable | A `/** … */` comment carrying reserved camelCase `@sdp*` tags is a second extracted representation of the anchor, feeding the same closed envelope as the constant form; prose still authors nothing, no import is required, and the package ships a zero-dependency `/anchors` subpath. | [Spec](../../specs/decisions/anchor-comment-form.sdp.md) (`spec:decisions.anchor-comment-form`) |
Expand Down
Loading
Loading