aigis-cli 2.1.0__tar.gz → 3.0.0__tar.gz

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 (90) hide show
  1. aigis_cli-3.0.0/PKG-INFO +243 -0
  2. aigis_cli-3.0.0/README.md +216 -0
  3. aigis_cli-3.0.0/aigis_cli/SKILL.md +40 -0
  4. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/__init__.py +1 -1
  5. aigis_cli-3.0.0/aigis_cli/atlas.py +285 -0
  6. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/auto_verify.py +271 -18
  7. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/build.py +75 -8
  8. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/classify.py +61 -7
  9. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/cli.py +210 -38
  10. aigis_cli-3.0.0/aigis_cli/content/index/atlas-NOTICE.md +238 -0
  11. aigis_cli-3.0.0/aigis_cli/content/index/atlas-entry-points.json +15 -0
  12. aigis_cli-3.0.0/aigis_cli/content/index/atlas.json +2694 -0
  13. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/audit-scan.md +6 -0
  14. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/auto-verify-rules.json +139 -0
  15. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/taxonomy.md +1 -1
  16. aigis_cli-3.0.0/aigis_cli/content/skills/areas/agent-permissions.md +228 -0
  17. aigis_cli-3.0.0/aigis_cli/content/skills/areas/agent-tool-safety.md +217 -0
  18. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/audit-logging.md +1 -0
  19. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/bias-monitoring.md +1 -0
  20. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/confidence-scoring.md +1 -0
  21. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/data-integrity.md +1 -0
  22. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/explainability.md +1 -0
  23. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/fallback-patterns.md +1 -0
  24. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/human-oversight.md +1 -0
  25. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/input-validation.md +1 -0
  26. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/monitoring.md +1 -0
  27. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/output-sanitization.md +1 -0
  28. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/pii-handling.md +1 -0
  29. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/prompt-security.md +1 -0
  30. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/rag-security.md +1 -0
  31. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/rate-limiting.md +1 -0
  32. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/supply-chain.md +1 -0
  33. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/core.md +15 -0
  34. aigis_cli-3.0.0/aigis_cli/content/templates/threat-model.md +80 -0
  35. aigis_cli-3.0.0/aigis_cli/content/verify/checklist-agent-permissions.md +16 -0
  36. aigis_cli-3.0.0/aigis_cli/content/verify/checklist-agent-tool-safety.md +15 -0
  37. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/report.py +28 -4
  38. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/search.py +5 -2
  39. aigis_cli-3.0.0/aigis_cli/threats.py +360 -0
  40. aigis_cli-3.0.0/aigis_cli.egg-info/PKG-INFO +243 -0
  41. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli.egg-info/SOURCES.txt +10 -0
  42. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/pyproject.toml +1 -1
  43. aigis_cli-2.1.0/PKG-INFO +0 -133
  44. aigis_cli-2.1.0/README.md +0 -106
  45. aigis_cli-2.1.0/aigis_cli/SKILL.md +0 -70
  46. aigis_cli-2.1.0/aigis_cli.egg-info/PKG-INFO +0 -133
  47. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/LICENSE +0 -0
  48. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/annotate.py +0 -0
  49. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/checksum.py +0 -0
  50. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/context-rules.json +0 -0
  51. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/frameworks.md +0 -0
  52. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/index/guardrails.json +0 -0
  53. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/resolvers/triggers.json +0 -0
  54. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/eu-ai-act-art-13-deployer-transparency.md +0 -0
  55. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/eu-ai-act-art-50-transparency-disclosure.md +0 -0
  56. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/eu-ai-act-art-73-incident-reporting.md +0 -0
  57. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/areas/eu-ai-act-art-9-risk-management.md +0 -0
  58. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/infrastructure/logging.md +0 -0
  59. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/infrastructure/rate-limiting.md +0 -0
  60. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/infrastructure/secrets.md +0 -0
  61. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/skills/workflows/fastapi-llm.md +0 -0
  62. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/templates/ai-impact-assessment.md +0 -0
  63. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/templates/eu-ai-act-annex-iv.md +0 -0
  64. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/templates/intended-purpose-doc.md +0 -0
  65. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/templates/risk-characterization.md +0 -0
  66. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/templates/third-party-assessment.md +0 -0
  67. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-audit-logging.md +0 -0
  68. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-bias-monitoring.md +0 -0
  69. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-confidence-scoring.md +0 -0
  70. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-data-integrity.md +0 -0
  71. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-explainability.md +0 -0
  72. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-fallback-patterns.md +0 -0
  73. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-human-oversight.md +0 -0
  74. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-input-validation.md +0 -0
  75. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-monitoring.md +0 -0
  76. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-output-sanitization.md +0 -0
  77. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-pii-handling.md +0 -0
  78. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-prompt-security.md +0 -0
  79. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-rag-security.md +0 -0
  80. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-rate-limiting.md +0 -0
  81. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/content/verify/checklist-supply-chain.md +0 -0
  82. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/fetch.py +0 -0
  83. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/init_ide.py +0 -0
  84. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/jurisdiction.py +0 -0
  85. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli/keywords.py +0 -0
  86. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli.egg-info/dependency_links.txt +0 -0
  87. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli.egg-info/entry_points.txt +0 -0
  88. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli.egg-info/requires.txt +0 -0
  89. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/aigis_cli.egg-info/top_level.txt +0 -0
  90. {aigis_cli-2.1.0 → aigis_cli-3.0.0}/setup.cfg +0 -0
