Skip to content

docs(design)!: restate the target as eight unified mechanisms with full capability parity - #597

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/design-unified-mechanisms
Oct 22, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/design-unified-mechanisms

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Closes #593

Summary

This PR restates the normative target (DESIGN.md + DESIGN.cue) top-down. charly is eight mechanisms, and every capability is an instance of exactly one of them: a row of that mechanism's table, never a kind, verb, command group or plugin of its own (new law D-LAW-8, new §1.1).

# Mechanism Table in DESIGN.cue
M1 content → IR the candy body, #ActionAlt
M2 artifact (one builder, BuildKit) #ArtifactRef, build
M3 deployment = kind × driver the kind table, #Driver
M4 need → grant #Need
M5 lifecycle and state #MethodIO (capture with a scope, restore)
M6 venue #VenueOutputAlt, _venueOperationWord
M7 observation #FactVerb, #ProtocolVerb
M8 store the store host methods

How the upstream changes since 2026-10-14 land as rows rather than new concepts:

  • containerd, krun, Firecracker. containerd (spec#266) is a container-engine driver row. libvirt, qemu, krun and firecracker (spec#227/chore: sync gitlinks #229) are hypervisor driver rows. Drivers are chosen by the new user-configuration schema (#UserConfig, #Driver; D-DRV-1..3, §12.6) and never named in an authored document. The form a vm consumes follows its driver: a disk, a root drive plus the os boot kernel, or an image for krun (D-FORM-3).

  • New needs. The runtime facts of CONTAINERD.md, K3S.md, LIBKRUN.md and CONTAINERD-IMAGES.md (read in full) become needs: isolation: microvm (the runtime handler or RuntimeClass), privilege: rootful, and nesting: userns (the narrow seccomp profile, never unconfined). They have new grant-matrix rows in §16.1 and D-HW-7.

  • Capture and restore. capture gains scope: filesystem | process (CRIU), and the new kind method and command restore (D-CAPTURE-4/5) absorb vm snapshot revert, check run --anchor and the k3s datadir backup.

  • Venues. Every interaction is a venue operation, and a venue declares the operations it serves (a microVM venue serves no exec; D-VENUE-1/2, §12.7).

  • Verbs. A verb is a fact verb or a protocol verb (D-VERB-6). New typed fact verbs: user, group, mount, kernel-param, dns, interface. Application and internal-operation verbs become namespaced (D-PLUG-7) or api methods.

  • One workflow kind. pipeline absorbs task, and its stages carry lane: (the spec#264 fan-out) (D-FLOW-1/2, §10.1). This is a design call, flagged here for review.

  • Store. It is served read-only as an image registry (D-STORE-10, charly-registry).

  • Volumes. A volume can be encrypted, absorbing plugin-enc.

  • Every first-party kind and verb is now typed. This replaces the opaque _otherKind/_otherVerb/#OtherBody (D-KIND-5). #Opaque remains only on S10 lines, and a new consistency control enforces that.

  • Parity is proved, not designed. design/parity.tsv (Appendix A.8) maps:

    • every provider word of the 110 product plugins on origin/main (plus charly-registry);
    • 33 subcommand groups whose disposition differs from their group;
    • 20 runtime capabilities.

    Each row names its mechanism and DESIGN home. Design-check check 4 now resolves every D-ID and home-column § in it.

The check machinery changed with the design, as Appendix A.7 requires:

  • scripts/design-consistency.sh adds three controls: the S10 control, the verb-table disjointness control, and ledger IDs/§ in check 4.
  • scripts/design-examples.sh adds a user-config example mode validated against #UserConfig.
  • design/example/rules.cue adds reference clauses for roster beds, pipeline stages and builder boxes.
  • There are 9 new negative cases and 4 new self-test rows; one row is re-anchored.

Section numbers are stable, because TODO.md cites them; new material lives in §1.1, §10.1, §12.6, §12.7 and A.8.

Session: https://claude.ai/code/session_01CXmkTVnkLrnMR64RYAHc2d

How tested

The change class is the design normative documents plus their executable check (Appendix A.1). The gate is bash scripts/design-check.sh on the committed tree, which runs the changed scripts live together with their self-tests. On top of that, a live re-fetch of every plugin manifest from origin/main is diffed against the ledger.

Design check on head 2acf387 (base = current origin/main e22b979):

# head 2acf387c24306c03029058c09305eb3e6d80730d (git rev-parse HEAD)
$ bash scripts/design-check.sh

== 1/5 toolchain
cue version v0.17.1

== 2/5 DESIGN.md ↔ DESIGN.cue
consistency: tables, table shape, word lists, rule tags, ids and § references, vocabulary — all agree

== 3/5 examples and negative cases
examples: 11 validated
negatives: 78 checked

== 4/5 self-test of the consistency check
selftest design-consistency.sh: 32 planted defects

== 5/5 self-test of the example check
selftest design-examples.sh: 19 planted defects

design-check: all controls pass

Every new control was proven able to fail by the self-tests above:

  • opaque-unmarked, verb-both-tables and parity-dangling-id are in the consistency check's 32 planted defects (up from 29 at baseline).
  • user-config-shape is in the example check's 19 (up from 18).
  • The baseline run on e22b979 before any change also passed, with 69 negatives; there are 78 now.

Parity completeness. The verify script re-fetches every non-archived plugin-* repo and charly-registry via gh api (git/trees/HEAD), parses each candy/*/charly.yml with PyYAML, and diffs every declared providers word against ledger column 1, excluding only the example and scaffold repos. The ledger itself was generated by a scratch script that fails on any unmapped word.

# head 2acf387c24306c03029058c09305eb3e6d80730d (git rev-parse HEAD)
$ bash verify_parity.sh design/parity.tsv
repos with manifests: 110; declared words: 208; ledger word rows: 208
unmapped: none
ledger rows no manifest declares: none

The ledger's subcommand rows come from the Kong command trees inventoried in this session, and they are not machine-diffed. Making the ledger a re-deriving gate is filed as #595.

Claim-keyed greps on the head:

$ git rev-parse HEAD
2acf387c24306c03029058c09305eb3e6d80730d
$ grep -cw nerdctl DESIGN.md DESIGN.cue
DESIGN.md:0
DESIGN.cue:0
$ grep -c '_otherKind\|_otherVerb\|#OtherBody' DESIGN.cue
0
$ grep -n '^_roleWord' DESIGN.cue
750:_roleWord: ["kind", "verb", "command", "type", "api"]
$ grep -n 'rootless' DESIGN.md
1144:        description: The shell as a rootless pod.
1605:        description: The hello box as a rootless pod on host port 18080.
$ awk -F'\t' 'NR>5{print $4}' design/parity.tsv | sort | uniq -c
    100 kept
    122 merged
     22 non-first-party
      7 renamed
     10 retired
$ git diff --stat origin/main...HEAD | tail -1
 17 files changed, 1024 insertions(+), 118 deletions(-)

Both rootless hits are example descriptions (instances); pod is no longer defined as rootless (§10, §12.1).

Rulebook compliance

  • R0: these skills were loaded before any action:
    • /charly-build:docs;
    • /charly-internals:skills ("where guidance belongs");
    • /charly-internals:cutover-policy;
    • /charly-internals:git-workflow with umbrella-mechanics.md and pre-validator-self-audit.md;
    • the check skill's "R10 gate by change class".
  • R1: every anomaly got an RCA.
    • Undefined IDs, banned terms, a mis-ordered D-HW-7, flow-mapping YAML errors and a ledger § check that read the evidence column were each root-caused and fixed in-tree.
    • My own mistake: a mis-parsed import list initialized all submodules in the session worktree. The cause was an unchecked empty variable after import: turned out to be a list, not a map. The process was stopped, and the 218 stray checkouts were deinitialized so the pre-commit pin gate passed. Nothing outside this worktree was touched.
    • The non-blocking findings are filed below.
  • R2:
  • R3: N/A — no runtime code, no waits or retries. The new attempt: is declared and bounded (D-FLOW-2).
  • R4: N/A for runtime — this is the target design. Every documented command (charly restore, charly pipeline run) is a target command of §19 and is not claimed to exist today.
  • R5: retired vocabulary is gone from DESIGN.md/.cue: nerdctl, _otherKind, _otherVerb, #OtherBody and the task kind (grep fence above; task is now a §2 "Not" term enforced by check 5).
  • R6: git status was checked before branching. The change sits on feat/design-unified-mechanisms, branched in a session worktree from current origin/main (base shown above). The pre-commit hook printed pre-commit: OK.
  • R7: each new control has a self-test row proving it fails. Each new schema rule has a negative case that is rejected with its expected text. The examples run through all three A.5 stages.
  • R8: N/A — no live service boundary. The parity re-fetch ran live against the GitHub API.
  • R9: N/A — no charly code or binary change. The pre-commit hook used the main clone's binary, as it notes.
  • R10: the change-class gate (design-check.sh) passed with zero failures on the committed head.

Also:

Change classification

Design normative documents plus their executable check: DESIGN.md, DESIGN.cue, design/, scripts/design-consistency.sh, scripts/design-examples.sh. No charly code, pin, gitlink or runtime config changed.

Because .cue, .sh, .tsv and .yaml files changed, the tier is fully tested and validated (precedent #454, the same file set): the change-class gate ran on the final tree, and the changed scripts executed live with self-tests proving every control can fail.

Filed issues

Agent: design-unify
Assisted-by: Claude Code Claude Opus 5.5 (fully tested and validated)

…ll capability parity

The target now names the eight mechanisms every capability is an instance of (M1 content → IR,
M2 artifact, M3 kind × driver, M4 need → grant, M5 lifecycle and state, M6 venue, M7 observation,
M8 store), and DESIGN.cue owns one table per mechanism. Upstream instances become rows: the
containerd engine and the libvirt/qemu/krun/firecracker hypervisors are driver rows chosen by
the user configuration (#UserConfig, D-DRV-1..3); microVM isolation, rootful privilege and
userns sandboxes are needs (D-HW-7); capture gains a scope and restore (D-CAPTURE-4/5); every
interaction is a venue operation (D-VENUE-1/2); verbs are fact or protocol verbs (D-VERB-6);
pipeline is the one workflow kind (D-FLOW-1/2); non-first-party words are namespaced (D-PLUG-7).
Every first-party kind and verb is typed; #Opaque marks only S10 payloads, gated by a new
consistency control. design/parity.tsv maps all 208 provider words of the 110 product plugins
on origin/main, the divergent subcommands and the measured runtime capabilities to their homes.

Refs #593

Claude-Session: https://claude.ai/code/session_01CXmkTVnkLrnMR64RYAHc2d
Assisted-by: Claude Code Claude Opus 5.5 (fully tested and validated)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

I re-derived the PR from the supplied body, the 17 per-file diffs, the single commit, and the (empty) comment thread. No comment asserts anything, so there is no sign-off to weigh and no stale claim to dismiss; the change stands on its own evidence.

What I checked, file by file

DESIGN.cue — The removal of _otherKind/_otherVerb/#OtherBody and replacement by typed definitions (#Init, #Builder, #CheckRoster, #Harness, #Pipeline, #Cua, #Jetkvm, #Skill, #Hook, #Marketplace, #Doc) is complete: the #KindNode table lists exactly the same kind words the §10 table lists (no task, no orphans). _candyField gains ready and capture_scope, which are added to _alt and #BoxFields respectively, so check 2's field-mirror still holds. The two verb tables #FactVerb/#ProtocolVerb are disjoint (command, file, package, service, process, port, user, group, mount, kernel-param, dns, interface vs http, kube, helm, adb, appium, cdp, wl, vnc, spice, dbus, mcp, record, cua, jetkvm, vision) and their union is exactly the §20 table. Every non-comment #Opaque use in the diff carries // S10, and the only {...} open struct remains the #Opaque definition — so the new check-6 control and the existing one-open-struct control both hold. userns, dns and bus (the only new keys ending in s) are added to D-NAME-1. #Driver/#UserConfig are internally consistent (pod from the container-engine list, vm from the hypervisor list) and the user-config example matches them.

DESIGN.md — §1.1, §10.1, §12.6, §12.7 and A.8 are new as claimed; §20 now splits fact/protocol; §7.1 ownership rows track the new word lists; §9.2/§9.3 add the driver-dependent form and restore; §16.1 adds the three new grant rows; D-KIND-5/D-VERB-6/D-DRV-1..3/D-FLOW-1..2/D-CAPTURE-4..5/D-VENUE-1..2/D-LAW-8 are all present. Section-number stability is plausible (new headings are all ### sub-sections).

Negatives / selftests / scripts — The 9 new negative files, the 3 consistency selftest rows (one re-anchored) and the 1 example selftest row match the body's "9 new negatives, 4 new selftest rows, one re-anchored." The consistency-script hunks add exactly the three controls claimed (S10, verb disjointness, ledger IDs/§), and the examples-script hunk adds the user-config mode. The parity ledger arithmetic is coherent: 5 header lines + 261 data rows = 266 lines; 208 word rows + 33 subcommand rows + 20 capability rows = 261; and the body's disposition counts (100+122+22+7+10) sum to 261. The check output numbers (69→78 negatives, 29→32 and 18→19 planted defects, 11 examples) are all internally consistent with the diffs.

Correctness / security / scope — No runtime code, no secrets, no injection surface, no dependency change; it is a design-document + executable-check change. The change is coherent and does not leave a legacy path (nerdctl, _otherKind, _otherVerb, #OtherBody, task are gone from DESIGN.md/.cue as claimed). The #Opaque uses are all S10-marked, so the "every first-party kind is typed" claim is backed by the schema.

Minor observations (non-blocking)

  • The body's git diff --stat line says 1024 insertions(+), 118 deletions(-), but summing the per-file counts in this diff gives 1025 insertions and 114 deletions (the DESIGN.md hunk accounts for the difference). This is a stale/mis-rounded stat line rather than a substantive claim; the file count (17) and all the check-output numbers do match. Worth correcting in the body, but it does not affect the change.
  • The ledger's mechanism column uses workflow, authoring, core and operations alongside M1..M8, while §1.1 says workflows/authoring "add no mechanism." No control checks that column, so the check still passes; it is a wording nit, not a defect.

Neither observation changes the substance: the schema, prose, checks and ledger are mutually consistent, and the change ships the coverage (negatives + selftests) that would fail without it.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 22, 2026 17:06
@github-actions
github-actions Bot merged commit e7f341c into main Oct 22, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 22, 2026
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — both minor observations from the PASS verdict are addressed.

  1. Stat line, rebutted. 1024 insertions(+), 118 deletions(-) is the verbatim output of git diff --stat origin/main...HEAD on 2acf387, pasted from the command in the body's claim-keyed fence. The 1025/114 figure comes from summing a per-file view, which is not the same object.
  2. Mechanism column, fixed in the follow-up PR feat/parity-mechanism-column. The seven core/operations rows are remapped to §1.1 mechanisms, and a check-4 control with a self-test now holds the column.

Agent: design-unify
Assisted-by: Claude Code Claude Opus 5.5 (fully tested and validated)

github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
…hanisms, and a control holds it (#598)

The #597 validator observed that design/parity.tsv used `core` and `operations` in its mechanism
column, which §1.1 does not define, and that no control checked the column. The seven rows now
name the mechanism that absorbs them (loader → authoring, mcp serve → workflow, alias → M6,
settings → M3, generate-packages → M2), and design-consistency.sh check 4 fails on any value
outside M1–M8, workflow and authoring, with a self-test row proving it.

Refs #593

Claude-Session: https://claude.ai/code/session_01CXmkTVnkLrnMR64RYAHc2d
Assisted-by: Claude Code Claude Opus 5.5 (fully tested and validated)
aitrawog added a commit that referenced this pull request Oct 22, 2026
The branch was BEHIND origin/main, and the org ruleset requires the branch to be up
to date before the required check counts, so the armed auto-merge could not land it.

A MERGE, never a rebase: no published commit is rewritten, no history is rewritten,
and the push stays a fast-forward of the published branch.

The merge brings in the design restatement and its changelogs (PR #597, PR #598),
which landed on main while this round was open. Those commits touch no file this
branch changes, so the merge is a pure fast-forward of the two trees; the branch's
own work is unchanged.

Every measurement this PR carries was taken again on the merged head.
@aitrawog
aitrawog deleted the feat/design-unified-mechanisms branch November 1, 2026 19:08
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.

DESIGN.md: restate the target as eight unified mechanisms with full capability parity (containerd, krun, Firecracker, BuildKit, restore)

1 participant