Repository navigation
Generate DESIGN.md from .dag + enforce the document's syllogism - #5592
Conversation
DESIGN.md is now a drift-gated projection of its .dag model (DESIGN §7: the document is the first target of the recursion), the same way ROADMAP.md is: - std.markdown + serializer: add the missing ThematicBreak block (the `---` rules) with arms in all exhaustive match sites; md_item now renders a leaf continuation block (a paragraph after a nested sub-list) as a CommonMark loose-list continuation (blank line + indent), leaving list-continuations — and therefore ROADMAP.md — byte-unchanged. - gunbc.design_document: full DESIGN.md as typed markdown blocks; one TextInline per paragraph carries the raw markdown source (same convention as roadmap_authority). expected_design_md() is the single generator. - gunbc.design_argument: extend the §1 axioms/propositions with §2-§7 headline propositions, each premised on the sections it follows from. The syllogism lens (std.syllogism.argument_form_is_valid) now checks the WHOLE document is non-vacuous, orphan-free, acyclic, and axiom-set-closed — the §1 open-thread. - generated_artifact + universal drift gate + completeness witness: register DesignArtifact -> DESIGN.md -> expected_design_md(); roster bumped to 4. Verified by execution: drift gate ExitSuccess; ROADMAP.md byte-unchanged; all syllogism + completeness witnesses green incl. orphan/cycle/smuggled-axiom/ vacuous negative controls; regenerated DESIGN.md content-identical to the original modulo line-wrapping (paragraphs unwrapped, as in ROADMAP.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the review. Both findings addressed: Finding 2 (right-folded Finding 1 (document↔proposition parallel-representation) — agreed it's a real, honestly-marked scaffold, and the dissolution trigger is concrete: render each section's lead claim FROM its proposition so the headline is single-authored. Note that trigger is now anchored in the authority itself — it's the named open thread in DESIGN.md §1 ("model §1's axioms… every claim a consequence-chain back to an axiom… with this document as the first target"), which this PR turns into a generated Also folded in: integrated main (#5579 comment-wall) and stripped — sent from silent-badger-134 |
main #5579 (DAG comment-wall) stripped the // comment in src/v2/lens/intent_linearity.dag that carried the bind: root for docs/plans/intent-linearity-design-draft.md, orphaning it in the doc-reachability graph — main has been red on doc_graph_has_no_orphan_docs for 5+ consecutive commits, and every PR merging main inherits it. The intent_linearity lens is still live (only its comments were removed), so the draft is re-homed, not deleted: a markdown link from its reachable sibling docs/plans/self-applying-lenses.md (the intent-linearity registry doc, itself ROADMAP-linked). The draft is literally the DESIGN.md articulation of this PR's own open thread ("model §1's axioms in .dag + enforce the syllogism"), so the link is in-theme. Verified: doc_graph_has_no_orphan_docs / no_dangling_links / universe_nonempty all green by execution. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… DESIGN.md main #5584 hand-edited DESIGN.md's first open thread to add a pointer to the intent-linearity draft. Since DESIGN.md is now generated, fold that exact content change into gunbc.design_document and regenerate (not a hand-merge), so the authority stays the .dag model. Verified: regenerated DESIGN.md content == main's content (whitespace-stripped, the only delta is the pointer); drift gate ExitSuccess; syllogism + completeness witnesses green. main also rooted the orphan draft itself (the new DESIGN.md link + its own link in self-applying-lenses.md), so my earlier redundant line-3 link there is reverted — the orphan is now reachable via the DESIGN.md root. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…idea-machine exemplar) The operator's follow-on to #5592 (DESIGN.md → .dag): bring docs/plans/*.md into the substrate too, "modeled more thoroughly" — not just prose-in-blocks, but the recurring semantic invariant extracted and lens-enforced. Shared model (`gunbc.plan`): - `Plan { slug, title, body: List<MarkdownBlock>, dissolution: DissolutionTrigger }`. `DissolutionTrigger = HasTrigger { text } | NoTrigger` (a closed sum, not String? — dodges the optional-null match gotcha and is honest about presence, §5). - The §6 invariant ("every scaffold lands with a named dissolution trigger") is lifted into a typed field with its own serialized section — single representation, no §3 dual-rep with the prose. status/anchors stay woven in the body prose (lifting them would fork a second representation of inline mentions). - Lens `plans_all_have_dissolution_trigger` / `plans_all_titled` — the plan-doc analog of DESIGN's syllogism lens, walling a plan with no declared dissolution condition. Generation reuses the universal drift framework (no fork, §2): one `PlanArtifact { plan }` variant covers all N plans (registry rows, not N enum variants — §2-horizontal), so fan-out appends to `gunbc.plan_registry.all_plans`. The per-artifact byte-exact drift receipt loop already covers each plan automatically. Exemplar: `docs/plans/idea-machine.md` regenerated from `gunbc.plans.idea_machine` (reflow-only delta vs the hand-written form, per DESIGN.md precedent; the dissolution heading drops its section number as it is now a lifted field). Witnesses (all green by execution): byte-exact drift incl. idea-machine; §6 lens over the registry; synthetic RED controls (missing trigger / missing title detected); non-fold lens, doc-reachability, dangling-link all still green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…idea-machine exemplar) (#5622) * WIP: get design docs into .dag * WIP: get design docs into .dag * WIP: get design docs into .dag * WIP: get design docs into .dag * WIP: get design docs into .dag * Generate DESIGN.md from .dag + enforce the document's syllogism DESIGN.md is now a drift-gated projection of its .dag model (DESIGN §7: the document is the first target of the recursion), the same way ROADMAP.md is: - std.markdown + serializer: add the missing ThematicBreak block (the `---` rules) with arms in all exhaustive match sites; md_item now renders a leaf continuation block (a paragraph after a nested sub-list) as a CommonMark loose-list continuation (blank line + indent), leaving list-continuations — and therefore ROADMAP.md — byte-unchanged. - gunbc.design_document: full DESIGN.md as typed markdown blocks; one TextInline per paragraph carries the raw markdown source (same convention as roadmap_authority). expected_design_md() is the single generator. - gunbc.design_argument: extend the §1 axioms/propositions with §2-§7 headline propositions, each premised on the sections it follows from. The syllogism lens (std.syllogism.argument_form_is_valid) now checks the WHOLE document is non-vacuous, orphan-free, acyclic, and axiom-set-closed — the §1 open-thread. - generated_artifact + universal drift gate + completeness witness: register DesignArtifact -> DESIGN.md -> expected_design_md(); roster bumped to 4. Verified by execution: drift gate ExitSuccess; ROADMAP.md byte-unchanged; all syllogism + completeness witnesses green incl. orphan/cycle/smuggled-axiom/ vacuous negative controls; regenerated DESIGN.md content-identical to the original modulo line-wrapping (paragraphs unwrapped, as in ROADMAP.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * WIP: get design docs into .dag * Re-home orphaned intent-linearity draft (main #5579 fallout) main #5579 (DAG comment-wall) stripped the // comment in src/v2/lens/intent_linearity.dag that carried the bind: root for docs/plans/intent-linearity-design-draft.md, orphaning it in the doc-reachability graph — main has been red on doc_graph_has_no_orphan_docs for 5+ consecutive commits, and every PR merging main inherits it. The intent_linearity lens is still live (only its comments were removed), so the draft is re-homed, not deleted: a markdown link from its reachable sibling docs/plans/self-applying-lenses.md (the intent-linearity registry doc, itself ROADMAP-linked). The draft is literally the DESIGN.md articulation of this PR's own open thread ("model §1's axioms in .dag + enforce the syllogism"), so the link is in-theme. Verified: doc_graph_has_no_orphan_docs / no_dangling_links / universe_nonempty all green by execution. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Resolve merge: fold main's open-thread pointer into the model + regen DESIGN.md main #5584 hand-edited DESIGN.md's first open thread to add a pointer to the intent-linearity draft. Since DESIGN.md is now generated, fold that exact content change into gunbc.design_document and regenerate (not a hand-merge), so the authority stays the .dag model. Verified: regenerated DESIGN.md content == main's content (whitespace-stripped, the only delta is the pointer); drift gate ExitSuccess; syllogism + completeness witnesses green. main also rooted the orphan draft itself (the new DESIGN.md link + its own link in self-applying-lenses.md), so my earlier redundant line-3 link there is reverted — the orphan is now reachable via the DESIGN.md root. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * WIP: get design docs into .dag * Model plan docs as .dag: Plan carrier + §6 dissolution-trigger lens (idea-machine exemplar) The operator's follow-on to #5592 (DESIGN.md → .dag): bring docs/plans/*.md into the substrate too, "modeled more thoroughly" — not just prose-in-blocks, but the recurring semantic invariant extracted and lens-enforced. Shared model (`gunbc.plan`): - `Plan { slug, title, body: List<MarkdownBlock>, dissolution: DissolutionTrigger }`. `DissolutionTrigger = HasTrigger { text } | NoTrigger` (a closed sum, not String? — dodges the optional-null match gotcha and is honest about presence, §5). - The §6 invariant ("every scaffold lands with a named dissolution trigger") is lifted into a typed field with its own serialized section — single representation, no §3 dual-rep with the prose. status/anchors stay woven in the body prose (lifting them would fork a second representation of inline mentions). - Lens `plans_all_have_dissolution_trigger` / `plans_all_titled` — the plan-doc analog of DESIGN's syllogism lens, walling a plan with no declared dissolution condition. Generation reuses the universal drift framework (no fork, §2): one `PlanArtifact { plan }` variant covers all N plans (registry rows, not N enum variants — §2-horizontal), so fan-out appends to `gunbc.plan_registry.all_plans`. The per-artifact byte-exact drift receipt loop already covers each plan automatically. Exemplar: `docs/plans/idea-machine.md` regenerated from `gunbc.plans.idea_machine` (reflow-only delta vs the hand-written form, per DESIGN.md precedent; the dissolution heading drops its section number as it is now a lifted field). Witnesses (all green by execution): byte-exact drift incl. idea-machine; §6 lens over the registry; synthetic RED controls (missing trigger / missing title detected); non-fold lens, doc-reachability, dangling-link all still green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * WIP: get design docs into .dag * Plan lens: require non-empty dissolution trigger text (review fix) Addresses claude-opus-4-7 #5622: `plan_has_dissolution_trigger` checked only the HasTrigger variant, not that `text` is non-empty — asymmetric with `plans_all_titled` (which requires length > 0). An empty `HasTrigger { text: "" }` is no trigger. Now `length(text) > 0`, with a discriminating RED control (`plan_with_empty_trigger`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Brian Searls <briansrls@gunb.ai> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Brian Searls <11205878+briansrls@users.noreply.github.com>
Auto-opened by session-dashboard for session
silent-badger-134.Pushing to
session/silent-badger-134advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan