agentleFS
terrene-foundationterrene-foundation/pact/.claude/skills/28-coc-reference/SKILL.md

coc-reference

Skill0 starsChanged 7 months agoApache-2.0View on GitHub

COC template implementation reference — how the five layers are implemented in Kailash COC templates (agents, skills, rules, hooks, commands). Use when asking about template structure, not COC concepts (use co-reference for specs).

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    All synced from loom/ (source of truth) via /sync.

    line 67

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

COC Template Implementation Reference

How the COC five-layer architecture is implemented in the Kailash COC template repos. For COC spec/concepts (fault lines, value inversion, autonomous execution), see co-reference/coc-spec.md.

Implementation Inventory

CO LayerCOC Artifact TypeCountPurpose
L1 IntentAgents30+Specialized domain experts
L2 ContextSkills + CLAUDE.md28+ dirs, 400+ filesInstitutional knowledge library
L3 GuardrailsRules + Hooks9 rules, 9 hooksDeterministic enforcement
L4 InstructionsCommands20 commandsPhase-gated workflow
L5 LearningLearning pipelineobservations + instincts + evolutionKnowledge compounding

Layer 3: Defense in Depth

Critical rules have 5-8 independent enforcement layers:

Rule file (soft — AI interprets)
  + Hook script (hard — deterministic, exit code 2 blocks)
    + Anti-amnesia hook (re-injects every message, survives compression)
      + Code review by reviewer
        + Security review by security-reviewer
          + CI pipeline check

The anti-amnesia hook (user-prompt-rules-reminder.js) is the single most important mechanism — fires on every user message.

Layer 4: Seven-Phase Workflow

PhaseCommandQuality Gate
Analysis/analyzereviewer
Planning/todosHuman approval
Implementation/implementreviewer + security-reviewer
Validation/redteamreviewer
Knowledge/codifygold-standards-validator
Release/releaseHuman approval

Evidence-based completion: AI cannot claim "done" without file-and-line proof.

Layer 5: Observe-Capture-Evolve

Observations (JSONL)
  → Pattern analysis (confidence = frequency 40% + success 30% + recency 20% + consistency 10%)
    → Evolution suggestions (Skills ≥0.7, Commands ≥0.6, Agents ≥0.8)
      → Human approval required

Template Repos

  • kailash-coc-claude-py — Python SDK template (USE)
  • kailash-coc-claude-rs — Rust SDK template (USE)
  • kailash-coc-claude-rb — Ruby SDK template (USE)

All synced from loom/ (source of truth) via /sync.

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.