@aigis-ai/cli 2.0.1 → 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 (82) hide show
  1. package/README.md +58 -188
  2. package/aigis-ai-cli-2.0.1.tgz +0 -0
  3. package/package.json +1 -1
  4. package/cli-python/LICENSE +0 -21
  5. package/cli-python/README.md +0 -32
  6. package/cli-python/aigis_cli/SKILL.md +0 -70
  7. package/cli-python/aigis_cli/__init__.py +0 -3
  8. package/cli-python/aigis_cli/__pycache__/__init__.cpython-313.pyc +0 -0
  9. package/cli-python/aigis_cli/__pycache__/annotate.cpython-313.pyc +0 -0
  10. package/cli-python/aigis_cli/__pycache__/build.cpython-313.pyc +0 -0
  11. package/cli-python/aigis_cli/__pycache__/checksum.cpython-313.pyc +0 -0
  12. package/cli-python/aigis_cli/__pycache__/classify.cpython-313.pyc +0 -0
  13. package/cli-python/aigis_cli/__pycache__/cli.cpython-313.pyc +0 -0
  14. package/cli-python/aigis_cli/__pycache__/fetch.cpython-313.pyc +0 -0
  15. package/cli-python/aigis_cli/__pycache__/init_ide.cpython-313.pyc +0 -0
  16. package/cli-python/aigis_cli/__pycache__/keywords.cpython-313.pyc +0 -0
  17. package/cli-python/aigis_cli/__pycache__/search.cpython-313.pyc +0 -0
  18. package/cli-python/aigis_cli/annotate.py +0 -45
  19. package/cli-python/aigis_cli/auto_verify.py +0 -518
  20. package/cli-python/aigis_cli/build.py +0 -470
  21. package/cli-python/aigis_cli/checksum.py +0 -22
  22. package/cli-python/aigis_cli/classify.py +0 -192
  23. package/cli-python/aigis_cli/cli.py +0 -618
  24. package/cli-python/aigis_cli/content/index/audit-scan.md +0 -217
  25. package/cli-python/aigis_cli/content/index/auto-verify-rules.json +0 -439
  26. package/cli-python/aigis_cli/content/index/context-rules.json +0 -90
  27. package/cli-python/aigis_cli/content/index/frameworks.md +0 -82
  28. package/cli-python/aigis_cli/content/index/guardrails.json +0 -23
  29. package/cli-python/aigis_cli/content/index/taxonomy.md +0 -81
  30. package/cli-python/aigis_cli/content/resolvers/triggers.json +0 -229
  31. package/cli-python/aigis_cli/content/skills/areas/audit-logging.md +0 -176
  32. package/cli-python/aigis_cli/content/skills/areas/bias-monitoring.md +0 -172
  33. package/cli-python/aigis_cli/content/skills/areas/confidence-scoring.md +0 -180
  34. package/cli-python/aigis_cli/content/skills/areas/data-integrity.md +0 -257
  35. package/cli-python/aigis_cli/content/skills/areas/explainability.md +0 -174
  36. package/cli-python/aigis_cli/content/skills/areas/fallback-patterns.md +0 -200
  37. package/cli-python/aigis_cli/content/skills/areas/human-oversight.md +0 -220
  38. package/cli-python/aigis_cli/content/skills/areas/input-validation.md +0 -380
  39. package/cli-python/aigis_cli/content/skills/areas/monitoring.md +0 -207
  40. package/cli-python/aigis_cli/content/skills/areas/output-sanitization.md +0 -183
  41. package/cli-python/aigis_cli/content/skills/areas/pii-handling.md +0 -189
  42. package/cli-python/aigis_cli/content/skills/areas/prompt-security.md +0 -153
  43. package/cli-python/aigis_cli/content/skills/areas/rag-security.md +0 -230
  44. package/cli-python/aigis_cli/content/skills/areas/rate-limiting.md +0 -246
  45. package/cli-python/aigis_cli/content/skills/areas/supply-chain.md +0 -193
  46. package/cli-python/aigis_cli/content/skills/core.md +0 -62
  47. package/cli-python/aigis_cli/content/skills/infrastructure/logging.md +0 -202
  48. package/cli-python/aigis_cli/content/skills/infrastructure/rate-limiting.md +0 -169
  49. package/cli-python/aigis_cli/content/skills/infrastructure/secrets.md +0 -167
  50. package/cli-python/aigis_cli/content/skills/workflows/fastapi-llm.md +0 -86
  51. package/cli-python/aigis_cli/content/templates/ai-impact-assessment.md +0 -54
  52. package/cli-python/aigis_cli/content/templates/intended-purpose-doc.md +0 -39
  53. package/cli-python/aigis_cli/content/templates/risk-characterization.md +0 -34
  54. package/cli-python/aigis_cli/content/templates/third-party-assessment.md +0 -41
  55. package/cli-python/aigis_cli/content/verify/checklist-audit-logging.md +0 -13
  56. package/cli-python/aigis_cli/content/verify/checklist-bias-monitoring.md +0 -13
  57. package/cli-python/aigis_cli/content/verify/checklist-confidence-scoring.md +0 -13
  58. package/cli-python/aigis_cli/content/verify/checklist-data-integrity.md +0 -12
  59. package/cli-python/aigis_cli/content/verify/checklist-explainability.md +0 -13
  60. package/cli-python/aigis_cli/content/verify/checklist-fallback-patterns.md +0 -13
  61. package/cli-python/aigis_cli/content/verify/checklist-human-oversight.md +0 -14
  62. package/cli-python/aigis_cli/content/verify/checklist-input-validation.md +0 -16
  63. package/cli-python/aigis_cli/content/verify/checklist-monitoring.md +0 -13
  64. package/cli-python/aigis_cli/content/verify/checklist-output-sanitization.md +0 -14
  65. package/cli-python/aigis_cli/content/verify/checklist-pii-handling.md +0 -14
  66. package/cli-python/aigis_cli/content/verify/checklist-prompt-security.md +0 -13
  67. package/cli-python/aigis_cli/content/verify/checklist-rag-security.md +0 -12
  68. package/cli-python/aigis_cli/content/verify/checklist-rate-limiting.md +0 -13
  69. package/cli-python/aigis_cli/content/verify/checklist-supply-chain.md +0 -13
  70. package/cli-python/aigis_cli/fetch.py +0 -232
  71. package/cli-python/aigis_cli/init_ide.py +0 -159
  72. package/cli-python/aigis_cli/keywords.py +0 -73
  73. package/cli-python/aigis_cli/search.py +0 -69
  74. package/cli-python/aigis_cli.egg-info/PKG-INFO +0 -59
  75. package/cli-python/aigis_cli.egg-info/SOURCES.txt +0 -56
  76. package/cli-python/aigis_cli.egg-info/dependency_links.txt +0 -1
  77. package/cli-python/aigis_cli.egg-info/entry_points.txt +0 -2
  78. package/cli-python/aigis_cli.egg-info/requires.txt +0 -6
  79. package/cli-python/aigis_cli.egg-info/top_level.txt +0 -1
  80. package/cli-python/dist/aigis_cli-1.0.3-py3-none-any.whl +0 -0
  81. package/cli-python/dist/aigis_cli-1.0.3.tar.gz +0 -0
  82. package/cli-python/pyproject.toml +0 -49
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
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigis-ai/cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "AI governance guardrails for coding agents. Framework-aligned security and compliance patterns from NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001.",
5
5
  "main": "bin/aigis.js",
