|
| 1 | +--- |
| 2 | +name: stack-update |
| 3 | +description: Fail-closed update protocol for The-Interdependency/stack. Load this when a stack change adds, moves, extracts, graduates, renames, removes, or changes the authority, relation, source identity, or placement of a participant, research workspace, libs pin, BASE record, stack manifest entry, or architecture description; when stack-manifest.json, STACK_MANIFEST.md, README.md, or research BASE.json files may drift from one another; or when validating that a structural stack change is complete before commit or merge. |
| 4 | +--- |
| 5 | + |
| 6 | +# stack-update — change the stack as one coherent transaction |
| 7 | + |
| 8 | +Use this procedural skill for structural changes to `The-Interdependency/stack`. |
| 9 | +It specializes `interdependent-work-graph`; it does not replace that skill or |
| 10 | +`project-incubation-graduation`. |
| 11 | + |
| 12 | +## Core contract |
| 13 | + |
| 14 | +A stack change that alters **identity, ownership, authority, relation, lifecycle, |
| 15 | +or placement** is incomplete until every affected authority/provenance projection |
| 16 | +agrees and the deterministic stack-consistency checker passes. |
| 17 | + |
| 18 | +```text |
| 19 | +structural mutation |
| 20 | + -> classify affected authority and relations |
| 21 | + -> update owning source and stack projections |
| 22 | + -> recompute machine identity |
| 23 | + -> validate local + cross-boundary consistency |
| 24 | + -> commit only when coherent |
| 25 | +``` |
| 26 | + |
| 27 | +Location never creates authority. A successful move, import, extraction, or test |
| 28 | +run does not itself update ownership, canon, proof status, measurement validity, |
| 29 | +or graduation standing. |
| 30 | + |
| 31 | +## Trigger / non-trigger |
| 32 | + |
| 33 | +Load this skill when a change touches any of these surfaces or their meaning: |
| 34 | + |
| 35 | +- `libs/<repo>/` pins or imported canonical views; |
| 36 | +- `research/<workspace>/` creation, deletion, rename, extraction, or lifecycle; |
| 37 | +- `research/*/BASE.json` provenance or authority; |
| 38 | +- `stack-manifest.json` / `STACK_MANIFEST.md` participants, authorities, relations, |
| 39 | + boundaries, or work-graph digest; |
| 40 | +- root architecture descriptions in `README.md` or `AGENTS.md`; |
| 41 | +- an emergent project moving toward or away from independent-repository authority. |
| 42 | + |
| 43 | +Do not load it for an ordinary implementation edit whose owning repository, |
| 44 | +workspace, authority, manifest identities, and architecture relations do not change. |
| 45 | + |
| 46 | +## Required companion skills |
| 47 | + |
| 48 | +1. Load `interdependent-work-graph` for every structural stack mutation. |
| 49 | +2. Load `project-incubation-graduation` when extraction, release, reconsumption, |
| 50 | + graduation, or implementation-authority transition is involved. |
| 51 | +3. Load `the-interdependency` for organization workflow and GitHub hygiene. |
| 52 | +4. Consult current METAPAT only when the change requires choosing a new conceptual |
| 53 | + distinction or authority relation rather than implementing an already-fixed one. |
| 54 | + |
| 55 | +## Workflow |
| 56 | + |
| 57 | +1. **Freeze the starting identity.** Record the exact stack commit and every |
| 58 | + producer/source commit whose authority can affect the change. |
| 59 | +2. **Classify the mutation.** Mark each affected item as one or more of: |
| 60 | + `identity`, `authority`, `relation`, `placement`, `lifecycle`, `pin`, `projection`. |
| 61 | +3. **Resolve edit ownership.** Change a claim at its owning source. Never repair a |
| 62 | + producer-owned defect by shadowing it in a consumer or by editing `libs/`. |
| 63 | +4. **Compute the update closure.** Inspect at minimum: |
| 64 | + `stack-manifest.json`, `STACK_MANIFEST.md`, root `README.md`, root `AGENTS.md`, |
| 65 | + the affected `research/*/BASE.json`, relevant local README/docs, and CI/checkers. |
| 66 | + Update every projection whose statement became false because of the mutation. |
| 67 | +5. **Remove superseded claims.** A newly separated owner requires the prior owner to |
| 68 | + stop claiming that responsibility in every stack-level authority projection. |
| 69 | + Do not merely add the new owner alongside stale text. |
| 70 | +6. **Preserve lifecycle standing.** Extraction is not graduation. Stack-local work |
| 71 | + remains noncanonical until its governing graduation gates complete and stack |
| 72 | + reconsumes the released independent artifact where required. |
| 73 | +7. **Recompute machine identity.** Recompute `work_graph_sha256` exactly from the |
| 74 | + versioned manifest contract after any hashed field changes. Never hand-wave or |
| 75 | + copy an old digest. |
| 76 | +8. **Run deterministic consistency validation.** In stack, run: |
| 77 | + |
| 78 | + ```bash |
| 79 | + python tools/check_stack_consistency.py |
| 80 | + ``` |
| 81 | + |
| 82 | + Treat any error as a blocked structural update, not a documentation warning. |
| 83 | +9. **Run affected behavioral gates.** Execute repository/workspace-local tests and |
| 84 | + at least one cross-boundary check for changed producer/consumer relations. |
| 85 | +10. **Commit the transaction.** The structural mutation and its required projections |
| 86 | + belong in one coherent PR/merge sequence. If a necessary authority is unavailable, |
| 87 | + preserve the boundary as `hmmm`; do not guess it into consistency. |
| 88 | + |
| 89 | +## Deterministic checker contract |
| 90 | + |
| 91 | +A consuming stack checker should fail closed for at least: |
| 92 | + |
| 93 | +- a `work_graph_sha256` that does not reproduce from the declared manifest fields; |
| 94 | +- disagreement between machine-readable and human-readable repository authority; |
| 95 | +- direct tracked edits to `libs/` presented as stack-owned canon; |
| 96 | +- an affected `BASE.json` whose source repository/commit conflicts with the pinned |
| 97 | + source identity it claims to derive from; |
| 98 | +- an emergent stack-local component whose authority separation is declared locally |
| 99 | + while stack-level authority text still assigns that responsibility to its former owner; |
| 100 | +- lifecycle language that treats extraction as graduation; |
| 101 | +- a structural update that changes one required projection but omits another. |
| 102 | + |
| 103 | +The checker validates coherence, not truth of scientific or semantic claims. Those |
| 104 | +remain owned by their proper repositories and evidence. |
| 105 | + |
| 106 | +## Output shape |
| 107 | + |
| 108 | +When this skill is active, report: |
| 109 | + |
| 110 | +```markdown |
| 111 | +## Stack transaction |
| 112 | +- start identity: |
| 113 | +- mutation class: |
| 114 | +- affected authority / relations: |
| 115 | +- files changed: |
| 116 | + |
| 117 | +## Validation |
| 118 | +- stack consistency: |
| 119 | +- local gates: |
| 120 | +- cross-boundary gate: |
| 121 | + |
| 122 | +## Standing |
| 123 | +- canon / research / extracted / graduated: |
| 124 | +- hmmm: |
| 125 | +``` |
| 126 | + |
| 127 | +## Usage guidance |
| 128 | + |
| 129 | +Before moving or separating a stack component, run the checker once **before** the |
| 130 | +change to establish the current baseline, make the structural edit and all required |
| 131 | +projection updates, then run it again. A pre-existing failure is evidence to classify; |
| 132 | +it is not permission to add another inconsistency. |
| 133 | + |
| 134 | +Example: moving English Gonol Construction out of EDCM requires the new workspace and |
| 135 | +its provenance **and** removal of `text-gonol construction` from EDCM's stack-level |
| 136 | +authority statement, corresponding manifest/work-graph updates, digest regeneration, |
| 137 | +and the affected English Gonol + EDCM checks. |
| 138 | + |
| 139 | +## Anti-patterns |
| 140 | + |
| 141 | +- Moving code first and treating manifest/docs repair as optional cleanup. |
| 142 | +- Updating `stack-manifest.json` but not `STACK_MANIFEST.md`, or vice versa. |
| 143 | +- Adding a new authority statement without removing the superseded one. |
| 144 | +- Editing `libs/<repo>/` to make a stack-local inconsistency disappear. |
| 145 | +- Reusing a stale work-graph digest after changing hashed fields. |
| 146 | +- Calling an extracted project graduated because the new repository exists. |
| 147 | +- Making CI green by widening `PYTHONPATH` or weakening checks instead of repairing |
| 148 | + ownership/provenance drift. |
| 149 | + |
| 150 | +## hmmm |
| 151 | + |
| 152 | +- The first stack checker is intentionally conservative: it can prove declared |
| 153 | + projections agree, but it cannot infer every semantic responsibility from source code. |
| 154 | +- Future schema revisions may carry explicit typed stack-local component records and |
| 155 | + edge lists so more structural obligations can be checked without text comparisons. |
| 156 | +- A checklist that never fails a build eventually becomes wall decoration. |
0 commit comments