agentleFS
cruxible-aicruxible-ai/cruxible/skills/create-state/SKILL.md

create-state

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Create a new Cruxible state from raw domain data through staged graph, workflow, query, and review-loop design.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. araujoleonardo/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

36 rules. About 0 are common, 28 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈28

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Use this skill when a user wants to turn new data into a usable Cruxible state.

    line 8
  2. Very specific:

    If the source files are messy, run prepare-data first.

    line 14
  3. Distinctive:

    Do not rely on YAML alone when drafting or reviewing a state.

    line 20
  4. Distinctive:

    Use inline output for fast review when the agent harness can render Mermaid:

    line 24
  5. Very specific:

    If the config uses extends, render the runtime composed view for onboarding/review surfaces:

    line 37
  6. Distinctive:

    When iterating the config toward its final shape, explicitly direct the user to the generated README views as the primary way to understand …

    line 51
  7. Distinctive:

    prefer durable source IDs or external identifiers

    line 66
  8. Distinctive:

    avoid names, titles, or other mutable text unless there is no better identifier

    line 67
  9. Distinctive:

    if no good primary key exists, stop and design one before continuing

    line 68
  10. Distinctive:

    if a concept may need to be a future query or traversal surface, model it as its own entity instead of leaving it as a property

    line 69
  11. Distinctive:

    if users may need to start from it, fan out from it, relate other things to it, or review it independently over time, it is usually better …

    line 70
  12. Distinctive:

    do not invent constraints just to fill the slot

    line 73
  13. Distinctive:

    if there are no clear durable invalid states yet, leave this empty for now

    line 74
  14. Distinctive:

    Use a concrete summary:

    line 78
  15. Distinctive:

    Keep this phase focused on domain shape.

    line 89
  16. Distinctive:

    Write only the minimum needed for the base graph:

    line 93
  17. Distinctive:

    Do not spend time on named queries, review loops, or advanced workflows yet.

    line 100
  18. Distinctive:

    After writing the base graph config, render at least the ontology view inline.

    line 102
  19. Distinctive:

    If the state has a README, add or update the ontology marker block there too.

    line 103
  20. Distinctive:

    Use this as the graph-shape checkpoint before moving on.

    line 104
  21. Distinctive:

    Use the real CLI to validate:

    line 108
  22. Distinctive:

    If you are working locally without a daemon (developer mode only):

    line 122
  23. Distinctive:

    Stop on validation or init errors.

    line 130
  24. Distinctive:

    Start with the operating loop, not the config nouns.

    line 136
  25. Distinctive:

    Keep this phase focused on operations.

    line 145
  26. Very specific:

    add only the base contracts needed to describe their task input and output shapes

    line 173
  27. Distinctive:

    do not build the provider-backed proposal workflows yet

    line 174
  28. Very specific:

    do not mark these tasks canonical

    line 175
  29. Very specific:

    Do not introduce Cruxible workflow machinery just because the schema allows it.

    line 177
  30. Distinctive:

    After adding workflow machinery, render the workflow pipeline and workflow summary inline.

    line 179
  31. Distinctive:

    After workflow config changes:

    line 187
  32. Very specific:

    Use cruxible plan --workflow <workflow_name> when you need to inspect the compiled workflow before running it.

    line 195
  33. Distinctive:

    Do not run judgment-based or proposal workflows in this phase.

    line 205
  34. Distinctive:

    After Phase 4, read and follow:

    line 217
  35. Very specific:

    When following it from create-state, use Phases 1-4 of this skill as the earlier loopback points for graph shape, canonical workflow …

    line 223
  36. Distinctive:

    After adding governed relationships, named queries, feedback profiles, outcome profiles, or decision policies, rerender the full default …

    line 225

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

Create State

Use this skill when a user wants to turn new data into a usable Cruxible state. You are authoring a Crux — the governed, executable artifact of the user's domain knowledge — so treat every stage below as artifact construction, not config editing: what you produce will be reviewed, versioned, and relied on by other agents.

If the source files are messy, run prepare-data first.

Work in stages. Do not try to design the graph, workflows, queries, and review loop all at once.

Generated config views

Do not rely on YAML alone when drafting or reviewing a state. At each major config checkpoint, generate canonical views from the config and use those views as the review surface.

Use inline output for fast review when the agent harness can render Mermaid:

uv run cruxible config views --config config.yaml --view all

Also update durable README marker blocks so CLI and non-GUI harnesses can inspect the same generated views:

uv run cruxible config views --config config.yaml --update-readme README.md

If the config uses extends, render the runtime composed view for onboarding/review surfaces:

uv run cruxible config views --config config.yaml --runtime --view all
uv run cruxible config views --config config.yaml --runtime --update-readme README.md

Everything between CRUXIBLE:BEGIN / CRUXIBLE:END markers is code-owned structural output from the config. Authored prose may explain intent, tradeoffs, open questions, and operating guidance, but it must not replace or contradict the generated structural view. Do not hand-author alternate Mermaid diagrams when a generated view exists.

When iterating the config toward its final shape, explicitly direct the user to the generated README views as the primary way to understand the current system. The YAML remains the execution source of truth, but the README's generated ontology, workflow, governed relationship, and query sections are the review surface for human decisions. Before asking the user to approve graph shape, workflow sequencing, governed boundaries, or query surfaces, update the README marker blocks and point them to the relevant generated section.

Phase 1: Understand the domain shape

