@aigis-ai/cli 1.0.3 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +53 -0
- package/SKILL.md +20 -55
- package/bin/aigis.js +446 -59
- package/cli-python/LICENSE +21 -0
- package/cli-python/README.md +32 -0
- package/cli-python/aigis_cli/SKILL.md +70 -0
- package/cli-python/aigis_cli/__init__.py +3 -0
- package/cli-python/aigis_cli/__pycache__/__init__.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/annotate.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/build.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/checksum.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/classify.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/cli.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/fetch.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/init_ide.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/keywords.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/__pycache__/search.cpython-313.pyc +0 -0
- package/cli-python/aigis_cli/annotate.py +45 -0
- package/cli-python/aigis_cli/auto_verify.py +518 -0
- package/cli-python/aigis_cli/build.py +470 -0
- package/cli-python/aigis_cli/checksum.py +22 -0
- package/cli-python/aigis_cli/classify.py +192 -0
- package/cli-python/aigis_cli/cli.py +618 -0
- package/cli-python/aigis_cli/content/index/audit-scan.md +217 -0
- package/cli-python/aigis_cli/content/index/auto-verify-rules.json +439 -0
- package/cli-python/aigis_cli/content/index/context-rules.json +90 -0
- package/cli-python/aigis_cli/content/index/frameworks.md +82 -0
- package/cli-python/aigis_cli/content/index/guardrails.json +23 -0
- package/cli-python/aigis_cli/content/index/taxonomy.md +81 -0
- package/cli-python/aigis_cli/content/resolvers/triggers.json +229 -0
- package/{content/implement → cli-python/aigis_cli/content/skills/areas}/audit-logging.md +5 -0
- package/cli-python/aigis_cli/content/skills/areas/fallback-patterns.md +200 -0
- package/cli-python/aigis_cli/content/skills/areas/input-validation.md +380 -0
- package/cli-python/aigis_cli/content/skills/areas/pii-handling.md +189 -0
- package/cli-python/aigis_cli/content/skills/areas/rate-limiting.md +246 -0
- package/cli-python/aigis_cli/content/skills/core.md +62 -0
- package/cli-python/aigis_cli/content/skills/infrastructure/logging.md +202 -0
- package/cli-python/aigis_cli/content/skills/infrastructure/rate-limiting.md +169 -0
- package/cli-python/aigis_cli/content/skills/infrastructure/secrets.md +167 -0
- package/cli-python/aigis_cli/content/skills/workflows/fastapi-llm.md +86 -0
- package/cli-python/aigis_cli/content/templates/ai-impact-assessment.md +54 -0
- package/cli-python/aigis_cli/content/templates/intended-purpose-doc.md +39 -0
- package/cli-python/aigis_cli/content/templates/risk-characterization.md +34 -0
- package/cli-python/aigis_cli/content/templates/third-party-assessment.md +41 -0
- package/cli-python/aigis_cli/content/verify/checklist-audit-logging.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-bias-monitoring.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-confidence-scoring.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-data-integrity.md +12 -0
- package/cli-python/aigis_cli/content/verify/checklist-explainability.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-fallback-patterns.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-human-oversight.md +14 -0
- package/cli-python/aigis_cli/content/verify/checklist-input-validation.md +16 -0
- package/cli-python/aigis_cli/content/verify/checklist-monitoring.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-output-sanitization.md +14 -0
- package/cli-python/aigis_cli/content/verify/checklist-pii-handling.md +14 -0
- package/cli-python/aigis_cli/content/verify/checklist-prompt-security.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-rag-security.md +12 -0
- package/cli-python/aigis_cli/content/verify/checklist-rate-limiting.md +13 -0
- package/cli-python/aigis_cli/content/verify/checklist-supply-chain.md +13 -0
- package/cli-python/aigis_cli/fetch.py +232 -0
- package/cli-python/aigis_cli/init_ide.py +159 -0
- package/cli-python/aigis_cli/keywords.py +73 -0
- package/cli-python/aigis_cli/search.py +69 -0
- package/cli-python/aigis_cli.egg-info/PKG-INFO +59 -0
- package/cli-python/aigis_cli.egg-info/SOURCES.txt +56 -0
- package/cli-python/aigis_cli.egg-info/dependency_links.txt +1 -0
- package/cli-python/aigis_cli.egg-info/entry_points.txt +2 -0
- package/cli-python/aigis_cli.egg-info/requires.txt +6 -0
- package/cli-python/aigis_cli.egg-info/top_level.txt +1 -0
- package/cli-python/dist/aigis_cli-1.0.3-py3-none-any.whl +0 -0
- package/cli-python/dist/aigis_cli-1.0.3.tar.gz +0 -0
- package/cli-python/pyproject.toml +49 -0
- package/content/index/audit-scan.md +21 -207
- package/content/index/auto-verify-rules.json +439 -0
- package/content/index/context-rules.json +90 -0
- package/content/resolvers/triggers.json +229 -0
- package/content/skills/areas/audit-logging.md +176 -0
- package/content/skills/areas/bias-monitoring.md +172 -0
- package/content/skills/areas/confidence-scoring.md +180 -0
- package/content/skills/areas/data-integrity.md +257 -0
- package/content/skills/areas/explainability.md +174 -0
- package/content/skills/areas/fallback-patterns.md +200 -0
- package/content/skills/areas/human-oversight.md +220 -0
- package/content/skills/areas/input-validation.md +380 -0
- package/content/skills/areas/monitoring.md +207 -0
- package/content/skills/areas/output-sanitization.md +183 -0
- package/content/skills/areas/pii-handling.md +189 -0
- package/content/skills/areas/prompt-security.md +153 -0
- package/content/skills/areas/rag-security.md +230 -0
- package/content/skills/areas/rate-limiting.md +246 -0
- package/content/skills/areas/supply-chain.md +193 -0
- package/content/skills/core.md +62 -0
- package/content/skills/infrastructure/logging.md +202 -0
- package/content/skills/infrastructure/rate-limiting.md +169 -0
- package/content/skills/infrastructure/secrets.md +167 -0
- package/content/skills/workflows/fastapi-llm.md +86 -0
- package/docs/resolvers.md +114 -0
- package/lib/auto-verify.js +378 -0
- package/lib/build.js +629 -0
- package/lib/checksum.js +39 -0
- package/lib/fetch.js +164 -9
- package/lib/init.js +141 -93
- package/lib/keywords.js +92 -130
- package/lib/special-recognizers.js +370 -0
- package/package.json +1 -1
- package/scripts/baseline-cursorrules.snapshot.txt +30 -0
- package/scripts/bootstrap-step-6-bench.js +85 -0
- package/scripts/check-content-sync.js +91 -0
- package/scripts/triggers.schema.json +50 -0
- package/scripts/validate-triggers.js +176 -0
- package/content/implement/fallback-patterns.md +0 -190
- package/content/implement/input-validation.md +0 -212
- package/content/implement/pii-handling.md +0 -207
- package/content/implement/rate-limiting.md +0 -217
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/bias-monitoring.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/confidence-scoring.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/data-integrity.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/explainability.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/human-oversight.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/monitoring.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/output-sanitization.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/prompt-security.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/rag-security.md +0 -0
- /package/{content/implement → cli-python/aigis_cli/content/skills/areas}/supply-chain.md +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
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)
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
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)
|