autosnippet 3.0.3 → 3.0.7

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 (45) hide show
  1. package/README.md +85 -240
  2. package/dashboard/dist/assets/{icons-Cdq22n2i.js → icons-eQ_rWCus.js} +97 -102
  3. package/dashboard/dist/assets/index-B3Nnkdxi.js +133 -0
  4. package/dashboard/dist/assets/index-BFNDAqh3.css +1 -0
  5. package/dashboard/dist/index.html +3 -3
  6. package/lib/core/AstAnalyzer.js +2 -2
  7. package/lib/core/ast/ensure-grammars.js +2 -0
  8. package/lib/core/ast/index.js +8 -0
  9. package/lib/core/ast/lang-rust.js +695 -0
  10. package/lib/core/discovery/PythonDiscoverer.js +3 -0
  11. package/lib/core/discovery/RustDiscoverer.js +467 -0
  12. package/lib/core/discovery/index.js +3 -0
  13. package/lib/core/enhancement/django-enhancement.js +169 -3
  14. package/lib/core/enhancement/fastapi-enhancement.js +149 -3
  15. package/lib/core/enhancement/go-grpc-enhancement.js +4 -0
  16. package/lib/core/enhancement/go-web-enhancement.js +6 -0
  17. package/lib/core/enhancement/index.js +5 -0
  18. package/lib/core/enhancement/langchain-enhancement.js +233 -0
  19. package/lib/core/enhancement/ml-enhancement.js +265 -0
  20. package/lib/core/enhancement/nextjs-enhancement.js +219 -0
  21. package/lib/core/enhancement/node-server-enhancement.js +178 -4
  22. package/lib/core/enhancement/react-enhancement.js +165 -4
  23. package/lib/core/enhancement/rust-tokio-enhancement.js +231 -0
  24. package/lib/core/enhancement/rust-web-enhancement.js +256 -0
  25. package/lib/core/enhancement/spring-enhancement.js +2 -0
  26. package/lib/core/enhancement/vue-enhancement.js +143 -2
  27. package/lib/external/ai/AiProvider.js +45 -6
  28. package/lib/external/mcp/handlers/bootstrap/skills.js +2 -0
  29. package/lib/external/mcp/handlers/bootstrap.js +33 -9
  30. package/lib/external/mcp/handlers/guard.js +42 -0
  31. package/lib/http/routes/candidates.js +7 -1
  32. package/lib/service/chat/ChatAgent.js +1 -0
  33. package/lib/service/chat/tools.js +5 -1
  34. package/lib/service/guard/ComplianceReporter.js +20 -7
  35. package/lib/service/guard/GuardCheckEngine.js +156 -5
  36. package/lib/service/guard/SourceFileCollector.js +15 -0
  37. package/package.json +28 -6
  38. package/skills/autosnippet-coldstart/SKILL.md +4 -2
  39. package/skills/autosnippet-concepts/SKILL.md +5 -3
  40. package/skills/autosnippet-reference-rust/SKILL.md +401 -0
  41. package/skills/autosnippet-structure/SKILL.md +1 -1
  42. package/templates/recipes-setup/README.md +2 -2
  43. package/templates/recipes-setup/_template.md +1 -1
  44. package/dashboard/dist/assets/index-ClkyPkDX.js +0 -133
  45. package/dashboard/dist/assets/index-t4QrJwv1.css +0 -1
package/README.md CHANGED
@@ -2,10 +2,7 @@
2
2
 
3
3
  # AutoSnippet
4
4
 
5
- **Knowledge Engine for CodeTurn your team's patterns into AI-searchable recipes.**
6
-
7
- Capture code patterns, best practices, and architecture decisions as a structured knowledge base.
8
- Then let Cursor, Copilot, Trae, Qoder, Xcode, and VS Code generate code that follows *your* standards.
5
+ Extract code patterns from your codebase into a knowledge base, and serve them to AI coding assistants in your IDE so generated code actually follows your team's conventions.
9
6
 
