clckernel 1.2.18 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/.agents/skills/clckernel_cli/SKILL.md +23 -6
  2. package/.agents/skills/clckernel_cli/reference/audit.md +13 -3
  3. package/.agents/skills/clckernel_cli/reference/commit.md +1 -1
  4. package/.agents/skills/clckernel_cli/reference/doctor.md +5 -3
  5. package/.agents/skills/clckernel_cli/reference/feature.md +3 -3
  6. package/.agents/skills/clckernel_cli/reference/guard.md +48 -12
  7. package/.agents/skills/clckernel_cli/reference/phase.md +6 -3
  8. package/.agents/skills/clckernel_cli/reference/start.md +14 -4
  9. package/.agents/skills/clckernel_cli/reference/test.md +1 -1
  10. package/.agents/skills/clckernel_cli/reference/update.md +19 -19
  11. package/CHANGELOG.md +244 -0
  12. package/LICENSE +21 -0
  13. package/README.es.md +280 -51
  14. package/README.md +274 -50
  15. package/bin/cli.js +8 -0
  16. package/package.json +12 -2
  17. package/src/adapters/agent-os.js +161 -84
  18. package/src/adapters/astro.js +8 -6
  19. package/src/adapters/base.js +27 -46
  20. package/src/adapters/django.js +14 -13
  21. package/src/adapters/fastapi.js +16 -15
  22. package/src/adapters/go.js +11 -9
  23. package/src/adapters/laravel.js +12 -10
  24. package/src/adapters/nextjs.js +7 -5
  25. package/src/adapters/rails.js +13 -11
  26. package/src/adapters/rust.js +11 -9
  27. package/src/catalog.js +58 -49
  28. package/src/config.js +38 -240
  29. package/src/detector.js +243 -44
  30. package/src/doctor.js +18 -9
  31. package/src/generator.js +737 -309
  32. package/src/gitignore.js +144 -0
  33. package/src/index.js +257 -18
  34. package/src/io.js +409 -0
  35. package/src/known-hashes.json +309 -0
  36. package/src/onboarding.js +15 -0
  37. package/src/technologies/detector.js +1 -1
  38. package/src/technologies/guards/_shared.js +1 -1
  39. package/src/ui.js +233 -40
  40. package/src/updater.js +271 -36
  41. package/tools/_changes.js +279 -0
  42. package/tools/_changes.py +233 -0
  43. package/tools/_config.js +294 -0
  44. package/tools/_config.py +271 -0
  45. package/tools/_yaml.py +489 -0
  46. package/tools/audit.js +511 -111
  47. package/tools/audit.py +506 -128
  48. package/tools/celery_guard.py +13 -35
  49. package/tools/check_a11y.js +8 -28
  50. package/tools/check_api_contracts.js +13 -39
  51. package/tools/check_architecture.js +35 -44
  52. package/tools/check_architecture.py +172 -105
  53. package/tools/check_custom.js +108 -61
  54. package/tools/check_custom.py +108 -271
  55. package/tools/check_data_files.js +88 -0
  56. package/tools/check_db_efficiency.py +80 -65
  57. package/tools/check_hitl.js +112 -69
  58. package/tools/check_links.js +138 -0
  59. package/tools/check_migrations.py +143 -94
  60. package/tools/check_performance.js +35 -44
  61. package/tools/check_placeholders.js +104 -0
  62. package/tools/check_responsive.js +8 -28
  63. package/tools/check_scope.py +40 -31
  64. package/tools/check_seo.js +8 -28
  65. package/tools/check_skills.js +158 -0
  66. package/tools/check_storybook.js +8 -21
  67. package/tools/check_symlinks.js +40 -22
  68. package/tools/check_ui_reuse.js +17 -29
  69. package/tools/docker_guard.py +19 -41
  70. package/tools/postgres_guard.py +15 -36
  71. package/tools/redis_guard.py +13 -35
  72. package/tools/scan_secrets.js +134 -67
  73. package/tools/scan_secrets.py +163 -72
  74. package/tools/verify_tdd.js +867 -0
  75. package/tools/verify_tdd.py +407 -165
  76. package/tools/yaml.js +404 -132
  77. package/tools/check_domain_data.js +0 -100
  78. package/tools/check_test_calendar_sync.js +0 -111
package/README.md CHANGED
@@ -13,21 +13,25 @@
13
13
 
14
14
  AI coding agents (Cursor, Claude Code, Windsurf, Copilot) code fast, but without guardrails they create architectural decay, tautological tests, and secret leaks.
15
15
 
16
- **CLC Kernel** is a polyglot developer harness that physically governs AI agents using **deterministic AST linters (< 5ms)**, **local SDD specs**, and an enforced **AI Unified Process (AIUP)**.
16
+ **CLC Kernel** is a polyglot developer harness that governs AI agents using **deterministic pre-commit guards** (pattern-based checks, plus Python AST guards on Python stacks), **local SDD specs**, and an enforced **AI Unified Process (AIUP)**.
17
17
 
18
18
  ---
19
19
 
20
20
  ## 📋 Table of Contents
