novahiz 0.2.5 → 0.3.1

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 (55) hide show
  1. package/NOTICE.md +17 -6
  2. package/README.md +12 -7
  3. package/adapters/README.md +1 -1
  4. package/adapters/opencode/agent/novahiz.md +2 -2
  5. package/adapters/opencode/instructions.md +2 -1
  6. package/adapters/opencode/novahiz.ts +336 -40
  7. package/catalog/categories.json +282 -9
  8. package/catalog/overrides.json +727 -0
  9. package/catalog/providers.json +50 -8
  10. package/catalog/rules.json +42 -9
  11. package/docs/ARCHITECTURE.md +2 -2
  12. package/docs/CATALOG.md +4 -4
  13. package/docs/CLASSIFICATION.md +3 -1
  14. package/docs/CONFIGURATION.md +3 -3
  15. package/docs/CONVERGENCE-2026-09-25.md +5 -0
  16. package/docs/GATE.md +26 -15
  17. package/docs/HARNESSES.md +10 -6
  18. package/docs/INSTALL.md +1 -0
  19. package/docs/PROVIDERS.md +19 -5
  20. package/docs/ROADMAPS.md +29 -0
  21. package/docs/RULES.md +7 -4
  22. package/docs/audit-2026-09-25.md +275 -0
  23. package/install/bootstrap.mjs +29 -24
  24. package/install/install.mjs +55 -18
  25. package/install/lib.mjs +20 -4
  26. package/mcp/novahiz-tools/README.md +5 -0
  27. package/mcp/novahiz-tools/index.mjs +78 -7
  28. package/novahiz.config.example.json +3 -2
  29. package/package.json +2 -2
  30. package/skills/gate/SKILL.md +16 -1
  31. package/skills/novahiz-analyse/SKILL.md +2 -2
  32. package/skills/novahiz-audit/SKILL.md +1 -1
  33. package/skills/novahiz-code-review/SKILL.md +1 -1
  34. package/skills/novahiz-converge/SKILL.md +1 -1
  35. package/skills/novahiz-gate/SKILL.md +2 -1
  36. package/skills/novahiz-implement/SKILL.md +2 -2
  37. package/skills/novahiz-plan/SKILL.md +2 -2
  38. package/skills/novahiz-planner/SKILL.md +5 -3
  39. package/skills/novahiz-task/SKILL.md +1 -1
  40. package/skills/prompt-rewriter/SKILL.md +18 -13
  41. package/src/cli.ts +24 -4
  42. package/src/commands/context.ts +43 -4
  43. package/src/commands/doctor.ts +26 -8
  44. package/src/commands/gate.ts +66 -85
  45. package/src/commands/graft.ts +14 -9
  46. package/src/commands/inspect.ts +28 -2
  47. package/src/commands/task.ts +30 -1
  48. package/src/exec.ts +38 -10
  49. package/src/gate-repair.ts +87 -0
  50. package/src/gate.ts +156 -14
  51. package/src/graft.ts +56 -23
  52. package/src/ledger.ts +12 -2
  53. package/src/memory.ts +14 -1
  54. package/src/prompt-rewriter.ts +357 -24
  55. package/src/spec.ts +18 -5
package/NOTICE.md CHANGED
@@ -30,17 +30,28 @@ Providers are referenced by install command, never vendored. Each lists its upst
30
30
  | `security` | `security-mcp` | https://github.com/AbrahamOO/security-mcp | MIT |
31
31
  | `narsil` | `narsil-mcp` | https://github.com/postrv/narsil-mcp | MIT OR Apache-2.0 |
32
32
  | `context7` | `@upstash/context7-mcp` | https://github.com/upstash/context7 | MIT |
33
- | `cron` | `mcp-cron` | https://github.com/jolks/mcp-cron | AGPL-3.0-only |
33
+ | `cron` | `scheduler-mcp` (local venv clone) | https://github.com/PhialsBasement/scheduler-mcp | MIT |
34
34
  | `novahiz` | local Novahiz MCP | https://github.com/novahiz/novahiz | Apache-2.0 |