6
6
  "bin": {
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Nayan Kanaparthi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,32 +0,0 @@
1
- # aigis-cli (Python)
2
-
3
- AI governance guardrails for coding agents. Python port of the [@aigis-ai/cli](https://www.npmjs.com/package/@aigis-ai/cli) npm package.
4
-
5
- Curated, agent-consumable security and compliance patterns from NIST AI RMF, OWASP Top 10 for LLMs, and ISO/IEC 42001.
6
-
7
- ## Install
8
-
9
- ```bash
10
- pip install aigis-cli
11
- ```
12
-
13
- ## Quick start
14
-
15
- ```bash
16
- aigis classify --traits uses-llm,processes-pii,accepts-user-input
17
- aigis get input-validation pii-handling
18
- aigis verify input-validation pii-handling
19
- aigis template ai-impact-assessment
20
- aigis audit --scan
21
- aigis search pii
22
- aigis traits
23
- aigis init cursor
24
- ```
25
-
26
- ## Documentation
27
-
28
- See the full documentation at [github.com/NayanKanaparthi/aigis](https://github.com/NayanKanaparthi/aigis).
29
-
30
- ## License
31
-
32
- [MIT](LICENSE)
@@ -1,70 +0,0 @@
1
- ---
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.
4
- ---
5
-
6
- # Aigis — AI Governance Skill
7
-
8
- Use the aigis CLI for governance patterns when building or auditing AI/LLM features.
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>
20
-
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.
22
-
23
- ## Quick start — audit existing project
24
- \`\`\`bash
25
- # 1. Get the structured audit scan prompt
26
- aigis audit --scan
27
-
28
- # 2. Follow the scan instructions: inventory the project, detect traits, classify
29
-
30
- # 3. Run the full audit with detected traits
31
- aigis audit --traits uses-llm,processes-pii,is-external
32
-
33
- # 4. Evaluate existing code against each check, produce gap report
34
- \`\`\`
35
-
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
42
-
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
57
-
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
64
-
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
@@ -1,3 +0,0 @@
1
- """aigis-cli: AI governance guardrails for coding agents."""
2
-
3
- __version__ = "2.0.0"
@@ -1,45 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import json
4
- from datetime import date
5
- from pathlib import Path
6
-
7
- AIGIS_DIR = Path.home() / ".aigis"
8
- ANNOTATIONS_FILE = AIGIS_DIR / "annotations.json"
9
-
10
-
11
- def _load_annotations() -> dict:
12
- if not ANNOTATIONS_FILE.exists():
13
- return {}
14
- try:
15
- return json.loads(ANNOTATIONS_FILE.read_text(encoding="utf-8"))
16
- except (json.JSONDecodeError, OSError):
17
- return {}
18
-
19
-
20
- def _save_annotations(data: dict) -> None:
21
- AIGIS_DIR.mkdir(parents=True, exist_ok=True)
22
- ANNOTATIONS_FILE.write_text(json.dumps(data, indent=2), encoding="utf-8")
23
-
24
-
25
- def annotate(file_id: str, note: str) -> None:
26
- data = _load_annotations()
27
- data.setdefault(file_id, []).append({
28
- "note": note,
29
- "date": date.today().isoformat(),
30
- })
31
- _save_annotations(data)
32
-
33
-
34
- def get_annotations(file_id: str) -> list[dict]:
35
- return _load_annotations().get(file_id, [])
36
-
37
-
38
- def list_annotations() -> dict:
39
- return _load_annotations()
40
-
41
-
42
- def clear_annotation(file_id: str) -> None:
43
- data = _load_annotations()
44
- data.pop(file_id, None)
45
- _save_annotations(data)