Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
37e2845
feat(extract): publish carrier reification seams
darko-mijic Jul 17, 2026
af7bd38
docs(carrier): open the interim markdown canonical path
darko-mijic Jul 17, 2026
f6644de
feat(extract): add strict consumer exclusions
darko-mijic Jul 17, 2026
5c33d2e
feat(carrier): add bounded yaml frontmatter parsing
darko-mijic Jul 17, 2026
cf87a6b
feat(carrier): parse the ruled markdown body
darko-mijic Jul 17, 2026
7ae074c
fix(carrier): refuse single-valued verification repeats and misplaced…
darko-mijic Jul 17, 2026
1a74fa8
feat(graph): carry owned prose in schema 0.4.0
darko-mijic Jul 18, 2026
70e1eab
feat(extract): discover and route markdown carriers
darko-mijic Jul 18, 2026
aca7909
feat(specs): establish the markdown carrier corpus
darko-mijic Jul 18, 2026
35620bf
test(extract): isolate root generated state and add preflight
darko-mijic Jul 18, 2026
d5e831f
chore(format): exempt the ruled carrier format from prettier
darko-mijic Jul 18, 2026
d70f91e
feat(specs): author the subsystem and domain corpus
darko-mijic Jul 18, 2026
b3be941
fix(specs): bind the workflow kind to its disciplined heading
darko-mijic Jul 18, 2026
90cccd2
style(test): format the self-hosting graph oracle
darko-mijic Jul 18, 2026
922e42a
feat(anchors): bind self-hosting entrypoints precisely
darko-mijic Jul 18, 2026
99bc103
test(specs): pin the self-hosting graph contract
darko-mijic Jul 18, 2026
e6679c5
test(extract): prove dual-carrier ambiguity is local
darko-mijic Jul 18, 2026
cdb68fc
fix(check): reproduce the anchor environment in the self-hosting pref…
darko-mijic Jul 18, 2026
cfe1f67
feat(specs): define the duplicate-id example point
darko-mijic Jul 18, 2026
8a6ba2c
test(cli): pin the session-3 warning set pending the verifier anchor
darko-mijic Jul 18, 2026
6242a53
test(specs): execute the dual-carrier contract
darko-mijic Jul 18, 2026
1687885
test(graph): prove self-hosted verifier derivation
darko-mijic Jul 18, 2026
ba9f1f0
feat(specs): record self-hosting decisions
darko-mijic Jul 18, 2026
897fb64
build(check): add the self-hosting clean gate
darko-mijic Jul 18, 2026
82bf870
docs(carrier): repair active authoring guidance
darko-mijic Jul 18, 2026
daa8c43
feat(review): render owned prose from the graph
darko-mijic Jul 18, 2026
6685a97
test(package): verify installed self-hosting surfaces
darko-mijic Jul 18, 2026
1d9f38c
docs(plan): record self-hosting execution evidence
darko-mijic Jul 18, 2026
c4454e9
docs(plan): record session four acceptance
darko-mijic Jul 18, 2026
24f9978
docs(concept): record the landed prose projection in 06
darko-mijic Jul 18, 2026
cd735ae
refactor(extract): name the then key directly
darko-mijic Jul 18, 2026
0ad4f44
test(cli): restore root generated-state idempotence and isolation
darko-mijic Jul 18, 2026
592502a
fix(carrier): refuse the full block marker set and align the cap find…
darko-mijic Jul 18, 2026
4ee6136
fix(check): restore the build prefix in preflight recovery commands
darko-mijic Jul 18, 2026
f8b26f5
test(carrier): pin the frozen grammar's security boundary and edge ma…
darko-mijic Jul 18, 2026
fb6b973
fix(extract): report unknown in-section keys instead of dropping them
darko-mijic Jul 18, 2026
e9ed445
docs(reviews): archive the phase-1 code review
darko-mijic Jul 18, 2026
f01ced9
docs(plan): reconcile review remediation ledger
darko-mijic Jul 18, 2026
f65546e
fix(self-hosting): refuse tab markers and correct F4 ledger
darko-mijic Jul 18, 2026
ec88bcc
fix(carrier): refuse inline HTML comments/declarations/PIs and dash-t…
darko-mijic Jul 18, 2026
107f3e5
docs(plan): mark self-hosting phase one executed
darko-mijic Jul 18, 2026
b92d4e3
fix(check): normalize filter spellings and fingerprint pooled root state
darko-mijic Jul 18, 2026
7429d33
docs(reviews): record the remediation verification addendum
darko-mijic Jul 18, 2026
a255705
docs(plans): archive the omo execution plans durably
darko-mijic Jul 18, 2026
6bc261c
docs(plans): file the bootstrap execution plan under its plan-01 family
darko-mijic Jul 18, 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
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ test/fixtures/checkout-v1/expected-graph.json
# same rule for the generated artifacts themselves — derived output is never format-policed
test/fixtures/checkout-v1/expected-design-review/
generated/