35
+ | `dart` | Dart SDK (`dart mcp-server`) | https://github.com/dart-lang/ai (pkgs/dart_mcp_server) | BSD-3-Clause |
35
36
 
36
- ## opencode plugins (third-party)
37
+ ## Skill packs (upstream, not vendored)
37
38
 
38
- The installer may register these OpenCode plugins from `opencode.jsonc` `plugin[]`. They are installed from npm, never vendored in this repository.
39
+ Installed on demand with `npx skills add` (or an upstream tarball when git transport fails); this repository does not copy their files.
39
40
 
40
- | Package | Repository | License |
41
+ | Id | Repository | License |
41
42
  | --- | --- | --- |
42
- | `@mohak34/opencode-notifier` | https://github.com/mohak34/opencode-notifier | MIT |
43
- | `@tarquinen/opencode-dcp` | https://github.com/Opencode-DCP/opencode-dynamic-context-pruning | AGPL-3.0-or-later |
43
+ | `flutter-skills` | https://github.com/flutter/agent-plugins | BSD-3-Clause |
44
+ | `dart-skills` | https://github.com/dart-lang/skills | BSD-3-Clause |
45
+ | `expo-skills` | https://github.com/expo/skills | MIT |
46
+
47
+ ## opencode plugins (third-party)
48
+
49
+ `opencode.jsonc` `plugin[]` holds only the Novahiz adapter. The former npm plugins were removed on 2026-09-26 (see `docs/HARNESSES.md`):
50
+
51
+ | Package | Repository | License | Status |
52
+ | --- | --- | --- | --- |
53
+ | `@mohak34/opencode-notifier` | https://github.com/mohak34/opencode-notifier | MIT | removed 2026-09-26 |
54
+ | `@tarquinen/opencode-dcp` | https://github.com/Opencode-DCP/opencode-dynamic-context-pruning | AGPL-3.0-or-later | removed 2026-09-26 |
44
55
 
45
56
  The Novahiz adapter (`adapters/opencode/novahiz.ts`) is first-party under Apache-2.0.
46
57
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
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
4
 
5
- 15 categories, 41 skills, 10 gate rules, 6 MCP providers — all deterministic, all local, all JSON.
5
+ 17 categories, 95 skills, 11 gate rules, 7 MCP providers — all deterministic, all local, all JSON.
6
6
 
7
7
  ```
8
8
  ┌─────────────────────────────────────────────────────────────────────┐
@@ -52,7 +52,7 @@
52
52
  └──────────────────────────────────────────────────────────────────────────┘
53
53
  ```
54
54
 
55
- **15 categories**, **41 skills**, **10 gate rules**, **6 MCP providers** — all deterministic, all local, all JSON.
55
+ **17 categories**, **95 skills**, **11 gate rules**, **7 MCP providers** — all deterministic, all local, all JSON.
56
56
 
57
57
  ---
58
58
 
@@ -89,7 +89,7 @@ npx Novahiz doctor
89
89
 
90
90
  ## The Classifier
91
91
 
92
- Every user prompt passes through the classifier. It scores keywords against 15 categories and picks the top matches.
92
+ Every user prompt passes through the classifier. It scores keywords against 17 categories and picks the top matches.
93
93
 
