agentleFS
Cody-SimsCody-Sims/agent-skills/skills/shadow-architecture/SKILL.md

shadow-architecture

Skill0 starsChanged 4 months agoMITView on GitHub

Sets up and maintains a repository-owned .shadow graph, manages approved decision lifecycles and index or schema compatibility, supersedes accepted history, and renders reviewed records. Use when creating or migrating .shadow, recording approved architecture decisions, maintaining its index or schema, superseding accepted decisions, or generating derived views from reviewed records; not for discovering observations, imagining future states, or checking drift.

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. About 0 are common, 21 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈21

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never invent historical intent or rationale.

    line 43
  2. Distinctive:

    Treat approved decision records as historical artifacts.

    line 45
  3. Distinctive:

    Treat candidate observations, future-state proposals, and drift reports as inputs for review, not as accepted decisions.

    line 47
  4. Distinctive:

    Treat rendered files as derived output, never as authority.

    line 49
  5. Distinctive:

    Read workspace instructions before changing files.

    line 55
  6. Very specific:

    Read .shadow/README.md first when it exists.

    line 56
  7. Distinctive:

    Follow the index and schema locations declared there, even when they differ from the reference layout.

    line 57
  8. Distinctive:

    Do not broaden a maintenance request into repository observation, architecture ideation, or drift analysis.

    line 75
  9. Very specific:

    When .shadow/ is absent, create the smallest useful layout: a README, declared index, declared schema, and decision-record location.

    line 80
  10. Distinctive:

    Document which files are authoritative, which are inputs awaiting review, and which are derived.

    line 82
  11. Distinctive:

    Add aliases, optional fields, schema unions, or a version marker before requiring destructive rewrites.

    line 87
  12. Distinctive:

    Keep the index synchronized with authoritative records and their statuses.

    line 96
  13. Distinctive:

    Keep IDs stable and relation targets resolvable.

    line 97
  14. Distinctive:

    Create a stable ID and a present-tense statement.

    line 106
  15. Very specific:

    Use observed for an evidence-supported description of current architecture and proposed for a not-yet-adopted decision.

    line 110
  16. Distinctive:

    Update the authoritative index and schema-compatible record together.

    line 113
  17. Distinctive:

    Never overwrite the substance of an accepted decision to express a new choice.

    line 122
  18. Distinctive:

    Create a new decision with its own evidence, rationale, approval, and ID.

    line 124
  19. Distinctive:

    Update the index atomically so both records and their relationship remain visible.

    line 128
  20. Distinctive:

    Read only authoritative, reviewed records and indexes.

    line 133
  21. Distinctive:

    Write output under the repository-declared derived location.

    line 136
  22. Distinctive:

    Do not alter decision text, lifecycle status, approval, evidence, or rationale while rendering.

    line 140
  23. Distinctive:

    Stop for human approval before:

    line 145
  24. Very specific:

    Run the repository-declared .shadow/ validator when one exists.

    line 160
  25. Distinctive:

    Check unique IDs, supported kinds and statuses, relation targets, required approval fields, provenance fields, and index-to-record …

    line 162
  26. Distinctive:

    Check that evidence and anchor references use the repository's declared conventions and that missing rationale remains explicit.

    line 164

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Shadow Architecture

Set up and maintain a repository-owned .shadow/ graph as durable, reviewable architecture memory. The repository's .shadow/README.md, declared index, and declared schema remain authoritative. Read the Shadow v2 reference contract when creating, migrating, or changing the graph contract.

Scope

This skill owns:

  • initial .shadow/ setup and migration from the minimal convention;
  • index, schema, identifier, relation, and compatibility maintenance;
  • recording decisions after the required human approval;
  • moving decisions through observed, proposed, accepted, and superseded;
  • preserving accepted history by linked supersession; and
  • rendering reviewed records into disposable derived output.

This skill does not autonomously discover candidate observations, invent future-state architecture, or compare the graph with implementation for drift. Hand those requests to shadow-observe, shadow-dream, or shadow-drift respectively. Use codebase-exploration for a repository map and documentation-maintenance for ordinary documentation work unrelated to the .shadow/ contract.

Evidence Rules

  1. Separate verified evidence, inference, and unknowns in every record.
  2. Cite repository-relative code, tests, documentation, issues, pull requests, or commits for material claims.
  3. Never invent historical intent or rationale. Store unknown when it cannot be verified.
  4. Treat approved decision records as historical artifacts. Do not silently rewrite them to match current preferences.
  5. Treat candidate observations, future-state proposals, and drift reports as inputs for review, not as accepted decisions.
  6. Treat rendered files as derived output, never as authority.

Workflow