# The ruled carrier grammar owns these bytes; Prettier rewrites can break its grammar
# and fixture↔live byte-parity
*.sdp.md
13 changes: 10 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ claims; **`src/` and tests** are authoritative evidence of current realization.

> **Status:** concept ratified · MVP slices 0–5 landed on `main` (plan 10) · post-MVP executable
> machinery landed (plan 13) · authoring **carrier ruled** as `.sdp.md` (the carrier ruling, MD-18;
> plan 16) — product Markdown parser and self-hosting are **next**, not done · **what now:** the
> self-hosting plan under `plans/` (DRAFTED). Build state lives in **`plans/`** — read the highest
> plan 16) — product Markdown parser and self-hosting landed · **interim carrier
> rule** (the carrier ruling (MD-18), transition clause amended by plan 17): New spec IDs may be
> born Markdown-canonical once the product parser lands; pre-existing IDs and the worked example
> remain TS-canonical until the ruled flip (the product parser, `sdp import`, and the checkout-v1
> migration) · **what now:** ✅ EXECUTED — phase-1 implementation complete; final audit passed. Build state lives in
> **`plans/`** — read the highest
> **primary-numbered** plan's status header, plus any **active subplans it (or its parent family)
> explicitly designates as current**; ignore unnumbered files and letter-suffixed plans only when
> no primary/active plan designates them. If that plan is DRAFTED, also read the latest ✅
Expand Down Expand Up @@ -59,7 +63,7 @@ Progressive disclosure — start at the top, follow the pointers down.
| `examples/checkout-v1` | **the worked MVP example** (TS DSL tracer bullet) — specs, anchors, untracked `generated/` (regenerated in-pipeline); walkthrough in its README | when proving the loop end-to-end |
| `explorations/` | **evidence only** (carrier exhibits, executable-example findings) — mapping evidence for design; **never promote spike code into product** | when judging design evidence; not a source tree to ship |
| `plans/` | **the build plan** — what each implementation session does, and why | before writing code — highest primary-numbered plan's status header, plus active subplans it designates; if DRAFTED, also the latest ✅ EXECUTED/RUN plan |
| `npm run check` | **the green gate** — `check:temporal` → typecheck → lint → format:check → build → `generate:example` → `typecheck:examples` → test → `check:example` (update this row when self-hosting check legs land) | before claiming green / after engine edits |
| `npm run check` | **the green gate** — `check:temporal` → lint → format:check → build → `generate:self-hosting` → `generate:example` → typecheck → `typecheck:examples` → test → `check:self-hosting` → `check:example` → `preflight` | before claiming green / after engine edits |
| `reviews/` | **archived session reviews** (implementation, founding-ideation, adversarial + prompts) — durable findings already folded into plans/DECISIONS; read for provenance | rarely |