94
94
  ```mermaid
95
95
  flowchart LR
@@ -167,8 +167,9 @@ flowchart TD
167
167
  | R11-accessibility | A design-ui or audit prompt | novahiz-wcag-audit |
168
168
  | R12-web-extract | A research prompt | novahiz-web-extract |
169
169
  | R13-design-craft | A design-ui prompt or a style file (css/scss/less/html) | novahiz-humanizer, ui-slop-remover, ui-craft-rules |
170
+ | R14-impeccable | A design-ui prompt or a style file (css/scss/less/html) | impeccable |
170
171
 
171
- `novahiz-humanizer` and `ui-slop-remover` are required only on frontend design tasks (R13).
172
+ `novahiz-humanizer` and `ui-slop-remover` are required only on frontend design tasks (R13); `impeccable` loads the same way (R14) so critique, audit and polish playbooks stay reachable.
172
173
 
173
174
  ---
174
175
 
@@ -241,7 +242,7 @@ flowchart TD
241
242
 
242
243
  ## Installed skills
243
244
 
244
- Novahiz ships with 41 skills across all categories:
245
+ Novahiz ships with 95 skills across all categories:
245
246
 
246
247
  | Category | Skills | Purpose |
247
248
  |----------|--------|---------|
@@ -253,6 +254,7 @@ Novahiz ships with 41 skills across all categories:
253
254
  | `docs-writing` | ... | Prose, marketing copy, AI de-tell |
254
255
  | `browser` | novahiz-browser, browser-session, novahiz-web-extract, ... | Web automation, screenshots, extraction |
255
256
  | `audit` | novahiz-security, package-risk-audit, llm-threat-review, ... | Security, compliance, vulnerability |
257
+ | `expo` | expo-overview, expo-router, expo-module, expo-dev-client, ... | Expo / React Native: routes, native modules, builds |
256
258
 
257
259
  Run `npx Novahiz skills --all` to see the full list.
258
260
 
@@ -264,12 +266,15 @@ Novahiz auto-registers external MCP servers based on the prompt category:
264
266
 
265
267
  | Provider | Package | License | Categories |
266
268
  |----------|---------|---------|------------|
267
- | context7 | `@upstash/context7-mcp` | MIT | code, research |
269
+ | context7 | `@upstash/context7-mcp` | MIT | code |
268
270
  | narsil | `narsil-mcp` | MIT OR Apache-2.0 | code, review |
269
271
  | novahiz | local (`mcp/novahiz-tools`) | Apache-2.0 | code, planning |
270
272
  | playwright | `@playwright/mcp` | Apache-2.0 | browser, design-ui |
271
273
  | security | `security-mcp` | MIT | audit |
272
- | cron | `mcp-cron` | AGPL-3.0-only | devops |
274
+ | cron | `scheduler-mcp` (local venv clone) | MIT | devops |
275
+ | dart | `dart mcp-server` (Dart SDK) | BSD-3-Clause | code, debug, design-ui, flutter |
276
+
277
+ Skill packs (installed from official repos, never vendored): `flutter/agent-plugins` (25 skills), `dart-lang/skills` (15 skills), `expo/skills` (17 skills, the `expo-*` group only; `eas-*` paid services excluded). See [docs/PROVIDERS.md](docs/PROVIDERS.md).
273
278
 
274
279
  Upstream repositories and full provenance for MCP providers and opencode plugins: [docs/PROVIDERS.md](docs/PROVIDERS.md), [docs/HARNESSES.md](docs/HARNESSES.md), [NOTICE.md](NOTICE.md).
275
280
 
@@ -4,7 +4,7 @@ Novahiz keeps every decision in the CLI. An adapter only translates a harness ev
4
4
 
5
5
  ## opencode
6
6
 
7
- `adapters/opencode/novahiz.ts` is a plugin. It classifies each user message, injects the roadmap checklist and expected skills, tracks loaded skills per session, and calls `Novahiz gate` on `edit`, `write`, `patch`, `apply_patch`, `bash`, and `shell`. The gate requires `novahiz-humanizer`, `ui-slop-remover` and `ui-craft-rules` only on frontend design tasks (R13). It registers the MCP server through the plugin `config` hook, and persists every skill launch with `Novahiz session-load`.
7
+ `adapters/opencode/novahiz.ts` is a plugin. It classifies each user message, injects the roadmap checklist and expected skills, tracks loaded skills per session, and calls `Novahiz gate` on `edit`, `write`, `patch`, `apply_patch`, `bash`, and `shell`. The gate requires `novahiz-humanizer`, `ui-slop-remover` and `ui-craft-rules` only on frontend design tasks (R13), and `impeccable` on the same selectors (R14). It registers the MCP server through the plugin `config` hook, and persists every skill launch with `Novahiz session-load`.
8
8
 
9
9
  `adapters/opencode/agent/novahiz.md` is the primary agent. It carries `permission: { question: allow, plan_enter: allow }`, because opencode denies `question` to every agent by default and only its built-in `build` and `plan` agents re-allow it.
10
10
 
@@ -25,8 +25,8 @@ Work in this order for every request:
25
25
 
26
26
  Rules:
27
27
 
28
- - novahiz-humanizer, ui-slop-remover and ui-craft-rules are required only for frontend design tasks (R13-design-craft); impeccable is not installed.
28
+ - novahiz-humanizer, ui-slop-remover and ui-craft-rules are required only for frontend design tasks (R13-design-craft); impeccable is installed and required on the same design selectors (R14-impeccable). After creating or substantially changing UI, run its critique, an audit when warranted, and a polish pass before ship.
29
29
  - Load the Supabase skills for any Supabase work.
30
30
  - Be honest. Avoid false good ideas. Keep a critical stance. Zero simulation: never pretend to have run, tested, or verified something you did not.
31
31
  - Criticize the request when it is inconsistent, ambiguous, risky, or suboptimal, and propose an alternative.
32
- - If the gate blocks you, load the missing skills it names, then retry. Do not try to route around the gate with a shell write.
32
+ - Gate auto-repair: when a call fails with "Novahiz gate blocked", do not stop and do not ask the user. Execute the AUTO-REPAIR block from the error verbatim: load every skill it names with `skill({ name: "..." })`, then retry the exact same call once and continue the user's task where it left off. If the identical skills are reported missing again, the loads did not register — run `novahiz doctor`, report honestly to the user, and stop. Never bypass the gate with a shell write, an alternate tool, or NOVAHIZ_GATE.
@@ -29,7 +29,8 @@ Playwright uses a **persistent profile** that preserves data across sessions (co
29
29
  ## Behavioral & Quality Rules
30
30
 
31
31
  1. **Mandatory design skills on frontend design tasks** — `novahiz-humanizer`, `ui-slop-remover` and `ui-craft-rules` are required only on frontend design work (design-ui prompts and style files). Load them with `skill({name})` before any design edit. Outside design, they are not required by the gate. Browser tasks (navigation, search, extraction) proceed as direct actions without a roadmap.
32
- 2. **Supabase** — On any Supabase task (database, auth, RLS, Edge Functions, migrations, Storage, Realtime, CLI/MCP), load the `novahiz-supabase` and `novahiz-postgres` skills before acting.
32
+ 2. **Impeccable after UI work** — `impeccable` is installed and required on the same design selectors (gate rule R14). Whenever a page, component, section, or screen design is created or substantially changed, run its critique systematically afterwards, an audit when the change warrants it (a11y, performance, responsive), and a polish pass before shipping. The design-ui roadmap carries optional `impeccable-critique`, `impeccable-audit`, and `impeccable-polish` steps for exactly this.
33
+ 3. **Supabase** — On any Supabase task (database, auth, RLS, Edge Functions, migrations, Storage, Realtime, CLI/MCP), load the `novahiz-supabase` and `novahiz-postgres` skills before acting.
33
34
  5. **Honesty and critical thinking** — Always be honest. Avoid false good ideas. Maintain critical thinking. **Zero simulation objective:** never claim to have executed, tested, or verified what was not. Explicitly report uncertainties and assumptions.
34
35
  6. **Propose next steps** — After completing a task, always honestly propose the relevant next step. Do not invent unnecessary work or mask failures.
35
36
  7. **Challenge the request** — Take the initiative to question the user's request when it is inconsistent, ambiguous, risky, or suboptimal. Explain why and propose an alternative.