From 3dec3cf49097f0a7520bf75294ceeeaa5547bb2f Mon Sep 17 00:00:00 2001 From: Erin Spencer Date: Sun, 6 Sep 2026 11:18:58 -0700 Subject: [PATCH 1/3] chore(skills): refresh canonical skill snapshot Source: The-Interdependency/skill-lib@c14ee9d500579a4b5d6821f62c9d82ca96e73608 --- .agents/skills/README.md | 2 +- .agents/skills/gonol-build/SKILL.md | 325 ++++---------------- .agents/skills/msdmd/SKILL.md | 31 +- .agents/skills/msdmd/collection.ts | 4 +- .agents/skills/msdmd/parsers/universal.py | 84 +++-- .agents/skills/msdmd/parsers/universal.ts | 72 ++++- .agents/skills/the-interdependency/SKILL.md | 40 +++ edcm_msdmd.ts | 2 +- 8 files changed, 251 insertions(+), 309 deletions(-) diff --git a/.agents/skills/README.md b/.agents/skills/README.md index ad18891..5caa7c1 100644 --- a/.agents/skills/README.md +++ b/.agents/skills/README.md @@ -3,7 +3,7 @@ This directory contains repo-local copies of canonical skills from `The-Interdependency/skill-lib`. -Source commit: `a1c6a7124af537ee9937b6fc6084940091982fe5` +Source commit: `c14ee9d500579a4b5d6821f62c9d82ca96e73608` Repo-local copies are not the source of truth. Edit `skill-lib` first, then propagate from the canonical source. diff --git a/.agents/skills/gonol-build/SKILL.md b/.agents/skills/gonol-build/SKILL.md index 3679dc3..86747c8 100644 --- a/.agents/skills/gonol-build/SKILL.md +++ b/.agents/skills/gonol-build/SKILL.md @@ -1,303 +1,108 @@ --- name: gonol-build -description: Cross-repository construction, review, replay, and continuation discipline for gonols. Load this when realizing gonol or affixiation geometry in UCNS; when constructing character, word, morphology, definition, punctuation-function, or recursive gonols in EDCM; when deciding whether a relation belongs inside a gonol; or when promoting a completed gonol to atomic participation at another scale. Do not load for unrelated geometry, ordinary prose editing, or EDCM measurement that consumes already-closed gonols without changing their construction. Resolve METAPAT semantic authority, UCNS geometric authority, and EDCM text-domain authority separately; never restore historical gonal-morphology, omega/phi/psi, bone/flesh, or carrier-LCM language rules. +description: Construction, closure, and replay contract for gonols across UCNS and EDCM. Load this when building or reviewing UCNS geometry used by gonols, or building EDCM character, word, definition, or recursive-relation gonols. UCNS owns geometry; EDCM owns text construction. The required EDCM order is characters -> words -> definitions -> recursive gonol relations. Pronunciation is not required unless an explicitly declared later experiment makes it part of the construction. Do not load for unrelated geometry, ordinary prose editing, or measurement over already-closed gonols. --- -# gonol-build — construct, close, promote, recurse +# gonol-build -Use this procedural skill to preserve gonol construction semantics without -collapsing repository authority boundaries. +Use this skill to keep gonol construction on the declared architecture and nothing else. -The governing split is: +## Workflow -```text -METAPAT -> conceptual meaning of affixiation and relational integration -UCNS -> gonol geometry, native Möbius/Public Gonol carrier, geometric operations -EDCM -> text-domain admission and linguistic/semantic gonol construction -skill-lib -> construction, evidence, replay, and continuation discipline -``` - -No repository gains another repository's authority merely because a construction -crosses the boundary. - -## Workflow: authority gate +1. Resolve the current UCNS and EDCM authorities before building. +2. Before launching construction or replay whose completion materially depends on scarce resources, preflight the resources required to finish the declared scope. +3. Keep the EDCM order load-bearing: characters -> words -> definitions -> recursive gonol relations. +4. Close each completed gonol before it participates atomically at the next declared scale. +5. If required UCNS geometry is unresolved, preserve that boundary as `hmmm`. +6. Replay the complete declared scope only where replay is required by the governing protocol. -Before acting: +## Authority -1. Resolve the current commits or PR heads of every repository whose authority - the construction uses. -2. Read the governing repository instructions and the directly applicable - canon/contract source before choosing a construction rule. -3. For affixiation, resolve current METAPAT semantics before implementing its - geometry or text-domain application. -4. For carrier, topology, orientation, closure geometry, or Public Gonol - operations, resolve current UCNS authority. -5. For character admission, morphology, words, definitions, source corpora, and - recursive textual relations, resolve current EDCM authority. -6. Distinguish declared architecture, implemented construction, evidence status, - proposed continuation, and `hmmm`. -7. If governing sources disagree, stop at the conflict. Do not choose the most - convenient repository or reconstruct authority from historical artifacts. - -Treat `hmmm` and an unresolved constructor as a ban on unqualified promotion, -not as a ban on declared candidate construction. An unresolved constructor is -permission to construct a named, bounded, falsifiable candidate under the -contracts that are already fixed; it is not permission to invent the missing -contract. `hmmm` blocks unqualified certainty and silent canonization. It does -not block declared experimentation, implementation, comparison, or candidate -construction. +```text +UCNS = geometry +EDCM = text-domain gonol construction +skill-lib = construction/replay discipline +``` -## Domain rule: every character is a gonol +Resolve the current UCNS and EDCM authorities before building. Do not move text semantics into UCNS or invent geometry in EDCM. -For active EDCM text construction: +## EDCM construction contract ```text -every admitted character is a gonol +characters -> words -> definitions -> recursive gonol relations ``` -This is an **EDCM text-domain rule**, not a UCNS linguistic rule and not a -METAPAT axiom. +This order is load-bearing. -EDCM owns what counts as an admitted character for a declared source/profile. -If the source boundary has not selected code point, grapheme, exact Public Gonol -glyph inventory, or another character unit, preserve that question as `hmmm`. -UCNS may geometrically realize an admitted character on its carrier; UCNS does -not silently decide EDCM's character-admission semantics. +- Every admitted character is a gonol. +- Ordered character gonols close into a word gonol. +- A closed word gonol is atomic at the consuming scale while its constituent identities, order, multiplicity, source positions, and provenance remain recoverable. +- Definition gonols are constructed from the applicable closed word gonols and exact source definition evidence. +- Recursive relations are constructed from already-closed gonols without reopening or erasing their internal structure. -Character occurrences remain separately addressable even when repeated. Their -source identity, order, multiplicity, and provenance are preserved according to -the active EDCM construction profile. +Do not insert another required stage into this sequence unless the governing contract is explicitly changed. -## Construction invariant - -```text -eligible gonol participants - -> explicit relation or geometrically authorized function application - -> relation enters the construction - -> closure with source identity and receipt - -> completed gonol - -> atomic participant at another declared scale -``` +## Pronunciation boundary -`atomic` means indivisible for participation at the consuming scale. It does -not mean internally structureless, provenance-free, irreversible, or forbidden -from inspection. +Pronunciation is not required for this construction. Pronunciation, phonetic spelling, IPA, audio, or other sound representations must not alter gonol identity, closure, ordering, or relations unless a later explicitly declared experiment makes phonology part of its construction. -When a relationship helps constitute the result, keep it intrinsic to the -gonol construction. Sidecars may carry indexes, caches, projections, -provenance, and receipts; an external edge table does not become the gonol's -authoritative relational content merely because it is easier to query. +Source pronunciation data may remain source metadata. It is not a dependency of the current build. -## Active EDCM text order +## Construction invariant -Unless current EDCM authority explicitly changes it, preserve: +At every scale: ```text -characters -> morphology -> definitions -> recursive gonol relations +ordered eligible gonols +-> authorized UCNS geometric relation/application +-> closure +-> deterministic identity + provenance receipt +-> atomic participation at the next declared scale ``` -This is an order of construction dependencies, not permission to flatten every -higher-scale gonol back into characters. Close each completed construction and -reuse its atomic identity at the consuming scale. - -Words and other intermediate closures may exist where the declared construction -requires them; do not manufacture a mandatory scale merely because a conventional -NLP pipeline usually has one. - -## Affixiation boundary - -METAPAT defines affixiation conceptually: already-bounded participants remain -individually addressable, their identity and provenance are preserved, the -declared relation may integrate as a higher-scale object-whole, and the -integrated whole may later participate recursively without erasing its -constituents. - -UCNS owns any exact geometric realization of that operation. Do not invent an -alternative carrier, topology, scale increment, arity rule, containment rule, -or coupling law merely to complete an implementation. Implement the native -carrier under the fixed METAPAT invariants and let unresolved geometric law -remain `hmmm` until construction exposes it. - -EDCM applies affixiation to text-domain gonols. Linguistic prefixes and suffixes -are one instance of affixiation; they do not define affixiation. - -The complete English root, stem, affix, irregular-transformation, and family law -remains unresolved unless current EDCM source/evidence establishes otherwise. -Never invent a decomposition to complete a pipeline. Do not assume every word is -`root + affix`, that a lemma is a final root, or that one stemmer supplies -semantic authority. - -## Closure rules - -- Preserve ordered occurrence identity, multiplicity, exact source evidence, - source offsets, and provenance required by the governing EDCM profile. -- Apply no normalization, folding, trimming, deduplication, inferred sorting, - or silent collapse unless the current profile explicitly authorizes it. -- Keep completed gonol closure intact inside larger constructions. Do not reopen - a closed word or definition merely because a larger relation contains it. -- A repeated completed gonol may reuse atomic identity when the governing - construction says it is the same gonol; repeated occurrences remain - separately addressable. -- Larger and smaller scales may couple directly when the governing construction - permits it. Do not invent mandatory adjacent-scale traversal. -- Do not materialize an all-pairs relationship graph as semantic authority. -- Do not substitute conventional NLP token IDs, subword IDs, opaque embedding - vectors, or whole-string hashes for gonol identity. - -## Public Gonol function application - -UCNS owns the geometric operation of Public Gonol function positions. EDCM may -apply only operations geometrically authorized by the current UCNS source and -evidence. - -- An unresolved geometric operation remains `hmmm`; Unicode names, dictionary - definitions, neighboring glyphs, or conventional punctuation grammar do not - fill it. -- Require occurrence-addressed application context when the governing EDCM - construction requires context. -- Never infer adjacency, precedence, grammatical role, or application scope from - glyph shape alone. -- Bind function identity, result identity, ordered participants, occurrence - addresses, carrier/construction identity, and source profile in the receipt. -- Replay against the same geometric authority and explicit construction plan. -- Do not promote structural survival into parsing, grammar, semantic utility, or - universal function law. - -## Candidate construction - -`Constructor unresolved` means no constructor is yet canonical. It does not mean -construction cannot begin. - -- Inventing hidden canon is prohibited. -- Constructing a declared, falsifiable candidate is required progress once the - governing contracts name the participants and boundary sufficiently to build. -- Freeze selectable implementation choices before inspecting the candidate's - evidentiary outcome when those choices could change the claimed result. -- A candidate must name its identity, standing, frozen choices, nonclaims, and - selection effect before a completion receipt is minted. -- Replay of a candidate establishes only that candidate's reproducibility. It - does not select it or transfer authority across repositories. - -## Evidence and replay - -For a construction that claims completion: - -1. Bind exact METAPAT, UCNS, EDCM, source-artifact, profile, code, and option - identities that materially determine the construction. -2. Admit the complete declared source, not an inspected prefix presented as a - finished run. -3. Preflight required compute and storage before starting. Once an admitted - healthy run begins, let it reach its natural terminal condition unless a - genuine safety boundary or preregistered load-bearing stop condition fires. -4. Emit deterministic construction/semantic receipts separately from resource - observations. -5. Independently reconstruct or replay the complete declared scope. -6. Compare byte-for-byte where the protocol requires exact identity. -7. Propagate failures and unresolved prerequisites without changing criteria - after outcome inspection. - -Passing fixtures proves only the fixtures. A historical receipt remains -historical evidence after its constructor or authority split is superseded; it -is not a receipt for the replacement construction. - -## Required output - -Report: +Preserve exact source identity, occurrence order, multiplicity, and provenance. Do not normalize, deduplicate, infer relations, or substitute tokens, embeddings, hashes, or another representation for gonol identity unless the active contract explicitly authorizes it. -```text -authority identities: -source identity: -construction identity: -participants and scales: -intrinsic relations/functions: -closure boundary: -atomic participation boundary: -receipt and replay status: -claims supported: -claims not supported: -hmmm: -next dependency-complete action: -``` +If required UCNS geometry is unresolved, preserve that boundary as `hmmm`; do not fill it with an invented rule. -Use `SURVIVED`, `FALSIFIED`, `BLOCKED`, `UNRESOLVED`, and `DEPRECATED` only under -the governing protocol. Do not translate `SURVIVED` into proved or canonical. +## Candidate boundary -## Usage guidance +An unresolved constructor is permission to construct a named, bounded candidate; it does not block declared experimentation. It blocks promotion beyond the evidence, not construction or testing. -When building text gonols, start in EDCM and consume UCNS geometry rather than -moving text semantics into UCNS. When building or repairing carrier geometry, -start in UCNS and use the METAPAT contract only for the relational invariants it -authorizes. When affixiation semantics themselves are in question, repair or -resolve them in METAPAT before downstream construction. +## Completion and replay -A minimal routing example is: +Before launching a construction or replay run whose completion materially depends on scarce resources, preflight the resources required to finish it. If the preflight cannot establish enough resource confidence to finish the declared scope, do not start the compute run; record the unresolved resource boundary as `hmmm` or narrow the declared scope under the governing protocol. Once a healthy admitted run begins, let it reach its natural terminal condition unless a genuine safety/resource boundary or preregistered load-bearing stop condition fires. Do not add arbitrary wall-clock limits. -```text -METAPAT: affixiation preserves bounded participant identity/provenance -UCNS: realize that relation on the native Möbius/Public Gonol geometry -EDCM: admit characters as gonols and construct text through affixiation -``` +A completion claim requires: -## Anti-patterns: refuse these - -- Assigning character, morphology, definition, or lexical-source authority to - UCNS merely because UCNS provides their geometry. -- Assigning affixiation semantics to EDCM or UCNS merely because they implement - or apply it. -- Reopening closed gonols merely because a larger construction contains them. -- Inferring function context, syntax, precedence, or operation from adjacency, - Unicode names, dictionary glosses, or glyph shape. -- Treating a source word list as a semantic dictionary. -- Treating `hmmm` or an unresolved constructor as permission to refuse a - declared candidate construction, complete run, or replay. -- Inventing morphology, a lexical family map, geometry, measurement authority, - alternate carrier, scale rule, or coupling law to fill an absent constructor. -- Promoting a sidecar relationship graph into intrinsic gonol semantics. -- Treating a partial corpus run as complete evidence. -- Adding arbitrary wall-clock limits to a healthy admitted computation. -- Restoring the deprecated omega/phi/psi cores, bone/flesh categories, fixed - morphology weights, or `multiplyFuel`/carrier-LCM as the universal language - law. -- Transferring UCNS construction survival into EDCM measurement validity, - PTCNA efficacy, cognition claims, or selected universal canon. - -## Minimal examples - -Character admission: +1. exact UCNS, EDCM, source/profile, and constructor identities; +2. the complete declared source scope; +3. deterministic construction receipts; and +4. independent complete replay where replay is required by the governing protocol. -```text -EDCM source/profile admits "a" -> that character occurrence is a gonol -UCNS supplies its authorized carrier geometry -EDCM owns the text-domain construction that consumes it -``` +Replay establishes reproducibility of that construction only. It does not by itself establish semantic quality, measurement validity, cognition claims, or canon outside the declared scope. -Recursive closure: +## Usage guidance + +For text construction, start in EDCM and consume current UCNS geometry. ```text -bounded gonols + declared relation - -> affixiate under METAPAT invariants - -> UCNS geometric realization - -> closed EDCM text-domain gonol - -> atomic participation in a later declared relation +UCNS: geometry +EDCM: characters -> words -> definitions -> recursive gonol relations ``` -Honest incomplete continuation: +When a word closes, use that word gonol atomically at the next scale. Ignore pronunciation unless a future explicit construction says otherwise. -```text -geometric coupling law unresolved - -> construct the smallest declared UCNS candidate allowed by fixed contracts - -> preserve candidate standing - -> hmmm blocks promotion, not construction -``` +## Anti-patterns -## hmmm +- Moving text semantics into UCNS or inventing geometry in EDCM. +- Inserting another required EDCM stage without an explicit contract change. +- Letting pronunciation alter gonol identity, closure, ordering, or relations unless a later explicitly declared experiment makes phonology part of its construction. +- Normalizing, deduplicating, inferring relations, or substituting tokens, embeddings, or hashes for gonol identity unless the active contract explicitly authorizes it. +- Adding arbitrary wall-clock limits to a healthy admitted run. +- Treating replay as semantic quality, measurement validity, cognition, or extra-scope canon. -`hmmm` blocks unqualified promotion. It does not block experimentation or -construction of a declared candidate. +## hmmm -- which exact EDCM character-admission unit applies where not already source-pinned; -- the source-supported complete English morphology law; -- the exact UCNS Möbius-carrier affixiation/coupling law exposed by implementation; -- executable geometry for direct coupling across distant recursive scales; -- quantitative compression and reconstruction behavior after recursive gonols exist; -- which recursive-gonol candidate, if any, later becomes selected canon. +- exact UCNS geometric operations that remain unresolved in current implementation; +- any future construction that explicitly adds phonology or another stage; +- any recursive relation whose governing source or geometry is not yet established. diff --git a/.agents/skills/msdmd/SKILL.md b/.agents/skills/msdmd/SKILL.md index 15f49d6..ffa10c4 100644 --- a/.agents/skills/msdmd/SKILL.md +++ b/.agents/skills/msdmd/SKILL.md @@ -48,10 +48,16 @@ claims to prove those obligations. See - **Fence**: `=== ===` opens, `=== END ===` closes. Block name is uppercase snake_case (e.g. `CONTRACTS`, `CHECKS`, `DOCS`, `CAPABILITIES`, `OWNERS`). -- **Comment marker**: whatever is idiomatic for the file's language. - `#` for Python / Ruby / Elixir / shell. `//` for TS / JS / Rust / Go / - Java / C / C++ / Swift. `--` for SQL / Lua / Haskell. The marker - appears at the start of every line inside the block. +- **Comment marker**: whatever is idiomatic for the file's language. The + reference parsers auto-detect these line-comment families by extension: + `#` for Python, Ruby, Elixir, shell, Perl, R, Julia, PowerShell, Tcl, and + Raku; `//` for TypeScript/JavaScript, Rust, Go, Java, C, C++ (including + `.c+`, `.c++`, `.cxx`, and header variants), Swift, Kotlin, C#, + Objective-C++, Scala, Dart, Zig, Groovy, and PHP; `--` for SQL, Lua, + Haskell, Ada, VHDL, and Lean; `%` for Erlang and Prolog; `;` for + Clojure/Lisp/Scheme/Racket; `!` for Fortran; `'` for Visual Basic; and + `*>` for COBOL. The marker appears at the start of every line in the block. + `COMMENT_MARKERS` in both universal parsers is the exact extension registry. - **Entry boundary**: every entry begins with `id:`. The id must be unique within its block and stable across refactors (so it can be referenced from external tooling). @@ -138,6 +144,17 @@ A reference implementation in pure stdlib Python lives at Both commit to zero non-stdlib dependencies so you can copy them into any project. +Extension detection refuses ambiguous suffixes rather than sniffing content. +For example, `.m` can mean Objective-C or MATLAB/Octave and therefore has no +automatic marker. A caller that already knows the language may still call +`parse_text` / `parseText` with an explicit marker. Languages that cannot carry +the msdmd shape as repeated line comments need a future versioned syntax +extension; they are not approximated with an invalid fence. + +The paired RATIOS helper preserves the interpreter boundary: a non-empty +line-1 shebang may precede opening RATIOS, which must then occupy line 2 with no +gap. See [`ratios/SKILL.md`](../ratios/SKILL.md) for the complete seal contract. + ## Repo collection point and visualizer Every consuming repo SHOULD maintain one repo-level collection point named @@ -219,9 +236,9 @@ Implementation rules every runner MUST follow: 1. **Walk the source tree** under a configurable root, skipping conventional non-source paths (`__pycache__`, `node_modules`, `.git`, build outputs, the runner's own test directory). -2. **Detect comment marker by extension**, not by content sniffing. - `.py / .rb / .ex / .sh → #`. `.ts / .js / .tsx / .jsx / .rs / .go / - .java / .c / .cpp / .swift → //`. `.sql / .lua / .hs → --`. +2. **Detect comment marker by extension**, not by content sniffing. Consume the + parser's `COMMENT_MARKERS` registry rather than maintaining a runner-local + language list. Python and TypeScript registries must remain identical. 3. **Parse all matching blocks** in each file. Multiple blocks of the same type concatenate; entries from different blocks are distinguishable only by id, not by source block. diff --git a/.agents/skills/msdmd/collection.ts b/.agents/skills/msdmd/collection.ts index 697dca2..00195df 100644 --- a/.agents/skills/msdmd/collection.ts +++ b/.agents/skills/msdmd/collection.ts @@ -1,4 +1,4 @@ -// ratios: loc_comments=67:0 imports_exports=0:0 calls_definitions=1:0 +// ratios: loc_comments=hmmm imports_exports=hmmm calls_definitions=hmmm /** * Shared TypeScript shapes for repo-level msdmd collection points. * @@ -72,4 +72,4 @@ export interface MsdmdCollection { export function defineMsdmdCollection(collection: MsdmdCollection): MsdmdCollection { return collection; } -// ratios: loc_comments=67:0 imports_exports=0:0 calls_definitions=1:0 +// ratios: loc_comments=hmmm imports_exports=hmmm calls_definitions=hmmm diff --git a/.agents/skills/msdmd/parsers/universal.py b/.agents/skills/msdmd/parsers/universal.py index 7bc86bf..204f533 100644 --- a/.agents/skills/msdmd/parsers/universal.py +++ b/.agents/skills/msdmd/parsers/universal.py @@ -1,4 +1,4 @@ -# ratios: loc_comments=128:49 imports_exports=4:7 calls_definitions=51:10 +# ratios: loc_comments=161:57 imports_exports=4:7 calls_definitions=55:10 """Universal msdmd parser — pure stdlib. Implements the parser contract from ``msdmd/SKILL.md``: extracts every @@ -7,6 +7,8 @@ Comment marker is auto-detected by file extension. The block syntax itself is identical across languages; only the per-line marker changes. +``COMMENT_MARKERS`` is public so runners can distinguish parser support +from their narrower language-specific execution or metric coverage. Public API: @@ -15,12 +17,13 @@ walk_tree(root, block_name, *, skip=None, extensions=None) -> tuple[annotated, untested] RATIOS is the one msdmd declaration that is *not* a fenced block — it is a -single comment line carried on a file's first and last non-blank lines. The -reader for it lives here too, as a sanctioned extension rather than a fork: +single comment line carried on a file's opening and closing source boundaries. +A valid interpreter shebang owns literal line 1, so the opening RATIOS line is +literal line 2 in that case. The reader lives here as a sanctioned extension: parse_ratios(text, marker="#") -> list[dict] parse_ratios_file(path) -> list[dict] - ratios_placement(text, marker="#") -> tuple[first_ok, last_ok] + ratios_placement(text, marker="#") -> tuple[opening_ok, closing_ok] This module has zero non-stdlib dependencies and is safe to copy verbatim into any project that wants msdmd support. @@ -30,13 +33,39 @@ from pathlib import Path from typing import Iterable -# extension → comment marker -_MARKERS: dict[str, str] = { - ".py": "#", ".rb": "#", ".ex": "#", ".exs": "#", ".sh": "#", - ".ts": "//", ".tsx": "//", ".js": "//", ".jsx": "//", ".mjs": "//", - ".rs": "//", ".go": "//", ".java": "//", ".c": "//", ".cpp": "//", - ".cc": "//", ".h": "//", ".hpp": "//", ".swift": "//", ".kt": "//", +# extension → line-comment marker. Keep this registry entry-for-entry equivalent +# to universal.ts; tests fail if either parser gains or loses an extension alone. +COMMENT_MARKERS: dict[str, str] = { + ".py": "#", ".pyw": "#", ".pyi": "#", + ".rb": "#", ".rake": "#", ".gemspec": "#", + ".ex": "#", ".exs": "#", + ".sh": "#", ".bash": "#", ".zsh": "#", ".fish": "#", + ".pl": "#", ".pm": "#", ".t": "#", + ".r": "#", ".jl": "#", + ".ps1": "#", ".psm1": "#", ".tcl": "#", + ".raku": "#", ".rakumod": "#", + ".ts": "//", ".tsx": "//", ".mts": "//", ".cts": "//", + ".js": "//", ".jsx": "//", ".mjs": "//", ".cjs": "//", + ".rs": "//", ".go": "//", ".java": "//", + ".c": "//", ".cc": "//", ".cp": "//", ".cpp": "//", + ".cxx": "//", ".c+": "//", ".c++": "//", + ".h": "//", ".hh": "//", ".hp": "//", ".hpp": "//", + ".hxx": "//", ".h+": "//", ".h++": "//", + ".tcc": "//", ".ipp": "//", ".inl": "//", + ".swift": "//", ".kt": "//", ".kts": "//", ".cs": "//", + ".mm": "//", ".scala": "//", ".dart": "//", ".zig": "//", + ".groovy": "//", ".gradle": "//", ".php": "//", ".sql": "--", ".lua": "--", ".hs": "--", + ".adb": "--", ".ads": "--", ".vhd": "--", ".vhdl": "--", + ".lean": "--", + ".erl": "%", ".hrl": "%", ".prolog": "%", + ".clj": ";", ".cljs": ";", ".cljc": ";", ".bb": ";", + ".lisp": ";", ".lsp": ";", ".cl": ";", + ".scm": ";", ".ss": ";", ".rkt": ";", + ".f": "!", ".for": "!", ".f90": "!", ".f95": "!", + ".f03": "!", ".f08": "!", + ".vb": "'", ".vbs": "'", + ".cob": "*>", ".cbl": "*>", } _DEFAULT_SKIP = ( @@ -48,7 +77,7 @@ def marker_for(path: Path) -> str | None: """Return the comment marker for a file path, or None if unsupported.""" - return _MARKERS.get(path.suffix.lower()) + return COMMENT_MARKERS.get(path.suffix.lower()) def _block_regex(block_name: str, marker: str) -> re.Pattern[str]: @@ -124,7 +153,7 @@ def walk_tree( ext_set = ( set(e.lower() if e.startswith(".") else "." + e.lower() for e in extensions) if extensions is not None - else set(_MARKERS.keys()) + else set(COMMENT_MARKERS.keys()) ) def iter_source_files(path: Path) -> Iterable[Path]: @@ -155,8 +184,9 @@ def iter_source_files(path: Path) -> Iterable[Path]: # --- RATIOS single-line declaration (msdmd extension) -------------------- # Unlike every other declaration, RATIOS is not fenced. It is a single -# comment line carrying the three canonical ratios, placed on the file's -# first and last non-blank lines: +# comment line carrying the three canonical ratios at the opening source +# boundary and last non-blank line. A valid line-1 shebang moves the opening +# boundary to literal line 2: # ratios: loc_comments=N:M imports_exports=N:M calls_definitions=N:M RATIO_IDS = ("loc_comments", "imports_exports", "calls_definitions") _RATIOS_TOKEN_RE = re.compile(r"(?P[a-z_]+)=(?P\S+)") @@ -171,9 +201,9 @@ def parse_ratios(text: str, marker: str = "#") -> list[dict]: RATIOS is not a fenced block: it is one comment line of the form `` ratios: loc_comments=N:M imports_exports=N:M calls_definitions=N:M`` - placed on the file's first and last non-blank lines. Returns one flat - ``{"id", "value"}`` dict per (declaration line x ratio token) so a drift - gate can verify every occurrence. + placed at the file's opening and closing source boundaries. Returns one + flat ``{"id", "value"}`` dict per (declaration line x ratio token) so a + drift gate can verify every occurrence. """ line_re = _ratios_line_re(marker) out: list[dict] = [] @@ -198,17 +228,29 @@ def parse_ratios_file(path: Path) -> list[dict]: def ratios_placement(text: str, marker: str = "#") -> tuple[bool, bool]: - """Return ``(first_line_has_ratios, last_non_blank_line_has_ratios)``.""" + """Return ``(opening_ratios_ok, closing_ratios_ok)``. + + A non-empty ``#!`` interpreter directive may occupy literal line 1. It is + the only accepted preamble and RATIOS must immediately follow it. + """ line_re = _ratios_line_re(marker) lines = text.splitlines() if not lines: return (False, False) - first_ok = bool(line_re.match(lines[0].rstrip())) + has_shebang = lines[0].startswith("#!") and bool(lines[0][2:].strip()) + opening_index = 1 if has_shebang else 0 + opening_ok = ( + len(lines) > opening_index + and bool(line_re.match(lines[opening_index].rstrip())) + ) + if opening_index == 0 and len(lines) > 1: + displaced = lines[1].startswith("#!") and bool(lines[1][2:].strip()) + opening_ok = opening_ok and not displaced last_ok = False for raw in reversed(lines): if raw.strip() == "": continue last_ok = bool(line_re.match(raw.rstrip())) break - return (first_ok, last_ok) -# ratios: loc_comments=128:49 imports_exports=4:7 calls_definitions=51:10 + return (opening_ok, last_ok) +# ratios: loc_comments=161:57 imports_exports=4:7 calls_definitions=55:10 diff --git a/.agents/skills/msdmd/parsers/universal.ts b/.agents/skills/msdmd/parsers/universal.ts index 2db076f..141f46c 100644 --- a/.agents/skills/msdmd/parsers/universal.ts +++ b/.agents/skills/msdmd/parsers/universal.ts @@ -1,4 +1,4 @@ -// ratios: loc_comments=176:0 imports_exports=2:0 calls_definitions=53:0 +// ratios: loc_comments=hmmm imports_exports=hmmm calls_definitions=hmmm /** * Universal msdmd parser — pure Node stdlib (fs, path). * @@ -9,12 +9,13 @@ * * Comment marker auto-detected by file extension. The block syntax * itself is identical across languages; only the per-line marker - * changes. + * changes. COMMENT_MARKERS is public so runners can keep their narrower + * language-specific execution or metric coverage separate. * * RATIOS is the one msdmd declaration that is not a fenced block — it is a - * single comment line on a file's first and last non-blank lines. Its reader - * (parseRatios / parseRatiosFile / ratiosPlacement) lives here too, as a - * sanctioned extension rather than a fork. + * single comment line on a file's opening and closing source boundaries. A + * valid interpreter shebang owns literal line 1, moving opening RATIOS to + * literal line 2. Its reader lives here as a sanctioned extension. * * Zero non-stdlib dependencies. Safe to copy verbatim into any * Node/Deno/Bun project that wants msdmd support. @@ -24,12 +25,39 @@ import { join, extname } from "node:path"; export type Entry = Record; -const MARKERS: Record = { - ".py": "#", ".rb": "#", ".ex": "#", ".exs": "#", ".sh": "#", - ".ts": "//", ".tsx": "//", ".js": "//", ".jsx": "//", ".mjs": "//", - ".rs": "//", ".go": "//", ".java": "//", ".c": "//", ".cpp": "//", - ".cc": "//", ".h": "//", ".hpp": "//", ".swift": "//", ".kt": "//", +// Keep this registry entry-for-entry equivalent to universal.py; tests fail if +// either parser gains or loses an extension alone. +export const COMMENT_MARKERS: Record = { + ".py": "#", ".pyw": "#", ".pyi": "#", + ".rb": "#", ".rake": "#", ".gemspec": "#", + ".ex": "#", ".exs": "#", + ".sh": "#", ".bash": "#", ".zsh": "#", ".fish": "#", + ".pl": "#", ".pm": "#", ".t": "#", + ".r": "#", ".jl": "#", + ".ps1": "#", ".psm1": "#", ".tcl": "#", + ".raku": "#", ".rakumod": "#", + ".ts": "//", ".tsx": "//", ".mts": "//", ".cts": "//", + ".js": "//", ".jsx": "//", ".mjs": "//", ".cjs": "//", + ".rs": "//", ".go": "//", ".java": "//", + ".c": "//", ".cc": "//", ".cp": "//", ".cpp": "//", + ".cxx": "//", ".c+": "//", ".c++": "//", + ".h": "//", ".hh": "//", ".hp": "//", ".hpp": "//", + ".hxx": "//", ".h+": "//", ".h++": "//", + ".tcc": "//", ".ipp": "//", ".inl": "//", + ".swift": "//", ".kt": "//", ".kts": "//", ".cs": "//", + ".mm": "//", ".scala": "//", ".dart": "//", ".zig": "//", + ".groovy": "//", ".gradle": "//", ".php": "//", ".sql": "--", ".lua": "--", ".hs": "--", + ".adb": "--", ".ads": "--", ".vhd": "--", ".vhdl": "--", + ".lean": "--", + ".erl": "%", ".hrl": "%", ".prolog": "%", + ".clj": ";", ".cljs": ";", ".cljc": ";", ".bb": ";", + ".lisp": ";", ".lsp": ";", ".cl": ";", + ".scm": ";", ".ss": ";", ".rkt": ";", + ".f": "!", ".for": "!", ".f90": "!", ".f95": "!", + ".f03": "!", ".f08": "!", + ".vb": "'", ".vbs": "'", + ".cob": "*>", ".cbl": "*>", }; const DEFAULT_SKIP = new Set([ @@ -43,7 +71,7 @@ function escapeRegex(s: string): string { } export function markerFor(path: string): string | null { - return MARKERS[extname(path).toLowerCase()] ?? null; + return COMMENT_MARKERS[extname(path).toLowerCase()] ?? null; } export function parseText( @@ -104,7 +132,7 @@ export function walkTree( ): { annotated: Array<[string, Entry[]]>; untested: string[] } { const skip = opts.skip ?? DEFAULT_SKIP; const extensions = - opts.extensions ?? new Set(Object.keys(MARKERS)); + opts.extensions ?? new Set(Object.keys(COMMENT_MARKERS)); const annotated: Array<[string, Entry[]]> = []; const untested: string[] = []; @@ -145,8 +173,9 @@ export function walkTree( // --- RATIOS single-line declaration (msdmd extension) -------------------- // Unlike every other declaration, RATIOS is not fenced. It is a single -// comment line carrying the three canonical ratios, placed on the file's -// first and last non-blank lines: +// comment line carrying the three canonical ratios at the opening source +// boundary and last non-blank line. A valid line-1 shebang moves the opening +// boundary to literal line 2: // ratios: loc_comments=N:M imports_exports=N:M calls_definitions=N:M export const RATIO_IDS = ["loc_comments", "imports_exports", "calls_definitions"] as const; @@ -184,13 +213,22 @@ export function ratiosPlacement(text: string, marker: string = "#"): [boolean, b const lineRe = ratiosLineRe(marker); const lines = text.split("\n"); if (lines.length === 0) return [false, false]; - const firstOk = lineRe.test(lines[0].replace(/\s+$/, "")); + const hasShebang = lines[0].startsWith("#!") && lines[0].slice(2).trim().length > 0; + const openingIndex = hasShebang ? 1 : 0; + const openingOk = + lines.length > openingIndex && + lineRe.test(lines[openingIndex].replace(/\s+$/, "")); + const displacedShebang = + openingIndex === 0 && + lines.length > 1 && + lines[1].startsWith("#!") && + lines[1].slice(2).trim().length > 0; let lastOk = false; for (let i = lines.length - 1; i >= 0; i--) { if (lines[i].trim() === "") continue; lastOk = lineRe.test(lines[i].replace(/\s+$/, "")); break; } - return [firstOk, lastOk]; + return [openingOk && !displacedShebang, lastOk]; } -// ratios: loc_comments=176:0 imports_exports=2:0 calls_definitions=53:0 +// ratios: loc_comments=hmmm imports_exports=hmmm calls_definitions=hmmm diff --git a/.agents/skills/the-interdependency/SKILL.md b/.agents/skills/the-interdependency/SKILL.md index d42dfd3..9f7ba4c 100644 --- a/.agents/skills/the-interdependency/SKILL.md +++ b/.agents/skills/the-interdependency/SKILL.md @@ -35,6 +35,44 @@ description: Protocol and workflow for all tasks involving The Interdependency o - **Usage guidance requirement**: Every code file, SKILL.md update, README change, research summary, or artifact produced under this skill **must contain clear, actionable usage guidance**. This is non-negotiable for accessibility, onboarding, and reducing signal loss. - **Research & canon alignment**: Ground all claims in source-backed canon (cross-load `canon` skill). Use `char-compress` for context handoff. Leave genuine uncertainty as `hmmm`. +## Operator workflow contract + +These constraints govern how work is selected and executed; they do not override repository-local authority about what a project means. + +- **Audit before assent**: Test a proposal against current code, canon, evidence, constraints, and failure modes before agreeing with it. Agreement is a conclusion, not a conversational default. +- **Preserve concepts; reject bad placement**: When a proposal is useful but architecturally misplaced, preserve the concept and move or re-scope it to the owning layer rather than either accepting the wrong placement or discarding the idea. +- **Useful, good, true**: Do not generate work merely to create activity. Prefer artifacts and actions that are useful to the stated goal, operationally sound, and truthfully supported by evidence or explicit status. +- **KISS under reality contact**: Prefer the smallest skilled design that survives actual execution. A clever mechanism that is fragile, opaque, untestable, or needlessly expensive is not simpler than a slightly longer mechanism that works. +- **Prior planning before execution**: Resolve authority, placement, dependency order, resource needs, validation, rollback, and terminal condition before expensive or destructive work begins. Planning exists to prevent avoidable failure, not to create an approval ceremony. +- **Complete within granted scope**: When the request, authority, and safety boundary already permit the next action, continue through the coherent workflow instead of repeatedly asking the operator to approve each obvious intermediate step. Ask only when a real unresolved decision cannot be recovered from authoritative sources or safely isolated as `hmmm`. +- **Usage-limit aware orchestration**: Treat model-plan limits, API quotas, tool-call limits, rate limits, context budgets, and session durability as real resources during preflight. Stage or redistribute work before launch so a workflow does not predictably die midway from exhaustion. Do not silently downgrade evidence quality merely to fit a limit. +- **Purposeful functions**: Every function, script, workflow step, and abstraction must have a defensible purpose, coherent inputs/outputs, failure behavior, and a reason to exist at that layer. Remove dead indirection and mechanisms whose only justification is that they already exist. +- **Deprecation is removal plus replacement when capability remains required**: Once a mechanism is declared deprecated, stop routing new work through it and provide or identify its supported replacement when the retired capability remains required. If the capability is intentionally retired as unnecessary, complete removal is the replacement outcome. Do not preserve deprecated behavior by default out of inertia. +- **`hmmm` is mandatory honest incompletion**: `hmmm` is the boundary object for unresolved constraints, missing authority, incomplete evidence, or a living continuation. Never erase an unresolved merely to make an artifact look finished. Where the boundary would otherwise be empty, leave a brief apropos, cogent, or humorous nonsequitur rather than silently dropping it. + +## Operational authority topology + +This section records durable ownership boundaries, not a frozen inventory of the operator's current machines, clients, logins, quotas, or provider sessions. + +- **GitHub repository boundary**: GitHub is the canonical remote source, review, and merge surface for repositories under `The-Interdependency`. GitHub Actions is validation evidence only where a repository's current workflows actually execute the claimed gates; inspect those jobs rather than inferring health from a green badge. +- **VM control-plane authority**: `skill-lib/vm-mcp` owns reusable VM MCP implementation and doctrine. Its authority profiles are deployment choices: bounded defaults remain appropriate for shared or first-contact environments, while the explicit `personal-console` profile is available for a deliberately configured single-owner private VM. The personal-console profile entered canonical skill-lib in merged #81 at `222ba4d4348022d81950c3fad054bae7e528b6a0`. Repository tests do not prove that any particular VM currently satisfies that profile. +- **Stack deployment authority**: `The-Interdependency/stack` owns stack-specific deployment and operational-use guidance. Stack's consumption of the canonical `vm-mcp` personal console entered stack in merged #12 at `22b74340d0c603883193a4ecf53e2ef3f9c3e780`. When stack deployment consumes `vm-mcp`, resolve that exact pinned skill-lib identity and the current `stack/backend/deploy` instructions before acting. No implementation or doctrine authority transfers from skill-lib into stack merely because stack consumes it. +- **Concrete host/client facts are runtime evidence**: A hostname or alias such as `a0`, a client such as Termux, Git transport/authentication method, tunnel state, installed CLI, provider login, exact version, quota, and API availability must be discovered from the current deployment/operator environment before use. This skill must not elevate those transient facts into unconditional organization-wide routing doctrine. +- **Provider execution capacity is not source authority**: OpenAI/Codex, xAI/Grok, DeepSeek/DeepCode, or another provider may be usable execution capacity when currently authenticated and within quota. Their availability must be checked at runtime, and choosing an executor does not transfer repository, semantic, mathematical, measurement, or publication authority. +- **Deprecated/stale routes do not revive themselves**: Historical services, hosts, clients, authentication paths, or provider assumptions are not automatic fallbacks. If a route is deprecated, migrate to its supported replacement and remove obsolete routing when compatibility permits; otherwise preserve the unresolved deployment boundary as `hmmm`. + +### Operational usage guidance + +Before routing work to a machine or provider: + +1. resolve the repository and exact commit that owns the work; +2. read the current deployment instructions owned by the consuming repository; +3. verify the actual host/client/authentication/tunnel/provider state; +4. choose only the authority profile and executor justified by that evidence; and +5. keep human recovery access independent where the deployment contract requires it. + +A statement like "use `a0`" is therefore a runtime/operator decision backed by current deployment evidence, not standing organization canon in this skill. + ## METAPAT consultation test Ask one question before conceptual or architectural commitment: @@ -97,6 +135,7 @@ When consultation triggers, inspect the current METAPAT repository state before - Using METAPAT to decorate a routine implementation decision. - Making a conceptual architecture choice that crosses the METAPAT gate without consulting current METAPAT. - Copying METAPAT doctrine into skill-lib and allowing the copy to become a competing authority. +- Treating a concrete host, client, provider login, or quota as standing organization authority without current deployment evidence. ## Output Rubric (active whenever this skill is loaded) @@ -112,3 +151,4 @@ hmmm - Whether the historical `meta` skill should remain as a compatibility router or be removed after all consumers propagate this gate. - Whether a companion metadata-block skill (e.g. `# === TIW_WORKFLOW ===` or `# === INTERDEPENDENCY ===`) should be added for self-declaring modules inside The-Interdependency repos. - Exact canonical reference for the full EDCMBONE transcript assembly protocol — should the detailed steps live in this skill or be expanded inside the edcmbone repo's own skill definitions? +- Actual VM state, current client/private-tunnel state, provider sessions, and quotas remain runtime evidence outside this skill. diff --git a/edcm_msdmd.ts b/edcm_msdmd.ts index ebc31ef..eb40c97 100644 --- a/edcm_msdmd.ts +++ b/edcm_msdmd.ts @@ -6353,5 +6353,5 @@ export default defineMsdmdCollection({ } ], "gaps": [], - "repo": "The-Interdependency/edcm" + "repo": "edcm" }); From 3243a77ac4559ccca7b1c0d1fc69a420fb3ef184 Mon Sep 17 00:00:00 2001 From: Erin Spencer Date: Sun, 6 Sep 2026 11:23:47 -0700 Subject: [PATCH 2/3] ci(skills): pin refreshed canonical snapshot --- .github/workflows/skill-compliance.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/skill-compliance.yml b/.github/workflows/skill-compliance.yml index 4944533..96773e6 100644 --- a/.github/workflows/skill-compliance.yml +++ b/.github/workflows/skill-compliance.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v7.0.1 with: repository: The-Interdependency/skill-lib - ref: a1c6a7124af537ee9937b6fc6084940091982fe5 + ref: c14ee9d500579a4b5d6821f62c9d82ca96e73608 path: skill-lib - name: Check vendored subset byte-for-byte @@ -31,7 +31,7 @@ jobs: run: | python tools/check_consumer_drift.py ../edcm \ --canon-root . \ - --sha a1c6a7124af537ee9937b6fc6084940091982fe5 \ + --sha c14ee9d500579a4b5d6821f62c9d82ca96e73608 \ --strict-sha \ --require-vendored @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@v7.0.1 with: repository: The-Interdependency/skill-lib - ref: a1c6a7124af537ee9937b6fc6084940091982fe5 + ref: c14ee9d500579a4b5d6821f62c9d82ca96e73608 path: skill-lib - name: Set up Python From 1a65aa4c479a05aa90bf3251573f94f2363c627b Mon Sep 17 00:00:00 2001 From: Erin Spencer Date: Sun, 6 Sep 2026 11:23:50 -0700 Subject: [PATCH 3/3] fix(skills): regenerate collection with canonical repository identity --- edcm_msdmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edcm_msdmd.ts b/edcm_msdmd.ts index eb40c97..ebc31ef 100644 --- a/edcm_msdmd.ts +++ b/edcm_msdmd.ts @@ -6353,5 +6353,5 @@ export default defineMsdmdCollection({ } ], "gaps": [], - "repo": "edcm" + "repo": "The-Interdependency/edcm" });