agentleFS
hi-donwihi-donwi/Donwi-Skills/skills/kerangka/SKILL.md

kerangka

Skill0 starsChanged 13 days agoMITView on GitHub

Author, validate, compile, and project Kerangka models — declarative JSON app logic, workflows, DDL, OpenAPI, MCP tools, and UIDL frontends.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Validate syntax and types: Run kerangka check <model.json>.

    line 36
  2. Very specific:

    Lint boundary invariants: Run kerangka lint <model.json>.

    line 37
  3. Very specific:

    Compile to Canonical Intermediate Representation: Run kerangka build <model.json> -o build/app.kir.json.

    line 38
  4. Very specific:

    Choose the UI projection path: Read references/declarative-ui-design.md.

    line 40
  5. Very specific:

    Use shared presentation hooks/recipes for grouped fields, bounded width, and actions.

    line 43
  6. Very specific:

    Execute sidecar runtime: Use kerangka serve --stdio --session app.db for transactional execution.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Kerangka

Overview

Kerangka turns a declarative JSON model (.kerangka.json) into production application logic (validation, computed fields, business rules, state workflows, actions, permissions) and multi-target projections (SQL DDL, OpenAPI 3.1, GraphQL SDL, MCP tools, and UIDL frontend screens) with identical semantics across platforms.

When to use

  • Authoring, editing, or validating .kerangka.json application models.
  • Compiling models to Canonical Intermediate Representation (KIR).
  • Generating database DDL (PostgreSQL, SQLite), OpenAPI contracts, or MCP tool declarations.
  • Projecting declarative dashboard, list, and form screens into UIDL for uidl-runtime.
  • Operating the deterministic sidecar engine with durable SQLite sessions and transactional outboxes.

Hand off when

NeedSkill
Hand-coding freeform UI outside a schemafrontend-ui-engineering
Rendering or styling raw UIDL documents in React/Flutteruidl-runtime
Custom token palettes, contrast, and themesdesign-tokens
Choosing and matching a published design systemuiux-design-systems
Designing non-modelled public REST APIsrest-api-contract

Process

  1. Declare the JSON skeleton first. Define entities, primitive types, defaults, and invariant rules in .kerangka.json. Keep data semantics pure without coupling to databases or UI frameworks.
  2. Model business rules and workflows declaratively. Define computed fields, DMN-style decision tables (decisions), and state transitions with role guards (workflow.transitions).
  3. Validate syntax and types. Run kerangka check <model.json>. Ensure all types resolve, expressions parse, and effective-date ranges do not overlap.
  4. Lint boundary invariants. Run kerangka lint <model.json>. Verify entity naming rules, relation depths, and modular boundaries before compilation.
  5. Compile to Canonical Intermediate Representation. Run kerangka build <model.json> -o build/app.kir.json. KIR is the verified input for all downstream projections.
  6. Project backend contracts. Generate SQL DDL (kerangka ddl), OpenAPI 3.1 (kerangka openapi), and Model Context Protocol tools (kerangka mcp) directly from the model.
  7. Choose the UI projection path. Read references/declarative-ui-design.md. Static kerangka uidl <model.json> -o uidl-screens/ emits lists/forms; dashboards require actor-aware dynamic screens. Check the host's exact runtime and stylesheet. Use shared presentation hooks/recipes for grouped fields, bounded width, and actions. Skin them from the design declaration's tokens — StyleIntent values and theme tokens, never inline CSS — per uidl-runtime's theming reference.
  8. Execute sidecar runtime. Use kerangka serve --stdio --session app.db for transactional execution. State changes, CloudEvents, and host effects commit atomically.

Red flags

  • Writing business rules or workflow logic inside page components instead of the model.
  • Hand-crafting REST APIs or CRUD endpoints that can be projected deterministically.
  • Inventing unmapped widget types in views that the UIDL reference registry cannot render.
  • Modifying emitted KIR or projection files by hand instead of updating the source model.
  • Performing side effects during pure evaluation runs instead of queueing host effects.

Verification

  • kerangka check exits 0 with no syntax or expression errors.
  • kerangka lint reports zero boundary or complexity violations.
  • Generated SQL DDL applies cleanly against target database (PostgreSQL/SQLite).
  • Generated UIDL documents validate successfully against uidl-validate.
  • Visible changes have browser evidence for spacing, wrapping, contrast, and controls.
  • Generated MCP tools expose correct parameter schemas and action permissions.

References

  • references/model-specification.md — entity fields, expressions, rules, workflows, and decisions
  • references/compiler-and-projections.md — CLI commands, KIR compilation, OpenAPI, DDL, MCP, and sidecar runtime
  • references/declarative-ui-design.md — designing dashboards, lists, and forms via Kerangka UIDL projections
  • examples/records.kerangka.json — executable list/form model using supported view keys

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.