1. Read Repository Authority

  1. Read workspace instructions before changing files.
  2. Read .shadow/README.md first when it exists.
  3. Follow the index and schema locations declared there, even when they differ from the reference layout.
  4. Inventory decision statuses, record kinds, identifiers, relations, approvals, provenance, and derived output.
  5. Preserve valid repository-specific fields and older records unless an approved migration explicitly changes them.

2. Classify the Request

Choose one or more bounded operations:

  • setup: create the minimal repository-owned graph and document its authority;
  • migrate: add v2 concepts without invalidating readable legacy records;
  • maintain: repair or evolve indexes, schemas, relations, or compatibility;
  • record: add or transition a decision with the required approval evidence;
  • supersede: replace accepted history with linked new history; or
  • render: generate a view from reviewed records without changing them.

Do not broaden a maintenance request into repository observation, architecture ideation, or drift analysis.

3. Set Up or Migrate

  1. When .shadow/ is absent, create the smallest useful layout: a README, declared index, declared schema, and decision-record location.
  2. Document which files are authoritative, which are inputs awaiting review, and which are derived.
  3. Define stable IDs, record kinds, lifecycle states, relation types, evidence fields, approval fields, and run provenance.
  4. For an existing graph, preserve its current paths and readable record shape.
  5. Add aliases, optional fields, schema unions, or a version marker before requiring destructive rewrites.
  6. Record migration provenance and unresolved compatibility gaps.
  7. Require human approval before changing the authoritative contract or promoting any record to accepted.

4. Maintain the Contract

  1. Make the schema accept every record that the README promises is supported.
  2. Keep the index synchronized with authoritative records and their statuses.
  3. Keep IDs stable and relation targets resolvable.
  4. Preserve unknown values instead of replacing them with guesses.
  5. Retain run, approval, and source provenance through format changes.
  6. Make derived output regenerable and exclude it from authority decisions.
  7. Report incompatible legacy records instead of silently dropping fields.

5. Record a Decision

  1. Identify the reviewed input and the evidence supporting the decision.
  2. Create a stable ID and a present-tense statement.
  3. Record rationale only when verified; otherwise mark it unknown.
  4. Record explicit evidence, inference, unknowns, anchors, relations, source provenance, and approval state.
  5. Use observed for an evidence-supported description of current architecture and proposed for a not-yet-adopted decision.
  6. Promote to accepted only with recorded human approval.
  7. Update the authoritative index and schema-compatible record together.

Candidate observations from shadow-observe, future-state proposals from shadow-dream, and drift reports from shadow-drift remain their original record kinds until reviewed. Approval may produce or update a decision; it does not retroactively turn the source artifact into an accepted decision.

6. Supersede Accepted History

  1. Never overwrite the substance of an accepted decision to express a new choice.
  2. Create a new decision with its own evidence, rationale, approval, and ID.
  3. Link the new record to the old one with supersedes.
  4. Mark the old record superseded and link it to the replacement.
  5. Preserve the old statement, rationale, evidence, approval, and provenance.
  6. Update the index atomically so both records and their relationship remain visible.

7. Render Reviewed Records

  1. Read only authoritative, reviewed records and indexes.
  2. Exclude unapproved candidates unless the requested view explicitly labels them as unapproved inputs.
  3. Write output under the repository-declared derived location.
  4. Record generator identity or command, source record IDs, source revisions or hashes when available, and generation time.
  5. Mark the output as derived and disposable.
  6. Do not alter decision text, lifecycle status, approval, evidence, or rationale while rendering.

Approval Gates

Stop for human approval before:

  • promoting a decision to accepted;
  • changing an accepted decision's meaning;
  • superseding accepted history;
  • changing the authoritative README, index, or schema contract incompatibly; or
  • treating a candidate observation, future-state proposal, or drift report as a decision.

Mechanical index synchronization and regeneration of already-reviewed derived output do not require a new architecture approval when repository policy allows them.

Validation

  1. Run the repository-declared .shadow/ validator when one exists.
  2. Otherwise parse the declared machine-readable files.
  3. Check unique IDs, supported kinds and statuses, relation targets, required approval fields, provenance fields, and index-to-record agreement.
  4. Check that evidence and anchor references use the repository's declared conventions and that missing rationale remains explicit.
  5. Confirm legacy records remain readable after migration.
  6. Confirm derived output identifies its sources and is not indexed as an authoritative decision.
  7. Review the diff for invented rationale, silent history rewrites, and accidental observation, dreaming, or drift work.

Response

Report the operation performed, authoritative files changed, decision lifecycle transitions, approvals used or still required, compatibility preserved, records rendered, validation commands and results, unknowns, and any handoff needed to a sibling skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.