Before writing config:

  1. inspect the source files
  2. identify entity types and likely primary keys
    • a primary key is the stable property that uniquely identifies one real entity across reloads and updates
    • prefer durable source IDs or external identifiers
    • avoid names, titles, or other mutable text unless there is no better identifier
    • if no good primary key exists, stop and design one before continuing
    • if a concept may need to be a future query or traversal surface, model it as its own entity instead of leaving it as a property
    • if users may need to start from it, fan out from it, relate other things to it, or review it independently over time, it is usually better modeled as an entity
  3. identify deterministic relationships between entities that can be loaded directly from the source data
  4. identify any obvious bad states that should remain invalid across future ingests, refreshes, and graph updates, and should later become constraints or quality checks
    • do not invent constraints just to fill the slot
    • if there are no clear durable invalid states yet, leave this empty for now
  5. identify the major user-facing query and use-case categories the state should eventually support
  6. summarize the structural model for user confirmation

Use a concrete summary:

  • entity type
  • likely primary key column
  • key properties
  • source file
  • relationship name
  • from -> to
  • how it gets populated
  • notes or ambiguities

Keep this phase focused on domain shape. Do not jump ahead to workflow design unless the user raises it.

Write Step A: Write the base graph config

Write only the minimum needed for the base graph:

  • entity_types
  • relationships
  • obvious constraints
  • minimal contracts only if clearly required

Do not spend time on named queries, review loops, or advanced workflows yet.

After writing the base graph config, render at least the ontology view inline. If the state has a README, add or update the ontology marker block there too. Use this as the graph-shape checkpoint before moving on.

Phase 2: Validate the base graph config

Use the real CLI to validate:

cruxible validate --config config.yaml

Then initialize the instance. If you are connected to a governed daemon (server mode), use:

cruxible init --config config.yaml

The daemon manages the instance directory. Do not pass --root-dir . or create a local .cruxible/ directory when running in server mode — the daemon owns instance state.

If you are working locally without a daemon (developer mode only):

cruxible init --config config.yaml --root-dir .

At this stage, the goal is not to design or run the full operational loading path yet. The goal is to confirm that the base graph definition is coherent enough to proceed.

Stop on validation or init errors. Do not continue with a broken base config.

Phase 3: Understand the operational workflows

Once the base graph shape is defined and validated, figure out how this state is built and maintained over time.

Start with the operating loop, not the config nouns. Ask:

  1. where does new data come from?
  2. what repeatable steps turn raw inputs into graph state?
  3. which steps are deterministic and repeatable?
  4. which steps require judgment, matching, or review?
  5. what should be automatically committed versus proposed for review?
  6. summarize the workflow plan for user confirmation

Keep this phase focused on operations. Ask only the workflow questions needed to understand refresh cadence, automatic rebuilds, proposal-vs-direct-apply boundaries, and where review is required.

Then translate those answers into Cruxible terms:

  • artifacts: input files, bundles, or external data sources the workflow depends on
  • providers: reusable logic, model calls, or external processing steps
  • contracts: structured workflow input and output shapes
  • workflows: repeatable procedures that build, refresh, or propose graph state
  • canonical workflows: workflows whose results are written directly into state instead of first becoming reviewable proposals. Use this only for deterministic or otherwise highly trusted operations that are safe to commit without a proposal/review step.

At the end of this phase, separate the workflow plan into two buckets:

  • canonical workflows to design now
  • judgment-based workflows that should become reviewable proposals later

For the later judgment-based workflows, define the task and the expected input/output shape now, but defer detailed provider and proposal-workflow design until after the graph and query surfaces are clearer.

Write Step B: Add workflow machinery

Fully design the canonical workflow path now. Extend the config with:

  • artifacts
  • contracts
  • providers needed for deterministic or otherwise trusted steps
  • deterministic workflows

For judgment-based tasks that will need model judgment, matching, ranking, or review:

  • add only the base contracts needed to describe their task input and output shapes
  • do not build the provider-backed proposal workflows yet
  • do not mark these tasks canonical

Do not introduce Cruxible workflow machinery just because the schema allows it.

After adding workflow machinery, render the workflow pipeline and workflow summary inline. If the state has a README, update the generated workflow marker blocks there too. The user should be able to review the sequence, each stage's input context, the produced state or proposal, and provider provenance without mentally parsing the YAML.

Phase 4: Build and inspect the state for the first time

After workflow config changes:

cruxible validate --config config.yaml
cruxible config reload --config config.yaml
cruxible lock

Use cruxible plan --workflow <workflow_name> when you need to inspect the compiled workflow before running it.

Then run every canonical build or refresh workflow you defined in Step B, in dependency order:

cruxible run --workflow <workflow_name> --apply

This is the first real population step. Use it to build or refresh the state through the full canonical workflow path you designed in Step B.

Do not run judgment-based or proposal workflows in this phase. This phase is only for the workflows that are safe to apply directly to the state.

Re-check the state with:

cruxible stats
cruxible sample --type <EntityType> --limit 5
cruxible inspect entity --type <EntityType> --id <entity_id>

Shared Governance Flow

After Phase 4, read and follow:

  • ../_shared/references/governance-flow.md

That shared reference is the source of truth for the remaining flow after the canonical layer is in place. Some phases inside it are conditional, but the reference itself is not optional once you move past Phase 4.

When following it from create-state, use Phases 1-4 of this skill as the earlier loopback points for graph shape, canonical workflow design, and canonical state build questions.

After adding governed relationships, named queries, feedback profiles, outcome profiles, or decision policies, rerender the full default config view bundle inline and update README marker blocks if present. Use the ontology, workflow summary, governed relationship table, query map, and query catalog together as the final structural review surface before hand-off.

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.