> Concept docs still carry implementation detail (TS shapes, DSL, graph JSON) for **unsettled and
Expand Down Expand Up @@ -125,6 +129,9 @@ Every doc honours both — never mistake one half for the other:
guidance only, never a validator (checks police conformance and honesty, never content-quality). In prose,
lead with meaning: "the typing law (MD-11)," never bare MD-n (the registry at the top of `DECISIONS.md`
holds the ratified names).
- **Decision-spec pointers lead with names.** See [the plain-language references decision](specs/decisions/plain-language-references.sdp.md)
(`spec:decisions.plain-language-references`) and [the concept-documents dissolution decision](specs/decisions/concept-docs-dissolve.sdp.md)
(`spec:decisions.concept-docs-dissolve`).
- **Naming is resolved — use these names.** Product **Libar Software Delivery Protocol** (short form "the
Protocol"); CLI **`sdp`**; npm **`@libar-dev/software-delivery-protocol`** (single package); repo
`libar-dev/software-delivery-protocol`. Namespaces: `@libar-dev/` (OSS) vs `@libar-ai/` (commercial).
Expand Down
10 changes: 6 additions & 4 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,12 @@ artifact** — approval provenance is git-native, never an authored primitive).
- **Resolved (MD-15):** authored Spec files carry the **`.sdp.ts`** extension (never `.spec.ts`, which every
JS test-runner default glob executes); the model name `Spec` itself was always settled — only the file
serialization changed.
- **Resolved (the carrier ruling, MD-18):** the authored `Spec` document is **`.sdp.md`** — the Markdown
carrier, all eight kinds — once the product parser and `sdp import` land and the worked example migrates;
until then the TS DSL stays sole-canonical. The surviving law is **one canonical surface per ID, no
mixing** (`04` §1); MD-15's rationale re-points to the `.sdp.md` sibling at the doc repair (plan 16 §6).
- **Resolved (the carrier ruling, MD-18; transition clause amended by plan 17):** the authored `Spec`
document is **`.sdp.md`** — the Markdown carrier, all eight kinds. New spec IDs may be born
Markdown-canonical once the product parser lands; pre-existing IDs and the worked example remain
TS-canonical until the ruled flip (the product parser, `sdp import`, and the checkout-v1 migration).
The surviving law is **one canonical surface per ID, no mixing** (`04` §1); the `.sdp.ts` extension
law (MD-15) is re-pointed, not repealed — its rationale carries to the `.sdp.md` sibling.
- **Resolved (the prose-ownership law, MD-19):** free prose enters the graph as **description values on
typed owners** — the owning section or the `Spec` itself (the spec-level narrative slot); never a
heading-path store, never a file-only pointer; the edge-text ownership rule is the surface-design
Expand Down
129 changes: 129 additions & 0 deletions check-carrier-interim.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";

// check-carrier-interim — the structured consistency gate for the interim carrier rule (the
// carrier ruling (MD-18), transition clause amended by the self-hosting plan).
//
// Asserts, and NAMES each disagreeing surface on failure:
// 1. the SAME interim-rule sentence in the three current-rule surfaces (the decision diary,
// the glossary, the agent handbook): new IDs may be born Markdown-canonical once the
// product parser lands, while pre-existing IDs and the worked example stay TS-canonical
// until the ruled flip — the canonical flip/import/migration is NOT claimed complete;
// 2. the obsolete sole-canonical-TS wording gone from the diary and the glossary, and the
// surviving law (one canonical surface per ID, no mixing) still present in the diary;
// 3. the extension-law re-point (the `.sdp.ts` extension law, MD-15) present in the diary;
// 4. the SAME logical/physical relations distinction in the core-model doc and JS-A1:
// relations stay OPTIONAL in the logical Spec; the physical Markdown envelope writes
// `relations: {}` when the logical set is empty — honest carrier syntax, never a new
// logical relation requirement;
// 5. every obligation row the self-hosting phase added to its docket.
//
// Usage: node check-carrier-interim.mjs [rootDir] [planFile]
// rootDir — tree holding the operative surfaces; defaults to this repo root. QA passes a
// temp tree of mutated copies to prove disagreeing surfaces are named.
// planFile — the docket file, relative to rootDir. The default is assembled in parts so this
// durable tracked file carries no numbered plan-path token (check-temporal bans
// those from tracked files).