10
7
  [![npm version](https://img.shields.io/npm/v/autosnippet.svg?style=flat-square)](https://www.npmjs.com/package/autosnippet)
11
8
  [![License](https://img.shields.io/npm/l/autosnippet.svg?style=flat-square)](https://github.com/GxFn/AutoSnippet/blob/main/LICENSE)
@@ -17,56 +14,38 @@ Then let Cursor, Copilot, Trae, Qoder, Xcode, and VS Code generate code that fol
17
14
 
18
15
  ---
19
16
 
20
- ## The Problem
17
+ ## Why
21
18
 
22
- AI coding assistants generate code in a vacuum they don't know your team's conventions, architecture patterns, or coding standards. Every AI-generated PR becomes a review burden.
19
+ Copilot and Cursor don't know how your team writes code. They'll generate something that works, but it won't look like yours — wrong naming, wrong patterns, wrong abstractions. You end up rewriting the AI's output or explaining the same conventions in every PR review.
23
20
 
24
- **AutoSnippet** bridges this gap by building a living knowledge base inside your project, making your team's expertise queryable by any AI tool.
21
+ AutoSnippet fixes this. It scans your codebase, extracts the patterns that matter (with your approval), and makes them available to any AI tool via [MCP](https://modelcontextprotocol.io/). Next time Cursor generates code, it actually follows your conventions.
25
22
 
26
23
  ```
27
- Your Codebase ──→ AI Scan & Extract ──→ Human Review ──→ Knowledge Base (Recipes)
28
-
29
- ┌─────────────────────────────────────────────────────┘
30
-
31
- Cursor / Copilot / Trae / Qoder / Xcode / VS Code
32
-
33
- Code generated following YOUR standards
24
+ Your code AI extracts patterns You review Knowledge base
25
+
26
+ Cursor / Copilot / VS Code / Xcode
27
+
28
+ AI follows your patterns
34
29
  ```
35
30
 
36
- ## Key Concepts
37
-
38
- | Concept | Description |
39
- |---------|-------------|
40
- | **Recipe** | The atomic unit of knowledge — a code pattern + explanation + metadata. Stored as Markdown in `AutoSnippet/recipes/`, cached in SQLite for fast retrieval |
41
- | **Candidate** | A pending knowledge entry awaiting human review — from AI scans, manual submission, or bootstrap. Promoted to Recipe after approval |
42
- | **Guard** | Code compliance engine — checks source files against knowledge-derived rules at file, target, or project scope |
43
- | **Skill** | Agent instruction sets (18 built-in) — guide AI agents to correctly invoke knowledge base operations |
44
- | **Bootstrap** | Cold-start engine — 9-dimension heuristic scan + dual-agent AI analysis, generating dozens of candidates in one pass |
45
-
46
- ## Quick Start
31
+ ## Get Started
47
32
 
48
33
  ```bash
49
- # Install globally
50
34
  npm install -g autosnippet
51
35
 
52
- # Initialize in your project
53
- cd /path/to/your-project
54
- asd setup # Creates workspace, DB, IDE integrations, installs VS Code extension
55
-
56
- # Cold-start: scan your codebase and extract patterns
57
- asd coldstart # 9-dimension AI analysis → Candidates
58
-
59
- # Launch Dashboard to review and manage knowledge
60
- asd ui # Web dashboard + API server
36
+ cd your-project
37
+ asd setup # workspace + DB + IDE configs (Cursor, VS Code, Trae, Qoder)
38
+ asd coldstart # scans your code, generates pattern candidates
39
+ asd ui # open the dashboard to review what was found
61
40
  ```
62
41
 
63
- > **Important**: Always run `asd` commands inside your project directory, not in the AutoSnippet source repo.
42
+ That's it. After you approve some candidates, they become **Recipes** structured knowledge entries that your IDE's AI can query in real time.
64
43
 
65
44
  ## How It Works
66
45
 
67
46
  ```
68
47
  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
69
- │ ① Setup │──→ │ ② Cold │──→ │ ③ Target │──→ │ ④ Review │──→ │ ⑤ IDE │
48
+ │ ① Setup │──→ │ ② Cold │──→ │ ③ Target │──→ │ ④ Revie │──→ │ ⑤ IDE │
70
49
  │ asd setup │ │ Start │ │ Scan │ │ Dashboard │ │ Delivery │
71
50
  └────────────┘ └────────────┘ └────────────┘ └────────────┘ └─────┬──────┘
72
51
 
@@ -78,250 +57,116 @@ asd ui # Web dashboard + API server
78
57
  └────────────┘ └────────────┘
79
58
  ```
80
59
 
81
- 1. **Setup** — `asd setup` creates the workspace structure, SQLite database, MCP configs for Cursor/VS Code/Qoder/Trae, and installs the VS Code extension
82
- 2. **Cold Start**Bootstrap engine scans your codebase across 9 dimensions (architecture, naming, networking, data flow, error handling, etc.) using a dual-agent system (Analyst Producer)
83
- 3. **Target Scan** — `asd ais <target>` performs focused extraction on specific modules
84
- 4. **Review** — Dashboard provides card-based review UI with AI confidence scoring, batch approve/reject, and inline editing
85
- 5. **IDE Delivery** — Recipes are delivered via MCP tools (real-time), Cursor Rules (`.cursor/rules/`), and Agent Skills
86
- 6. **AI Generation** — IDE AI assistants query the knowledge base and generate code following your team's patterns
87
- 7. **Continuous Capture** — File watchers detect new patterns, creating a feedback loop
88
-
89
- ## Features
90
-
91
- ### 🔍 Multi-Strategy Search Engine
92
-
93
- 4-layer retrieval funnel with 5 search modes:
94
-
95
- | Layer | Strategy | Purpose |
96
- |-------|----------|---------|
97
- | L1 | Inverted Index + BM25 | Fast keyword recall with CJK support |
98
- | L2 | Cross-Encoder Reranker | AI-powered semantic reranking |
99
- | L2.5 | Coarse Ranker (E-E-A-T) | 5-dimension quality scoring |
100
- | L3 | Multi-Signal Ranker | 6-signal weighted ranking (relevance, authority, recency, popularity, difficulty, seasonality) |
60
+ 1. **`asd setup`** Creates the workspace, SQLite DB, MCP configs for your IDEs, installs the VS Code extension.
61
+ 2. **`asd coldstart`**Scans your codebase from multiple angles (architecture, naming, error handling, etc.). Produces **Candidates** pattern drafts for you to review.
62
+ 3. **Review in Dashboard** — Approve, edit, or reject. Approved candidates become Recipes.
63
+ 4. **IDE picks them up** — Via MCP, Cursor Rules, or Agent Skills. When AI generates code, it checks your Recipes first.
64
+ 5. **Keep going** — As you write new code, scan again. The knowledge base grows with your project.
101
65
 
102
- ### 🤖 AI Integration (6 Providers)
66
+ You can also scan specific modules with `asd ais <target>`. Better yet, just describe what you want in Cursor using natural language — the AI will automatically invoke the knowledge base to scan and submit patterns for you.
103
67
 
104
- | Provider | Notes |
105
- |----------|-------|
106
- | Google Gemini | Native tool calling + structured output |
107
- | OpenAI | GPT-4o, GPT-4, etc. |
108
- | Claude (Anthropic) | Native tool calling |
109
- | DeepSeek | OpenAI-compatible |
110
- | Ollama | Local models, no API key needed |
111
- | Mock | Auto-fallback when no AI configured |
68
+ ## What's in the Box
112
69
 
113
- Auto-detection, priority-based fallback, and context window adaptation.
70
+ **Pattern extraction** — AI reads your code, identifies reusable patterns, and structures them as Recipes with code, explanation, metadata, and usage guidelines. Supports ObjC, Swift, TypeScript, JavaScript, Python, Java, Kotlin, Go, Ruby (9 languages via Tree-sitter AST).
114
71
 
115
- ### 🛡️ Guard Code Compliance
72
+ **Search** BM25 keyword matching → semantic reranking → quality scoring → multi-signal ranking. Works in Chinese and English.
116
73
 
117
- - **Regex + AST semantic rules** (mustCallThrough, mustNotUseInContext, mustConformToProtocol)
118
- - **3 scopes**: file / target / project
119
- - **CI/CD ready**: `asd guard:ci` with Quality Gate, `asd guard:staged` for pre-commit hooks
120
- - **Rule learning**: Auto-suggest rules from violation patterns (14-day effectiveness tracking)
121
- - **Feedback loop**: Guard violations → Recipe usage confirmation
74
+ **Guard** Regex and AST-based compliance rules derived from your Recipes. Run on files, modules, or the whole project. Hooks into CI with `asd guard:ci` and git pre-commit with `asd guard:staged`.
122
75
 
123
- ### 📊 Dashboard (18 Views)
76
+ **Dashboard** Web UI (`asd ui`) for everything: browsing Recipes, reviewing Candidates, AI chat, knowledge graph visualization, Guard reports, module explorer, project wiki generation, and LLM config.
124
77
 
125
- Full-featured web UI launched with `asd ui`:
78
+ **IDE integration** MCP server (works with Cursor, VS Code, Qoder, Trae), VS Code extension (search, directives, CodeLens, Guard), Xcode support (file watcher, auto-insertion, snippet sync).
126
79
 
127
- - **Knowledge Management** — Recipe browser, candidate review, batch operations
128
- - **AI Chat** — ReAct-loop conversation with 54 internal tools
129
- - **Knowledge Graph** — Visual relationship explorer
130
- - **Guard Dashboard** — Rule management, violation tracking, compliance reports
131
- - **SPM / Module Explorer** — Dependency analysis across language ecosystems
132
- - **Wiki Generator** — Auto-generated project documentation with Mermaid diagrams
133
- - **Bootstrap Progress** — Real-time 9-dimension progress with time estimates
134
- - **Skills Manager** — Browse, create, and manage agent skills
135
- - **LLM Config** — Visual AI provider/model/key configuration
80
+ **AI providers** — Google Gemini, OpenAI, Claude, DeepSeek, Ollama (local), with auto-fallback between them. Or no AI at all — the knowledge base works without it.
136
81
 
137
- ### 🔌 IDE Integrations
82
+ ## File Directives
138
83
 
139
- #### MCP Server (16 Tools)
84
+ Write these in any source file:
140
85
 
141
- Works with any MCP-compatible IDE (Cursor, VS Code Copilot, Qoder, Trae):
142
-
143
- ```bash
144
- # Automatically configured by asd setup
145
- # Or manually: asd setup:mcp
146
86
  ```
147
-
148
- 12 Agent-tier tools (search, knowledge, structure, graph, guard, submit, skills, bootstrap, etc.) + 4 Admin tools.
149
-
150
- #### VS Code Extension
151
-
152
- Installed automatically by `asd setup`. Features:
153
-
154
- - **Search & Insert** — `Cmd+Shift+F5` opens QuickPick with code preview, inserts at cursor
155
- - **Directive Detection** — Auto-detects `// as:s`, `// as:c`, `// as:a` directives on save
156
- - **CodeLens** — Inline action buttons above directives
157
- - **Guard Audit** — Run compliance checks on files or entire project
158
- - **Create Candidate** — Submit selected code as a knowledge candidate
159
- - **Status Bar** — Real-time API server connection indicator
160
-
161
- #### Xcode Integration
162
-
163
- - **File Watcher** — `asd watch` monitors files for `// as:` directives
164
- - **Auto-Insertion** — osascript-driven code insertion preserving Undo history
165
- - **Header Management** — Automatic `#import`/`@import` deduplication with SPM-aware decisions
166
- - **Snippet Sync** — Export recipes as native Xcode `.codesnippet` files
167
-
168
- ### 📝 File Directives
169
-
170
- Write directives as comments in any source file:
171
-
172
- ```objc
173
- // as:s network request timeout → Search & insert matching recipe
174
- // as:c → Create candidate from surrounding code
175
- // as:c -c → Create candidate from clipboard
176
- // as:a → Run Guard audit on this file
177
- // as:include "MyHeader.h" → ObjC header import
178
- // as:import UIKit → Module import
87
+ // as:s network timeout Search recipes and insert the match
88
+ // as:c Create a candidate from surrounding code
89
+ // as:a Run Guard audit on this file
179
90
  ```
180
91
 
181
- ### 🧬 AST Analysis (9 Languages)
182
-
183
- Tree-sitter powered code intelligence:
184
-
185
- | Language | Capabilities |
186
- |----------|-------------|
187
- | Objective-C, Swift | Full: classes, protocols, categories, extensions, design patterns |
188
- | TypeScript, JavaScript, TSX | Classes, functions, React components, imports |
189
- | Python | Classes, functions, decorators, imports |
190
- | Java, Kotlin | Classes, interfaces, annotations |
191
- | Go | Structs, interfaces, functions |
192
-
193
- Plus 11 framework enhancement packs (React, Vue, Spring, Django, FastAPI, gRPC, Android, etc.).
194
-
195
- ### 🏛️ Constitution & Governance
196
-
197
- Three-layer permission model:
198
-
199
- 1. **Capability Layer** — `git push --dry-run` probes write access (physical signal)
200
- 2. **Role Layer** — 3 roles (developer / external_agent / chat_agent) with permission matrix
201
- 3. **Governance Layer** — 4 inviolable rules enforced by Constitution engine
202
-
203
- Every write operation passes through the Gateway: role check → constitution rules → audit log.
204
-
205
- ### 🧠 Agent Memory (4 Tiers)
206
-
207
- | Tier | Scope | Persistent | Purpose |
208
- |------|-------|-----------|---------|
209
- | Working Memory | Session | No | Scratchpad + context compression |
210
- | Episodic Memory | Cross-dimension | No | Discovery sharing between bootstrap dimensions |
211
- | Project Semantic Memory | Project | SQLite | Permanent facts, insights, preferences (importance scoring + TTL) |
212
- | Tool Result Cache | Cross-dimension | No | Deduplication of tool calls |
92
+ The VS Code extension and `asd watch` (Xcode) pick these up automatically.
213
93
 
214
- ## CLI Reference
94
+ ## CLI
215
95
 
216
- | Command | Description |
96
+ | Command | What it does |
217
97
  |---------|-------------|
218
- | `asd setup` | Initialize workspace, DB, IDE configs, install VS Code extension |
219
- | `asd coldstart` | Bootstrap knowledge base (9-dimension AI scan) |
220
- | `asd ais [target]` | AI scan source files → extract and publish recipes |
221
- | `asd ui` | Launch Dashboard + API server |
222
- | `asd watch` | Start Xcode file watcher for directives |
98
+ | `asd setup` | Init workspace, DB, IDE configs |
99
+ | `asd coldstart` | Full codebase scan candidates |
100
+ | `asd ais [target]` | Scan a specific module |
101
+ | `asd ui` | Dashboard + API server |
223
102
  | `asd search <query>` | Search knowledge base |
224
- | `asd guard <file>` | Run Guard compliance check |
225
- | `asd guard:ci` | CI/CD full-project Guard + Quality Gate |
226
- | `asd guard:staged` | Check git staged files (pre-commit hook) |
227
- | `asd sync` | Sync `recipes/*.md` SQLite database |
228
- | `asd upgrade` | Update IDE integrations (MCP, Skills, Rules) |
229
- | `asd cursor-rules` | Generate Cursor 4-channel delivery artifacts |
230
- | `asd server` | Start API server standalone |
231
- | `asd status` | Check environment health |
103
+ | `asd guard <file>` | Run compliance check |
104
+ | `asd guard:ci` | CI mode with quality gate |
105
+ | `asd guard:staged` | Pre-commit hook |
106
+ | `asd watch` | Xcode file watcher |
107
+ | `asd sync` | Sync recipe markdown DB |
108
+ | `asd upgrade` | Update IDE integrations |
109
+ | `asd status` | Health check |
232
110
 
233
- ## Architecture
111
+ ## Project Structure
112
+
113
+ After `asd setup`, your project gets:
234
114
 
235
115
  ```
236
- ┌─────────────────────────────────────────────────────────┐
237
- │ IDE Layer │
238
- Cursor VS Code │ Trae │ Qoder │ Xcode │ Dashboard │
239
- └────────────────────────┬────────────────────────────────┘
240
-
241
- ┌──────────┴──────────┐
242
- MCP Server (16) │──── HTTP API (REST + WebSocket)
243
- └──────────┬──────────┘
244
-
245
- ┌────────────────────────┴────────────────────────────────┐
246
- │ Service Layer │
247
- │ SearchEngine │ KnowledgeService │ GuardEngine │ Chat │
248
- │ Bootstrap │ WikiGenerator │ Skills │ SPM │
249
- └────────────────────────┬────────────────────────────────┘
250
-
251
- ┌────────────────────────┴────────────────────────────────┐
252
- │ Core Layer │
253
- │ AstAnalyzer (9 lang) │ KnowledgeGraph │ CodeEntityGraph│
254
- │ RetrievalFunnel │ QualityScorer │ ConfidenceRouter│
255
- └────────────────────────┬────────────────────────────────┘
256
-
257
- ┌────────────────────────┴────────────────────────────────┐
258
- │ Infrastructure Layer │
259
- │ SQLite │ VectorStore │ EventBus │ AuditLog │ Gateway │
260
- │ DI Container (40+ services) │ Constitution │ PathGuard │
261
- └─────────────────────────────────────────────────────────┘
116
+ your-project/
117
+ ├── AutoSnippet/ # Knowledge data (git-tracked)
118
+ ├── recipes/ # Approved patterns (Markdown)
119
+ │ ├── candidates/ # Pending review
120
+ └── skills/ # Project-specific agent instructions
121
+ ├── .autosnippet/ # Runtime cache (gitignored)
122
+ ├── autosnippet.db # SQLite
123
+ │ └── context/ # Vector index
124
+ ├── .cursor/mcp.json # Cursor MCP config
125
+ └── .vscode/mcp.json # VS Code MCP config
262
126
  ```
263
127
 
264
- ## Configuration
128
+ Recipes are Markdown files. SQLite is a read cache. If the DB breaks, `asd sync` rebuilds it.
265
129
 
266
- ### AI Provider Setup
130
+ ## Configuration
267
131
 
268
- Create `.env` in your project root (or configure via Dashboard → LLM Config):
132
+ Put a `.env` in your project root, or use Dashboard → LLM Config:
269
133
 
270
134
  ```env
271
- # Pick one (or more for fallback)
272
- ASD_GOOGLE_API_KEY=your-gemini-key
273
- ASD_OPENAI_API_KEY=your-openai-key
274
- ASD_CLAUDE_API_KEY=your-claude-key
275
- ASD_DEEPSEEK_API_KEY=your-deepseek-key
135
+ # Pick one (multiple = auto-fallback)
136
+ ASD_GOOGLE_API_KEY=...
137
+ ASD_OPENAI_API_KEY=...
138
+ ASD_CLAUDE_API_KEY=...
139
+ ASD_DEEPSEEK_API_KEY=...
276
140
 
277
- # Or use local Ollama (no key needed)
141
+ # Or run local
278
142
  ASD_AI_PROVIDER=ollama
279
143
  ASD_AI_MODEL=llama3
280
144
  ```
281
145
 
282
- ### Project Structure After Setup
146
+ ## Architecture
283
147
 
284
148
  ```
285
- your-project/
286
- ├── AutoSnippet/ # Core data (git sub-repo = Source of Truth)
287
- │ ├── constitution.yaml # Permission rules
288
- ├── recipes/ # Knowledge entries (Markdown)
289
- │ ├── candidates/ # Pending entries
290
- └── skills/ # Project-specific skills
291
- ├── .autosnippet/ # Runtime (gitignored)
292
- ├── config.json # Project config
293
- │ ├── autosnippet.db # SQLite cache
294
- │ └── context/ # Vector index cache
295
- ├── .cursor/ # Cursor IDE integration
296
- │ ├── mcp.json
297
- │ ├── rules/
298
- │ └── skills/
299
- └── .vscode/ # VS Code integration
300
- ├── mcp.json # MCP server config
301
- └── extensions.json # Recommended extensions
149
+ IDE Layer Cursor · VS Code · Trae · Qoder · Xcode · Dashboard
150
+
151
+ MCP Server + HTTP API
152
+
153
+ Service Layer Search · Knowledge · Guard · Chat · Bootstrap · Wiki
154
+
155
+ Core Layer AST (9 lang) · KnowledgeGraph · RetrievalFunnel · QualityScorer
156
+
157
+ Infrastructure SQLite · VectorStore · EventBus · AuditLog · DI Container (40+)
302
158
  ```
303
159
 
304
- ## Security
305
-
306
- - **PathGuard**: 2-layer boundary protection — blocks writes outside project root + whitelist-only allowed paths
307
- - **Constitution**: 4 inviolable rules enforced on every write operation
308
- - **Audit Trail**: Full audit logging with 90-day TTL auto-cleanup
309
- - **No External Calls in postinstall**: Build scripts are purely local (macOS Swift compilation)
310
- - **Gateway**: Every mutation goes through role verification → constitution check → audit log
311
-
312
160
  ## Requirements
313
161
 
314
- - **Node.js** ≥ 20.0.0
315
- - **macOS** recommended (required for Xcode integration; other platforms work without Xcode features)
316
- - **SQLite** via better-sqlite3 (bundled)
162
+ - Node.js ≥ 20
163
+ - macOS recommended (Xcode features need it; everything else is cross-platform)
164
+ - better-sqlite3 (bundled)
317
165
 
318
166
  ## Contributing
319
167
 
320
- Contributions are welcome. Please ensure:
321
-
322
- 1. Run `npm test` before submitting
323
- 2. Follow existing code patterns (ESM, domain-driven structure)
324
- 3. Guard rules and knowledge entries go through the standard review process
168
+ 1. `npm test` before submitting
169
+ 2. Follow existing patterns (ESM, domain-driven structure)
325
170
 
326
171
  ## License
327
172