Skip to content

feat: establish the intent and exploration foundation#122

Merged
levifig merged 20 commits into
mainfrom
intent-exploration-foundation
Jul 19, 2026
Merged

feat: establish the intent and exploration foundation#122
levifig merged 20 commits into
mainfrom
intent-exploration-foundation

Conversation

@levifig

@levifig levifig commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Adds the provider-neutral relational substrate between capture and delivery, as the first materialized node of the five-node change-model-hard-cut lineage.

What this Change delivers

  • Schema 12 (additive): project-scoped Intent with immutable snapshots, append-only dispositions derived from per-aggregate sequences, and immutable four-field deferral payloads; Exploration with byte-capped portable checkpoints and typed ordered items; logical conversations normalized apart from machine-local handles, bounded log references, and immutable availability observations. Composite foreign keys reject cross-project and cross-intent references before commit.
  • One canonical operation mapping (intent_operations) shared by intent create, intent defer, the transitional journal defer adapter, and legacy conversion: retries converge on the first write with digest telemetry, canonical-first adapter calls materialize legacy projections from the stored packet with an atomic v0→1 advance, and keys owned by pre-conversion legacy deferrals cannot be captured by unrelated writes.
  • Deterministic CLI surfaces: loaf intent, loaf exploration (including the bounded cursor-expandable context projection), loaf conversation, loaf intake list, loaf state migrate deferrals (non-mutating dry-run manifest; backup-first, provenance-linking, rerunnable apply), loaf doctor --json, and loaf install --upgrade --dry-run --json with plan/apply parity.
  • Continuity: journal context gains canonical deferred-Intent precedence with legacy dedup, plus a bounded exploration-checkpoints layer with exact resume commands.
  • Skill convergence: new /explore (checkpoint discipline, portable resumption, exploration-deferral semantics), /triage rewritten around intake dispositions with two-step capture closure, idea narrowed to pure capture, brainstorm internalized behind explore, and the config-aware maintenance protocol in loaf-reference with request-mode gates.

Verification

  • Full go test ./... green; failure injection at every transactional stage; concurrency race-checked; portable core proven byte-identical with every source unavailable; blind fresh-agent resumption exercise passed from the rendered context alone.
  • Installed smoke evidence re-recorded against Claude Code 2.1.215, Codex 0.144.5, and OpenCode 1.18.3 with model-visible markers.
  • Three independent reviews: Claude units review (findings resolved), Claude complete-diff review (APPROVE), and two Codex adversarial reviews (all thirteen findings fixed with falsification tests or guidance corrections; three non-blocking observations retained as journal deferrals).

Out of scope, deliberately

Intent-to-Change promotion, worktree mechanization, and draft PRs (next node); Linear coordination (following node); Spec/Task/render removal (terminal node). Real-database migration to schema 12 remains a separately consented, backup-first operation.

levifig added 20 commits July 19, 2026 02:07
Amend the spec-conversion-and-guidance-sweep terminal stub with the reversal-test gate, the Change Decisions section as the delivery-scoped primary ledger, reflect joining the guidance convergence with an already-carried-by-the-Change check, stand-alone promoted ADRs with no back-links, and maturity-weighted ADR creation.
…or protocol

- add the intent-exploration-foundation Change packet: product contract, plan with seven named units, and the workflow-convergence research synthesis
- amend the journal-reliability-foundation successor protocol to the accepted five-node lineage without rewriting its shipped history
- add additive migration 0012: intent identity/snapshots/deferrals/dispositions, the canonical intent_operations mapping, exploration checkpoints and typed items, logical conversations with handles/log refs, and immutable availability observations
- enforce same-project references through composite foreign keys and reject cross-project joins before commit
- centralize entity-kind and relationship-type registration and rewire trace resolution through it
- apply every canonical migration above 10 in the explicit journal-first path so it converges to the current schema
- prove schema 9/10/11 upgrades, constraint falsification, concurrent sequence allocation, and doc mirror parity
- implement loaf intent create/defer/resume/resolve/show/list over immutable snapshots and append-only dispositions with retry-safe operation keys and digest telemetry
- convert journal defer into a compatibility adapter over the canonical operation: adapter-first writes record the Intent and a version-1 mapping, canonical-first retries materialize both legacy projections from the stored packet and advance the mapping atomically, and legacy-only rows stay untouched until explicit conversion
- implement loaf exploration create/checkpoint/list/context with the four-field portable core capped at 4096 UTF-8 bytes, typed ordered items, and bounded cursor-expandable context layers
- implement loaf conversation create/show/list/handle add/observe for logical conversations, machine-local handles, bounded log references, and immutable availability observations
- extend project deletion, safe-command classification, agent help, CLI reference metadata, the native cutover audit, and generated targets for the new surfaces
- enforce the closed relationship matrix at link creation for pairings that touch the new entity kinds while preserving legacy link behavior
- add loaf intake list: a deterministic projection of unresolved sparks, ideas, brainstorms, intents, and unmigrated legacy deferrals with exact read commands and converted-projection deduplication
- extend the export manifest and the backend-mapping invariant scans with the new tables, joining conditionally so behind-schema databases still classify before upgrade
- register intake reference metadata, agent help, safe-command leaves, and the native cutover audit row; regenerate targets
- reject deferring or checkpointing through an operation key already bound to a different aggregate instead of silently returning the other aggregate's first write
- report a clear binding explanation when journal defer hits a key bound to a non-deferred intent
- build the conditional invariant-scan clauses from one kind-to-table source so the three scan sites cannot drift
- prove every matrix pairing through link and trace, seeded project deletion, backup row preservation, and multi-page intents-layer pagination
…ontext

