@aigis-ai/cli 1.0.3 → 2.0.2

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 (47) hide show
  1. package/CONTRIBUTING.md +53 -0
  2. package/README.md +58 -188
  3. package/SKILL.md +20 -55
  4. package/aigis-ai-cli-2.0.1.tgz +0 -0
  5. package/bin/aigis.js +446 -59
  6. package/content/index/audit-scan.md +21 -207
  7. package/content/index/auto-verify-rules.json +439 -0
  8. package/content/index/context-rules.json +90 -0
  9. package/content/resolvers/triggers.json +229 -0
  10. package/content/{implement → skills/areas}/audit-logging.md +5 -0
  11. package/content/skills/areas/fallback-patterns.md +200 -0
  12. package/content/skills/areas/input-validation.md +380 -0
  13. package/content/skills/areas/pii-handling.md +189 -0
  14. package/content/skills/areas/rate-limiting.md +246 -0
  15. package/content/skills/core.md +62 -0
  16. package/content/skills/infrastructure/logging.md +202 -0
  17. package/content/skills/infrastructure/rate-limiting.md +169 -0
  18. package/content/skills/infrastructure/secrets.md +167 -0
  19. package/content/skills/workflows/fastapi-llm.md +86 -0
  20. package/docs/resolvers.md +114 -0
  21. package/lib/auto-verify.js +378 -0
  22. package/lib/build.js +629 -0
  23. package/lib/checksum.js +39 -0
  24. package/lib/fetch.js +164 -9
  25. package/lib/init.js +141 -93
  26. package/lib/keywords.js +92 -130
  27. package/lib/special-recognizers.js +370 -0
  28. package/package.json +1 -1
  29. package/scripts/baseline-cursorrules.snapshot.txt +30 -0
  30. package/scripts/bootstrap-step-6-bench.js +85 -0
  31. package/scripts/check-content-sync.js +91 -0
  32. package/scripts/triggers.schema.json +50 -0
  33. package/scripts/validate-triggers.js +176 -0
  34. package/content/implement/fallback-patterns.md +0 -190
  35. package/content/implement/input-validation.md +0 -212
  36. package/content/implement/pii-handling.md +0 -207
  37. package/content/implement/rate-limiting.md +0 -217
  38. /package/content/{implement → skills/areas}/bias-monitoring.md +0 -0
  39. /package/content/{implement → skills/areas}/confidence-scoring.md +0 -0
  40. /package/content/{implement → skills/areas}/data-integrity.md +0 -0
  41. /package/content/{implement → skills/areas}/explainability.md +0 -0
  42. /package/content/{implement → skills/areas}/human-oversight.md +0 -0
  43. /package/content/{implement → skills/areas}/monitoring.md +0 -0
  44. /package/content/{implement → skills/areas}/output-sanitization.md +0 -0
  45. /package/content/{implement → skills/areas}/prompt-security.md +0 -0
  46. /package/content/{implement → skills/areas}/rag-security.md +0 -0
  47. /package/content/{implement → skills/areas}/supply-chain.md +0 -0