const rootDir = process.argv[2] ?? dirname(fileURLToPath(import.meta.url));
const planFile = process.argv[3] ?? ["plans", "17-self-hosting-v1.md"].join("/");

const SURFACES = {
decisions: "docs/concept/DECISIONS.md",
glossary: "CONTEXT.md",
agents: "AGENTS.md",
coreModel: "docs/concept/02-core-model.md",
jsA1: "jtbd-stories/01-capture-and-evolve-intent.md",
};

// The one interim carrier rule. Verbatim (modulo whitespace) in the diary, the glossary, and
// the agent handbook — never paraphrased per surface. The trailing period is surface-local
// punctuation (the AGENTS status row continues with its `·` separator), so it is not asserted.
const INTERIM_RULE =
"New spec IDs may be born Markdown-canonical once the product parser lands; pre-existing IDs and the worked example remain TS-canonical until the ruled flip (the product parser, `sdp import`, and the checkout-v1 migration)";

// The owner-confirmed logical/physical relations distinction. Verbatim in the core-model doc
// and JS-A1.
const RELATIONS_DISTINCTION =
"Relations are optional in the logical `Spec` model. A physical Markdown envelope writes `relations: {}` when the logical set is empty: honest carrier syntax, not a new logical relation requirement.";

const SURVIVING_LAW = "one canonical surface per ID, no mixing";
const OBSOLETE_SOLE_CANONICAL = "stays sole-canonical";
const EXTENSION_LAW_REPAIR = "re-pointed, not repealed";

const DOCKET_ROWS = [
"Public/package API proof",
"Temporal-scan coverage",
"Root generated-state isolation",
"Clean-clone proof",
"JTBD carrier repair",
"MD-15 wording repair",
"Four-gate review ledger",
];

// Sameness is about WORDS, so markdown quoting furniture is stripped before whitespace
// normalization: a sentence wrapped inside a `>` blockquote (the AGENTS status row, the
// core-model carrier note) must read identically to its plain-paragraph twins.
const norm = (text) => text.replace(/^>\s?/gm, "").replace(/\s+/g, " ");
const read = (rel) => norm(readFileSync(join(rootDir, rel), "utf8"));

const failures = [];
const expectContains = (surface, needle, why) => {
if (!read(surface).includes(norm(needle))) {
failures.push(`${surface} — ${why}`);
}
};
const expectOmits = (surface, needle, why) => {
if (read(surface).includes(norm(needle))) {
failures.push(`${surface} — ${why}`);
}
};

for (const surface of [SURFACES.decisions, SURFACES.glossary, SURFACES.agents]) {
expectContains(surface, INTERIM_RULE, "missing the interim carrier-rule sentence");
}
expectContains(
SURFACES.decisions,
SURVIVING_LAW,
"dropped the surviving one-canonical-surface law",
);
expectOmits(
SURFACES.decisions,
OBSOLETE_SOLE_CANONICAL,
"still carries the obsolete sole-canonical-TS wording",
);
expectOmits(
SURFACES.glossary,
OBSOLETE_SOLE_CANONICAL,
"still carries the obsolete sole-canonical-TS wording",
);
expectContains(
SURFACES.decisions,
EXTENSION_LAW_REPAIR,
"missing the extension-law re-point (the `.sdp.ts` extension law, MD-15)",
);
expectContains(
SURFACES.coreModel,
RELATIONS_DISTINCTION,
"missing the logical/physical relations distinction",
);
expectContains(
SURFACES.jsA1,
RELATIONS_DISTINCTION,
"missing the logical/physical relations distinction",
);
for (const row of DOCKET_ROWS) {
expectContains(planFile, row, `docket obligation missing: ${row}`);
}

if (failures.length > 0) {
console.error("check-carrier-interim — disagreeing surfaces:\n");
console.error(failures.join("\n"));
process.exit(1);
}

console.log(
"check-carrier-interim — all surfaces agree: interim carrier rule, relations distinction, docket obligations.",
);
process.exit(0);
Loading
Loading