21
21
  - [🎯 Use Cases](#-use-cases)
22
22
  - [🏛️ The AI Unified Process (AIUP)](#️-the-ai-unified-process-aiup)
23
- - [🔍 Review-Driven Development (RDD) & the 4 Canonical Lenses](#-review-driven-development-rdd--the-4-canonical-lenses)
23
+ - [🔍 Review-Driven Development (RDD) & the 4 Lenses](#-review-driven-development-rdd--the-4-lenses)
24
24
  - [⚡ Step-by-Step Guide (Full Lifecycle)](#-step-by-step-guide-full-lifecycle)
25
+ - [🧭 What happens after install](#after-install)
25
26
  - [🎮 Universal Command Interface](#-universal-command-interface)
26
27
  - [🔄 Updating an Existing Project](#-updating-an-existing-project)
28
+ - [⚙️ Configuration (`.clckernel.yaml`)](#configuration)
27
29
  - [🌐 Supported Stacks & Archetypes](#-supported-stacks--archetypes)
30
+ - [⚠️ Known limitations](#known-limitations)
28
31
  - [🏛️ Architecture: Standalone vs. Gentle AI Symbiosis](#-architecture-standalone-vs-gentle-ai-symbiosis)
29
32
  - [🧩 Optional Ecosystem Companions](#-optional-ecosystem-companions)
30
33
  - [📖 Glossary of Key Terms](#-glossary-of-key-terms)
34
+ - [🤝 Contributing & Community](#-contributing--community)
31
35
  - [📄 License](#-license)
32
36
 
33
37
  ---
@@ -37,10 +41,10 @@ AI coding agents (Cursor, Claude Code, Windsurf, Copilot) code fast, but without
37
41
 
38
42
  | Use Case | Problem It Solves | How CLC Kernel Solves It |
39
43
  |---|---|---|
40
- | **1. Coding Agent Governance**<br>*(Cursor, Claude Code, Copilot)* | Agents "vibe code", bypass tests, and violate layer boundaries in backend/frontend apps. | Enforces **Rule #0** (Research -> SDD -> TDD Red-to-Green -> AST Audit) and blocks commits via native AST guards. |
41
- | **2. Agent-OS & Domain Workflows**<br>*(Autonomous bots, marketing/sales OS)* | Agent runtimes execute actions without review, hallucinate metrics, or drift across IDE configs. | Provides **Dual-Layer Governance**, validates IDE mirror symlinks, checks Human-in-the-Loop (`check_hitl`), and enforces null-safe schemas (`check_domain_data`). |
42
- | **3. Complex Refactors & Migrations** | Agents modify files outside the agreed feature scope, causing silent regressions. | Locks work to a local `sdds/{change}/spec.md` and fails commits modifying untouched layers (`check_scope`). |
43
- | **4. Shift-Left CI/CD & Pre-commit** | Secret leaks, N+1 query loops, and broken database migrations reach remote branches. | Runs zero-dependency AST checks in your stack's native language in **< 5ms** before Git commit. |
44
+ | **1. Coding Agent Governance**<br>*(Cursor, Claude Code, Copilot)* | Agents "vibe code", bypass tests, and violate layer boundaries in backend/frontend apps. | Enforces **Rule #0** (Research -> SDD -> TDD Red-to-Green -> Audit) and blocks commits via the pre-commit hook (`--no-verify` skips it; CI is the backstop). |
45
+ | **2. Agent-OS & Domain Workflows**<br>*(Autonomous bots, marketing/sales OS)* | Agent runtimes execute actions without review, hallucinate metrics, or drift across IDE configs. | Provides **Dual-Layer Governance** and guards for any agent repository: explicit Human-in-the-Loop markers in skills and playbooks (`check_hitl`), SKILL.md frontmatter (`check_skills`), relative links (`check_links`), forgotten placeholders (`check_placeholders`), JSON data files that parse (`check_data_files`) and rule mirrors pointing to AGENTS.md (`check_symlinks`). Domain rules belong to the project: guards in `tools/guards/` run in the hook and the audit. |
46
+ | **3. Complex Refactors & Migrations** | Agents modify files outside the agreed feature scope, causing silent regressions. | Anchors work to a local `sdds/{change}/spec.md`; scope is an agent-enforced protocol (not checked by a guard). |
47
+ | **4. Shift-Left CI/CD & Pre-commit** | Secret leaks, N+1 query loops, and broken database migrations reach remote branches. | Runs zero-dependency checks in your stack's native language before Git commit: pattern-based guards everywhere, Python AST guards (layers, N+1 heuristic) on Python stacks. |
44
48
 
45
49
  ---
46
50
 
@@ -51,39 +55,51 @@ AI coding agents (Cursor, Claude Code, Windsurf, Copilot) code fast, but without
51
55
  ┌─────────────────────────────────────────────────────────────────────────────┐
52
56
  │ AI UNIFIED PROCESS (AIUP) │
53
57
  ├─────────────┬─────────────┬─────────────┬──────────────────┬────────────────┤
54
- │ 1. SDD │ 2. HIT │ 3. TDD │ 4. AST │ 5. MIRROR │
58
+ │ 1. SDD │ 2. HIT │ 3. TDD │ 4. GUARDS │ 5. MIRROR │
55
59
  │ Spec-Driven │ Human-in-the│ Red-to-Green│ Deterministic │ Single Source │
56
- │ Development │ Loop │ Transitions │ Layer Linters │ of Truth Sync │
60
+ │ Development │ Loop │ Transitions │ Pre-commit Hook │ of Truth Sync │
57
61
  └─────────────┴─────────────┴─────────────┴──────────────────┴────────────────┘
58
62
  ```
59
63
 
60
64
  1. **SDD (Spec-Driven Development):** Agent must write a local, gitignored specification (`sdds/{feature}/spec.md`) before editing production files.
61
65
  2. **HIT (Human-in-the-Loop):** The engineer reviews and approves test scenarios and contracts before execution begins.
62
66
  3. **TDD (Red-to-Green):** Agent must prove failure with a failing regression test (Red Phase) before writing implementation code (Green Phase).
63
- 4. **AST (Deterministic Safeguards):** Native stack parsers (Python `ast`, Go `ast`, RuboCop, TypeScript AST) inspect diffs and physically block invalid commits.
64
- 5. **SSOT (Single Source of Truth):** `AGENTS.md` is forged once and mirrored via filesystem symlinks to `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, and Copilot.
67
+ 4. **Guards (Deterministic Safeguards):** Pattern-based scripts (and Python `ast` parsers for Python stacks) inspect the staged diff; the pre-commit hook blocks non-compliant commits (`--no-verify` skips it; CI is the backstop).
68
+ 5. **SSOT (Single Source of Truth):** `AGENTS.md` is forged once and mirrored via filesystem symlinks to `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.cursor/rules/clckernel_context.mdc`, `.github/copilot-instructions.md` and `.antigravity/rules.md` (the default `mirrors.list`).
65
69
 
66
70
  ---
67
71
 
68
72
  <a id="rdd-and-lenses"></a>
69
- ## 🔍 Review-Driven Development (RDD) & the 4 Canonical Lenses
73
+ ## 🔍 Review-Driven Development (RDD) & the 4 Lenses
70
74
 
71
- CLC Kernel structures all verification and audit gates around **Review-Driven Development (RDD)**, categorizing every safeguard across the **4 Canonical Review Lenses**:
75
+ CLC Kernel structures all verification and audit gates around **Review-Driven Development (RDD)**, with guard results grouped into **4 lenses** by a static name → lens table:
72
76
 
73
77
  ```
74
78
  ┌─────────────────────────────────────────────────────────────────────────────┐
75
- │ THE 4 CANONICAL REVIEW LENSES │
79
+ │ RESULTS GROUPED INTO 4 REVIEW LENSES │
76
80
  ├─────────────────────┬───────────────────┬───────────────────┬───────────────┤
77
81
  │ 🎯 CORRECTNESS │ 🛡️ SECURITY │ 🏛️ ARCHITECTURE │ ⚡ PERFORMANCE│
78
- │ Functional bugs, │ Secret leaks, │ Layer violations, │ N+1 queries, │
82
+ │ Functional bugs, │ Secret leaks, │ Layer violations, │ N+1 heuristic,│
79
83
  │ scope drift, TDD, │ permission bypass,│ domain boundaries,│ bundle size, │
80
84
  │ API contracts │ dangerous eval │ circular deps │ memory leaks │
81
85
  └─────────────────────┴───────────────────┴───────────────────┴───────────────┘
82
86
  ```
83
87
 
84
- When you run `clckernel audit` (or `node tools/audit.js`), CLC Kernel generates:
85
- 1. **Human-Readable Educational Report (`05-audit-report.md`):** Explains exactly what passed, failed, or was skipped grouped by lens.
86
- 2. **Machine-Readable Audit Receipt (`audit-receipt.json`):** An immutable JSON receipt bound to the active `commitHash` certifying the verdict for automated review gates (such as Gentle AI).
88
+ `clckernel audit` (or `node tools/audit.js` / `python3 tools/audit.py`) prints the 4-lens summary and writes
89
+ nothing. Pass the SDD change it belongs to — `clckernel audit --change <name>` (or
90
+ `node tools/audit.js --change <name>`) — and it also writes, in `sdds/<name>/` only:
91
+ 1. **Human-Readable Educational Report (`05-audit-report.md`):** Explains exactly what passed, failed, warned, or was skipped grouped by lens.
92
+ 2. **Machine-Readable Audit Receipt (`audit-receipt.json`):** An immutable JSON receipt bound to the active `commitHash` certifying the verdict (`PASSED`, `PASSED_WITH_WARNINGS` or `FAILED`) for automated review gates (such as Gentle AI).
93
+
94
+ With both orchestrators installed (a mixed JS + Python stack), each writes its own pair so neither overwrites
95
+ the other: `05-audit-report.js.md` / `audit-receipt.js.json` and `05-audit-report.py.md` / `audit-receipt.py.json`.
96
+
97
+ Orchestrator CLI: `audit.(js|py) [targetDir] [--hook] [--change <name>] [--staged]`. `<name>` must be one path
98
+ segment (letters, digits, `.`, `_`, `-`); `--staged` spells out the default snapshot (the staged changes, or
99
+ the last commit when nothing is staged); `--hook` (used by the pre-commit hook) prints one line per guard and
100
+ cannot be combined with `--change`; any other flag exits 2 with the usage. A failing guard whose level is
101
+ `warning` — set by the guard (`level: 'warning'` in its result) or by `severities` in `.clckernel.yaml` — is
102
+ printed as `WARN` and does not fail the audit or the commit; a guard that crashes always fails.
87
103
 
88
104
  ---
89
105
 
@@ -93,20 +109,21 @@ When you run `clckernel audit` (or `node tools/audit.js`), CLC Kernel generates:
93
109
  ```
94
110
  [1. Terminal] [2. AI Chat] [3. TDD Loop] [4. Git Commit]
95
111
  npx clckernel ───► clckernel start ───► "Feature X with harness" ───► Pre-commit Hooks
96
- (Bootstrap) (Interactive Setup) (SDD -> HIT -> Tests) (AST & Secret Guard)
112
+ (Install) (Interactive Setup) (SDD -> HIT -> Tests) (Guards & Secret Scan)
97
113
  ```
98
114
 
99
115
  ### 1️⃣ Step 1: Bootstrap the Repository (Terminal)
100
116
  ```bash
101
- npx clckernel start
117
+ npx clckernel # interactive: shows the detected stack and asks before writing
118
+ npx clckernel . --yes # non-interactive (add --dry-run to print the plan only)
102
119
  ```
103
- Auto-detects your framework, generates `AGENTS.md`, creates dynamic IDE symlinks (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`), provisions pre-commit hooks, and creates native AST checks in `tools/`.
120
+ Auto-detects your framework, generates `AGENTS.md`, creates the AI agent mirrors (symlinks to `AGENTS.md`: `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.cursor/rules/clckernel_context.mdc`, `.github/copilot-instructions.md`, `.antigravity/rules.md`), writes the pre-commit hook, and installs native guard scripts in `tools/`. It ends with a **Next steps** block; see [What happens after install](#after-install).
104
121
 
105
122
  ### 2️⃣ Step 2: Initialize in Your AI Chat (Conversational CLI)
106
- Open Cursor, Claude Code, Gemini CLI, Windsurf, or Copilot and type:
123
+ Open your AI agent (Claude Code, Gemini CLI, Cursor, Copilot, Antigravity, or any agent that reads `AGENTS.md`) and type:
107
124
  > `clckernel start`
108
125
 
109
- The agent scans your codebase silently, proposes an AIUP governance plan tailored to your framework, and generates `.clckernel.yaml`.
126
+ `start` is an agent command (the CLI rejects it): the agent scans your codebase, proposes an AIUP governance plan tailored to your framework, installs the harness with `npx clckernel . --yes` if it is missing, and writes `.clckernel.yaml` only for settings you want to change (the file is optional). If you keep the defaults, it writes a `.clckernel.yaml` that holds only a comment, which ends the first-session onboarding.
110
127
 
111
128
  ### 3️⃣ Step 3: Develop with the AIUP Harness
112
129
  When requesting features or bugfixes, instruct your agent:
@@ -118,46 +135,104 @@ The agent autonomously executes the complete AIUP cycle:
118
135
  3. **HIT Review:** Requests your review and approval on proposed contracts.
119
136
  4. **TDD Red Phase:** Writes a failing regression test proving the requirement.
120
137
  5. **Clean Implementation (Green Phase):** Writes minimal code to pass tests while respecting layer isolation.
121
- 6. **AST Audit Gate:** Runs `node tools/audit.js` and outputs the verification summary.
138
+ 6. **Audit Gate:** Runs `node tools/audit.js --change <name>` and outputs the verification summary (report in `sdds/<name>/`).
122
139
 
123
140
  ### 4️⃣ Step 4: Deterministic Guard Verification (Git Commit)
124
141
  ```bash
125
142
  git add .
126
143
  git commit -m "feat(auth): add user authentication endpoint"
127
144
  ```
128
- Pre-commit hooks automatically execute AST scanners (Clean Architecture, Secret Leaks, Scope Guard, Migration Idempotency). Any non-compliant commit is **physically blocked** before touching Git history.
145
+ Pre-commit hooks automatically execute the installed guards (e.g. Clean Architecture, Secret Leaks, Migration Reversibility, depending on the stack). Any non-compliant commit is **blocked by the pre-commit hook** (`--no-verify` skips it; CI is the backstop).
146
+
147
+ The secret scan (`scan_secrets`, on every stack) matches private keys, AWS, Stripe, OpenAI, Anthropic, Google, Slack and GitHub tokens, JWTs, quoted key/secret/password assignments, and secret-named values in committed `.env` files (`.env.example`, `.env.sample` and `.env.template` are skipped).
148
+
149
+ The hook is written to `.githooks/pre-commit` (and `core.hooksPath` is set to `.githooks` in the repository's local git config), or to `.husky/pre-commit` when Husky already runs the repository's hooks. `core.hooksPath` is left unchanged when the directory is not a git repository root or another hook manager owns it; the Next steps block then prints the command that activates the hook. The hook does not list guards: it calls the audit orchestrators (`node tools/audit.js --hook`, `python3 tools/audit.py --hook`, each when installed) and then the stack's external tools (linters, test runners) when they are available. The orchestrators discover every guard — the kernel's and the project's own, either at the top of `tools/` (`check_*`, `scan_*`, `verify_*`, `*_guard`) or in `tools/guards/` — and run each exactly once, so the commit hook and `clckernel audit` always run the same set.
129
150
 
130
151
  ### 5️⃣ Step 5: Verify Repository Health Anytime (Doctor)
131
152
  ```bash
132
153
  npx clckernel doctor
133
154
  ```
134
- Audits 100% compliance across `AGENTS.md`, `sdds/`, `tools/`, active test runners, and Git hooks.
155
+ Checks `AGENTS.md`, `sdds/`, `docs/Journal/`, `tools/`, the pre-commit hook, that each guard script loads (JS) or parses (Python), and the audit orchestrators' imports. It does not run the tests.
156
+
157
+ ---
158
+
159
+ <a id="after-install"></a>
160
+ ## 🧭 What happens after install
161
+
162
+ ### In the terminal: Next steps
163
+ A real install (not `--dry-run`) ends with a **Next steps** block built from what was installed. For a
164
+ Next.js project in a git repository it reads:
165
+
166
+ ```text
167
+ Next steps
168
+ 1. Review and commit the harness: git add -A && git commit -m "chore: install clckernel"
169
+ The pre-commit hook (.githooks/pre-commit) runs on this commit.
170
+ 2. Open your AI agent and ask it to run clckernel start to tailor the rules (.clckernel.yaml),
171
+ or just start working: it follows AGENTS.md.
172
+ AGENTS.md mirrors written for: Claude Code (CLAUDE.md), Gemini (GEMINI.md), Cursor, Copilot, Antigravity.
173
+ 3. Run npx clckernel audit anytime to see every guard's result.
174
+ 4. Project-specific checks go in tools/guards/ (the hook and the audit run them).
175
+ 5. Later, preview kernel updates with npx clckernel update --dry-run.
176
+ ```
177
+
178
+ - When the hook is not active (no git repository, a subdirectory of the repository, or `core.hooksPath`
179
+ owned by another hook manager), step 1 prints the activation command first, e.g.
180
+ `git init && git config core.hooksPath .githooks`, then the commit.
181
+ - In a full-stack or monorepo install, step 1 adds that the hook runs the checks of every part from the
182
+ repository root.
183
+ - Step 2 lists only the mirrors this run wrote or found up to date. A file of the same name that is not a
184
+ symlink (your own `CLAUDE.md`, for example) is kept, and that agent reads your file instead of `AGENTS.md`.
185
+ With no mirror written, step 2 says to use an agent that reads `AGENTS.md` itself.
186
+ - `clckernel update` prints a shorter Next steps block only when something needs attention: a
187
+ `*.clckernel-new` copy to merge, or guards available with `--add-guards`.
188
+
189
+ ### In your AI agent: the first session
190
+ Every AI harness reads the same law: Claude Code (`CLAUDE.md`), Gemini (`GEMINI.md`), Cursor
191
+ (`.cursorrules`, `.cursor/rules/clckernel_context.mdc`), Copilot (`.github/copilot-instructions.md`) and
192
+ Antigravity (`.antigravity/rules.md`) through the default mirrors; Windsurf through `.windsurfrules` when
193
+ it is listed in `mirrors.list` at install time; agents such as Codex or OpenCode read `AGENTS.md` directly.
194
+
195
+ Every generated `AGENTS.md` ends with a **First session after install** section. It applies while
196
+ `tools/.clckernel-managed.json` exists and `.clckernel.yaml` does not:
197
+
198
+ 1. **Your request comes first.** If you ask for a task, the agent does it under the rules and mentions
199
+ onboarding once, in one sentence, at the end.
200
+ 2. **Otherwise it orients you briefly:** what the kernel installed (`tools/.clckernel-managed.json`) and what
201
+ the pre-commit hook runs on every commit.
202
+ 3. **It asks ONE question** and waits: tailor the rules now with `clckernel start`, or keep the defaults.
203
+ Keeping the defaults writes a `.clckernel.yaml` that holds only a comment, so the question is not asked
204
+ again.
205
+
206
+ The `clckernel_cli` skill also triggers in that first session. Projects installed before this section
207
+ existed do not get it on `update`: an existing `AGENTS.md` is never rewritten (update only adds the
208
+ `clckernel update` row to its command table when missing). To get the section, copy it from a fresh
209
+ install's `AGENTS.md`.
135
210
 
136
211
  ---
137
212
 
138
213
  <a id="universal-command-interface"></a>
139
214
  ## 🎮 Universal Command Interface (All LLMs & Agents)
140
215
 
141
- CLC Kernel provides a deterministic command grammar supported natively by **Claude Code, Cursor, Codeium/Windsurf, Copilot, Gemini, and Antigravity**:
216
+ CLC Kernel defines a command grammar in `AGENTS.md`, which the agents read through their mirrors (**Claude Code, Gemini, Cursor, Copilot, Antigravity**; Windsurf when `.windsurfrules` is in `mirrors.list`) or directly (agents that read `AGENTS.md` themselves):
142
217
 
143
218
  | Command | Category | Mandatory Execution Protocol |
144
219
  |---|---|---|
145
220
  | `clckernel feature <name>` | Feature | Full AIUP cycle: Research -> Local Spec (`sdds/{name}/spec.md`) -> HIT review -> TDD Red Phase -> Green Implementation -> Audit. |
146
221
  | `clckernel fix <issue>` | Bug Fix | Root-cause analysis (no direct code edits) -> Failing regression test -> Surgical clean fix -> Audit gate. |
147
222
  | `clckernel test` | Verification | Runs repository test suite in the native stack runner and confirms clean pass. |
148
- | `clckernel audit` | Verification | Runs `node tools/audit.js` or `python tools/audit.py` and emits the Educational Summary. |
149
- | `clckernel doctor` | Diagnostics | Checks Git pre-commit hooks, IDE mirror symlinks, and AST engine integrity. |
223
+ | `clckernel audit` | Verification | Runs `node tools/audit.js` and/or `python3 tools/audit.py` and emits the Educational Summary; with `--change <name>` it also writes the report and receipt to `sdds/<name>/`. |
224
+ | `clckernel doctor` | Diagnostics | Runs `npx clckernel doctor [dir]`: checks AGENTS.md, sdds/, tools/, the pre-commit hook and that the guard scripts load. |
150
225
  | `clckernel commit <message>` | Version Control | Pre-flight audit, verifies diff vs SDD scope, and commits with Conventional Commits (zero AI attribution). |
151
- | `clckernel guard create <name>` | Safeguards | Scaffolds a new AST guard script in the stack's native language in `tools/guards/`. |
226
+ | `clckernel guard create <name>` | Safeguards | Scaffolds a new guard script in the stack's native language in `tools/guards/`; the pre-commit hook and the audit run every project guard (`tools/guards/*.js`/`*.py`, and unmanaged `check_*`/`scan_*`/`verify_*` files at the top of `tools/`). |
152
227
  | `clckernel update` | Maintenance | Non-destructive update: refreshes core tools, skills & IDE symlinks without overwriting SDDs, custom guards, or `.clckernel.yaml`. |
153
- | `clckernel start` | Setup | Auto-detects stack, proposes AIUP lifecycle, and generates `.clckernel.yaml`. |
228
+ | `clckernel start` | Setup | Agent command: auto-detects the stack, proposes the AIUP lifecycle, installs the harness (`npx clckernel . --yes`) if missing; `.clckernel.yaml` is optional and written only for non-default settings (keeping the defaults writes a comment-only file). |
154
229
 
155
230
  ---
156
231
 
157
232
  <a id="updating-an-existing-project"></a>
158
233
  ## 🔄 Updating an Existing Project (Non-Destructive)
159
234
 
160
- When new versions of CLC Kernel are released with new AST guards, upgraded playbooks, or improved IDE rules, update your project safely without losing your work:
235
+ When new versions of CLC Kernel are released with new guards, upgraded playbooks, or improved IDE rules, update your project safely without losing your work:
161
236
 
162
237
  ```bash
163
238
  npx clckernel update
@@ -168,13 +243,87 @@ clckernel update
168
243
  ```
169
244
 
170
245
  ### 🔒 The Non-Destructive Update Guarantee:
171
- - **Refreshes & Upgrades:** Core orchestrators (`tools/audit.js`, `tools/audit.py`), built-in AST guards, Agent Skills (`.agents/skills/`), and IDE symlinks (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, Copilot, Antigravity).
246
+ - **Refreshes & Upgrades:** Core orchestrators (`tools/audit.js`, `tools/audit.py`), the built-in guards your project has, Agent Skills (`.agents/skills/`), and the IDE symlinks your project has (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, Copilot, Antigravity).
172
247
  - **100% Preserved:**
173
248
  - `sdds/`: All local specifications, plans, and verification receipts remain intact.
174
- - `tools/guards/`: All team-authored custom AST guards are preserved without modification.
175
- - `.clckernel.yaml`: All custom thresholds and active safeguard selections are preserved.
249
+ - Project guards (`tools/guards/`, and guard files at the top of `tools/` the kernel does not own) are preserved without modification. A kernel guard the kernel no longer ships stays exactly where it is, leaves the registry and keeps running as a project guard; `update` reports it as a "retired kernel guard kept as project guard".
250
+ - `.clckernel.yaml`: never rewritten; update reads it (see [Configuration](#configuration)).
176
251
  - Application source code and domain models are never touched.
177
252
 
253
+ ### 🛡️ Files you edited are never overwritten
254
+ `update` (and a reinstall with `--yes`) only overwrites a kernel file (`tools/*`, the pre-commit hook, the
255
+ `clckernel_cli` skill) when it can prove the file is its own and intact: its sha256 matches the registry
256
+ (`tools/.clckernel-managed.json`) or a version the kernel published. Anything else — a guard you hardened, a
257
+ project file that happens to share a kernel file's name — is kept byte for byte, and the new version is
258
+ written next to it as `<file>.clckernel-new` (gitignored) for you to review and merge. The summary lists what
259
+ was written, unchanged, protected, moved, added to `.gitignore` and set in `git config`.
260
+
261
+ Preview first with `--dry-run`: it prints the same summary as a plan and writes nothing (no files,
262
+ `.gitignore` or `git config`):
263
+ ```bash
264
+ npx clckernel update . --dry-run
265
+ npx clckernel . --yes --dry-run
266
+ ```
267
+
268
+ ### ➕ Update never adds what you did not choose
269
+ `update` refreshes what the project already has; it never adds guards or IDE mirrors on its own:
270
+ - **Guards:** only the guards in the registry or present in `tools/` are refreshed and run by the hook. New
271
+ guards of your stack are listed as *available, not installed*; opt in with `--add-guards` (they stay
272
+ installed and updated from then on). An unknown name fails with exit 1 and writes nothing. Support files
273
+ (`_changes.js/.py`, the config readers `_config.js/.py`, `yaml.js`, `_yaml.py`, the audit orchestrators)
274
+ follow the installed guards.
275
+ - **Mirrors:** a mirror you deleted (e.g. `.cursor/rules/clckernel_context.mdc`) is not recreated; it is
276
+ reported as *not present (skipped)*. A fresh install still creates them all.
277
+ - **`.gitignore`:** an entry whose path git tracks (a mirror or the skill you commit) is never added, on
278
+ install or update; it is reported as *tracked, not ignored*.
279
+ ```bash
280
+ npx clckernel update . --add-guards check_skills,check_placeholders
281
+ npx clckernel update . --add-guards all
282
+ ```
283
+
284
+ ---
285
+
286
+ <a id="configuration"></a>
287
+ ## ⚙️ Configuration (`.clckernel.yaml`)
288
+
289
+ Optional. Without the file every default below applies (it is the behaviour of a project without
290
+ config). Install, update and every guard read it from the project root; an invalid value stops them
291
+ with `Invalid .clckernel.yaml: key "<key>" — <reason>` (nothing is written, the commit is blocked).
292
+
293
+ | Key | Effect | Default | Read by |
294
+ |---|---|---|---|
295
+ | `rules` | Custom regex rules (`name`, `pattern`, `message`, optional `severity`, `scope`, `exclude`) run against the changed files | none | `check_custom` |
296
+ | `exclude_paths` | Globs no diff-based guard evaluates (secret scan, TDD verifier, custom rules, …) | none | `_changes.js/.py` |
297
+ | `mirrors.list` | AI IDE mirrors (symlinks to `AGENTS.md`) install creates and `check_symlinks` verifies | install: `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.cursor/rules/clckernel_context.mdc`, `.github/copilot-instructions.md`, `.antigravity/rules.md`; `check_symlinks`: `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules` | install/update, `check_symlinks` |
298
+ | `mirrors.required` | `true`: a listed mirror that is missing fails `check_symlinks` | `false` | `check_symlinks` |
299
+ | `hitl.markers` | Regexes (case-insensitive, one line, outside code fences) that count as a Human-in-the-Loop marker; they replace the defaults | a `HITL:` line or a `## Human checkpoint` / `## HITL` heading | `check_hitl` |
300
+ | `hitl.paths` | Globs of the changed files `check_hitl` evaluates | skills (`SKILL.md`, flat `skills/*.md`) and `playbooks/**/*.md` | `check_hitl` |
301
+ | `hitl.optOut` | `{ key, value }`: a file whose frontmatter has `key: value` is exempt | none | `check_hitl` |
302
+ | `update.exclude` | Root-relative globs install and update never write, move or remove; listed as *excluded by config* | none | install/update |
303
+ | `tdd.code` | Extra globs counted as production code (any language), e.g. Python tools tested by JS tests | none | `verify_tdd.js/.py` |
304
+ | `tdd.ignore` | Globs never counted as production code | none | `verify_tdd.js/.py` |
305
+ | `severities` | `{ <guard name>: warning \| error }`: a failing guard at `warning` is reported (`WARN`, verdict `PASSED_WITH_WARNINGS`) but does not block; `error` blocks even when the guard reports `level: 'warning'`. A crash always blocks | each guard's own level (`error` unless it reports `warning`) | `audit.js` / `audit.py` (audit and pre-commit hook) |
306
+
307
+ ```yaml
308
+ exclude_paths: ["vendor/**"]
309
+ mirrors:
310
+ list: [CLAUDE.md, .github/copilot-instructions.md]
311
+ required: true
312
+ hitl:
313
+ optOut: { key: checkpoint, value: none }
314
+ update:
315
+ exclude: [AGENTS.md]
316
+ tdd:
317
+ code: ["tools/**/*.py"]
318
+ severities:
319
+ check_seo: warning
320
+ ```
321
+
322
+ Keys earlier releases accepted without any effect — `active_guards`, `phases`, `gate_mode`,
323
+ `layers`, `scope` — are ignored with a deprecation warning; remove them. An unknown top-level key is
324
+ ignored with a warning. The guards read it through `tools/_config.js` (+ `yaml.js`) and `tools/_config.py`
325
+ (+ `_yaml.py`), installed next to `_changes.js/.py`, so a file created after install applies at once.
326
+
178
327
  ---
179
328
 
180
329
  <a id="supported-stacks"></a>
@@ -183,14 +332,81 @@ clckernel update
183
332
  | Ecosystem | Detection Signature | Test Runner | Native Safeguards |
184
333
  |---|---|---|---|
185
334
  | ⚛️ **Next.js** | `next` | Vitest / Jest | Clean Arch, UI Reuse, Semantic Tokens, RSC, A11y, Responsive, SEO |
186
- | ⚡ **FastAPI** | `fastapi` | Pytest | Pydantic V2, Alembic Idempotency, Clean Arch AST, DB Efficiency (N+1) |
187
- | 💎 **Rails** | `Gemfile` | RSpec | RuboCop AST, Brakeman Security, Migration Idempotency |
188
- | 🐹 **Golang** | `go.mod` | `go test` | `golangci-lint` AST, Domain/UseCase Layer Isolation |
189
- | 🦀 **Rust** | `Cargo.toml` | `cargo test` | `cargo clippy` AST, `cargo audit`, Strict Memory Safety |
190
- | 🐘 **Laravel** | `artisan` | Pest / PHPUnit | PHPStan AST, Eloquent N+1 Loop Detection, Migrations |
191
- | 🎸 **Django** | `manage.py` | `pytest-django` | Django ORM Idempotency, Ruff AST, Scope Guard, DB Efficiency (N+1) |
335
+ | ⚡ **FastAPI** | `fastapi` | Pytest | Alembic Migration Reversibility, Clean Arch (Python AST), N+1 Heuristic (Python AST), Red→Green TDD Verifier (pytest) |
336
+ | 💎 **Rails** | `Gemfile` | RSpec | RuboCop, Brakeman Security, Red→Green TDD Verifier (RSpec / Minitest) |
337
+ | 🐹 **Golang** | `go.mod` | `go test` | `golangci-lint`, Domain/UseCase Layer Isolation, Red→Green TDD Verifier (`go test`) |
338
+ | 🦀 **Rust** | `Cargo.toml` | `cargo test` | `cargo clippy`, `cargo audit`, Strict Memory Safety, Red→Green TDD Verifier (`cargo test`, integration tests) |
339
+ | 🐘 **Laravel** | `artisan` | Pest / PHPUnit | PHPStan static analysis, Red→Green TDD Verifier (Pest / PHPUnit) |
340
+ | 🎸 **Django** | `manage.py` | `pytest-django` | Ruff, Clean Arch (Python AST), N+1 Heuristic (Python AST), Red→Green TDD Verifier (pytest) |
192
341
  | 🚀 **Astro** | `astro.config` | Playwright | Tailwind v4 Tokens, Content Schema, A11y, Responsive, SEO |
193
- | 🤖 **Agent-OS** | `skills/`, `brand/`, `templates/` | Contract Tests | Dual-Layer AGENTS.md, HITL Gates (`check_hitl`), Symlinks (`check_symlinks`), Domain Data (`check_domain_data`) |
342
+ | 🤖 **Agent-OS** | `skills/<name>/SKILL.md` (also `.agents/skills/`, `.claude/skills/`), `playbooks/` or `rules/` with Markdown; a code stack in the same repo wins | Contract Tests | Dual-Layer AGENTS.md, HITL markers (`check_hitl`), Skills (`check_skills`), Links (`check_links`), Placeholders (`check_placeholders`), JSON data (`check_data_files`), Mirrors (`check_symlinks`), Custom rules (`check_custom`); project guards in `tools/guards/` |
343
+
344
+ ### 🧱 Full-stack & monorepos
345
+
346
+ A repository can hold several code parts. `clckernel` looks for a stack in the root, in the directories
347
+ declared as workspaces (`package.json#workspaces`, array or `{ packages }`, and `pnpm-workspace.yaml`
348
+ `packages:`) and in the conventional directories `frontend`, `backend`, `web`, `api`, `server`, `client`,
349
+ `apps/*`, `services/*` and `packages/*` (at most two levels deep; `node_modules`, `.git`, `vendor`, `dist` and
350
+ `build` are skipped). Workspace patterns are read as literal directories or `dir/*`; other glob forms are
351
+ ignored.
352
+
353
+ - **One part at the root:** installed exactly as a single-stack repository.
354
+ - **Several parts** (e.g. Next.js at the root + `backend/` FastAPI, or `apps/web` + `apps/api`): the project
355
+ type is `fullstack` (a part at the root) or `monorepo` (only subdirectories). Two stacks of the same
356
+ ecosystem in one directory (e.g. FastAPI and Django) stay one part, the first adapter winning as before.
357
+ - **Guards:** the union of the parts' guards is installed once in the root `tools/`, with one audit
358
+ orchestrator per guard language, and runs once from the root.
359
+ - **External tools** (ruff, pytest, tsc, …) run inside their part's directory; a missing one prints
360
+ `clckernel: <tool> (<dir>) not available, skipped`.
361
+ - **Red→Green TDD Verifier:** each changed file belongs to its nearest project root (Python:
362
+ `pyproject.toml`, `requirements.txt`, `setup.cfg`, `setup.py`, `manage.py`; JS: `package.json`; Go: `go.mod`;
363
+ Rust: `Cargo.toml`; Ruby: `Gemfile`; PHP: `composer.json`). Each group runs in its root (`PYTHONPATH`, runner
364
+ and `node_modules` of that root, or the repository root's `node_modules` when hoisted). Code changed in a part
365
+ without a changed test in that same part fails.
366
+ - **AGENTS.md** lists every part (directory, stack, test runner) with each stack's rules; `clckernel update`
367
+ re-detects the parts.
368
+
369
+ <a id="red-green-other-stacks"></a>
370
+ #### Red→Green on Go, Rust, Ruby and PHP
371
+
372
+ `tools/verify_tdd.js` (Node is present on every stack) runs the changed tests on the staged code (must pass,
373
+ with at least one test executed) and on `HEAD` plus those tests (must fail), from trees materialized from git:
374
+
375
+ | Language | Tests | Production code | Command |
376
+ |---|---|---|---|
377
+ | Go | `*_test.go` | other `.go` (not `vendor/`) | `go test -v -count=1 ./<pkg>…` (packages of the changed tests) |
378
+ | Rust | `tests/*.rs`, `tests/<t>/main.rs` | `src/**/*.rs` | `cargo test --test <t>…` (temporary `CARGO_TARGET_DIR`) |
379
+ | Ruby | `spec/**/*_spec.rb`, `test/**/*_test.rb` | `app/**/*.rb`, `lib/**/*.rb` | `bundle exec rspec` / `bundle exec ruby -Ilib -Itest` |
380
+ | PHP | `tests/**/*Test.php` | `app/**/*.php`, `src/**/*.php` | `vendor/bin/pest`, else `vendor/bin/phpunit` (one file per run) |
381
+
382
+ A missing `go`, `cargo`, `bundle`, locked `rspec-core` (for specs) or `vendor/bin/{pest,phpunit}` fails the
383
+ check with an install hint. Limitations: Rust `#[cfg(test)]` unit tests live inside the code file and cannot be
384
+ separated for the red run, so a `src/` change needs a changed integration test under `tests/` (or a
385
+ `tdd.ignore` entry); Minitest runs through plain `ruby -Ilib -Itest`, not `rails test`; Go is verified per
386
+ package; PHP assumes Composer 2.2+ bin proxies. Only committed or staged files exist in the trees (no `.env`).
387
+
388
+ Not supported: Agent-OS as one part of a monorepo, nested git repositories or submodules, choosing parts by
389
+ hand in the interactive prompt ("Choose another stack" installs a single stack), and Go/Cargo/Composer
390
+ workspaces (their parts are found only through the conventional directories).
391
+
392
+ ---
393
+
394
+ <a id="known-limitations"></a>
395
+ ## ⚠️ Known limitations
396
+
397
+ - **Windows is not tested.** The pre-commit hook is a shell script (`#!/usr/bin/env bash`, or `sh` under
398
+ Husky): on Windows it needs a bash/sh such as Git Bash.
399
+ - **Your own lint-staged / ESLint config may lint the harness files under `tools/`.** The kernel's files are
400
+ listed in `tools/.clckernel-managed.json`; exclude `tools/` (or those paths) in your linter config.
401
+ - **Rust inline unit tests** (`#[cfg(test)]`) cannot be separated for the red run; see
402
+ [Red→Green on Go, Rust, Ruby and PHP](#red-green-other-stacks).
403
+ - **Existing installs keep their `AGENTS.md`.** `update` never rewrites it, so the *First session after
404
+ install* section and other template changes reach only fresh installs; copy them by hand if you want them.
405
+ - **Windsurf has no default mirror.** List `.windsurfrules` in `mirrors.list` before installing; on an
406
+ existing install `update` does not add mirrors, so create it yourself (`ln -s AGENTS.md .windsurfrules`).
407
+ - **External linters and test runners run only when available.** The hook runs each one (tsc, ruff, pytest,
408
+ golangci-lint, cargo, …) when the project has it at commit time and otherwise prints
409
+ `clckernel: <tool> not available, skipped`; the guards in `tools/` always run.
194
410
 
195
411
  ---
196
412
 
@@ -210,17 +426,17 @@ flowchart TD
210
426
  subgraph CORE["🤖 CLC KERNEL (Core Governance Engine)"]
211
427
  SSOT["1. SSOT Law<br/>(AGENTS.md & IDE Mirrors)"]
212
428
  AIUP["2. AIUP Harness<br/>(SDD + HITL + TDD Red-to-Green)"]
213
- AST["3. AST Guards &lt;5ms<br/>(Layer, Secret & Migration Rules)"]
429
+ GUARDS["3. Pre-commit Guards<br/>(Layer, Secret & Migration Rules)"]
214
430
  RECEIPT["4. 4-Lens Audit Engine<br/>(Emits audit-receipt.json)"]
215
- SSOT --> AIUP --> AST --> RECEIPT
431
+ SSOT --> AIUP --> GUARDS --> RECEIPT
216
432
  end
217
433
 
218
434
  RECEIPT -->|audit-receipt.json| MODES{Deployment Mode}
219
435
 
220
436
  subgraph MODE1["🟢 MODE 1: STANDALONE (100% Local & Offline)"]
221
437
  M1_1["• Zero foreign dependencies"]
222
- M1_2["• Native stack AST execution in &lt; 5ms"]
223
- M1_3["• Git pre-commit hook physically blocks invalid commits"]
438
+ M1_2["• Guards run in the stack's native language"]
439
+ M1_3["• Git pre-commit hook blocks invalid commits (--no-verify skips it; CI is the backstop)"]
224
440
  M1_4["• Self-contained 05-audit-report.md"]
225
441
  end
226
442
 
@@ -254,17 +470,25 @@ CLC Kernel focuses strictly on governance and runs with **zero foreign dependenc
254
470
  |---|---|
255
471
  | **SDD** *(Spec-Driven Development)* | A specification-first methodology where detailed technical contracts, schemas, acceptance criteria, and test scenarios are authored in local, gitignored specs (`sdds/{change}/spec.md`) before modifying source code. |
256
472
  | **RDD** *(Review-Driven Development)* | An adversarial and structured code verification methodology where changes are audited across four orthogonal lenses (Correctness, Security, Architecture, Performance) to ensure systematic quality gates before merge or commit. |
257
- | **AIUP** *(AI Unified Process)* | The end-to-end governed lifecycle implemented by CLC Kernel: Research $\rightarrow$ Local SDD $\rightarrow$ Human-in-the-Loop (HITL) approval $\rightarrow$ TDD Red-to-Green $\rightarrow$ AST Guard Audit Gate $\rightarrow$ Conventional Commit. |
473
+ | **AIUP** *(AI Unified Process)* | The end-to-end governed lifecycle implemented by CLC Kernel: Research $\rightarrow$ Local SDD $\rightarrow$ Human-in-the-Loop (HITL) approval $\rightarrow$ TDD Red-to-Green $\rightarrow$ Guard Audit Gate $\rightarrow$ Conventional Commit. |
258
474
  | **HIT / HITL** *(Human-in-the-Loop)* | A mandatory approval gate where a human engineer validates contracts, architecture decisions, and proposed tests before an autonomous agent executes production code edits. |
259
475
  | **TDD** *(Test-Driven Development)* | The engineering practice of writing a failing automated regression test (Red Phase) to reproduce an issue or specify a new feature before writing the minimal production code to make it pass (Green Phase). |
260
- | **AST Guard** *(Abstract Syntax Tree Safeguard)* | A lightweight, zero-dependency static analysis script in the stack's native language (Python `ast`, TypeScript Compiler API, Go `go/parser`, RuboCop, etc.) executing in under 5ms to physically block architectural violations before git commits. |
261
- | **SSOT** *(Single Source of Truth)* | The centralized governance principle where `AGENTS.md` acts as the single source of truth, mirrored automatically to all AI IDE config files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, Copilot) via filesystem symlinks. |
476
+ | **Guard** *(Safeguard script)* | A lightweight, zero-dependency check in the stack's native language, run by the pre-commit hook. Most guards are pattern-based (regex); on Python stacks the layer, N+1 and Celery/Redis/Postgres guards parse code with Python `ast`. The hook blocks violations before commit (`--no-verify` skips it; CI is the backstop). |
477
+ | **SSOT** *(Single Source of Truth)* | The centralized governance principle where `AGENTS.md` acts as the single source of truth, mirrored to the AI agent rule files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.cursor/rules/clckernel_context.mdc`, `.github/copilot-instructions.md`, `.antigravity/rules.md`; configurable with `mirrors.list`) via filesystem symlinks. |
262
478
  | **Audit Receipt** | An immutable, machine-readable JSON artifact (`audit-receipt.json`) produced by the audit engine containing the timestamp, commit hash, per-lens verdicts, and Gentle AI RDD compatibility metadata. |
263
479
  | **ADR** *(Architectural Decision Record)* | A standardized document in `docs/Journal/` capturing significant architectural decisions, context, evaluated alternatives, and consequences. |
264
- | **Agent-OS** | An operating system archetype for non-tech domain workflows (e.g. Marketing OS, Content Ops, Research OS) governed by dual-layer architecture, strict schema validation, and HITL checkpoints. |
480
+ | **Agent-OS** | An operating system archetype for non-tech domain workflows (e.g. Marketing OS, Content Ops, Research OS) made of skills, playbooks, rules, prompts and templates, governed by a dual-layer AGENTS.md, explicit HITL checkpoints and document guards (skill frontmatter, links, placeholders). |
265
481
 
266
482
  ---
267
483
 
484
+ ## 🤝 Contributing & Community
485
+ Contributions are welcome. Start with these documents:
486
+
487
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — setup, the pre-commit hook, tests and the pull request flow.
488
+ - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) — expected behavior and how to report a problem.
489
+ - [SECURITY.md](SECURITY.md) — how to report a vulnerability privately.
490
+ - [CHANGELOG.md](CHANGELOG.md) — notable changes per release.
491
+
268
492
  <a id="license"></a>
269
493
  ## 📄 License
270
- MIT © [CarlosLeonCode](https://github.com/carlosleoncode)
494
+ MIT © [CarlosLeonCode](https://github.com/carlosleoncode) — see [LICENSE](LICENSE).
package/bin/cli.js CHANGED
@@ -4,8 +4,16 @@
4
4
  * Invokes the main controller module for CLC Kernel.
5
5
  */
6
6
 
7
+ const path = require('path');
7
8
  const { runCli } = require('../src/index');
8
9
 
10
+ // Binary names from before the rename: still installed, removed in the next major.
11
+ const DEPRECATED_BIN_NAMES = new Set(['clc-forge', 'create-clc-forge']);
12
+ const invokedAs = path.basename(process.argv[1] || '').replace(/\.(js|cmd)$/i, '');
13
+ if (DEPRECATED_BIN_NAMES.has(invokedAs)) {
14
+ process.stderr.write('"clc-forge" is deprecated; use "clckernel"\n');
15
+ }
16
+
9
17
  runCli().catch((err) => {
10
18
  console.error('\n❌ Error ejecutando clckernel:', err);
11
19
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clckernel",
3
- "version": "1.2.18",
3
+ "version": "2.0.0",
4
4
  "description": "CLC Kernel — The Universal Polyglot AI Agent Governance Engine (Next.js, FastAPI, Django, Astro, Rails, Go, Rust, Laravel).",
5
5
  "main": "./bin/cli.js",
6
6
  "files": [
@@ -9,7 +9,9 @@
9
9
  "tools",
10
10
  ".agents/skills/clckernel_cli",
11
11
  "README.md",
12
- "README.es.md"
12
+ "README.es.md",
13
+ "LICENSE",
14
+ "CHANGELOG.md"
13
15
  ],
14
16
  "bin": {
15
17
  "clckernel": "bin/cli.js",
@@ -41,6 +43,14 @@
41
43
  ],
42
44
  "author": "Carlos Leon Code",
43
45
  "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/CarlosLeonCode/clc_forge.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/CarlosLeonCode/clc_forge/issues"
52
+ },
53
+ "homepage": "https://clckernel.carlosleoncode.com",
44
54
  "engines": {
45
55
  "node": ">=18.0.0"
46
56
  },