- deferred-intent layer treats unresolved canonical deferred Intents as active truth regardless of journal recency, enriched with mapped legacy decision/spark projections when present
- pre-conversion legacy deferrals still surface once; mapped legacy rows deduplicate behind their canonical Intent
- add the bounded exploration-checkpoints layer: latest portable checkpoint per exploration with counts, truncation, and exact resume commands
- render both layers in the human digest and hook envelopes with exact read commands
- loaf doctor --json emits the identical check set as a read-only projection that never prompts or repairs; --json --fix is rejected structurally and parity plus non-mutation are proven by tree hashing
- loaf state migrate deferrals converts historical journal deferrals into canonical deferred Intents: dry-run reports the project-specific manifest without writing, apply verifies a whole-database backup first, links decision/spark provenance, records one migration marker each, preserves every legacy row, and reruns idempotently
- register both surfaces in agent help and CLI reference metadata
- add the user-facing explore skill: durable Explorations, four-field checkpoint discipline, portable resumption, provenance rules, and Intent capture, with brainstorm's divergent stance preserved as an internal technique
- rewrite triage around loaf intake list and explicit dispositions: discard, retain, track as Intent, defer, resume, resolve, explore, or hand to shape, with legacy deferrals visible until consented conversion
- narrow idea to a capture primitive routed through triage and hide brainstorm from the primary workflow without deleting its stance
- add the config-aware maintenance protocol reference to loaf-reference with diagnose, plan, ask, apply, verify sequencing and package-manager boundaries
- extend the routing evaluation to 35 skills with explore, maintenance, and disposition conflict probes
- add loaf install --upgrade --dry-run: per-surface plan functions mirror apply for target artifacts, managed skills, codex rules and guidance, deprecations, project files, symlinks, fenced sections, and MCP recommendations, recording creates, updates, retirements, preserved conflicts, and consent requirements without writing
- --json emits one deterministic plan document with exact follow-up commands and consent_required; non-mutation is proven by tree hashing across installed, absent, and consent-missing fixtures, and the skill plan is asserted against apply behavior
- register the flags in reference metadata and update the skill taxonomy count for the converged surface
- the triage skill, spark resolve command help, CLI reference, and agent help all omitted the required --by resolving-entity flag, so the documented invocation failed verbatim with no way to self-correct from --help
- reconcile the durable-artifact declaration: spark is a CLI capture primitive carried by idea and triage guidance, not a skill directory
…ions

- rebuilding for this Change changed the candidate native binary hash, so the strict capability suite failed closed on the retained receipts; the locally installed harnesses had also moved past the exact-version pins
- re-pin and freshly smoke Claude Code 2.1.215 startup (the CLI auto-updated from 2.1.214 mid-refresh), Codex 0.144.5 isolated startup, and OpenCode 1.18.3 request delivery; all three returned the model-visible marker and the OpenCode receipt proves plugin load, root-session lookup, and cleanup
- update the capability registry records and test pins to the proven versions; superseded receipts remain in git history
- reject minting a canonical operation mapping for a key that a pre-conversion legacy deferral owns, so a tracked create can never hide a legacy deferral from continuity or block its conversion
- include ordered checkpoint items in the idempotency digest so retries differing only in items report a mismatch instead of a silent match
- enforce same-intent deferral references with composite (intent_id, deferral_id) foreign keys; a disposition can no longer cite another intent's immutable payload
- rewrite the idea skill to pure capture, removing the retired backend, status-lifecycle, and SPEC-promotion guidance; strip document lifecycle and persistence duties from the internal brainstorm technique
- gate the maintenance protocol on request mode (diagnose and plan stop before apply), require one approved mutation ledger, name the config-election recording operation, and use the noninteractive doctor fix form
- make triage close tracked captures against their new intent, handle unreadable items ephemerally, and stop instructing a fabricated spark resolver; tighten explore and triage routing and document exploration deferral and resolved-intent resumption; refresh smoke receipts for the final binary
…vidence

- codex 0.144.5 emits rmcp transport ERROR tracing on stderr even in an isolated CODEX_HOME, which correctly tripped the fail-closed stderr cleanliness gate and produced a receipt the strict validator refused
- run the smoke with RUST_LOG=off so backend transport noise cannot contaminate the gate while positive proofs (hook observation, marker match, exit code) still decide the outcome
@levifig
levifig merged commit db63c87 into main Jul 19, 2026
1 check passed
@levifig
levifig deleted the intent-exploration-foundation branch July 19, 2026 14:43
levifig added a commit that referenced this pull request Jul 19, 2026
Prerelease publication of the intent and exploration foundation (#122) under the lineage freeze: version files to 2.0.0-alpha.10, curated changelog, release artifact rebuild with version stamping, and installed smoke evidence re-recorded against the stamped artifacts.
levifig added a commit that referenced this pull request Jul 19, 2026
…the foundation ship (#126)

Reflect updates from the foundation ship: adversarial review recommended for foundational state-model changes (PR #122 evidence: thirteen Codex findings after two Claude reviews), and one explicit fixture per supported starting state for migration/classification code (the alpha.10 transitive-coverage regression, #124).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant