agentleFS
cruxible-aicruxible-ai/cruxible/skills/overlay-and-fit/SKILL.md

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.

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
  1. Distinctive:

    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.

    line 8
  2. Distinctive:

    If you are not sure whether the current workspace is already an overlay, check first:

    line 12
  3. Distinctive:

    If it reports upstream tracking metadata, continue in the current workspace.

    line 18
  4. Distinctive:

    If it says the instance is not tracking an upstream published state, create an overlay first:

    line 20
  5. Very specific:

    treat .cruxible/composed/config.yaml as generated output, not as the source of truth

    line 41
  6. Very specific:

    use the inherited state and the applied kit as-is if they already solve the problem

    line 42
  7. Distinctive:

    add local extensions instead of re-declaring inherited config or graph structure from the reference state

    line 43
  8. Very specific:

    prefer refining the local kit pattern over inventing new local machinery

    line 44
  9. Distinctive:

    if a desired change really belongs in the inherited config, call it out as upstream work

    line 45
  10. Distinctive:

    keep the local fit as small as the use case allows

    line 46
  11. Distinctive:

    Start by inspecting the overlay workspace:

    line 50
  12. Very specific:

    If a kit was applied, inspect the local files it brought in too.

    line 65
  13. Distinctive:

    if not, what is actually missing?

    line 75
  14. Distinctive:

    Keep this phase grounded in the current overlay.

    line 78
  15. Very specific:

    if yes, which existing workflows, proposal flows, or named_queries should be used?

    line 85
  16. Very specific:

    if no, is the gap missing local graph structure, missing local provider or workflow machinery, missing local named_queries, or some …

    line 86
  17. Very specific:

    If the answer is "use the current overlay as-is," continue to Phase 3 and do not edit config.yaml yet.

    line 91
  18. Distinctive:

    If the answer is "the overlay needs local changes," continue to Phase 4.

    line 93
  19. Distinctive:

    If the current overlay is already good enough, use it directly.

    line 97
  20. Very specific:

    Do not edit config.yaml in this phase.

    line 99
  21. Distinctive:

    run the current setup and inspect the results

    line 106
  22. Distinctive:

    Use the existing CLI surfaces that match the current overlay:

    line 108
  23. Very specific:

    If the current overlay and kit solve the problem, stop here and hand off the working flow.

    line 117
  24. Distinctive:

    If the current setup is not enough, continue to Phase 4 and make the smallest necessary local change.

    line 119
  25. Distinctive:

    Start with the local operating loop, not just the config nouns.

    line 123
  26. Distinctive:

    Keep this phase ownership-focused.

    line 134
  27. Very specific:

    Use the applied kit as a starting point where possible.

    line 145
  28. Distinctive:

    Use local names for new entries so they do not collide with inherited names.

    line 159
  29. Very specific:

    Do not copy large chunks of inherited config into the local file.

    line 165
  30. Distinctive:

    After local config changes:

    line 169
  31. Very specific:

    Run only the local canonical workflows you added through the local config:

    line 177
  32. Distinctive:

    Do not try to rebuild inherited state here.

    line 183
  33. Very specific:

    If the inherited state plus the applied kit now solve the problem, stop adding machinery.

    line 193
  34. Distinctive:

    After Phase 5, read and follow:

    line 197
  35. Very specific:

    When following it from overlay-and-fit:

    line 203
  36. Distinctive:

    use Phases 1-5 of this skill as the earlier loopback points for local fit boundary, local canonical config, and local canonical build …

    line 205
  37. Very specific:

    prefer inherited and kit surfaces before adding local ones

    line 206
  38. Distinctive:

    add only the smallest local fit needed to solve the current problem

    line 207
  39. Distinctive:

    if a change really belongs upstream, call it out instead of forcing it into the overlay

    line 208
  40. Very specific:

    Before doing the final handoff phase in governance-flow.md, return here for the overlay-specific final phase below.

    line 210
  41. Distinctive:

    Before the final handoff, confirm that the local config still stays compatible with future upstream pulls:

    line 214
  42. Distinctive:

    If the local config does not compose cleanly with the upstream preview:

    line 223
  43. Distinctive:

    Only apply the pull if the user wants to test it directly:

    line 229
  44. Very specific:

    When you return to the final handoff phase in governance-flow.md, also clearly distinguish:

    line 235

≈ “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

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 status

If 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

  • canonical behavior means deterministic graph-building or refresh behavior whose results can be written directly into state
  • governed behavior means judgment-based behavior that should go through proposal, review, and resolution before it becomes durable state
  • proposal workflows are the non-canonical workflows that produce reviewable candidates or groups instead of writing directly into state
  • named_queries are the user-facing query entry points the state exposes
  • providers are the code or model-backed steps that workflows call

Core Rules

  • edit the local config.yaml, not .cruxible/upstream/current/config.yaml
  • treat .cruxible/composed/config.yaml as generated output, not as the source of truth
  • use the inherited state and the applied kit as-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 kit pattern 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:

  1. what user problem are we solving in this overlay?
  2. what does the inherited state already provide?
  3. what does the applied kit already provide?
  4. what named_queries or downstream workflows does this overlay need to support for the user?
  5. does the current inherited state plus local files already have a clean path for those surfaces?
  6. can the current overlay already handle this use case without local changes?
  7. if not, what is actually missing?
  8. 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:

  1. can the inherited state, applied kit, and existing workflows handle the user's data or workflow as-is?
  2. if yes, which existing workflows, proposal flows, or named_queries should be used?
  3. if no, is the gap missing local graph structure, missing local provider or workflow machinery, missing local named_queries, or some combination?
  4. does the problem require new local canonical behavior, new governed behavior, new local queries, or none of those?
  5. what is the smallest set of local changes needed to support those goals?
  6. 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:

  1. identify which existing canonical workflows should be run for the user's data
  2. identify which existing governed workflows or review surfaces should be used
  3. identify which existing named_queries already answer the user's questions
  4. 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:

  1. which local entities or relationships are truly missing?
  2. what repeatable local steps should turn local inputs into local graph state?
  3. which of those steps are deterministic and repeatable enough to become local canonical workflows?
  4. which of those steps require judgment, matching, or review and should become later proposal workflows instead?
  5. which local review or governed surfaces are actually needed?
  6. which local named_queries are actually needed?
  7. what can be solved by refining the applied kit or local config instead of inventing new machinery?
  8. 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 canonical workflows to implement and run in Phase 5
  • judgment-based local proposal workflows to 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_types
  • relationships
  • artifacts
  • contracts
  • integrations
  • providers
  • workflows
  • named_queries
  • feedback_profiles
  • outcome_profiles
  • appended constraints, quality_checks, decision_policies, or tests

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 lock

Run only the local canonical workflows you added through the local config:

cruxible run --workflow <workflow_name> --apply

Do 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 kit surfaces 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-preview

Inspect 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-preview result
  • what should stay local versus what should be proposed upstream later

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.