overlay-and-fit
Skill17 starsChanged 4 months agoApache-2.0View on GitHub
Create an overlay from a published reference state, use the inherited state plus any applied kit with the lowest-friction path, and only add local config or code when the current overlay is not enough.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- classification-at-scaleSkill
- create-stateSkill
- prepare-dataSkill
- review-stateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. About 0 are common, 27 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when the user wants to start from a published reference state and fit it to a local use case with the least friction.
- Distinctive: line 12
If you are not sure whether the current workspace is already an overlay, check first:
- Distinctive: line 18
If it reports upstream tracking metadata, continue in the current workspace.
- Distinctive: line 20
If it says the instance is not tracking an upstream published state, create an overlay first:
- Very specific: line 41
treat .cruxible/composed/config.yaml as generated output, not as the source of truth
- Very specific: line 42
use the inherited state and the applied kit as-is if they already solve the problem
- Distinctive: line 43
add local extensions instead of re-declaring inherited config or graph structure from the reference state
- Very specific: line 44
prefer refining the local kit pattern over inventing new local machinery
- Distinctive: line 45
if a desired change really belongs in the inherited config, call it out as upstream work
- Distinctive: line 46
keep the local fit as small as the use case allows
- Distinctive: line 50
Start by inspecting the overlay workspace:
- Very specific: line 65
If a kit was applied, inspect the local files it brought in too.
- Distinctive: line 75
if not, what is actually missing?
- Distinctive: line 78
Keep this phase grounded in the current overlay.
- Very specific: line 85
if yes, which existing workflows, proposal flows, or named_queries should be used?
- Very specific: line 86
if no, is the gap missing local graph structure, missing local provider or workflow machinery, missing local named_queries, or some …
- Very specific: line 91
If the answer is "use the current overlay as-is," continue to Phase 3 and do not edit config.yaml yet.
- Distinctive: line 93
If the answer is "the overlay needs local changes," continue to Phase 4.
- Distinctive: line 97
If the current overlay is already good enough, use it directly.
- Very specific: line 99
Do not edit config.yaml in this phase.
- Distinctive: line 106
run the current setup and inspect the results
- Distinctive: line 108
Use the existing CLI surfaces that match the current overlay:
- Very specific: line 117
If the current overlay and kit solve the problem, stop here and hand off the working flow.
- Distinctive: line 119
If the current setup is not enough, continue to Phase 4 and make the smallest necessary local change.
- Distinctive: line 123
Start with the local operating loop, not just the config nouns.
- Distinctive: line 134
Keep this phase ownership-focused.
- Very specific: line 145
Use the applied kit as a starting point where possible.
- Distinctive: line 159
Use local names for new entries so they do not collide with inherited names.
- Very specific: line 165
Do not copy large chunks of inherited config into the local file.
- Distinctive: line 169
After local config changes:
- Very specific: line 177
Run only the local canonical workflows you added through the local config:
- Distinctive: line 183
Do not try to rebuild inherited state here.
- Very specific: line 193
If the inherited state plus the applied kit now solve the problem, stop adding machinery.
- Distinctive: line 197
After Phase 5, read and follow:
- Very specific: line 203
When following it from overlay-and-fit:
- Distinctive: line 205
use Phases 1-5 of this skill as the earlier loopback points for local fit boundary, local canonical config, and local canonical build …
- Very specific: line 206
prefer inherited and kit surfaces before adding local ones
- Distinctive: line 207
add only the smallest local fit needed to solve the current problem
- Distinctive: line 208
if a change really belongs upstream, call it out instead of forcing it into the overlay
- Very specific: line 210
Before doing the final handoff phase in governance-flow.md, return here for the overlay-specific final phase below.
- Distinctive: line 214
Before the final handoff, confirm that the local config still stays compatible with future upstream pulls:
- Distinctive: line 223
If the local config does not compose cleanly with the upstream preview:
- Distinctive: line 229
Only apply the pull if the user wants to test it directly:
- Very specific: line 235
When you return to the final handoff phase in governance-flow.md, also clearly distinguish:
≈ “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.
Files
Overlay And Fit
Use this skill when the user wants to start from a published reference state and fit it to a local use case with the least friction. You are extending a published Crux with a local overlay, not authoring one from scratch.
This is the reference-state path, not the greenfield path. Start from the inherited state, use the applied kit if one exists, and only add local config or code when the current overlay is not enough.
If you are not sure whether the current workspace is already an overlay, check first:
cruxible state statusIf it reports upstream tracking metadata, continue in the current workspace.
If it says the instance is not tracking an upstream published state, create an overlay first:
cruxible state create-overlay --state-ref <alias> --root-dir <root_dir>Here, <root_dir> is the workspace root directory that will contain the local config.yaml and the .cruxible/ instance directory. It is not the .cruxible/ directory itself.
If that state has a configured default kit, its local files will be copied into the workspace automatically. This usually means the overlay-specific config.yaml plus any companion workspace files that kit needs, such as local provider code, artifacts or seed data, helper files, or other local starting material. The exact kit shape may vary. Use --kit <kit> to override the default kit, or --no-kit for a bare overlay.
Cruxible Terms
canonicalbehavior means deterministic graph-building or refresh behavior whose results can be written directly into stategovernedbehavior means judgment-based behavior that should go through proposal, review, and resolution before it becomes durable stateproposal workflowsare the non-canonicalworkflowsthat produce reviewable candidates or groups instead of writing directly into statenamed_queriesare the user-facing query entry points the state exposesprovidersare the code or model-backed steps thatworkflowscall
Core Rules
- edit the local
config.yaml, not.cruxible/upstream/current/config.yaml - treat
.cruxible/composed/config.yamlas generated output, not as the source of truth - use the inherited state and the applied
kitas-is if they already solve the problem - add local extensions instead of re-declaring inherited config or graph structure from the reference state
- prefer refining the local
kitpattern over inventing new local machinery - if a desired change really belongs in the inherited config, call it out as upstream work
- keep the local fit as small as the use case allows
Phase 1: Establish the overlay baseline
Start by inspecting the overlay workspace:
cruxible state status
cruxible stats
cruxible sample --type <EntityType> --limit 5
cruxible inspect entity --type <EntityType> --id <entity_id>Inspect the three config layers:
- local config:
config.yaml - inherited config snapshot:
.cruxible/upstream/current/config.yaml - active composed runtime config:
.cruxible/composed/config.yaml
If a kit was applied, inspect the local files it brought in too.
Then answer:
- what user problem are we solving in this overlay?
- what does the inherited state already provide?
- what does the applied
kitalready provide? - what
named_queriesor downstreamworkflowsdoes this overlay need to support for the user? - does the current inherited state plus local files already have a clean path for those surfaces?
- can the current overlay already handle this use case without local changes?
- if not, what is actually missing?
- what should stay local instead of being pushed upstream?
Keep this phase grounded in the current overlay. Do not redesign the inherited state from scratch.
Phase 2: Choose the fit strategy
Decide whether to use the overlay as-is or make the smallest local fit:
- can the inherited state, applied
kit, and existingworkflowshandle the user's data or workflow as-is? - if yes, which existing
workflows, proposal flows, ornamed_queriesshould be used? - if no, is the gap missing local graph structure, missing local provider or workflow machinery, missing local
named_queries, or some combination? - does the problem require new local canonical behavior, new governed behavior, new local queries, or none of those?
- what is the smallest set of local changes needed to support those goals?
- summarize the chosen path for user confirmation
If the answer is "use the current overlay as-is," continue to Phase 3 and do not edit config.yaml yet.
If the answer is "the overlay needs local changes," continue to Phase 4.
Phase 3: Run the current overlay with no local changes
If the current overlay is already good enough, use it directly.
Do not edit config.yaml in this phase.
Instead:
- identify which existing canonical
workflowsshould be run for the user's data - identify which existing governed
workflowsor review surfaces should be used - identify which existing
named_queriesalready answer the user's questions - run the current setup and inspect the results
Use the existing CLI surfaces that match the current overlay:
cruxible run --workflow <workflow_name> --apply
cruxible propose --workflow <workflow_name>
cruxible query run <query_name> --param key=value
cruxible explain --receipt <receipt_id>If the current overlay and kit solve the problem, stop here and hand off the working flow.
If the current setup is not enough, continue to Phase 4 and make the smallest necessary local change.
Phase 4: Define the local fit boundary
Start with the local operating loop, not just the config nouns. Decide what the local config actually needs to add:
- which local entities or relationships are truly missing?
- what repeatable local steps should turn local inputs into local graph state?
- which of those steps are deterministic and repeatable enough to become local
canonicalworkflows? - which of those steps require judgment, matching, or review and should become later
proposal workflowsinstead? - which local review or governed surfaces are actually needed?
- which local
named_queriesare actually needed? - what can be solved by refining the applied
kitor local config instead of inventing new machinery? - summarize the local fit boundary for user confirmation
Keep this phase ownership-focused. If a change would require inherited entries or semantics to change, call that out as upstream work instead of forcing it into the local config.
At the end of this phase, separate the local workflow plan into two buckets:
- local
canonicalworkflowsto implement and run in Phase 5 - judgment-based local
proposal workflowsto design later in Phases 6-8
Write Step A: Update the local config
Edit only the local config.yaml.
Use the applied kit as a starting point where possible. Add only the local pieces that are actually needed:
entity_typesrelationshipsartifactscontractsintegrationsprovidersworkflowsnamed_queriesfeedback_profilesoutcome_profiles- appended
constraints,quality_checks,decision_policies, ortests
Use local names for new entries so they do not collide with inherited names.
In this step, fully add the local graph structure and local canonical workflow machinery needed for Phase 5.
For later judgment-based tasks that should become proposal workflows, only add the base local structure you already know you need, such as supporting graph elements or base contracts. Do not fully design the provider-backed proposal flow here; that belongs in Phases 6-7.
Do not copy large chunks of inherited config into the local file. Reuse inherited structure and kit patterns instead.
Phase 5: Validate and run the local canonical fit
After local config changes:
cruxible validate --config config.yaml
cruxible config reload --config config.yaml
cruxible lockRun only the local canonical workflows you added through the local config:
cruxible run --workflow <workflow_name> --applyDo not try to rebuild inherited state here. The overlay should add local state and local behavior on top of what is already inherited.
Re-check the state:
cruxible stats
cruxible sample --type <EntityType> --limit 5
cruxible inspect entity --type <EntityType> --id <entity_id>If the inherited state plus the applied kit now solve the problem, stop adding machinery.
Shared Governance Flow
After Phase 5, read and follow:
../_shared/references/governance-flow.md
That shared reference is the source of truth for the remaining flow after the local canonical fit. Some phases inside it are conditional, so if the inherited state plus the selected kit already solve the problem you may skip the unnecessary add-more-machinery phases there. But the shared reference itself is not optional once you move past Phase 5.
When following it from overlay-and-fit:
- use Phases 1-5 of this skill as the earlier loopback points for local fit boundary, local canonical config, and local canonical build questions
- prefer inherited and
kitsurfaces before adding local ones - add only the smallest local fit needed to solve the current problem
- if a change really belongs upstream, call it out instead of forcing it into the overlay
Before doing the final handoff phase in governance-flow.md, return here for the overlay-specific final phase below.
Phase 6: Check future upstream pull compatibility
Before the final handoff, confirm that the local config still stays compatible with future upstream pulls:
cruxible state status
cruxible state pull-previewInspect warnings, compatibility, and conflicts.
If the local config does not compose cleanly with the upstream preview:
- simplify the local fit
- move the conflicting change into upstream work
- or clearly document the pull risk before handoff
Only apply the pull if the user wants to test it directly:
cruxible state pull-apply --apply-digest <digest>When you return to the final handoff phase in governance-flow.md, also clearly distinguish:
- what remains inherited
- what came from the selected
kit - what was added locally in this overlay
- the current
state status/pull-previewresult - what should stay local versus what should be proposed upstream later
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
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.