@@ -0,0 +1,53 @@
1
+ # Contributing to Aigis
2
+
3
+ Thanks for your interest in contributing. This guide is short on purpose — most contributions follow one of a few well-trodden paths.
4
+
5
+ ## Where to put what
6
+
7
+ - **Governance pattern content** (the procedures agents follow): `content/skills/areas/<id>.md`
8
+ - **Workflow scaffolding** (canonical file layouts per project type): `content/skills/workflows/<type>.md`
9
+ - **Trigger mappings** (natural-language → trait): `content/resolvers/triggers.json` — see [Trigger mappings](#trigger-mappings) below.
10
+ - **Verification checklists** (used by `aigis verify`): `content/verify/checklist-<id>.md`
11
+ - **Auto-verify rules** (deterministic scanner patterns): `content/index/auto-verify-rules.json`
12
+ - **CLI behavior**: `bin/aigis.js` and `lib/*.js`
13
+
14
+ ## Trigger mappings
15
+
16
+ To add or modify entries in `content/resolvers/triggers.json`:
17
+
18
+ 1. Read [`docs/resolvers.md`](docs/resolvers.md) — the tier rule and curation policy.
19
+ 2. Pick a tier per the decision rule. When in doubt, low-confidence.
20
+ 3. Insert the entry alphabetically within the appropriate tier (case-insensitive sort).
21
+ 4. Run validation locally: `node scripts/validate-triggers.js`
22
+ 5. Open a PR using `.github/PULL_REQUEST_TEMPLATE/trigger_mapping.md`.
23
+
24
+ **The use-case requirement is non-negotiable.** Every trigger PR includes a one-sentence real use case (`"I'm building X and I needed this trigger because Y."`). PRs without a real use case are closed. We curate based on actual demand, not theoretical taxonomy completeness.
25
+
26
+ The PR template enforces structure; CI runs four validations on the JSON via `.github/workflows/triggers-validation.yml`.
27
+
28
+ ## CLI / library changes
29
+
30
+ - Add CLI-deterministic tests next to the change. Where existing tests exist (e.g., `test/checksum-determinism.test.js`), follow their pattern.
31
+ - Backward compatibility: not promised across alpha releases. After v2.0 final ships, breaking changes go through a deprecation notice and a major version bump.
32
+ - Python CLI mirrors the JS CLI structurally (see `cli-python/aigis_cli/`). Functional parity is best-effort; JS is the primary runtime for the v2.0 benchmark.
33
+
34
+ ## Running aigis from this checkout
35
+
36
+ ```
37
+ git clone <repo>
38
+ cd aigis-cli
39
+ npm install
40
+ npm link # makes the in-repo build the global `aigis`
41
+ aigis --version # confirms you're on the branch's version
42
+ ```
43
+
44
+ To restore the published version: `npm unlink -g @aigis-ai/cli && npm install -g @aigis-ai/cli`.
45
+
46
+ ## Tests
47
+
48
+ ```
49
+ node scripts/validate-triggers.js # JSON validation (schema, traits, prompts, ordering)
50
+ node test/checksum-determinism.test.js # checksum reproducibility
51
+ ```
52
+
53
+ (Test runner is the standard Node test runner via the `test:` script in `package.json`. We do not use a heavyweight test framework.)
package/README.md CHANGED
@@ -1,236 +1,106 @@
1
1
  # Aigis
2
2
 
3
- AI governance guardrails for coding agents. Curated, agent-consumable security and compliance patterns from NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001.
3
+ **AI governance that ships with your code.**
4
4
 
5
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
- [![npm](https://img.shields.io/npm/v/@aigis-ai/cli)](https://www.npmjs.com/package/@aigis-ai/cli)
7
- [![PyPI](https://img.shields.io/pypi/v/aigis-cli)](https://pypi.org/project/aigis-cli/)
8
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
9
- [![Python](https://img.shields.io/badge/python-%3E%3D3.9-blue)](https://www.python.org/)
5
+ Aigis is a command-line tool that gives coding agents like Cursor, Claude Code, GitHub Copilot, and Windsurf curated AI governance patterns mapped to NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001.
10
6
 
11
- ## The problem
7
+ You describe what you're building. Aigis classifies it against the frameworks that apply. Your agent pulls the right governance patterns and implements them. One command verifies the result.
12
8
 
13
- Coding agents hallucinate security patterns and build AI systems without governance controls. When your agent writes an LLM-powered endpoint, it doesn't know about prompt injection, PII redaction, bias monitoring, or the compliance documentation your organization needs.
14
-
15
- ## What Aigis does
16
-
17
- Aigis gives your coding agent curated governance patterns it can fetch via a simple CLI. The agent reads the patterns, applies them when writing code, and verifies its own output against checklists — all mapped to real framework control IDs.
18
-
19
- ```
20
- Without Aigis With Aigis
21
- ─────────────────── ─────────────────
22
- Agent writes LLM code Agent classifies the system
23
- No input validation Fetches governance patterns
24
- No PII redaction Writes code with controls built in
25
- No audit logging Self-verifies against checklists
26
- Compliance team finds gaps later Compliance documentation generated alongside code
27
- Rework cycle Ships compliant on first pass
28
- ```
29
-
30
- ## Quick start
31
-
32
- Install the CLI with **npm** (JavaScript / Node.js) or **pip** (Python). Both packages expose the same `aigis` command and behavior.
33
-
34
- **JavaScript developers — npm**
9
+ ## Install
35
10
 
36
11
  ```bash
37
12
  npm install -g @aigis-ai/cli
13
+ # or
14
+ pip install aigis-cli
38
15
  ```
39
16
 
40
- **Python developers — pip**
17
+ Verify:
41
18
 
42
19
  ```bash
43
- pip install aigis-cli
20
+ aigis --version
21
+ # 2.0.1
44
22
  ```
45
23
 
46
- **After installing (either toolchain)**
24
+ ## Quick start
47
25
 
48
26
  ```bash
49
- # Set up for your IDE
50
- aigis init cursor # or: claude-code, windsurf, copilot
51
-
52
- # Classify your system
53
- aigis classify --traits uses-llm,accepts-user-input,processes-pii,is-external
54
-
55
- # Fetch patterns
56
- aigis get input-validation pii-handling audit-logging
57
-
58
- # After writing code, verify
59
- aigis verify input-validation pii-handling audit-logging
60
-
61
- # Generate compliance documentation (if HIGH/MEDIUM risk)
62
- aigis template ai-impact-assessment intended-purpose-doc
27
+ aigis build "customer support chatbot with order history lookup"
63
28
  ```
64
29
 
65
- ## How it works
66
-
67
- Aigis has three layers:
30
+ Aigis will classify the description against NIST, OWASP, and ISO frameworks, identify relevant governance areas (PII handling, rate limiting, audit logging, prompt security), and produce a consolidated brief your agent can implement from.
68
31
 
69
- **1. Classify** — Describe what you're building using 22 system traits. Aigis determines the risk tier (HIGH/MEDIUM/LOW) and tells you which governance files to fetch.
70
-
71
- **2. Implement** — Fetch the relevant pattern files. Each file contains concrete code patterns (Python + JavaScript) for one security/governance concern, tagged with NIST, OWASP, and ISO control IDs.
72
-
73
- **3. Verify** — After writing code, fetch the matching checklists. The agent evaluates its own code against each check and reports PASS/FAIL with evidence.
74
-
75
- ## Commands
76
-
77
- | Command | Purpose |
78
- |---------|---------|
79
- | `aigis classify --traits <list>` | Classify system, get risk tier and recommended files |
80
- | `aigis classify "<description>"` | Same, using natural language (keyword matching) |
81
- | `aigis get <id> [id...]` | Fetch implementation pattern files |
82
- | `aigis get <id> --lang py\|js` | Fetch filtered to one language |
83
- | `aigis verify <id> [id...]` | Fetch verification checklists |
84
- | `aigis template <id> [id...]` | Fetch compliance documentation templates |
85
- | `aigis audit --scan` | Get structured prompt for auditing existing codebases |
86
- | `aigis audit --traits <list>` | Run full audit (classify + all checklists bundled) |
87
- | `aigis search <query>` | Search content by keyword or control ID |
88
- | `aigis search --list` | List all available files |
89
- | `aigis annotate <id> "<note>"` | Attach a local note for future sessions |
90
- | `aigis init <ide>` | Set up for cursor, claude-code, windsurf, or copilot |
91
- | `aigis traits` | List all 22 classification traits |
92
-
93
- ## Classification traits (22)
94
-
95
- **AI architecture:** uses-llm, uses-rag, uses-finetuned, uses-thirdparty-api, is-agentic, is-multimodal
96
-
97
- **Data sensitivity:** processes-pii, handles-financial, handles-health, handles-proprietary, handles-minors
98
-
99
- **Impact scope:** influences-decisions, accepts-user-input, is-external, is-internal, is-high-volume
100
-
101
- **Output type:** generates-code, generates-content, multi-model-pipeline
102
-
103
- **Jurisdiction:** jurisdiction-eu, jurisdiction-us-regulated, jurisdiction-global
104
-
105
- ## Governance content (15 pattern files)
106
-
107
- Each file covers one security/governance concern with Python + JavaScript code patterns, anti-patterns, edge cases, and cross-references to related files.
108
-
109
- | File | OWASP | What it covers |
110
- |------|-------|----------------|
111
- | input-validation | LLM01 | Sanitization, length limits, prompt separation, schema enforcement, injection detection |
112
- | output-sanitization | LLM05 | HTML encoding, parameterized queries, code sandboxing, content type validation |
113
- | pii-handling | LLM02 | PII detection/redaction, data minimization, output filtering, separated storage |
114
- | prompt-security | LLM07 | No secrets in prompts, minimal prompts, leakage detection, server-side enforcement |
115
- | human-oversight | LLM06 | Tool allowlists, approval gates, action rate limiting, override mechanisms |
116
- | supply-chain | LLM03 | Model version pinning, regression testing, fallback providers, version tracking |
117
- | data-integrity | LLM04 | Data provenance, RAG validation, checksums, distribution monitoring, batch rollback |
118
- | rag-security | LLM08 | Vector DB access control, tenant isolation, context validation, permission inheritance |
119
- | confidence-scoring | LLM09 | Confidence metadata, grounding verification, recommendation framing |
120
- | rate-limiting | LLM10 | Per-user limits, token budgets, cost monitoring, request timeouts |
121
- | audit-logging | — | Structured entries, trace ID propagation, decision records |
122
- | bias-monitoring | — | Fairness metadata, distribution monitoring, periodic reports |
123
- | fallback-patterns | — | Default safe responses, circuit breakers, kill switches |
124
- | monitoring | — | Key metrics, drift detection, user feedback, incident logging |
125
- | explainability | — | Decision explanations, model cards, audit-friendly records |
126
-
127
- ## Compliance templates (4)
128
-
129
- | Template | Framework | When required |
130
- |----------|-----------|---------------|
131
- | ai-impact-assessment | ISO 42001 Clause 8.4 | HIGH risk, EU jurisdiction, decisions about individuals |
132
- | intended-purpose-doc | NIST MAP 1.1 | HIGH and MEDIUM risk |
133
- | risk-characterization | NIST MAP 5.1 | HIGH risk |
134
- | third-party-assessment | GOVERN 6 / LLM03 | Third-party API at MEDIUM or HIGH risk |
135
-
136
- ## Auditing existing projects
137
-
138
- Aigis can audit codebases that already exist, not just new code:
32
+ Paste the brief into your coding agent's chat. The agent implements the patterns. Then:
139
33
 
140
34
  ```bash
141
- # Get the structured scan prompt
142
- aigis audit --scan
143
-
144
- # The agent scans the codebase following the prompt, detects traits, then:
145
- aigis audit --traits uses-llm,processes-pii,is-external
146
-
147
- # Output: classification + all relevant checklists
148
- # Agent evaluates existing code against each check → gap report
35
+ aigis verify <area> --auto .
149
36
  ```
150
37
 
151
- ## Self-improving agents
38
+ Runs deterministic checks on the implementation.
152
39
 
153
- Aigis supports a learning loop where agents get smarter over time:
40
+ ## What's new in v2.0
154
41
 
155
- ```bash
156
- # Agent discovers a workaround during coding
157
- aigis annotate input-validation "Needs raw body for webhook verification"
42
+ - **`aigis build`** — new command that produces one consolidated governance brief per project
43
+ - **Infrastructure content** — production-ready patterns for rate limiting, secrets management, and structured logging
44
+ - **Curated resolver** — 39 high-signal triggers mapped to traits, with interactive confirmation for low-confidence matches
45
+ - **Content architecture redesign** — areas, workflows, and infrastructure separated into layered skills, built around how modern AI agents actually read context
158
46
 
159
- # Next session, the annotation appears automatically
160
- aigis get input-validation
161
- # ... content includes annotation at the bottom
162
- ```
47
+ ## How Aigis is different
163
48
 
164
- ## Agent-agnostic design
49
+ **Structured.** Aigis is a compiler for agent instructions, not a prompt. The resolver uses deterministic rules. The procedures have explicit verification checkpoints. Brief generation is fully deterministic — same description produces byte-identical output.
165
50
 
166
- Aigis works with any coding agent that can execute shell commands:
51
+ **Honest.** Every iteration of v2.0 was benchmarked. The final numbers, against the same 10 descriptions:
167
52
 
168
- - **Cursor** — `aigis init cursor` writes `.cursorrules`
169
- - **Claude Code** — `aigis init claude-code` creates `~/.claude/skills/aigis/SKILL.md`
170
- - **Windsurf** — `aigis init windsurf` writes `.windsurfrules`
171
- - **GitHub Copilot** — `aigis init copilot` writes `.github/copilot-instructions.md`
172
- - **Any agent** — if it can run a terminal command and read stdout, it works
53
+ - Baseline (no Aigis): P=0.737, R=0.905, F1=0.790
54
+ - v2.0 (aigis build): P=0.847, R=0.851, F1=0.837
173
55
 
174
- ## Framework coverage
56
+ F1 beats baseline by +0.047. Precision improved by +15%. Methodology and per-run tables live in `benchmarks/`.
175
57
 
176
- Aigis maps every code pattern to specific control IDs across three frameworks:
58
+ **Open source.** Local. Never calls external LLMs. Never writes files to your project. Your code, your tools, your accountability.
177
59
 
178
- - **OWASP Top 10 for LLM Applications (2025)** — all 10 risks covered
179
- - **NIST AI Risk Management Framework (AI RMF 1.0)** — 25 subcategories mapped
180
- - **ISO/IEC 42001:2023** — 15 control references mapped
60
+ ## The principle behind Aigis
181
61
 
182
- Control IDs are in each file's YAML frontmatter, enabling compliance teams to trace code decisions back to framework requirements.
62
+ Governance isn't a content problem. It's an interface problem.
183
63
 
184
- ## Architecture
64
+ AI governance frameworks exist. NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001 — all rigorous, all published, all sitting in documents that engineering teams never read.
185
65
 
186
- The governance content lives under `content/` and is shared by both CLIs.
66
+ Aigis treats governance as an agent-computer interface problem. Context layered for on-demand loading. Deterministic rules where accuracy isn't negotiable. Flexible reasoning where real projects don't fit rigid templates.
187
67
 
188
- **npm package** [`@aigis-ai/cli`](https://www.npmjs.com/package/@aigis-ai/cli) (Node.js)
68
+ Inspired by [SWE-agent's work on agent-computer interfaces](https://arxiv.org/abs/2405.15793) — the idea that how information reaches an LM agent matters as much as what reaches it.
189
69
 
190
- ```
191
- @aigis-ai/cli
192
- ├── bin/aigis.js # CLI entry point (commander.js)
193
- ├── lib/
194
- │ ├── classify.js # Classification engine + guardrails
195
- │ ├── fetch.js # Content reader + annotation injection
196
- │ ├── keywords.js # Natural language → trait mapping
197
- │ ├── search.js # Content search
198
- │ ├── annotate.js # Local annotation store
199
- │ └── init.js # IDE setup
200
- ├── content/
201
- │ ├── implement/ # 15 governance pattern files
202
- │ ├── verify/ # 15 verification checklists
203
- │ ├── templates/ # 4 compliance doc templates
204
- │ └── index/ # Taxonomy, frameworks index, guardrails, audit scan
205
- ├── SKILL.md # Portable agent skill file
206
- └── package.json
70
+ ## Commands
71
+
72
+ ```bash
73
+ aigis build "<description>" # Generate governance brief (the main command)
74
+ aigis build "..." --list # List areas without full brief
75
+ aigis build "..." --compact # Pointer-only brief
76
+
77
+ aigis classify "<text>" # Classify traits from description
78
+ aigis get <area> # Fetch governance procedure for an area
79
+ aigis infra <area> # Fetch infrastructure pattern (rate-limiting, secrets, logging)
80
+ aigis workflow <type> # Fetch workflow template
81
+
82
+ aigis verify <area> --auto . # Run deterministic checks on your implementation
83
+ aigis audit . # Summary audit of all implemented areas
84
+ aigis search --list # List all available areas
207
85
  ```
208
86
 
209
- **PyPI package** [`aigis-cli`](https://pypi.org/project/aigis-cli/) (Python)
87
+ Run `aigis --help` for full options.
210
88
 
211
- ```
212
- cli-python/
213
- ├── pyproject.toml
214
- └── aigis_cli/ # click + rich + python-frontmatter; mirrors the JS CLI
215
- ├── cli.py
216
- ├── classify.py, fetch.py, keywords.py, search.py, annotate.py, init_ide.py
217
- ├── content/ # same markdown + JSON as above (bundled as package data)
218
- └── SKILL.md
219
- ```
89
+ ## Supported agents
90
+
91
+ - Cursor
92
+ - Claude Code
93
+ - GitHub Copilot
94
+ - Windsurf
220
95
 
221
- No network calls. No telemetry. No LLM API calls. No databases. Everything runs locally, reads local files, prints to stdout.
96
+ Run `aigis init <ide>` to set up your IDE rules. The resolver's trigger reference is embedded in the rules file with a checksum that automatically refreshes on `aigis init --refresh`.
222
97
 
223
98
  ## Contributing
224
99
 
225
- Content is plain markdown with YAML frontmatter, submitted as pull requests. See the existing files in `content/implement/` for the format.
100
+ Aigis is built around a curated trigger map for classification. Trigger contributions are welcome, with one-sentence use-case justification per the template in `.github/PULL_REQUEST_TEMPLATE/trigger_mapping.md`.
226
101
 
227
- To add a new governance pattern:
228
- 1. Create `content/implement/your-pattern.md` following the existing format
229
- 2. Create `content/verify/checklist-your-pattern.md` with verification checks
230
- 3. Add the pattern to the trait-to-file mapping in `content/index/taxonomy.md`
231
- 4. Add control IDs to the YAML frontmatter
232
- 5. Submit a PR
102
+ See `CONTRIBUTING.md` for the full contributor workflow, including how to add new governance areas, workflows, or infrastructure patterns.
233
103
 
234
104
  ## License
235
105
 
236
- [MIT](LICENSE)
106
+ MIT
package/SKILL.md CHANGED
@@ -1,70 +1,35 @@
1
1
  ---
2
2
  name: aigis
3
- description: AI governance skill for coding agents. Provides framework-aligned security and compliance patterns from NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001. Use before building any AI/LLM feature or when auditing existing AI systems.
3
+ description: AI governance for coding agents. Three-layer skill system — core / area / workflow. Use the aigis CLI to load skills on demand. Mapped to NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001.
4
4
  ---
5
5
 
6
- # Aigis — AI Governance Skill
6
+ # Aigis skill system
7
7
 
8
- Use the aigis CLI for governance patterns when building or auditing AI/LLM features.
8
+ Aigis ships skills in three layers. Agents load them on demand via the CLI, not by reading this file.
9
9
 
10
- ## Quick start — new feature
11
- 1. aigis classify --traits <relevant-traits> --json
12
- 2. For EACH file in the implement_files list, one at a time:
13
- a. aigis get <file-id>
14
- b. Implement the patterns in the code
15
- c. aigis verify <file-id>
16
- d. Fix any FAIL or PARTIAL items until all checks pass
17
- e. Move to the next file
18
- 3. After all files pass, generate required templates:
19
- aigis template <template-id>
10
+ ## Layers
20
11
 
21
- IMPORTANT: Do NOT fetch all implement files at once. Work through them one at a time. Implement fully and verify before moving to the next.
12
+ - **Core skill** — `content/skills/core.md`. Always loaded into the agent's context by `aigis init <ide>`. Orients the agent to the workflow + the four CLI commands. ~50 lines.
13
+ - **Area skills** — `content/skills/areas/<id>.md`, one per governance area (input-validation, pii-handling, etc.). 15 today. Loaded by `aigis get <id>` when classify points the agent at that area.
14
+ - **Workflow skills** — `content/skills/workflows/<type>.md`. Loaded by `aigis workflow <type>` after classify identifies the project shape. Step 5 ships `fastapi-llm`; future workflows: `express-llm`, `nextjs-llm`, `agentic`, `rag-service`.
22
15
 
23
- ## Quick start — audit existing project
24
- \`\`\`bash
25
- # 1. Get the structured audit scan prompt
26
- aigis audit --scan
16
+ ## How an agent uses Aigis
27
17
 
28
- # 2. Follow the scan instructions: inventory the project, detect traits, classify
18
+ After `aigis init` writes the core skill into the agent's rules file, the agent runs:
29
19
 
30
- # 3. Run the full audit with detected traits
31
- aigis audit --traits uses-llm,processes-pii,is-external
20
+ 1. `aigis classify` — get risk tier + recommended areas + workflow suggestion
21
+ 2. `aigis workflow <type>` — get the canonical file layout + wiring contracts
22
+ 3. `aigis get <area>` and `aigis verify <area> --auto .` per area, in order
32
23
 
33
- # 4. Evaluate existing code against each check, produce gap report
34
- \`\`\`
24
+ See `content/skills/core.md` for the full prose version that the agent sees.
35
25
 
36
- ## When to use
37
- - Before writing any LLM API call or AI feature (new code)
38
- - When auditing an existing AI system for governance gaps (existing code)
39
- - Before processing any sensitive data through an AI system
40
- - Before deploying any AI feature to production
41
- - When onboarding to a new AI project to understand what controls exist
26
+ ## Setup per IDE
42
27
 
43
- ## Commands
44
- - \`aigis classify --traits <comma-separated>\` — get risk tier and relevant files
45
- - \`aigis classify "<description>"\` — same, using natural language (keyword matching)
46
- - \`aigis get <file-id> [file-id...]\` — fetch implementation patterns (one or more)
47
- - \`aigis get <file-id> --lang py|js\` — fetch filtered to one language
48
- - \`aigis verify <file-id> [file-id...]\` — fetch verification checklists
49
- - \`aigis template <template-id> [template-id...]\` — fetch compliance documentation templates
50
- - \`aigis audit --scan\` — get structured audit prompt for scanning existing codebases
51
- - \`aigis audit --traits <comma-separated>\` — get bundled classification + all checklists for audit
52
- - \`aigis search <query>\` — search across all content by keyword or control ID
53
- - \`aigis search --list\` — list all available files
54
- - \`aigis annotate <file-id> "<note>"\` — attach a local note for future sessions
55
- - \`aigis annotate --list\` — list all annotations
56
- - \`aigis init cursor|claude-code|windsurf|copilot\` — set up aigis for your IDE
28
+ Run once in the project root:
57
29
 
58
- ## Available traits (22)
59
- AI architecture: uses-llm, uses-rag, uses-finetuned, uses-thirdparty-api, is-agentic, is-multimodal
60
- Data sensitivity: processes-pii, handles-financial, handles-health, handles-proprietary, handles-minors
61
- Impact scope: influences-decisions, accepts-user-input, is-external, is-internal, is-high-volume
62
- Output type: generates-code, generates-content, multi-model-pipeline
63
- Jurisdiction: jurisdiction-eu, jurisdiction-us-regulated, jurisdiction-global
30
+ - `aigis init cursor` — writes `.cursorrules`
31
+ - `aigis init claude-code` — writes `~/.claude/skills/aigis/SKILL.md`
32
+ - `aigis init windsurf` — writes `.windsurfrules`
33
+ - `aigis init copilot` — writes `.github/copilot-instructions.md`
64
34
 
65
- ## Integration
66
- - Claude Code: place this file in ~/.claude/skills/aigis/SKILL.md
67
- - Cursor: run \`aigis init cursor\` in your project root
68
- - Windsurf: run \`aigis init windsurf\` in your project root
69
- - GitHub Copilot: run \`aigis init copilot\` in your project root
70
- - Any agent: include aigis usage instructions in system prompt
35
+ All four destinations receive the same content: `content/skills/core.md`. Area and workflow skills load on demand; they are not pre-installed into the rules file.
Binary file