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).
In this repository37 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- .claude/guides/claude-code/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- core-sdkSkill
- dataflowSkill
- nexusSkill
- kaizenSkill
- kailash-mcpSkill
- cheatsheetsSkill
- development-guidesSkill
- nodes-referenceSkill
- workflow-patternsSkill
- deployment-gitSkill
- frontend-integrationSkill
- testing-strategiesSkill
- architecture-decisionsSkill
- code-templatesSkill
- enterprise-infrastructureSkill
- validation-patternsSkill
- gold-standardsSkill
- security-patternsSkill
- flutter-patternsSkill
- interactive-widgetsSkill
- enterprise-ai-uxSkill
- conversation-uxSkill
- uiux-design-principlesSkill
- value-auditSkill
- ai-interaction-patternsSkill
- eatp-referenceSkill
- 29-pactSkill
- claude-code-patternsSkill
- error-troubleshootingSkill
- kailash-mlSkill
- kailash-alignSkill
- co-referenceSkill
- managementSkill
- projectSkill
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
- Very specific: line 67
All synced from loom/ (source of truth) via /sync.
≈ “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.
Files
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 Layer | COC Artifact Type | Count | Purpose |
| L1 Intent | Agents | 30+ | Specialized domain experts |
| L2 Context | Skills + CLAUDE.md | 28+ dirs, 400+ files | Institutional knowledge library |
| L3 Guardrails | Rules + Hooks | 9 rules, 9 hooks | Deterministic enforcement |
| L4 Instructions | Commands | 20 commands | Phase-gated workflow |
| L5 Learning | Learning pipeline | observations + instincts + evolution | Knowledge 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 checkThe anti-amnesia hook (user-prompt-rules-reminder.js) is the single most important mechanism — fires on every user message.
Layer 4: Seven-Phase Workflow
| Phase | Command | Quality Gate |
| Analysis | /analyze | reviewer |
| Planning | /todos | Human approval |
| Implementation | /implement | reviewer + security-reviewer |
| Validation | /redteam | reviewer |
| Knowledge | /codify | gold-standards-validator |
| Release | /release | Human 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 requiredTemplate 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.
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.

