Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/patches/039d5006817f443a # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## GitHub aien-dev/aien-architecture-mv#125 (code only) closed derived `039d5006817f443a` #125 Imported from GitHub aien-dev/aien-architecture-mv#125 (code only) GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed). Base `5994859af1aedf77834a8cbdf7bf3f8b4d7127e6` · Head `c86e80687f8a879714749bcc0052df6c8a8425f3` ### Apply it ``` git checkout -b patch-039d5006817f443a 5994859af1aedf77834a8cbdf7bf3f8b4d7127e6 curl -fsSL https://interplane.io/drakestapleton/aien-architecture-mv/patches/039d5006817f443a.patch | git am ``` Raw patch (mbox) · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/aien-architecture-mv 125 c86e80687f8a879714749bcc0052df6c8a8425f3 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"aien-architecture-mv","number":125,"url":"https://github.com/aien-dev/aien-architecture-mv/pull/125","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:37:44Z","metadata":"unavailable","state_derived":true} ``` ### Changes ``` diff --git a/.crumb b/.crumb index 500b406..d857d3d 100644 --- a/.crumb +++ b/.crumb @@ -21,8 +21,8 @@ "generated": { "children": [ { - "digest": "697a912114b6f13b06506981c14863febe63859e3b17dffbc6f0089a858b2e05", - "last_commit": "212d9cb", + "digest": "298c8cb7fb3c21883fa2a30ffc77083d9e0473153e371b7a8df1d0788c75cdd1", + "last_commit": "5994859", "name": "docs", "purpose": "Directory docs. Purpose not yet described by a human." }, @@ -39,21 +39,21 @@ "purpose": "Directory scripts. Purpose not yet described by a human." }, { - "digest": "1adefd17db40e0273bf521ae61ad78c2e818d2cf50523ffd10a7948521696cf8", - "last_commit": "212d9cb", + "digest": "cdd14c4842f34bc96327321a87f1cd8a17a074966e0e25421da072bdbc249f8c", + "last_commit": "5994859", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], - "children_root": "sha256:106d31a808ab63118132a5ba79e8f66ed489fa31b8a503ebbe18dce175abbb34", - "compiled_at": "2026-10-04T13:35:21Z", + "children_root": "sha256:30c050cd43087f731de1c8f98052cab92e2e50e06ff5785cd5d30dcded89f4ff", + "compiled_at": "2026-10-04T13:46:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:468c1e24b965c745809a9135b8af02255c9b98f2a3bd079e7d4db02b606510a5", + "digest": "sha256:abfe1a3797af7cf4c4513bc342951aecc50374c61c99a6dc5d73db5ec452e33d", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 211, - "generated_at_commit": "212d9cb77f088ece71621b6800f75a2a785a378f", - "source_tree": "sha256:9a0300456ad42d857c4f637da19903f1ce958f7531b8a288264c75887beff025" + "generated_at_commit": "5994859af1aedf77834a8cbdf7bf3f8b4d7127e6", + "source_tree": "sha256:6dd5c2d8ac24820015f76f5f10dc5c284e286b929a3ab625617711d4e2f5539e" }, "owner_lane": "", "provenance": { diff --git a/docs/.crumb b/docs/.crumb index 0137943..de6fc29 100644 --- a/docs/.crumb +++ b/docs/.crumb @@ -74,14 +74,14 @@ } ], "children_root": "sha256:dd603189233af01eac9b174938042b315877c3e0c1b88ab39d038783af78adbe", - "compiled_at": "2026-10-04T13:35:21Z", + "compiled_at": "2026-10-04T13:46:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:697a912114b6f13b06506981c14863febe63859e3b17dffbc6f0089a858b2e05", + "digest": "sha256:298c8cb7fb3c21883fa2a30ffc77083d9e0473153e371b7a8df1d0788c75cdd1", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 118, - "generated_at_commit": "212d9cb77f088ece71621b6800f75a2a785a378f", - "source_tree": "sha256:55f319799760fe179a7c0868474087f6a1ba24a2d202675fbaeab72060996920" + "generated_at_commit": "5994859af1aedf77834a8cbdf7bf3f8b4d7127e6", + "source_tree": "sha256:8d4c8ad97db50fb3a5173177c842337249bbefc7601a631e1e99ea0b7f09782a" }, "owner_lane": "", "provenance": { diff --git a/docs/CRUMB_PROTOCOL_RFC_0003.md b/docs/CRUMB_PROTOCOL_RFC_0003.md index 8870e79..575272e 100644 --- a/docs/CRUMB_PROTOCOL_RFC_0003.md +++ b/docs/CRUMB_PROTOCOL_RFC_0003.md @@ -25,7 +25,7 @@ Until now people and agents wrote the descriptions in crumbs by hand, and they w `digest = sha256(semantic || source_tree || children_root || evidence_root)`, where `semantic` is the compact, key-sorted JSON of the semantic kernel with null keys removed, and the three roots are the lowercase hex digests. `children_root` is the sha256 of each child's digest followed by a newline, in name order. Directories are compiled deepest first (D4), so a parent always embeds its children's final digests. Changing one file therefore changes that directory's digest and those of its ancestors only; siblings stay CURRENT. -## 4. Design decisions D1-D9 (binding, from the reference implementation) and D3a +## 4. Design decisions D1-D10 (binding; D1-D9 from the reference implementation) and D3a | ID | Decision | Trap it closes | |---|---|---| @@ -39,6 +39,7 @@ Until now people and agents wrote the descriptions in crumbs by hand, and they w | D7 | Only directories that already hold a `.crumb` take part; `crumb seed` decides membership. | One mechanism for membership, not two. Hidden child directories are not listed as children. | | D8 | Evidence is tracked files whose path has a component named `evidence` or `receipts`, or ending `.receipt.json`; `evidence_root` hashes their blob ids in path order. | Receipts become part of the fingerprint, so a changed receipt shows up as STALE. | | D9 | Output is key-sorted JSON, written to a temporary file then renamed, byte-stable. | `verify` can be an exact comparison. | +| D10 | A directory listed in `/.crumbignore` (one relative directory per line, the same file `crumb seed` reads) is excluded with its whole subtree from compile, verify and status: no `.crumb` under it is read as a child or rewritten. Its tracked files still count toward the enclosing crumb's `source_tree` and `evidence_root`. Added 2026-10-04 for the rollout to omega, aienos and physics. | Trees guarded by immutability checks (omega `evidence/`, which holds a seeded `.crumb`; physics `nvrm` and `m16`) would otherwise be rewritten by compile and fail their own CI. The shell reference does not implement D10; the differential holds for repositories without a `.crumbignore`. | ## 5. Commands diff --git a/tools/.crumb b/tools/.crumb index 26fd2f7..7ad7811 100644 --- a/tools/.crumb +++ b/tools/.crumb @@ -13,21 +13,21 @@ "generated": { "children": [ { - "digest": "cafcbcd4bc15abaf1af336cc39cc14d9492590f773ec10c3a88d9fa8d1b90540", - "last_commit": "212d9cb", + "digest": "29b5375d03b699b7684d62c36fd2e8a4568953a291aff7f040b119fa47f27515", + "last_commit": "5994859", "name": "crumb", "purpose": "Directory tools/crumb. Purpose not yet described by a human." } ], - "children_root": "sha256:ce10ff8d84a7961aca5cecf3a55245c9851c89a6ab856637cab4883e5d4fafbf", - "compiled_at": "2026-10-04T13:35:21Z", + "children_root": "sha256:a2606ec45edc3ed58b193bccc7c3a0a125bb435114cdc6b4b53bfb0d564fa379", + "compiled_at": "2026-10-04T13:46:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:1adefd17db40e0273bf521ae61ad78c2e818d2cf50523ffd10a7948521696cf8", + "digest": "sha256:cdd14c4842f34bc96327321a87f1cd8a17a074966e0e25421da072bdbc249f8c", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 6, - "generated_at_commit": "212d9cb77f088ece71621b6800f75a2a785a378f", - "source_tree": "sha256:933db0889f0651a281f6fdeadd33fb6722e50200e20d765c61c39d7c7cdc0b72" + "generated_at_commit": "5994859af1aedf77834a8cbdf7bf3f8b4d7127e6", + "source_tree": "sha256:9587ca41028610fe08d594ad42e01d5ee5e0fc1fff70fe538c4184ca93f2393d" }, "owner_lane": "", "provenance": { diff --git a/tools/crumb/.crumb b/tools/crumb/.crumb index 34d1917..e15d487 100644 --- a/tools/crumb/.crumb +++ b/tools/crumb/.crumb @@ -7,14 +7,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:35:21Z", + "compiled_at": "2026-10-04T13:46:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:cafcbcd4bc15abaf1af336cc39cc14d9492590f773ec10c3a88d9fa8d1b90540", + "digest": "sha256:29b5375d03b699b7684d62c36fd2e8a4568953a291aff7f040b119fa47f27515", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 6, - "generated_at_commit": "212d9cb77f088ece71621b6800f75a2a785a378f", - "source_tree": "sha256:933db0889f0651a281f6fdeadd33fb6722e50200e20d765c61c39d7c7cdc0b72" + "generated_at_commit": "5994859af1aedf77834a8cbdf7bf3f8b4d7127e6", + "source_tree": "sha256:9587ca41028610fe08d594ad42e01d5ee5e0fc1fff70fe538c4184ca93f2393d" }, "owner_lane": "", "provenance": { diff --git a/tools/crumb/crumb-compile.sh b/tools/crumb/crumb-compile.sh index a72244f..4a0a710 100755 --- a/tools/crumb/crumb-compile.sh +++ b/tools/crumb/crumb-compile.sh @@ -20,6 +20,8 @@ # D8 Evidence = tracked files under the directory whose path has a component named evidence or receipts, or that # end in .receipt.json; evidence_root = sha256 of their blob ids in path order. # D9 Output is written with jq -S (sorted keys) via tmp+rename, byte-stable, so `verify` can be an exact comparison. +# D10 (C tool only) /.crumbignore subtrees never take part in compile/verify/status; this shell reference +# does not implement D10, so the differential holds only for repositories without a .crumbignore. set -eu die() { echo "crumb-compile: $*" >&2; exit 1; } need() { command -v "$1" >/dev/null 2>&1 || die "needs $1"; } diff --git a/tools/crumb/crumb.c b/tools/crumb/crumb.c index 0c87cde..03a043f 100644 --- a/tools/crumb/crumb.c +++ b/tools/crumb/crumb.c @@ -886,6 +886,18 @@ static int ignored_rel(const char *rel) { for (size_t i = 0; i < g_nign; i++) if (!strcmp(rel, g_ign[i])) return 1; return 0; } +/* D10: a .crumbignore entry excludes that directory and everything below it from compile/verify/status. + Its files still count toward the enclosing crumb's source tree (so a change there is still noticed upstairs), + but no .crumb under it is ever read as a child or rewritten. Needed for trees guarded by immutability + checks (omega evidence/, physics nvrm and m16). */ +static int ignored_subtree(const char *rel) { + for (size_t i = 0; i < g_nign; i++) { + size_t n = strlen(g_ign[i]); + if (!strncmp(rel, g_ign[i], n) && (rel[n] == 0 || rel[n] == '/')) return 1; + } + return 0; +} +static void reset_ignore(void) { for (size_t i = 0; i < g_nign; i++) free(g_ign[i]); free(g_ign); g_ign = NULL; g_nign = 0; } static Node *scan(const char *path, const char *rel, int isroot) { Node *n = xmalloc(sizeof *n); memset(n, 0, sizeof *n); n->path = xstrdup(path); n->rel = xstrdup(rel); n->name = xstrdup(base_of(path)); @@ -1703,6 +1715,7 @@ static J *comp_object(Comp *c, const char *d, char *dig_out) { /* the generate J *kids = jnew(JARR); Sha crs; sha_init(&crs); for (size_t i = 0; i < nn; i++) { char *kd = root ? xstrdup(names[i]) : pjoin(d, names[i]), *kc = pjoin(kd, ".crumb"), *kcf = pjoin(c->top, kc); struct stat sb; + if (ignored_subtree(kd)) continue; /* D10 */ if (stat(kcf, &sb) || !S_ISREG(sb.st_mode)) continue; const char *kdig = dig_of(c, kd); char *kdig_own = NULL; if (!kdig) { /* not compiled in this run: fall back to what the crumb says */ @@ -1748,6 +1761,7 @@ static void find_crumbs(const char *top, const char *rel, CDir **out, size_t *n, if (!strcmp(e->d_name, ".") || !strcmp(e->d_name, "..")) continue; char *r = *rel ? pjoin(rel, e->d_name) : xstrdup(e->d_name), *f = pjoin(top, r); struct stat st; if (lstat(f, &st) == 0) { + if (S_ISDIR(st.st_mode) && ignored_subtree(r)) { free(r); free(f); continue; } /* D10 */ if (!strcmp(e->d_name, ".crumb") && !S_ISDIR(st.st_mode)) { if (*n == *cap) { *cap = *cap ? *cap * 2 : 32; *out = xrealloc(*out, *cap * sizeof **out); } (*out)[*n].d = *rel ? xstrdup(rel) : xstrdup("."); (*n)++; @@ -1765,6 +1779,7 @@ static int compile_engine(char mode, const char *root, int quiet, int *total_out char *top = cap_cmd(cmd, NULL); chomp(top); if (!*top) die("crumb %s: not inside a git repository: %s", mode == 'c' ? "compile" : mode == 'v' ? "verify" : "status", root); c.top = top; + reset_ignore(); load_ignore(top); /* D10: /.crumbignore subtrees never participate */ char *head = run_git(top, "rev-parse HEAD"); if (strlen(head) != 40) head = xstrdup("0000000000000000000000000000000000000000"); if (head_out) strcpy(head_out, head); comp_load_files(&c); @@ -1775,6 +1790,7 @@ static int compile_engine(char mode, const char *root, int quiet, int *total_out size_t l = strlen(s); const char *b = strrchr(s, '/'); b = b ? b + 1 : s; if (strcmp(b, ".crumb")) continue; char *d = l == 6 ? xstrdup(".") : xstrndup_(s, l - 7); int dup = 0; + if (ignored_subtree(d)) { free(d); continue; } /* D10 */ for (size_t i = 0; i < nd; i++) if (!strcmp(ds[i].d, d)) dup = 1; if (dup) continue; if (nd == cap) { cap = cap ? cap * 2 : 32; ds = xrealloc(ds, cap * sizeof *ds); } diff --git a/tools/crumb/test.sh b/tools/crumb/test.sh index 2727591..84140f0 100644 --- a/tools/crumb/test.sh +++ b/tools/crumb/test.sh @@ -172,6 +172,20 @@ echo x >> src/a.c; git add -A; "$C" context src/a.c | grep -q "^Crumbs STALE: 2 "$C" context docs | grep -q 'held by lane-x' && bad "C3 context ignores locks elsewhere" || ok "C3 context ignores locks elsewhere" "$C" close lane-x src src/a.c >/dev/null [ "$("$C" context src | wc -l)" -lt 80 ] && ok "C3 context output is bounded" || bad "C3 context bounded" +# D10: .crumbignore subtrees never participate in compile/verify/status (omega evidence/, physics nvrm, m16) +"$C" compile . >/dev/null; git add -A; git -c user.name=t -c user.email=t@t commit -qm "pre-ignore" +ev0=$(cat src/deep/.crumb); printf '# guarded tree\nsrc/deep/\n' > .crumbignore +st=$("$C" verify . | grep '^STALE' | awk '{print $2}' | sort | tr '\n' ' ') +[ "$st" = ". src " ] && ok "C3 D10 adding .crumbignore stales only the parent and its ancestors (children list changed)" || bad "C3 D10 ignore stale set (got: $st)" +"$C" compile . >/dev/null +[ "$(cat src/deep/.crumb)" = "$ev0" ] && ok "C3 D10 compile never rewrites a .crumb under an ignored subtree" || bad "C3 D10 ignored crumb rewritten" +jq -e '.extensions.generated.children | map(.name) | index("deep") == null' src/.crumb >/dev/null && ok "C3 D10 ignored directory is not a child of its parent" || bad "C3 D10 ignored child listed" +"$C" status . | grep -q 'src/deep' && bad "C3 D10 status lists ignored dir" || ok "C3 D10 status does not list the ignored directory" +echo 'int b3;' > src/deep/b.c; git add -A; st=$("$C" verify . | grep '^STALE' | awk '{print $2}' | sort | tr '\n' ' ') +[ "$st" = ". src " ] && ok "C3 D10 a file under the ignored subtree still stales the enclosing crumbs, never the ignored one" || bad "C3 D10 enclosing stale (got: $st)" +"$C" compile . >/dev/null; [ "$(cat src/deep/.crumb)" = "$ev0" ] && ok "C3 D10 ignored crumb still untouched after that compile" || bad "C3 D10 ignored crumb touched" +rm .crumbignore; "$C" compile . >/dev/null; "$C" verify . >/dev/null && ok "C3 D10 removing .crumbignore and recompiling returns to OK" || bad "C3 D10 remove ignore" +git add -A; git -c user.name=t -c user.email=t@t commit -qm "post-ignore" # differential vs the shell reference (needs jq, git, sha256sum) REF="$HERE/crumb-compile.sh" if command -v jq >/dev/null 2>&1 && [ -f "$REF" ]; then ```