@@ -0,0 +1,243 @@
1
+ Metadata-Version: 2.4
2
+ Name: aigis-cli
3
+ Version: 3.0.0
4
+ Summary: 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
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/NayanKanaparthi/aigis
7
+ Project-URL: Repository, https://github.com/NayanKanaparthi/aigis
8
+ Keywords: ai,governance,security,compliance,llm,owasp,nist,iso42001,guardrails,coding-agent
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Security
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: click>=8.0
22
+ Requires-Dist: rich>=13.0
23
+ Requires-Dist: python-frontmatter>=1.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: build>=1.0; extra == "dev"
26
+ Dynamic: license-file
27
+
28
+ # Aigis
29
+
30
+ **AI governance that ships with your code.**
31
+
32
+ Aigis now understands how attackers attack AI systems and helps your agent build defenses against them.
33
+
34
+ Aigis sits between you and your coding agent (Cursor, Claude Code, GitHub Copilot, Windsurf) and gives the agent curated AI governance patterns mapped to NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001, and the EU AI Act, with threat modeling from MITRE ATLAS.
35
+
36
+ You don't run Aigis. Your agent does. After one setup command, you describe what you're building and your agent picks the right governance patterns, implements them, and verifies the result, all in the same chat where you write code.
37
+
38
+ ## What's new in v3.0
39
+
40
+ - **Two new areas for agentic systems.** `agent-permissions` covers agent identity, tool permissions and authority limits. `agent-tool-safety` covers tool invocation safety, validation of tool inputs and outputs, and scope drift.
41
+ - **`aigis classify` recommends both new areas when a system is agentic** (`is-agentic`). Builds, audits and reports for agentic projects include them too.
42
+ - **3.0 is additive: no command, flag or JSON key was removed or renamed.**
43
+ - Aigis now ships 21 governance areas and 17 verify checklists.
44
+ - **MITRE ATLAS mitigations cited** by `aigis classify`, `aigis verify --auto`, `aigis report` and `aigis build`, next to the existing OWASP, NIST and ISO citations.
45
+ - **`aigis threats`** builds a threat model from your traits: attacker techniques for your entry points, the mitigations MITRE links to each, the Aigis areas that help implement each one (in part), and the gaps.
46
+ - **`aigis template threat-model`**, a fill-in threat model worksheet.
47
+ - **Your agent is instructed to threat-model on its own.** The core skill that `aigis init` writes tells the agent when to run `aigis threats` without being asked, and `aigis audit --scan` has a new threat model phase.
48
+ - **Pinned ATLAS v2026.10 data, offline.** The catalog ships inside the package. No network calls.
49
+
50
+ ### Results
51
+
52
+ Tested with a real coding agent building agent features from plain requests, with Aigis 2.1.1 and with Aigis 3.0 (6 runs each), graded by a blind reviewer:
53
+
54
+ | | Aigis 2.1.1 | Aigis 3.0 |
55
+ |---|---|---|
56
+ | Agent-safety defenses present in the code | 51% | **80%** |
57
+ | Agent ran a threat model on its own | 0 of 6 | **6 of 6** |
58
+ | Agent told the user about uncovered gaps | 1 of 6 | **6 of 6** |
59
+
60
+ Every MITRE ATLAS reference Aigis prints matched MITRE's own data (9,604 checked). Small sample; method and limits in [`BENCHMARKS.md`](BENCHMARKS.md).
61
+
62
+ ## Install
63
+
64
+ ```bash
65
+ pip install aigis-cli
66
+ # or
67
+ npm install -g @aigis-ai/cli
68
+
69
+ cd your-project
70
+ aigis init cursor # or: claude-code, copilot, windsurf
71
+ ```
72
+
73
+ That's it. `aigis init` writes a single rules file (`.cursorrules` for Cursor, `.github/copilot-instructions.md` for Copilot, etc.) that teaches your agent the Aigis workflow. Your agent reads it on every interaction in this project.
74
+
75
+ ![One command and you're done; your agent takes over.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/setup.png)
76
+
77
+ ## Quick start
78
+
79
+ Open the project in your IDE. In the agent chat, just describe what you're building:
80
+
81
+ > *Build me an EU AI Act compliant customer support chatbot for an e-commerce site. Use aigis to figure out the governance patterns and apply them.*
82
+
83
+ Building an agent that can take actions, like sending email or querying a database? Ask for the feature in plain words. Your agent is instructed to run `aigis threats` on its own, fetch the defenses that apply, and tell you about any gaps.
84
+
85
+ Your agent will read `.cursorrules`, classify the description against the resolver, fetch the relevant procedures, and implement them, invoking `aigis` itself as it works:
86
+
87
+ ![Your agent reads the rules file, classifies the project, fetches the brief, and implements, without you opening a separate terminal.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/agent-flow.png)
88
+
89
+ When the agent is done, you can verify deterministically:
90
+
91
+ ```bash
92
+ aigis verify input-validation --auto . --jurisdiction eu
93
+ ```
94
+
95
+ ![aigis verify cites OWASP + NIST + ISO + EU AI Act controls per check, with file:line evidence.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/verify.png)
96
+
97
+ The whole loop, describe, implement, verify, happens without leaving the IDE. You stay in the chat; the agent uses the CLI.
98
+
99
+ ## What `aigis init` actually did
100
+
101
+ When you ran `aigis init cursor`, three things landed in your repo:
102
+
103
+ 1. **`.cursorrules`** — the Aigis "core skill" your agent loads on every interaction. It documents the workflow (`classify → build → implement → verify → report`) and embeds a 39-phrase resolver block (high-confidence and low-confidence triggers) the agent uses to pick traits from your description.
104
+ 2. **A checksum** at the top of the resolver block. When Aigis updates, `aigis init <ide> --refresh` overwrites cleanly; mismatched checksums error out so you can see what changed.
105
+ 3. **No hidden services. No telemetry. No background processes.** Just a markdown file your agent reads.
106
+
107
+ Optional add-ons at init time:
108
+
109
+ ```bash
110
+ aigis init cursor --ci github # drops .github/workflows/aigis.yml
111
+ aigis init cursor --hook # installs .git/hooks/pre-commit
112
+ ```
113
+
114
+ Both surfaces read a single `.aigisrc.json` config:
115
+
116
+ ```json
117
+ { "areas": ["pii-handling", "audit-logging"], "jurisdiction": "eu" }
118
+ ```
119
+
120
+ The CI workflow runs `aigis verify` on every PR; the pre-commit hook runs it before each commit. Configure once, both run.
121
+
122
+ ## Threat modeling with MITRE ATLAS
123
+
124
+ OWASP says what can go wrong. MITRE ATLAS says how an attacker does it. NIST AI RMF says how you govern it.
125
+
126
+ ```bash
127
+ aigis threats --traits uses-llm,uses-rag,is-agentic
128
+ aigis threats "<description>"
129
+ ```
130
+
131
+ `--traits` is the reliable path. The description path only finds traits the resolver recognizes.
132
+
133
+ What you get: the techniques for your entry points, Realized first (seen in real attacks); the mitigations MITRE links to each technique; the Aigis areas that help implement each mitigation (in part); and the gaps, mitigations with no mapped Aigis area. `--redteam` adds test stubs, `--json` is for scripts.
134
+
135
+ When: designing an AI feature; adding a capability (tools, write access, memory, a new data source); before launch; after an incident. Your agent is instructed to do this at those moments without being asked, and you can run it yourself at any time.
136
+
137
+ What ships: a pinned subset of ATLAS v2026.10 (16 tactics, 221 techniques, 44 mitigations, counts from 77 case studies). No network calls. Aigis areas currently map to 21 of the 44 mitigations.
138
+
139
+ The mapping from areas to mitigations is ours. The links from mitigations to techniques are MITRE's. The entry points come from a reviewed map of 9 traits to 29 techniques.
140
+
141
+ Limits: MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness. A cited mitigation means the area helps implement it (in part). The technique list is a starting point based on your traits, not proof of coverage.
142
+
143
+ ## What's new in v2.1
144
+
145
+ - **EU AI Act mapping** — Articles 9, 10, 12, 13, 14, 15, 50, 72, 73 mapped to runnable governance patterns, plus an Annex IV technical documentation template
146
+ - **`--jurisdiction` flag** (`eu`, `us-regulated`) — gates content by where you ship. EU AI Act citations only surface when you're shipping to EU users
147
+ - **`aigis report`** — generates audit-ready compliance documentation with cross-framework citations (NIST + OWASP + ISO + EU AI Act) and file:line evidence per check
148
+ - **Activation surfaces** — `aigis init --ci github` drops a GitHub Action; `aigis init --hook` installs a pre-commit hook
149
+ - **`--tight` flag** (experimental) — minimal briefs for users who want less context. Requires ≥2 trait matches per area instead of ≥1
150
+ - **Resolver expansion** — 27 new triggers covering modern AI project types (internal coding assistants, agentic code review, document Q&A, image generation, enterprise search) and EU Annex III high-risk categories (biometric ID, credit scoring, hiring, law enforcement)
151
+
152
+ ## The principle behind Aigis
153
+
154
+ Governance isn't a content problem. It's an interface problem.
155
+
156
+ NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001, and the EU AI Act are all rigorous, all published, and all sit in documents that engineering teams never read. Aigis treats governance as an **agent-computer interface** problem: how the right content reaches an LM agent at the right time, in the right shape.
157
+
158
+ - Context layered for on-demand loading (core skill always loaded; per-area procedures fetched when needed)
159
+ - Deterministic rules where accuracy isn't negotiable (resolver triggers, brief generation, verify regexes)
160
+ - Flexible reasoning where real projects don't fit rigid templates (the brief tells the agent to skip areas that don't apply, with a written reason)
161
+
162
+ 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.
163
+
164
+ ## Manual CLI reference (for CI, scripting, audit prep, power users)
165
+
166
+ The CLI exists in case you want to drive Aigis directly, for CI workflows, audit prep, debugging, or one-off invocations.
167
+
168
+ ```bash
169
+ # Classification + brief
170
+ aigis classify "<description>" # detect traits + recommended areas
171
+ aigis build "<description>" # the consolidated brief (the main command)
172
+ aigis build "..." --jurisdiction eu # surface EU AI Act content for EU-bound systems
173
+ aigis build "..." --tight # minimal brief: ≥2 trait matches required (experimental)
174
+ aigis build "..." --list # area names + traits, no procedure content
175
+ aigis build "..." --compact # pointer-only brief
176
+
177
+ # Per-area work
178
+ aigis get <area> # fetch a single governance procedure
179
+ aigis infra <area> # fetch infrastructure pattern (rate-limiting, secrets, logging)
180
+ aigis workflow <type> # fetch workflow template
181
+
182
+ # Verify + audit
183
+ aigis verify <area> --auto . # deterministic check on your implementation
184
+ aigis verify <area> --auto . --jurisdiction eu # surfaces EU AI Act citations in output
185
+ aigis report --from-classify "<desc>" --jurisdiction eu --output audit.md
186
+ # audit-ready compliance documentation
187
+ aigis audit --scan # discovery prompt for auditing existing code
188
+ aigis audit --traits <list> # scoped audit with deterministic denominator
189
+
190
+ # Threat modeling (MITRE ATLAS)
191
+ aigis threats --traits <list> # techniques, MITRE mitigations, Aigis areas, gaps
192
+ aigis threats "<description>" --redteam # same from a description, plus red-team test stubs
193
+ aigis template threat-model # threat model worksheet
194
+
195
+ # Misc
196
+ aigis search --list # list all available areas
197
+ aigis traits # list classification traits
198
+ aigis template <id> # compliance documentation template
199
+ ```
200
+
201
+ Run `aigis --help` for full options.
202
+
203
+ ## Honest about what this isn't
204
+
205
+ - **Not a certification.** EU AI Act conformity assessment requires a notified body. `aigis report` is preparation material; it does not certify.
206
+ - **Not a security audit.** `aigis verify` is heuristic regex over your source. It catches common misimplementations; it doesn't replace SAST, code review, or penetration testing.
207
+ - **Doesn't run your code or call your APIs.** The agent does the work. Aigis provides the brief, the verifier, and the audit doc.
208
+ - **Local. No cloud. No telemetry.** Aigis ships nothing back to a server. Your descriptions, your code, and your verify results stay on your machine.
209
+ - **Not a penetration test.** `aigis threats` lists known techniques for your traits. It does not attack or test your system.
210
+
211
+ ## Benchmark results
212
+
213
+ ### v3.0
214
+
215
+ See [Results](#results) above. Full method, per-defense tables and limits: [`BENCHMARKS.md`](BENCHMARKS.md).
216
+
217
+ ### v2.0
218
+
219
+ v2.0 was benchmarked at every iteration. Final numbers, against the same 10 descriptions:
220
+
221
+ - Baseline (Aigis v1.0.3): P=0.737, R=0.905, F1=0.790
222
+ - v2.0 (`aigis build`): P=0.847, R=0.851, F1=0.837
223
+
224
+ F1 beats baseline by +0.047. v2.1 ships `--tight` as a flag-gated experiment; promotion to default is pending a confirmation benchmark. Methodology, per-run tables, and the v2.1 manual end-to-end test live in the [`benchmarks/`](https://github.com/NayanKanaparthi/aigis) directory.
225
+
226
+ ## Supported agents
227
+
228
+ - Cursor
229
+ - Claude Code
230
+ - GitHub Copilot
231
+ - Windsurf
232
+
233
+ Each maps to a different rules file location. `aigis init <ide>` handles the difference; `--refresh` updates safely.
234
+
235
+ ## Contributing
236
+
237
+ Aigis is built around a curated trigger map for classification. Trigger contributions are welcome, with a one-sentence use-case justification per the template in `.github/PULL_REQUEST_TEMPLATE/trigger_mapping.md`.
238
+
239
+ See `CONTRIBUTING.md` for the full contributor workflow, including how to add new governance areas, workflows, infrastructure patterns, or EU AI Act article mappings.
240
+
241
+ ## License
242
+
243
+ Aigis is MIT licensed. The package also includes a copy of MITRE ATLAS data (`content/index/atlas.json`). That data belongs to MITRE and is shared under its own open license, which allows reuse as long as MITRE's notice and license text travel with it. Both are in `content/index/atlas-NOTICE.md` (Apache-2.0).
@@ -0,0 +1,216 @@
1
+ # Aigis
2
+
3
+ **AI governance that ships with your code.**
4
+
5
+ Aigis now understands how attackers attack AI systems and helps your agent build defenses against them.
6
+
7
+ Aigis sits between you and your coding agent (Cursor, Claude Code, GitHub Copilot, Windsurf) and gives the agent curated AI governance patterns mapped to NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001, and the EU AI Act, with threat modeling from MITRE ATLAS.
8
+
9
+ You don't run Aigis. Your agent does. After one setup command, you describe what you're building and your agent picks the right governance patterns, implements them, and verifies the result, all in the same chat where you write code.
10
+
11
+ ## What's new in v3.0
12
+
13
+ - **Two new areas for agentic systems.** `agent-permissions` covers agent identity, tool permissions and authority limits. `agent-tool-safety` covers tool invocation safety, validation of tool inputs and outputs, and scope drift.
14
+ - **`aigis classify` recommends both new areas when a system is agentic** (`is-agentic`). Builds, audits and reports for agentic projects include them too.
15
+ - **3.0 is additive: no command, flag or JSON key was removed or renamed.**
16
+ - Aigis now ships 21 governance areas and 17 verify checklists.
17
+ - **MITRE ATLAS mitigations cited** by `aigis classify`, `aigis verify --auto`, `aigis report` and `aigis build`, next to the existing OWASP, NIST and ISO citations.
18
+ - **`aigis threats`** builds a threat model from your traits: attacker techniques for your entry points, the mitigations MITRE links to each, the Aigis areas that help implement each one (in part), and the gaps.
19
+ - **`aigis template threat-model`**, a fill-in threat model worksheet.
20
+ - **Your agent is instructed to threat-model on its own.** The core skill that `aigis init` writes tells the agent when to run `aigis threats` without being asked, and `aigis audit --scan` has a new threat model phase.
21
+ - **Pinned ATLAS v2026.10 data, offline.** The catalog ships inside the package. No network calls.
22
+
23
+ ### Results
24
+
25
+ Tested with a real coding agent building agent features from plain requests, with Aigis 2.1.1 and with Aigis 3.0 (6 runs each), graded by a blind reviewer:
26
+
27
+ | | Aigis 2.1.1 | Aigis 3.0 |
28
+ |---|---|---|
29
+ | Agent-safety defenses present in the code | 51% | **80%** |
30
+ | Agent ran a threat model on its own | 0 of 6 | **6 of 6** |
31
+ | Agent told the user about uncovered gaps | 1 of 6 | **6 of 6** |
32
+
33
+ Every MITRE ATLAS reference Aigis prints matched MITRE's own data (9,604 checked). Small sample; method and limits in [`BENCHMARKS.md`](BENCHMARKS.md).
34
+
35
+ ## Install
36
+
37
+ ```bash
38
+ pip install aigis-cli
39
+ # or
40
+ npm install -g @aigis-ai/cli
41
+
42
+ cd your-project
43
+ aigis init cursor # or: claude-code, copilot, windsurf
44
+ ```
45
+
46
+ That's it. `aigis init` writes a single rules file (`.cursorrules` for Cursor, `.github/copilot-instructions.md` for Copilot, etc.) that teaches your agent the Aigis workflow. Your agent reads it on every interaction in this project.
47
+
48
+ ![One command and you're done; your agent takes over.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/setup.png)
49
+
50
+ ## Quick start
51
+
52
+ Open the project in your IDE. In the agent chat, just describe what you're building:
53
+
54
+ > *Build me an EU AI Act compliant customer support chatbot for an e-commerce site. Use aigis to figure out the governance patterns and apply them.*
55
+
56
+ Building an agent that can take actions, like sending email or querying a database? Ask for the feature in plain words. Your agent is instructed to run `aigis threats` on its own, fetch the defenses that apply, and tell you about any gaps.
57
+
58
+ Your agent will read `.cursorrules`, classify the description against the resolver, fetch the relevant procedures, and implement them, invoking `aigis` itself as it works:
59
+
60
+ ![Your agent reads the rules file, classifies the project, fetches the brief, and implements, without you opening a separate terminal.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/agent-flow.png)
61
+
62
+ When the agent is done, you can verify deterministically:
63
+
64
+ ```bash
65
+ aigis verify input-validation --auto . --jurisdiction eu
66
+ ```
67
+
68
+ ![aigis verify cites OWASP + NIST + ISO + EU AI Act controls per check, with file:line evidence.](https://github.com/NayanKanaparthi/aigis/raw/main/docs/screenshots/verify.png)
69
+
70
+ The whole loop, describe, implement, verify, happens without leaving the IDE. You stay in the chat; the agent uses the CLI.
71
+
72
+ ## What `aigis init` actually did
73
+
74
+ When you ran `aigis init cursor`, three things landed in your repo:
75
+
76
+ 1. **`.cursorrules`** — the Aigis "core skill" your agent loads on every interaction. It documents the workflow (`classify → build → implement → verify → report`) and embeds a 39-phrase resolver block (high-confidence and low-confidence triggers) the agent uses to pick traits from your description.
77
+ 2. **A checksum** at the top of the resolver block. When Aigis updates, `aigis init <ide> --refresh` overwrites cleanly; mismatched checksums error out so you can see what changed.
78
+ 3. **No hidden services. No telemetry. No background processes.** Just a markdown file your agent reads.
79
+
80
+ Optional add-ons at init time:
81
+
82
+ ```bash
83
+ aigis init cursor --ci github # drops .github/workflows/aigis.yml
84
+ aigis init cursor --hook # installs .git/hooks/pre-commit
85
+ ```
86
+
87
+ Both surfaces read a single `.aigisrc.json` config:
88
+
89
+ ```json
90
+ { "areas": ["pii-handling", "audit-logging"], "jurisdiction": "eu" }
91
+ ```
92
+
93
+ The CI workflow runs `aigis verify` on every PR; the pre-commit hook runs it before each commit. Configure once, both run.
94
+
95
+ ## Threat modeling with MITRE ATLAS
96
+
97
+ OWASP says what can go wrong. MITRE ATLAS says how an attacker does it. NIST AI RMF says how you govern it.
98
+
99
+ ```bash
100
+ aigis threats --traits uses-llm,uses-rag,is-agentic
101
+ aigis threats "<description>"
102
+ ```
103
+
104
+ `--traits` is the reliable path. The description path only finds traits the resolver recognizes.
105
+
106
+ What you get: the techniques for your entry points, Realized first (seen in real attacks); the mitigations MITRE links to each technique; the Aigis areas that help implement each mitigation (in part); and the gaps, mitigations with no mapped Aigis area. `--redteam` adds test stubs, `--json` is for scripts.
107
+
108
+ When: designing an AI feature; adding a capability (tools, write access, memory, a new data source); before launch; after an incident. Your agent is instructed to do this at those moments without being asked, and you can run it yourself at any time.
109
+
110
+ What ships: a pinned subset of ATLAS v2026.10 (16 tactics, 221 techniques, 44 mitigations, counts from 77 case studies). No network calls. Aigis areas currently map to 21 of the 44 mitigations.
111
+
112
+ The mapping from areas to mitigations is ours. The links from mitigations to techniques are MITRE's. The entry points come from a reviewed map of 9 traits to 29 techniques.
113
+
114
+ Limits: MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness. A cited mitigation means the area helps implement it (in part). The technique list is a starting point based on your traits, not proof of coverage.
115
+
116
+ ## What's new in v2.1
117
+
118
+ - **EU AI Act mapping** — Articles 9, 10, 12, 13, 14, 15, 50, 72, 73 mapped to runnable governance patterns, plus an Annex IV technical documentation template
119
+ - **`--jurisdiction` flag** (`eu`, `us-regulated`) — gates content by where you ship. EU AI Act citations only surface when you're shipping to EU users
120
+ - **`aigis report`** — generates audit-ready compliance documentation with cross-framework citations (NIST + OWASP + ISO + EU AI Act) and file:line evidence per check
121
+ - **Activation surfaces** — `aigis init --ci github` drops a GitHub Action; `aigis init --hook` installs a pre-commit hook
122
+ - **`--tight` flag** (experimental) — minimal briefs for users who want less context. Requires ≥2 trait matches per area instead of ≥1
123
+ - **Resolver expansion** — 27 new triggers covering modern AI project types (internal coding assistants, agentic code review, document Q&A, image generation, enterprise search) and EU Annex III high-risk categories (biometric ID, credit scoring, hiring, law enforcement)
124
+
125
+ ## The principle behind Aigis
126
+
127
+ Governance isn't a content problem. It's an interface problem.
128
+
129
+ NIST AI RMF, OWASP Top 10 for LLMs, ISO/IEC 42001, and the EU AI Act are all rigorous, all published, and all sit in documents that engineering teams never read. Aigis treats governance as an **agent-computer interface** problem: how the right content reaches an LM agent at the right time, in the right shape.
130
+
131
+ - Context layered for on-demand loading (core skill always loaded; per-area procedures fetched when needed)
132
+ - Deterministic rules where accuracy isn't negotiable (resolver triggers, brief generation, verify regexes)
133
+ - Flexible reasoning where real projects don't fit rigid templates (the brief tells the agent to skip areas that don't apply, with a written reason)
134
+
135
+ 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.
136
+
137
+ ## Manual CLI reference (for CI, scripting, audit prep, power users)
138
+
139
+ The CLI exists in case you want to drive Aigis directly, for CI workflows, audit prep, debugging, or one-off invocations.
140
+
141
+ ```bash
142
+ # Classification + brief
143
+ aigis classify "<description>" # detect traits + recommended areas
144
+ aigis build "<description>" # the consolidated brief (the main command)
145
+ aigis build "..." --jurisdiction eu # surface EU AI Act content for EU-bound systems
146
+ aigis build "..." --tight # minimal brief: ≥2 trait matches required (experimental)
147
+ aigis build "..." --list # area names + traits, no procedure content
148
+ aigis build "..." --compact # pointer-only brief
149
+
150
+ # Per-area work
151
+ aigis get <area> # fetch a single governance procedure
152
+ aigis infra <area> # fetch infrastructure pattern (rate-limiting, secrets, logging)
153
+ aigis workflow <type> # fetch workflow template
154
+
155
+ # Verify + audit
156
+ aigis verify <area> --auto . # deterministic check on your implementation
157
+ aigis verify <area> --auto . --jurisdiction eu # surfaces EU AI Act citations in output
158
+ aigis report --from-classify "<desc>" --jurisdiction eu --output audit.md
159
+ # audit-ready compliance documentation
160
+ aigis audit --scan # discovery prompt for auditing existing code
161
+ aigis audit --traits <list> # scoped audit with deterministic denominator
162
+
163
+ # Threat modeling (MITRE ATLAS)
164
+ aigis threats --traits <list> # techniques, MITRE mitigations, Aigis areas, gaps
165
+ aigis threats "<description>" --redteam # same from a description, plus red-team test stubs
166
+ aigis template threat-model # threat model worksheet
167
+
168
+ # Misc
169
+ aigis search --list # list all available areas
170
+ aigis traits # list classification traits
171
+ aigis template <id> # compliance documentation template
172
+ ```
173
+
174
+ Run `aigis --help` for full options.
175
+
176
+ ## Honest about what this isn't
177
+
178
+ - **Not a certification.** EU AI Act conformity assessment requires a notified body. `aigis report` is preparation material; it does not certify.
179
+ - **Not a security audit.** `aigis verify` is heuristic regex over your source. It catches common misimplementations; it doesn't replace SAST, code review, or penetration testing.
180
+ - **Doesn't run your code or call your APIs.** The agent does the work. Aigis provides the brief, the verifier, and the audit doc.
181
+ - **Local. No cloud. No telemetry.** Aigis ships nothing back to a server. Your descriptions, your code, and your verify results stay on your machine.
182
+ - **Not a penetration test.** `aigis threats` lists known techniques for your traits. It does not attack or test your system.
183
+
184
+ ## Benchmark results
185
+
186
+ ### v3.0
187
+
188
+ See [Results](#results) above. Full method, per-defense tables and limits: [`BENCHMARKS.md`](BENCHMARKS.md).
189
+
190
+ ### v2.0
191
+
192
+ v2.0 was benchmarked at every iteration. Final numbers, against the same 10 descriptions:
193
+
194
+ - Baseline (Aigis v1.0.3): P=0.737, R=0.905, F1=0.790
195
+ - v2.0 (`aigis build`): P=0.847, R=0.851, F1=0.837
196
+
197
+ F1 beats baseline by +0.047. v2.1 ships `--tight` as a flag-gated experiment; promotion to default is pending a confirmation benchmark. Methodology, per-run tables, and the v2.1 manual end-to-end test live in the [`benchmarks/`](https://github.com/NayanKanaparthi/aigis) directory.
198
+
199
+ ## Supported agents
200
+
201
+ - Cursor
202
+ - Claude Code
203
+ - GitHub Copilot
204
+ - Windsurf
205
+
206
+ Each maps to a different rules file location. `aigis init <ide>` handles the difference; `--refresh` updates safely.
207
+
208
+ ## Contributing
209
+
210
+ Aigis is built around a curated trigger map for classification. Trigger contributions are welcome, with a one-sentence use-case justification per the template in `.github/PULL_REQUEST_TEMPLATE/trigger_mapping.md`.
211
+
212
+ See `CONTRIBUTING.md` for the full contributor workflow, including how to add new governance areas, workflows, infrastructure patterns, or EU AI Act article mappings.
213
+
214
+ ## License
215
+
216
+ Aigis is MIT licensed. The package also includes a copy of MITRE ATLAS data (`content/index/atlas.json`). That data belongs to MITRE and is shared under its own open license, which allows reuse as long as MITRE's notice and license text travel with it. Both are in `content/index/atlas-NOTICE.md` (Apache-2.0).
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: aigis
3
+ description: AI governance for coding agents. Three-layer skill system (core, area, workflow) loaded on demand with the aigis CLI. Mapped to NIST AI RMF, OWASP Top 10 for LLMs and ISO/IEC 42001, with MITRE ATLAS threat modeling.
4
+ ---
5
+
6
+ # Aigis skill system
7
+
8
+ Aigis ships skills in three layers. Agents load them on demand with the CLI, not by reading this file.
9
+
10
+ ## Layers
11
+
12
+ - **Core skill**: `content/skills/core.md`. `aigis init <ide>` writes it into the agent's rules file. It tells the agent when to use Aigis, the build and audit workflows, how to read verify output, and when to threat-model.
13
+ - **Area skills**: `content/skills/areas/<id>.md`, one per governance area (input-validation, pii-handling, agent-permissions and so on). 21 today, 17 of them with a verify checklist. 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. `fastapi-llm` ships today.
15
+
16
+ ## How an agent uses Aigis
17
+
18
+ After `aigis init` writes the core skill, the agent runs:
19
+
20
+ 1. `aigis classify --traits <traits> --json` to get the risk tier, the recommended areas and a workflow suggestion.
21
+ 2. `aigis workflow <type>` to get the file layout and wiring for the stack.
22
+ 3. `aigis get <area>` and `aigis verify <area> --auto .` for each area, one at a time.
23
+ 4. `aigis threats --traits <traits>` to build a threat model. It lists attacker techniques for the system's entry points (Realized first), the mitigations MITRE links to each, the Aigis areas that help implement each one (in part), and gaps. A gap is a mitigation with no mapped Aigis area. The agent fetches and verifies every area it names and tells the user about every gap.
24
+
25
+ To audit an existing project, the agent starts with `aigis audit --scan` instead.
26
+
27
+ MITRE ATLAS is a threat catalog, not a standard. Nobody is "ATLAS compliant". It does not score risk, and it does not cover bias or fairness.
28
+
29
+ See `content/skills/core.md` for the full text the agent sees.
30
+
31
+ ## Setup per IDE
32
+
33
+ Run once in the project root:
34
+
35
+ - `aigis init cursor` writes `.cursorrules`
36
+ - `aigis init claude-code` writes `~/.claude/skills/aigis/SKILL.md`
37
+ - `aigis init windsurf` writes `.windsurfrules`
38
+ - `aigis init copilot` writes `.github/copilot-instructions.md`
39
+
40
+ All four receive the same content: `content/skills/core.md`. Area and workflow skills load on demand; they are not pre-installed into the rules file.
@@ -1,3 +1,3 @@
1
1
  """aigis-cli: AI governance guardrails for coding agents."""
2
2
 
3
- __version__ = "2.1.0"
3
+ __version__ = "3.0.0"