novahiz 0.2.2 → 0.2.3

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.
package/README.md CHANGED
@@ -1,355 +1,355 @@
1
- # Novahiz
2
-
3
- > **Zero-dependency enforcement layer for AI coding agents** — classifies prompts, assigns execution roadmaps, blocks unsafe edits, and injects session-level skills, all deterministically without model calls.
4
-
5
- 15 categories, 185 skills, 11 gate rules, 12 MCP providers — all deterministic, all local, all JSON.
6
-
7
- ```
8
- ┌─────────────────────────────────────────────────────────────────────┐
9
- │ │
10
- │ USER PROMPT ──▶ CLASSIFIER ──▶ GATE ──▶ SAFE OUTPUT │
11
- │ │
12
- │ "Fix the 3 categories 2 missing Edit blocked │
13
- │ auth bug" detected skills until skills │
14
- │ required loaded │
15
- │ │
16
- └─────────────────────────────────────────────────────────────────────┘
17
- ```
18
-
19
- ---
20
-
21
- ## What it does
22
-
23
- ```
24
- ┌──────────────────────────────────────────────────────────────────────────┐
25
- │ HOW Novahiz WORKS │
26
- │ │
27
- │ ┌──────────┐ ┌────────────┐ ┌──────────┐ ┌──────────────┐ │
28
- │ │ USER │───▶│ CLASSIFY │───▶│ INJECT │───▶│ MODEL │ │
29
- │ │ PROMPT │ │ │ │ ENFORCE │ │ RESPONSE │ │
30
- │ └──────────┘ │ keywords │ │ block + │ └──────┬───────┘ │
31
- │ │ priority │ │ roadmap │ │ │
32
- │ │ roadmap │ │ ledger │ ▼ │
33
- │ └────────────┘ └──────────┘ ┌──────────────┐ │
34
- │ │ │ TOOL CALL │ │
35
- │ │ │ (edit/write) │ │
36
- │ │ └──────┬───────┘ │
37
- │ │ │ │
38
- │ │ ┌────────────┐ │ │
39
- │ └────────▶│ GATE │◀───────────┘ │
40
- │ │ │ │
41
- │ │ file path │ │
42
- │ │ skills │ │
43
- │ │ content │ │
44
- │ └─────┬──────┘ │
45
- │ │ │
46
- │ ▼ │
47
- │ ┌──────────┐ │
48
- │ │ allow / │ │
49
- │ │ BLOCK │ │
50
- │ └──────────┘ │
51
- │ │
52
- └──────────────────────────────────────────────────────────────────────────┘
53
- ```
54
-
55
- **15 categories**, **185 skills**, **11 gate rules**, **12 MCP providers** — all deterministic, all local, all JSON.
56
-
57
- ---
58
-
59
- ## Quick start
60
-
61
- ### Option 1 — One-liner (recommended)
62
-
63
- ```bash
64
- npm install -g Novahiz
65
- ```
66
-
67
- This installs Novahiz globally and auto-configures opencode (skills, plugin, MCP servers, config). Then verify:
68
-
69
- ```bash
70
- npx Novahiz doctor # 10 health checks
71
- npx Novahiz classify "fix the auth bug"
72
- ```
73
-
74
- ### Option 2 — From source
75
-
76
- ```bash
77
- git clone https://github.com/novahiz/novahiz.git
78
- cd novahiz
79
- npm install && npm run build
80
- node ./install/install.mjs
81
-
82
- # Verify
83
- npx Novahiz doctor
84
- ```
85
-
86
- > Requires **Node.js >= 22.18**. The installer auto-installs opencode if it's missing.
87
-
88
- ---
89
-
90
- ## The Classifier
91
-
92
- Every user prompt passes through the classifier. It scores keywords against 15 categories and picks the top matches.
93
-
94
- ```mermaid
95
- flowchart LR
96
- A[User Prompt] --> B[Text Folding<br/>lowercase + strip accents]
97
- B --> C{Keyword Scoring<br/>+1.0 per hit<br/>+1.5 multi-word bonus}
98
- C --> D[Rank by Score + Priority]
99
- D --> E[Top 3 Categories]
100
- E --> F[Primary Category<br/>determines roadmap]
101
- F --> G[Required Skills<br/>union of all categories]
102
- F --> H[Enforced Skills<br/>primary only — gate blocks if missing]
103
- ```
104
-
105
- **Example:**
106
-
107
- | Prompt | Top Category | Confidence | Skills Required |
108
- |--------|-------------|------------|-----------------|
109
- | "fix the auth bug" | `debug` | 0.60 | novahiz-plan, novahiz-analyse, novahiz-implement, novahiz-converge |
110
- | "add a landing page" | `design-ui` | 0.50 | novahiz-humanizer, anti-AI-design |
111
- | "create supabase migration" | `database-supabase` | 0.60 | novahiz-supabase, novahiz-postgres, novahiz-plan, novahiz-implement |
112
-
113
- ---
114
-
115
- ## The Gate
116
-
117
- The gate is the enforcement mechanism. It inspects every file edit and decides: **allow** or **block**.
118
-
119
- ```mermaid
120
- flowchart TD
121
- A[Tool Call: edit / write / patch] --> B[File Class Detection]
122
- B --> C{Rule Matching}
123
-
124
- C --> D[R1: Content contains prose?<br/>require novahiz-humanizer]
125
- C --> F[R3: Prompt was Supabase?<br/>require novahiz-supabase + postgres]
126
- C --> G[R4: Prompt was browser?<br/>require novahiz-browser]
127
- C --> H[R6: Workflow prompt?<br/>require plan/clarify/analyse/implement/converge]
128
-
129
- D --> I{Roadmap Enforcement}
130
- F --> I
131
- G --> I
132
- H --> I
133
-
134
- I --> J{Placeholder Detection<br/>TODO / FIXME / placeholder tokens}
135
-
136
- J --> K["Check installed skills<br/>(missing → reported, not blocked)"]
137
- J --> L["Check loaded skills<br/>(missing → BLOCKED)"]
138
-
139
- K --> M{All loaded?}
140
- L --> M
141
-
142
- M -->|Yes| N[✅ Allow edit]
143
- M -->|No| O[❌ Block edit<br/>list missing skills]
144
- ```
145
-
146
- ### File classes
147
-
148
- | Class | Extensions |
149
- |-------|-----------|
150
- | `code` | `.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.go`, `.rs`, `.java`, `.kt`, `.swift`, `.php`, `.dart`, `.rb` |
151
- | `design` | `.css`, `.scss`, `.html`, `.vue`, `.svelte`, `.astro` |
152
- | `text` | `.md`, `.txt`, `.rst` |
153
- | `config` | `.json`, `.yaml`, `.yml`, `.toml` |
154
- | `data` | `.csv`, `.sql`, `.db` |
155
-
156
- ### Gate rules
157
-
158
- | Rule | Triggers on | Requires |
159
- |------|-------------|----------|
160
- | R1-code-prose | Code or design file whose change contains prose | novahiz-humanizer |
161
- | R1-docs | Text, data or config file, or a docs-writing prompt | novahiz-humanizer |
162
- | R3-supabase | A Supabase path or a Supabase prompt | novahiz-supabase, novahiz-postgres |
163
- | R4-playwright | A browser prompt category | novahiz-browser |
164
- | R6-Novahiz | A prompt in a workflow category | novahiz-plan, -clarify, -analyse, -implement, -converge |
165
- | R7-assessment | An assessment prompt | novahiz-assess-intake, -research, -define, -shape, -decide |
166
- | R8-docs | Edits under `novahiz-docs/**/*.md` | novahiz-docs |
167
- | R9-code-review | A review prompt or a code file under review | novahiz-code-review |
168
- | R10-security | An audit or security prompt | novahiz-security |
169
- | R11-accessibility | A design-ui or audit prompt | novahiz-wcag-audit |
170
- | R12-web-extract | A research prompt | novahiz-web-extract |
171
-
172
- ---
173
-
174
- ## Roadmaps
175
-
176
- Each category has an ordered execution roadmap. The gate enforces non-optional `skill` steps.
177
-
178
- ```mermaid
179
- flowchart LR
180
- subgraph "Feature (code)"
181
- A1[advisory: Understand] --> A2[skill: Plan]
182
- A2 --> A3[skill: Analyse]
183
- A3 --> A4[skill: Implement]
184
- A4 --> A5[skill: Converge]
185
- A5 --> A6[verify: Verify]
186
- end
187
-
188
- subgraph "Bugfix (debug)"
189
- B1[advisory: Reproduce] --> B2[advisory: Isolate]
190
- B2 --> B3[skill: Plan]
191
- B3 --> B4[skill: Analyse]
192
- B4 --> B5[skill: Implement]
193
- B5 --> B6[skill: Converge]
194
- B6 --> B7[advisory: Prevent]
195
- end
196
-
197
- subgraph "Schema (database-supabase)"
198
- C1[skill: Plan] --> C2[skill: Clarify]
199
- C2 --> C3[skill: Inspect]
200
- C3 --> C4[skill: Load supabase]
201
- C4 --> C5[skill: Implement]
202
- C5 --> C6[skill: Security]
203
- C6 --> C7[skill: Converge]
204
- end
205
- ```
206
-
207
- | Step Kind | What it means | Gate behavior |
208
- |-----------|---------------|---------------|
209
- | `skill` | Load a skill before proceeding | **Blocks** if skill not loaded |
210
- | `edit` | Make code changes | Allowed |
211
- | `verify` | Check the work is correct | Advisory |
212
- | `advisory` | Informational | Never blocks |
213
-
214
- ---
215
-
216
- ## Task Ledger
217
-
218
- For work that spans more than a few steps, the ledger keeps the plan in SQLite instead of in the conversation.
219
-
220
- ```mermaid
221
- flowchart TD
222
- A["task new 'Add CSV export'"] --> B[Create task + todos from roadmap]
223
- B --> C[Dispatch work packets]
224
- C --> D[Each packet = one todo<br/>exclusive file ownership]
225
- D --> E[Agent works on todos]
226
- E --> F{Review cadence<br/>every N edits}
227
- F -->|N reached| G[Force review step<br/>reconcile plan]
228
- F -->|N not reached| E
229
- G --> E
230
- E --> H[All todos done]
231
- H --> I[Task complete]
232
- ```
233
-
234
- - **Exclusive file ownership** — no two work packets can edit the same file
235
- - **Iteration budget** — each todo has a max (default: 12) before escalation
236
- - **Review cadence** — forced review every 3 edits or 2 completed todos
237
- - **Proof required** — verify steps require evidence before completion
238
-
239
- ---
240
-
241
- ## Installed skills
242
-
243
- Novahiz ships with 172 skills across all categories:
244
-
245
- | Category | Skills | Purpose |
246
- |----------|--------|---------|
247
- | `code` | novahiz-code-review, engineering-code-standards, mcp-server-builder, ... | Code quality, patterns, architecture |
248
- | `debug` | debug-issue, novahiz-analyse, ... | Root cause analysis, code navigation |
249
- | `review` | novahiz-code-review, review-pr, ... | Structured review, blast radius |
250
- | `database-supabase` | supabase, supabase-postgres-best-practices, novahiz-postgres, ... | Schema, RLS, migrations, optimization |
251
- | `design-ui` | anti-AI-design, frontend-design-taste, apple-hig-audit, ... | UI/UX, visual hierarchy, native feel |
252
- | `docs-writing` | novahiz-humanizer, copywriting, copy-editing, humanizer, ... | Prose, marketing copy, AI de-tell |
253
- | `browser` | novahiz-browser, playwright-agent, novahiz-web-extract, computer-use, ... | Web automation, screenshots, extraction |
254
- | `audit` | novahiz-security, narsil-*, dependency-auditor, ai-security, ... | Security, compliance, vulnerability |
255
-
256
- Run `npx Novahiz skills --all` to see the full list.
257
-
258
- ---
259
-
260
- ## Providers
261
-
262
- Novahiz auto-registers external MCP servers based on the prompt category:
263
-
264
- | Provider | Purpose | Categories |
265
- |----------|---------|------------|
266
- | context7 | Library documentation | all |
267
- | narsil | Code intelligence, security scan | code, debug, review, audit |
268
- | novahiz-web-extract | Clean markdown from URLs | research, docs-writing |
269
- | playwright | Browser automation | browser, design |
270
- | supabase | Database operations | database-supabase |
271
- | supabase-postgres-best-practices | Postgres optimization | database-supabase |
272
- | security | Security orchestration | audit |
273
- | cron | Scheduled tasks | devops |
274
- | dart | Dart/Flutter tools | code |
275
-
276
- See [docs/PROVIDERS.md](docs/PROVIDERS.md) for full details.
277
-
278
- ---
279
-
280
- ## Configuration
281
-
282
- ```bash
283
- # Disable the gate (escape hatch)
284
- NOVAHIZ_GATE=off npx opencode
285
-
286
- # Override home directory
287
- NOVAHIZ_HOME=/path/to/Novahiz npx Novahiz doctor
288
-
289
- # Force node version
290
- NOVAHIZ_NODE=/usr/local/bin/node npx Novahiz doctor
291
- ```
292
-
293
- See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for all options.
294
-
295
- ---
296
-
297
- ## Commands
298
-
299
- | Command | Purpose |
300
- |---------|---------|
301
- | `Novahiz init` | One-shot setup |
302
- | `Novahiz doctor` | 10-check health diagnostic |
303
- | `Novahiz status` | Current classification + gate state |
304
- | `Novahiz classify <text>` | Classify a prompt |
305
- | `Novahiz gate` | Check if an edit is allowed |
306
- | `Novahiz task new <title>` | Start a tracked task |
307
- | `Novahiz task status` | Task progress |
308
- | `Novahiz task done <id>` | Mark a todo complete |
309
- | `Novahiz report` | Session report |
310
- | `Novahiz skills` | List loaded or available skills |
311
- | `Novahiz catalog <query>` | Search the skill catalog |
312
- | `Novahiz roadmap` | Show execution roadmap |
313
- | `Novahiz dispatch` | Generate work packets |
314
- | `Novahiz sync` | Rebuild installed-skills index |
315
- | `Novahiz clean` | Remove old logs |
316
- | `Novahiz upgrade` | Pull latest + rebuild |
317
- | `Novahiz version` | Print version |
318
-
319
- See [docs/CLI.md](docs/CLI.md) for full reference.
320
-
321
- ---
322
-
323
- ## Documentation
324
-
325
- | File | Topic |
326
- |------|-------|
327
- | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design, components, data flow |
328
- | [docs/CLASSIFICATION.md](docs/CLASSIFICATION.md) | How the classifier works |
329
- | [docs/GATE.md](docs/GATE.md) | Gate rules, file classes, enforcement |
330
- | [docs/CATALOG.md](docs/CATALOG.md) | Categories, rules, providers, overrides |
331
- | [docs/PLUGIN.md](docs/PLUGIN.md) | opencode plugin lifecycle |
332
- | [docs/CLI.md](docs/CLI.md) | CLI command reference |
333
- | [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Config files and env vars |
334
- | [docs/EXECUTION.md](docs/EXECUTION.md) | Task ledger, todos, dispatch |
335
- | [docs/PROVIDERS.md](docs/PROVIDERS.md) | MCP servers and skill packs |
336
- | [docs/INSTALL.md](docs/INSTALL.md) | Installation and setup |
337
- | [docs/ROADMAPS.md](docs/ROADMAPS.md) | Execution roadmaps |
338
- | [docs/RULES.md](docs/RULES.md) | Gate rules reference |
339
- | [docs/CONSTITUTION.md](docs/CONSTITUTION.md) | Project principles |
340
- | [docs/HARNESSES.md](docs/HARNESSES.md) | Harness adapter guide |
341
- | [docs/TOKENS.md](docs/TOKENS.md) | Token diagnostics |
342
-
343
- ---
344
-
345
- ## Philosophy
346
-
347
- Novahiz treats skills like **locks** and the prompt like a **key**. The classifier determines which locks exist. The gate checks whether you have the right keys loaded. No key, no edit.
348
-
349
- Everything is local, deterministic, and JSON. No cloud calls. No model inference in the decision path. Same prompt + same config = same result, every time.
350
-
351
- ---
352
-
353
- ## License
354
-
355
- Apache-2.0
1
+ # Novahiz: Agent Governance Toolkit
2
+
3
+ > **Zero-dependency enforcement layer for AI coding agents** — classifies prompts, assigns execution roadmaps, blocks unsafe edits, and injects session-level skills, all deterministically without model calls.
4
+
5
+ 15 categories, 173 skills, 12 gate rules, 10 MCP providers — all deterministic, all local, all JSON.
6
+
7
+ ```
8
+ ┌─────────────────────────────────────────────────────────────────────┐
9
+ │ │
10
+ │ USER PROMPT ──▶ CLASSIFIER ──▶ GATE ──▶ SAFE OUTPUT │
11
+ │ │
12
+ │ "Fix the 3 categories 2 missing Edit blocked │
13
+ │ auth bug" detected skills until skills │
14
+ │ required loaded │
15
+ │ │
16
+ └─────────────────────────────────────────────────────────────────────┘
17
+ ```
18
+
19
+ ---
20
+
21
+ ## What it does
22
+
23
+ ```
24
+ ┌──────────────────────────────────────────────────────────────────────────┐
25
+ │ HOW Novahiz WORKS │
26
+ │ │
27
+ │ ┌──────────┐ ┌────────────┐ ┌──────────┐ ┌──────────────┐ │
28
+ │ │ USER │───▶│ CLASSIFY │───▶│ INJECT │───▶│ MODEL │ │
29
+ │ │ PROMPT │ │ │ │ ENFORCE │ │ RESPONSE │ │
30
+ │ └──────────┘ │ keywords │ │ block + │ └──────┬───────┘ │
31
+ │ │ priority │ │ roadmap │ │ │
32
+ │ │ roadmap │ │ ledger │ ▼ │
33
+ │ └────────────┘ └──────────┘ ┌──────────────┐ │
34
+ │ │ │ TOOL CALL │ │
35
+ │ │ │ (edit/write) │ │
36
+ │ │ └──────┬───────┘ │
37
+ │ │ │ │
38
+ │ │ ┌────────────┐ │ │
39
+ │ └────────▶│ GATE │◀───────────┘ │
40
+ │ │ │ │
41
+ │ │ file path │ │
42
+ │ │ skills │ │
43
+ │ │ content │ │
44
+ │ └─────┬──────┘ │
45
+ │ │ │
46
+ │ ▼ │
47
+ │ ┌──────────┐ │
48
+ │ │ allow / │ │
49
+ │ │ BLOCK │ │
50
+ │ └──────────┘ │
51
+ │ │
52
+ └──────────────────────────────────────────────────────────────────────────┘
53
+ ```
54
+
55
+ **15 categories**, **173 skills**, **12 gate rules**, **10 MCP providers** — all deterministic, all local, all JSON.
56
+
57
+ ---
58
+
59
+ ## Quick start
60
+
61
+ ### Option 1 — One-liner (recommended)
62
+
63
+ ```bash
64
+ npm install -g Novahiz
65
+ ```
66
+
67
+ This installs Novahiz globally and auto-configures opencode (skills, plugin, MCP servers, config). Then verify:
68
+
69
+ ```bash
70
+ npx Novahiz doctor # 12 health checks
71
+ npx Novahiz classify "fix the auth bug"
72
+ ```
73
+
74
+ ### Option 2 — From source
75
+
76
+ ```bash
77
+ git clone https://github.com/novahiz/novahiz.git
78
+ cd novahiz
79
+ npm install && npm run build
80
+ node ./install/install.mjs
81
+
82
+ # Verify
83
+ npx Novahiz doctor
84
+ ```
85
+
86
+ > Requires **Node.js >= 22.18**. The installer auto-installs opencode if it's missing.
87
+
88
+ ---
89
+
90
+ ## The Classifier
91
+
92
+ Every user prompt passes through the classifier. It scores keywords against 15 categories and picks the top matches.
93
+
94
+ ```mermaid
95
+ flowchart LR
96
+ A[User Prompt] --> B[Text Folding<br/>lowercase + strip accents]
97
+ B --> C{Keyword Scoring<br/>+1.0 per hit<br/>+1.5 multi-word bonus}
98
+ C --> D[Rank by Score + Priority]
99
+ D --> E[Top 3 Categories]
100
+ E --> F[Primary Category<br/>determines roadmap]
101
+ F --> G[Required Skills<br/>union of all categories]
102
+ F --> H[Enforced Skills<br/>primary only — gate blocks if missing]
103
+ ```
104
+
105
+ **Example:**
106
+
107
+ | Prompt | Top Category | Confidence | Skills Required |
108
+ |--------|-------------|------------|-----------------|
109
+ | "fix the auth bug" | `debug` | 0.60 | novahiz-plan, novahiz-analyse, novahiz-implement, novahiz-converge |
110
+ | "add a landing page" | `design-ui` | 0.50 | novahiz-humanizer, anti-AI-design |
111
+ | "create supabase migration" | `database-supabase` | 0.60 | novahiz-supabase, novahiz-postgres, novahiz-plan, novahiz-implement |
112
+
113
+ ---
114
+
115
+ ## The Gate
116
+
117
+ The gate is the enforcement mechanism. It inspects every file edit and decides: **allow** or **block**.
118
+
119
+ ```mermaid
120
+ flowchart TD
121
+ A[Tool Call: edit / write / patch] --> B[File Class Detection]
122
+ B --> C{Rule Matching}
123
+
124
+ C --> D[R1: Content contains prose?<br/>require novahiz-humanizer]
125
+ C --> F[R3: Prompt was Supabase?<br/>require novahiz-supabase + postgres]
126
+ C --> G[R4: Prompt was browser?<br/>require novahiz-browser]
127
+ C --> H[R6: Workflow prompt?<br/>require plan/clarify/analyse/implement/converge]
128
+
129
+ D --> I{Roadmap Enforcement}
130
+ F --> I
131
+ G --> I
132
+ H --> I
133
+
134
+ I --> J{Placeholder Detection<br/>TODO / FIXME / placeholder tokens}
135
+
136
+ J --> K["Check installed skills<br/>(missing → reported, not blocked)"]
137
+ J --> L["Check loaded skills<br/>(missing → BLOCKED)"]
138
+
139
+ K --> M{All loaded?}
140
+ L --> M
141
+
142
+ M -->|Yes| N[✅ Allow edit]
143
+ M -->|No| O[❌ Block edit<br/>list missing skills]
144
+ ```
145
+
146
+ ### File classes
147
+
148
+ | Class | Extensions |
149
+ |-------|-----------|
150
+ | `code` | `.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.go`, `.rs`, `.java`, `.kt`, `.swift`, `.php`, `.dart`, `.rb` |
151
+ | `design` | `.css`, `.scss`, `.html`, `.vue`, `.svelte`, `.astro` |
152
+ | `text` | `.md`, `.txt`, `.rst` |
153
+ | `config` | `.json`, `.yaml`, `.yml`, `.toml` |
154
+ | `data` | `.csv`, `.sql`, `.db` |
155
+
156
+ ### Gate rules
157
+
158
+ | Rule | Triggers on | Requires |
159
+ |------|-------------|----------|
160
+ | R1-code-prose | Code or design file whose change contains prose | novahiz-humanizer |
161
+ | R1-docs | Text, data or config file, or a docs-writing prompt | novahiz-humanizer |
162
+ | R3-supabase | A Supabase path or a Supabase prompt | novahiz-supabase, novahiz-postgres |
163
+ | R4-playwright | A browser prompt category | novahiz-browser |
164
+ | R6-Novahiz | A prompt in a workflow category | novahiz-plan, -clarify, -analyse, -implement, -converge |
165
+ | R7-assessment | An assessment prompt | novahiz-assess-intake, -research, -define, -shape, -decide |
166
+ | R8-docs | Edits under `novahiz-docs/**/*.md` | novahiz-docs |
167
+ | R9-code-review | A review prompt or a code file under review | novahiz-code-review |
168
+ | R10-security | An audit or security prompt | novahiz-security |
169
+ | R11-accessibility | A design-ui or audit prompt | novahiz-wcag-audit |
170
+ | R12-web-extract | A research prompt | novahiz-web-extract |
171
+
172
+ ---
173
+
174
+ ## Roadmaps
175
+
176
+ Each category has an ordered execution roadmap. The gate enforces non-optional `skill` steps.
177
+
178
+ ```mermaid
179
+ flowchart LR
180
+ subgraph "Feature (code)"
181
+ A1[advisory: Understand] --> A2[skill: Plan]
182
+ A2 --> A3[skill: Analyse]
183
+ A3 --> A4[skill: Implement]
184
+ A4 --> A5[skill: Converge]
185
+ A5 --> A6[verify: Verify]
186
+ end
187
+
188
+ subgraph "Bugfix (debug)"
189
+ B1[advisory: Reproduce] --> B2[advisory: Isolate]
190
+ B2 --> B3[skill: Plan]
191
+ B3 --> B4[skill: Analyse]
192
+ B4 --> B5[skill: Implement]
193
+ B5 --> B6[skill: Converge]
194
+ B6 --> B7[advisory: Prevent]
195
+ end
196
+
197
+ subgraph "Schema (database-supabase)"
198
+ C1[skill: Plan] --> C2[skill: Clarify]
199
+ C2 --> C3[skill: Inspect]
200
+ C3 --> C4[skill: Load supabase]
201
+ C4 --> C5[skill: Implement]
202
+ C5 --> C6[skill: Security]
203
+ C6 --> C7[skill: Converge]
204
+ end
205
+ ```
206
+
207
+ | Step Kind | What it means | Gate behavior |
208
+ |-----------|---------------|---------------|
209
+ | `skill` | Load a skill before proceeding | **Blocks** if skill not loaded |
210
+ | `edit` | Make code changes | Allowed |
211
+ | `verify` | Check the work is correct | Advisory |
212
+ | `advisory` | Informational | Never blocks |
213
+
214
+ ---
215
+
216
+ ## Task Ledger
217
+
218
+ For work that spans more than a few steps, the ledger keeps the plan in SQLite instead of in the conversation.
219
+
220
+ ```mermaid
221
+ flowchart TD
222
+ A["task new 'Add CSV export'"] --> B[Create task + todos from roadmap]
223
+ B --> C[Dispatch work packets]
224
+ C --> D[Each packet = one todo<br/>exclusive file ownership]
225
+ D --> E[Agent works on todos]
226
+ E --> F{Review cadence<br/>every N edits}
227
+ F -->|N reached| G[Force review step<br/>reconcile plan]
228
+ F -->|N not reached| E
229
+ G --> E
230
+ E --> H[All todos done]
231
+ H --> I[Task complete]
232
+ ```
233
+
234
+ - **Exclusive file ownership** — no two work packets can edit the same file
235
+ - **Iteration budget** — each todo has a max (default: 12) before escalation
236
+ - **Review cadence** — forced review every 3 edits or 2 completed todos
237
+ - **Proof required** — verify steps require evidence before completion
238
+
239
+ ---
240
+
241
+ ## Installed skills
242
+
243
+ Novahiz ships with 173 skills across all categories:
244
+
245
+ | Category | Skills | Purpose |
246
+ |----------|--------|---------|
247
+ | `code` | novahiz-code-review, engineering-code-standards, mcp-server-builder, ... | Code quality, patterns, architecture |
248
+ | `debug` | debug-issue, novahiz-analyse, ... | Root cause analysis, code navigation |
249
+ | `review` | novahiz-code-review, review-pr, ... | Structured review, blast radius |
250
+ | `database-supabase` | supabase, supabase-postgres-best-practices, novahiz-postgres, ... | Schema, RLS, migrations, optimization |
251
+ | `design-ui` | anti-AI-design, frontend-design-taste, apple-hig-audit, ... | UI/UX, visual hierarchy, native feel |
252
+ | `docs-writing` | novahiz-humanizer, copywriting, copy-editing, humanizer, ... | Prose, marketing copy, AI de-tell |
253
+ | `browser` | novahiz-browser, playwright-agent, novahiz-web-extract, computer-use, ... | Web automation, screenshots, extraction |
254
+ | `audit` | novahiz-security, narsil-*, dependency-auditor, ai-security, ... | Security, compliance, vulnerability |
255
+
256
+ Run `npx Novahiz skills --all` to see the full list.
257
+
258
+ ---
259
+
260
+ ## Providers
261
+
262
+ Novahiz auto-registers external MCP servers based on the prompt category:
263
+
264
+ | Provider | Purpose | Categories |
265
+ |----------|---------|------------|
266
+ | context7 | Library documentation | all |
267
+ | narsil | Code intelligence, security scan | code, debug, review, audit |
268
+ | novahiz-web-extract | Clean markdown from URLs | research, docs-writing |
269
+ | playwright | Browser automation | browser, design |
270
+ | supabase | Database operations | database-supabase |
271
+ | supabase-postgres-best-practices | Postgres optimization | database-supabase |
272
+ | security | Security orchestration | audit |
273
+ | cron | Scheduled tasks | devops |
274
+ | dart | Dart/Flutter tools | code |
275
+
276
+ See [docs/PROVIDERS.md](docs/PROVIDERS.md) for full details.
277
+
278
+ ---
279
+
280
+ ## Configuration
281
+
282
+ ```bash
283
+ # Disable the gate (escape hatch)
284
+ NOVAHIZ_GATE=off npx opencode
285
+
286
+ # Override home directory
287
+ NOVAHIZ_HOME=/path/to/Novahiz npx Novahiz doctor
288
+
289
+ # Force node version
290
+ NOVAHIZ_NODE=/usr/local/bin/node npx Novahiz doctor
291
+ ```
292
+
293
+ See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for all options.
294
+
295
+ ---
296
+
297
+ ## Commands
298
+
299
+ | Command | Purpose |
300
+ |---------|---------|
301
+ | `Novahiz init` | One-shot setup |
302
+ | `Novahiz doctor` | 12-check health diagnostic |
303
+ | `Novahiz status` | Current classification + gate state |
304
+ | `Novahiz classify <text>` | Classify a prompt |
305
+ | `Novahiz gate` | Check if an edit is allowed |
306
+ | `Novahiz task new <title>` | Start a tracked task |
307
+ | `Novahiz task status` | Task progress |
308
+ | `Novahiz task done <id>` | Mark a todo complete |
309
+ | `Novahiz report` | Session report |
310
+ | `Novahiz skills` | List loaded or available skills |
311
+ | `Novahiz catalog <query>` | Search the skill catalog |
312
+ | `Novahiz roadmap` | Show execution roadmap |
313
+ | `Novahiz dispatch` | Generate work packets |
314
+ | `Novahiz sync` | Rebuild installed-skills index |
315
+ | `Novahiz clean` | Remove old logs |
316
+ | `Novahiz upgrade` | Pull latest + rebuild |
317
+ | `Novahiz version` | Print version |
318
+
319
+ See [docs/CLI.md](docs/CLI.md) for full reference.
320
+
321
+ ---
322
+
323
+ ## Documentation
324
+
325
+ | File | Topic |
326
+ |------|-------|
327
+ | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design, components, data flow |
328
+ | [docs/CLASSIFICATION.md](docs/CLASSIFICATION.md) | How the classifier works |
329
+ | [docs/GATE.md](docs/GATE.md) | Gate rules, file classes, enforcement |
330
+ | [docs/CATALOG.md](docs/CATALOG.md) | Categories, rules, providers, overrides |
331
+ | [docs/PLUGIN.md](docs/PLUGIN.md) | opencode plugin lifecycle |
332
+ | [docs/CLI.md](docs/CLI.md) | CLI command reference |
333
+ | [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Config files and env vars |
334
+ | [docs/EXECUTION.md](docs/EXECUTION.md) | Task ledger, todos, dispatch |
335
+ | [docs/PROVIDERS.md](docs/PROVIDERS.md) | MCP servers and skill packs |
336
+ | [docs/INSTALL.md](docs/INSTALL.md) | Installation and setup |
337
+ | [docs/ROADMAPS.md](docs/ROADMAPS.md) | Execution roadmaps |
338
+ | [docs/RULES.md](docs/RULES.md) | Gate rules reference |
339
+ | [docs/CONSTITUTION.md](docs/CONSTITUTION.md) | Project principles |
340
+ | [docs/HARNESSES.md](docs/HARNESSES.md) | Harness adapter guide |
341
+ | [docs/TOKENS.md](docs/TOKENS.md) | Token diagnostics |
342
+
343
+ ---
344
+
345
+ ## Philosophy
346
+
347
+ Novahiz treats skills like **locks** and the prompt like a **key**. The classifier determines which locks exist. The gate checks whether you have the right keys loaded. No key, no edit.
348
+
349
+ Everything is local, deterministic, and JSON. No cloud calls. No model inference in the decision path. Same prompt + same config = same result, every time.
350
+
351
+ ---
352
+
353
+ ## License
354
+
355
+ Apache-2.0