@neuravim/aiden 0.12.0
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/LICENSE +661 -0
- package/README.fr.md +204 -0
- package/README.md +208 -0
- package/dist/index.js +7483 -0
- package/dist/index.js.map +1 -0
- package/package.json +85 -0
- package/templates/aiden.config.yaml +46 -0
- package/templates/rules/coding-standards.md +29 -0
- package/templates/skills/adr-enforcer/instructions.md +66 -0
- package/templates/skills/adr-enforcer/skill.yaml +14 -0
- package/templates/skills/adversarial-review/instructions.md +33 -0
- package/templates/skills/adversarial-review/skill.yaml +11 -0
- package/templates/skills/api-design-restful/instructions.md +74 -0
- package/templates/skills/api-design-restful/skill.yaml +16 -0
- package/templates/skills/changelog-gen/instructions.md +59 -0
- package/templates/skills/changelog-gen/skill.yaml +14 -0
- package/templates/skills/code-review-strict/instructions.md +13 -0
- package/templates/skills/code-review-strict/skill.yaml +8 -0
- package/templates/skills/compliance-rgpd/instructions.md +18 -0
- package/templates/skills/compliance-rgpd/skill.yaml +12 -0
- package/templates/skills/dead-code-detector/instructions.md +38 -0
- package/templates/skills/dead-code-detector/skill.yaml +7 -0
- package/templates/skills/dependency-audit/instructions.md +43 -0
- package/templates/skills/dependency-audit/skill.yaml +17 -0
- package/templates/skills/hipaa-guard/instructions.md +62 -0
- package/templates/skills/hipaa-guard/skill.yaml +23 -0
- package/templates/skills/iso-27001/instructions.md +54 -0
- package/templates/skills/iso-27001/skill.yaml +10 -0
- package/templates/skills/jira-sync/instructions.md +10 -0
- package/templates/skills/jira-sync/skill.yaml +18 -0
- package/templates/skills/linear-sync/instructions.md +39 -0
- package/templates/skills/linear-sync/skill.yaml +22 -0
- package/templates/skills/naming-conventions/instructions.md +45 -0
- package/templates/skills/naming-conventions/skill.yaml +16 -0
- package/templates/skills/nestjs-patterns/instructions.md +55 -0
- package/templates/skills/nestjs-patterns/skill.yaml +12 -0
- package/templates/skills/owasp-check/instructions.md +71 -0
- package/templates/skills/owasp-check/skill.yaml +20 -0
- package/templates/skills/react-best-practices/instructions.md +59 -0
- package/templates/skills/react-best-practices/skill.yaml +12 -0
- package/templates/skills/secret-scan/instructions.md +44 -0
- package/templates/skills/secret-scan/skill.yaml +11 -0
- package/templates/skills/slack-notify/instructions.md +45 -0
- package/templates/skills/slack-notify/skill.yaml +19 -0
- package/templates/skills/test-coverage-enforcer/instructions.md +42 -0
- package/templates/skills/test-coverage-enforcer/skill.yaml +18 -0
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuravim/aiden",
|
|
3
|
+
"version": "0.12.0",
|
|
4
|
+
"description": "AI-Driven Engineering - CLI framework for AI-assisted development",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"aiden": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsup",
|
|
11
|
+
"dev": "tsx src/cli/index.ts",
|
|
12
|
+
"test": "vitest run",
|
|
13
|
+
"test:watch": "vitest",
|
|
14
|
+
"test:ci": "tsx tests/ci-runner.ts",
|
|
15
|
+
"test:e2e": "AIDEN_E2E=1 bunx vitest run tests/e2e/ --timeout 300000",
|
|
16
|
+
"lint": "eslint src/ --quiet",
|
|
17
|
+
"lint:ci": "eslint src/ --quiet --format compact",
|
|
18
|
+
"format": "prettier --write src/",
|
|
19
|
+
"format:check": "prettier --check src/",
|
|
20
|
+
"typecheck": "tsc --noEmit",
|
|
21
|
+
"prepare": "husky"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"templates",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"keywords": [
|
|
33
|
+
"ai",
|
|
34
|
+
"cli",
|
|
35
|
+
"agents",
|
|
36
|
+
"developer-tools",
|
|
37
|
+
"claude",
|
|
38
|
+
"gemini",
|
|
39
|
+
"copilot",
|
|
40
|
+
"orchestration",
|
|
41
|
+
"enterprise"
|
|
42
|
+
],
|
|
43
|
+
"license": "AGPL-3.0-only",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/neuravim/aiden"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://aiden.neuravim.tech",
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=20.0.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"chalk": "^5.3.0",
|
|
54
|
+
"commander": "^12.1.0",
|
|
55
|
+
"handlebars": "^4.7.8",
|
|
56
|
+
"js-yaml": "^4.1.0",
|
|
57
|
+
"ora": "^8.1.0",
|
|
58
|
+
"semver": "^7.6.0",
|
|
59
|
+
"zod": "^3.23.8"
|
|
60
|
+
},
|
|
61
|
+
"lint-staged": {
|
|
62
|
+
"src/**/*.{ts,tsx}": [
|
|
63
|
+
"prettier --write",
|
|
64
|
+
"eslint --quiet --fix"
|
|
65
|
+
],
|
|
66
|
+
"src/**/*.{json,md,yaml,yml}": [
|
|
67
|
+
"prettier --write"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/js-yaml": "^4.0.9",
|
|
72
|
+
"@types/node": "^20.14.0",
|
|
73
|
+
"@types/semver": "^7.5.0",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
75
|
+
"@typescript-eslint/parser": "^7.13.0",
|
|
76
|
+
"eslint": "^8.57.0",
|
|
77
|
+
"husky": "^9.1.7",
|
|
78
|
+
"lint-staged": "^16.4.0",
|
|
79
|
+
"prettier": "^3.3.0",
|
|
80
|
+
"tsup": "^8.1.0",
|
|
81
|
+
"tsx": "^4.15.0",
|
|
82
|
+
"typescript": "^5.5.0",
|
|
83
|
+
"vitest": "^1.6.0"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# AIDEN - Project configuration
|
|
2
|
+
# Documentation: https://github.com/Anas-ZAHOURI/aiden#configuration
|
|
3
|
+
|
|
4
|
+
project: my-project
|
|
5
|
+
provider: claude-code # claude-code | gemini | copilot | auto
|
|
6
|
+
mode: standard # flash | standard | enterprise
|
|
7
|
+
lang: en # language for artifacts
|
|
8
|
+
|
|
9
|
+
# Providers (optional - defaults are sensible)
|
|
10
|
+
# providers:
|
|
11
|
+
# claude-code:
|
|
12
|
+
# enabled: true
|
|
13
|
+
# command: claude
|
|
14
|
+
# model: claude-sonnet-4-6
|
|
15
|
+
# maxTokens: 100000
|
|
16
|
+
# costPer1k: 0.003
|
|
17
|
+
# gemini:
|
|
18
|
+
# enabled: true
|
|
19
|
+
# command: gemini
|
|
20
|
+
# model: gemini-2.5-pro
|
|
21
|
+
# maxTokens: 1000000
|
|
22
|
+
# costPer1k: 0.001
|
|
23
|
+
|
|
24
|
+
# Routing (optional)
|
|
25
|
+
# routing:
|
|
26
|
+
# strategy: prefer # auto | prefer | fixed | cost-optimized
|
|
27
|
+
# fallback: [gemini, claude-code]
|
|
28
|
+
|
|
29
|
+
# Token budget (optional)
|
|
30
|
+
# budget:
|
|
31
|
+
# monthlyLimit: 500000
|
|
32
|
+
# alertAt: 80
|
|
33
|
+
# perFeature:
|
|
34
|
+
# flash: 5000
|
|
35
|
+
# standard: 20000
|
|
36
|
+
# enterprise: 100000
|
|
37
|
+
|
|
38
|
+
# Hooks (optional)
|
|
39
|
+
# hooks:
|
|
40
|
+
# on_phase_end:
|
|
41
|
+
# - command: npm test
|
|
42
|
+
# onFailure: block
|
|
43
|
+
|
|
44
|
+
# Enterprise rules (optional)
|
|
45
|
+
# rules:
|
|
46
|
+
# - coding-standards.md
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Mandatory coding standards
|
|
2
|
+
|
|
3
|
+
## TypeScript
|
|
4
|
+
- Strict mode enabled
|
|
5
|
+
- No `any` unless justified with a comment
|
|
6
|
+
- Interfaces for all public types
|
|
7
|
+
- JSDoc for exported functions
|
|
8
|
+
|
|
9
|
+
## Tests
|
|
10
|
+
- Minimum coverage: 80%
|
|
11
|
+
- Unit tests mandatory for all business logic
|
|
12
|
+
- Integration tests for API endpoints
|
|
13
|
+
- Mocking: prefer dependency injection over module mocking
|
|
14
|
+
|
|
15
|
+
## Git
|
|
16
|
+
- Commit convention: Conventional Commits
|
|
17
|
+
- Branches: feature/<slug>, fix/<slug>, refactor/<slug>
|
|
18
|
+
- PR: max 400 changed lines (split otherwise)
|
|
19
|
+
|
|
20
|
+
## Security
|
|
21
|
+
- No secrets in code (use env vars)
|
|
22
|
+
- Validate user inputs (zod or joi)
|
|
23
|
+
- Sanitize HTML outputs
|
|
24
|
+
- CORS configured explicitly
|
|
25
|
+
|
|
26
|
+
## Architecture
|
|
27
|
+
- Clean Architecture: domain -> application -> infrastructure
|
|
28
|
+
- No business logic in controllers
|
|
29
|
+
- Repository pattern for data access
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# ADR Enforcer
|
|
2
|
+
|
|
3
|
+
## For Planner Agent
|
|
4
|
+
|
|
5
|
+
For every significant technical decision in the spec, generate an Architecture Decision Record (ADR) in MADR format. A decision is "significant" if it involves:
|
|
6
|
+
|
|
7
|
+
- Choice of technology, framework, or library
|
|
8
|
+
- Architectural pattern selection (e.g., event-driven vs. request-response)
|
|
9
|
+
- Data model design decisions
|
|
10
|
+
- API design trade-offs
|
|
11
|
+
- Security or compliance approach
|
|
12
|
+
|
|
13
|
+
### MADR format
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# NNNN — <Decision Title>
|
|
17
|
+
|
|
18
|
+
## Status
|
|
19
|
+
Proposed | Accepted | Deprecated | Superseded
|
|
20
|
+
|
|
21
|
+
## Context
|
|
22
|
+
<What is the issue that we're seeing that is motivating this decision?>
|
|
23
|
+
|
|
24
|
+
## Decision
|
|
25
|
+
<What is the change that we're proposing and/or doing?>
|
|
26
|
+
|
|
27
|
+
## Consequences
|
|
28
|
+
|
|
29
|
+
### Positive
|
|
30
|
+
- <Good outcome>
|
|
31
|
+
|
|
32
|
+
### Negative
|
|
33
|
+
- <Trade-off or downside>
|
|
34
|
+
|
|
35
|
+
## Alternatives Considered
|
|
36
|
+
|
|
37
|
+
### <Alternative 1>
|
|
38
|
+
- Pros: ...
|
|
39
|
+
- Cons: ...
|
|
40
|
+
- Reason rejected: ...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use `NNNN` as placeholder — DocOps will assign the final number.
|
|
44
|
+
|
|
45
|
+
### Output marker
|
|
46
|
+
|
|
47
|
+
For each ADR generated, emit:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
ADR_GENERATED:
|
|
51
|
+
- title: <decision title>
|
|
52
|
+
- status: proposed
|
|
53
|
+
- alternatives: <number of alternatives considered>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## For DocOps Agent
|
|
57
|
+
|
|
58
|
+
Collect all ADRs generated by the Planner:
|
|
59
|
+
|
|
60
|
+
1. Assign sequential numbers based on existing ADRs in the configured `outputDir` (default: `.aiden/adrs/`)
|
|
61
|
+
2. Use the numbering format `NNNN` (e.g., `0001`, `0002`)
|
|
62
|
+
3. Name files as `NNNN-kebab-case-title.md`
|
|
63
|
+
4. Verify each ADR has all required sections: Status, Context, Decision, Consequences, Alternatives
|
|
64
|
+
5. Add a date field and link to the feature that prompted the decision
|
|
65
|
+
|
|
66
|
+
Emit `ADR_GENERATED` for each finalized ADR with the assigned number.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: adr-enforcer
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Enforce Architecture Decision Records in MADR format
|
|
4
|
+
agents:
|
|
5
|
+
- planner
|
|
6
|
+
- docops
|
|
7
|
+
modes:
|
|
8
|
+
- enterprise
|
|
9
|
+
priority: 15
|
|
10
|
+
enabled: true
|
|
11
|
+
config:
|
|
12
|
+
outputDir: .aiden/adrs
|
|
13
|
+
numberingFormat: "NNNN"
|
|
14
|
+
template: madr
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Adversarial Review
|
|
2
|
+
|
|
3
|
+
You are now operating in **adversarial review mode**. Your goal is to find problems, not to validate.
|
|
4
|
+
|
|
5
|
+
## Mindset
|
|
6
|
+
|
|
7
|
+
Adopt a cynical, skeptical perspective. Assume things WILL go wrong. Your job is to find out HOW before production does.
|
|
8
|
+
|
|
9
|
+
## Review Checklist
|
|
10
|
+
|
|
11
|
+
For every technical decision in the spec, brief, or code:
|
|
12
|
+
|
|
13
|
+
1. **Challenge the decision**: Why was this approach chosen? What alternatives were dismissed? Were they dismissed for the right reasons?
|
|
14
|
+
2. **Single points of failure**: Identify any component whose failure would cascade across the system.
|
|
15
|
+
3. **Cross-agent coherence**: Does the analyst's risk assessment match the planner's stories? Does the dev's implementation address the planner's constraints?
|
|
16
|
+
4. **Optimism bias**: Are estimates realistic? Is the happy path over-emphasized? Are error paths fully handled?
|
|
17
|
+
5. **Hidden dependencies**: Are there implicit assumptions about infrastructure, external APIs, or user behavior?
|
|
18
|
+
6. **Security attack surface**: What new attack vectors does this feature introduce?
|
|
19
|
+
7. **Scalability concerns**: Will this approach work at 10x the current load? 100x?
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
|
|
23
|
+
For each finding, report:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
ADVERSARIAL_FINDING:
|
|
27
|
+
- severity: critical | major | minor
|
|
28
|
+
- category: architecture | security | coherence | optimism | dependency | scalability
|
|
29
|
+
- description: <what's wrong>
|
|
30
|
+
- recommendation: <what to do about it>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Expect to find **at least 5 issues**. If you find fewer than 3, you're not looking hard enough.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: adversarial-review
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Adversarial review of decisions and architecture — challenges assumptions, finds single points of failure
|
|
4
|
+
agents:
|
|
5
|
+
- analyst
|
|
6
|
+
- qa
|
|
7
|
+
modes:
|
|
8
|
+
- standard
|
|
9
|
+
- enterprise
|
|
10
|
+
priority: 80
|
|
11
|
+
enabled: true
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# RESTful API Design Standards
|
|
2
|
+
|
|
3
|
+
## For Planner Agent
|
|
4
|
+
|
|
5
|
+
When designing API endpoints in the spec:
|
|
6
|
+
|
|
7
|
+
1. **Resource naming**: Use plural nouns (`/users`, `/orders`), kebab-case for multi-word (`/order-items`)
|
|
8
|
+
2. **Hierarchy**: Nest sub-resources max 2 levels deep (`/users/:id/orders`, not deeper)
|
|
9
|
+
3. **Versioning**: Use URL prefix strategy by default (`/api/v1/...`)
|
|
10
|
+
4. **Document each endpoint**: method, path, request body schema, response schema, status codes, error cases
|
|
11
|
+
|
|
12
|
+
Include an API design section in the spec with endpoint inventory and schema definitions.
|
|
13
|
+
|
|
14
|
+
## For Dev Agent
|
|
15
|
+
|
|
16
|
+
Implement API endpoints following RESTful standards:
|
|
17
|
+
|
|
18
|
+
### URL conventions
|
|
19
|
+
- Use plural nouns for collections: `GET /api/v1/users`
|
|
20
|
+
- Use resource ID for single items: `GET /api/v1/users/:id`
|
|
21
|
+
- Use verbs only for actions that are not CRUD: `POST /api/v1/users/:id/activate`
|
|
22
|
+
- Version prefix: `/api/v1/` (configurable via `versioningStrategy`)
|
|
23
|
+
|
|
24
|
+
### HTTP methods and status codes
|
|
25
|
+
| Method | Success | Created | No Content | Not Found | Conflict |
|
|
26
|
+
|--------|---------|---------|------------|-----------|----------|
|
|
27
|
+
| GET | 200 | — | — | 404 | — |
|
|
28
|
+
| POST | — | 201 | — | — | 409 |
|
|
29
|
+
| PUT | 200 | — | 204 | 404 | 409 |
|
|
30
|
+
| PATCH | 200 | — | 204 | 404 | — |
|
|
31
|
+
| DELETE | — | — | 204 | 404 | — |
|
|
32
|
+
|
|
33
|
+
### Error format (RFC 7807)
|
|
34
|
+
All errors MUST use the Problem Details format:
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"type": "https://api.example.com/errors/validation",
|
|
38
|
+
"title": "Validation Error",
|
|
39
|
+
"status": 422,
|
|
40
|
+
"detail": "The 'email' field is not a valid email address",
|
|
41
|
+
"instance": "/api/v1/users"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Pagination (cursor-based by default)
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"data": [...],
|
|
49
|
+
"pagination": {
|
|
50
|
+
"cursor": "eyJpZCI6MTAwfQ==",
|
|
51
|
+
"hasMore": true,
|
|
52
|
+
"pageSize": 25
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
- Maximum page size: configurable (`maxPageSize`, default 100)
|
|
57
|
+
- Default page size: 25
|
|
58
|
+
- Include `Link` headers for discoverability
|
|
59
|
+
|
|
60
|
+
### Headers
|
|
61
|
+
- `Content-Type: application/json` on all responses
|
|
62
|
+
- `Location` header on 201 responses with the new resource URL
|
|
63
|
+
- `X-Request-Id` for traceability
|
|
64
|
+
- Cache headers (`Cache-Control`, `ETag`) for GET responses where appropriate
|
|
65
|
+
|
|
66
|
+
### Output Format
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
API_VIOLATION:
|
|
70
|
+
- rule: naming | method | status-code | error-format | pagination | header | versioning
|
|
71
|
+
- endpoint: <METHOD /path>
|
|
72
|
+
- description: <what violates the standard>
|
|
73
|
+
- fix: <corrected implementation>
|
|
74
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: api-design-restful
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Enforce RESTful API design standards and conventions
|
|
4
|
+
agents:
|
|
5
|
+
- planner
|
|
6
|
+
- dev
|
|
7
|
+
modes:
|
|
8
|
+
- standard
|
|
9
|
+
- enterprise
|
|
10
|
+
priority: 10
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
versioningStrategy: url-prefix
|
|
14
|
+
paginationStyle: cursor
|
|
15
|
+
errorFormat: rfc7807
|
|
16
|
+
maxPageSize: 100
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Changelog Generator
|
|
2
|
+
|
|
3
|
+
## For DocOps Agent
|
|
4
|
+
|
|
5
|
+
Generate changelog entries following the [Keep a Changelog](https://keepachangelog.com/) format for every completed feature.
|
|
6
|
+
|
|
7
|
+
### Categories
|
|
8
|
+
|
|
9
|
+
Classify each change into one of the standard categories:
|
|
10
|
+
|
|
11
|
+
- **Added**: New features or capabilities
|
|
12
|
+
- **Changed**: Changes to existing functionality
|
|
13
|
+
- **Deprecated**: Features that will be removed in future versions
|
|
14
|
+
- **Removed**: Features that were removed
|
|
15
|
+
- **Fixed**: Bug fixes
|
|
16
|
+
- **Security**: Vulnerability fixes or security improvements
|
|
17
|
+
|
|
18
|
+
### Rules
|
|
19
|
+
|
|
20
|
+
1. Write entries from the user's perspective, not the developer's
|
|
21
|
+
2. Each entry is a single line starting with `- ` (markdown list item)
|
|
22
|
+
3. Use past tense: "Added user authentication" not "Add user authentication"
|
|
23
|
+
4. Include breaking changes with a `**BREAKING:**` prefix when `includeBreaking` is enabled
|
|
24
|
+
5. Group related changes under a single entry when they form a coherent feature
|
|
25
|
+
6. Reference the feature slug or issue ID in parentheses at the end: `(feat/user-auth)`
|
|
26
|
+
|
|
27
|
+
### Output Format
|
|
28
|
+
|
|
29
|
+
For each entry, emit:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
CHANGELOG_ENTRY:
|
|
33
|
+
- category: Added | Changed | Deprecated | Removed | Fixed | Security
|
|
34
|
+
- description: <user-facing description of the change>
|
|
35
|
+
- breaking: true | false
|
|
36
|
+
- feature: <feature slug>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Full changelog section format
|
|
40
|
+
|
|
41
|
+
When assembling the final output, produce a section like:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
## [Unreleased]
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- Description of added feature (feat/feature-slug)
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Description of change (feat/feature-slug)
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
- Description of fix (feat/feature-slug)
|
|
54
|
+
|
|
55
|
+
### Security
|
|
56
|
+
- Description of security fix (feat/feature-slug)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Only include categories that have entries. Maintain chronological order within each category (newest first).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: changelog-gen
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Generate Keep a Changelog entries from completed features
|
|
4
|
+
agents:
|
|
5
|
+
- docops
|
|
6
|
+
modes:
|
|
7
|
+
- standard
|
|
8
|
+
- enterprise
|
|
9
|
+
priority: 10
|
|
10
|
+
enabled: true
|
|
11
|
+
config:
|
|
12
|
+
outputFile: CHANGELOG.md
|
|
13
|
+
format: keepachangelog
|
|
14
|
+
includeBreaking: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Strict Code Review
|
|
2
|
+
|
|
3
|
+
## For Dev Agent
|
|
4
|
+
- Every function MUST have explicit return types
|
|
5
|
+
- No `any` type allowed, use `unknown` if needed
|
|
6
|
+
- All public APIs must have JSDoc comments
|
|
7
|
+
- Error handling must use custom error classes, not generic Error
|
|
8
|
+
|
|
9
|
+
## For QA Agent
|
|
10
|
+
- Verify test coverage >= 80% for new code
|
|
11
|
+
- Check for missing edge case tests
|
|
12
|
+
- Validate error messages are user-friendly
|
|
13
|
+
- Ensure no console.log left in production code
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# RGPD Compliance
|
|
2
|
+
|
|
3
|
+
## For Analyst Agent
|
|
4
|
+
- Flag any feature that collects, stores, or processes personal data
|
|
5
|
+
- Identify data retention requirements
|
|
6
|
+
- Note if consent mechanisms are needed
|
|
7
|
+
|
|
8
|
+
## For Dev Agent
|
|
9
|
+
- Personal data must be encrypted at rest and in transit
|
|
10
|
+
- Implement data anonymization for logs
|
|
11
|
+
- Add data deletion endpoints for right-to-erasure compliance
|
|
12
|
+
- Never log personal data (emails, names, IPs) in plain text
|
|
13
|
+
|
|
14
|
+
## For QA Agent
|
|
15
|
+
- Verify no personal data leaks in error messages
|
|
16
|
+
- Check that data deletion actually removes all traces
|
|
17
|
+
- Validate consent flow completeness
|
|
18
|
+
- Test data export (right to portability)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Dead Code Detector
|
|
2
|
+
|
|
3
|
+
## For QA Agent
|
|
4
|
+
|
|
5
|
+
Scan all new and modified files for dead code. Your goal is to keep the codebase lean by identifying code that serves no purpose.
|
|
6
|
+
|
|
7
|
+
### What to detect
|
|
8
|
+
|
|
9
|
+
1. **Unused exports**: functions, classes, constants, or types exported but never imported elsewhere in the project
|
|
10
|
+
2. **Unused imports**: imported symbols that are never referenced in the file
|
|
11
|
+
3. **Unreachable code**: statements after `return`, `throw`, `break`, `continue`, or inside always-false conditions
|
|
12
|
+
4. **Unused variables and parameters**: declared but never read (except destructuring rest)
|
|
13
|
+
5. **Dead branches**: conditions that are always true or always false based on type narrowing
|
|
14
|
+
6. **Commented-out code blocks**: large blocks of commented code that should be removed (version control exists)
|
|
15
|
+
|
|
16
|
+
### Exclusions
|
|
17
|
+
|
|
18
|
+
Do NOT flag the following as dead code:
|
|
19
|
+
|
|
20
|
+
- Variables prefixed with `_` (intentional unused marker)
|
|
21
|
+
- Re-exports from barrel `index.ts` files
|
|
22
|
+
- Interface/type declarations that serve as public API contracts
|
|
23
|
+
- Decorator-referenced symbols (e.g., NestJS `@Injectable()` classes)
|
|
24
|
+
|
|
25
|
+
### Output Format
|
|
26
|
+
|
|
27
|
+
For each finding, emit:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
DEAD_CODE_FINDING:
|
|
31
|
+
- type: unused-export | unused-import | unreachable | unused-variable | dead-branch | commented-code
|
|
32
|
+
- file: <path>
|
|
33
|
+
- line: <line number or range>
|
|
34
|
+
- symbol: <name of the dead symbol>
|
|
35
|
+
- suggestion: <remove | refactor | verify usage>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Summarize with a total count of findings by type at the end of the review.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Dependency Audit
|
|
2
|
+
|
|
3
|
+
## For Analyst Agent
|
|
4
|
+
|
|
5
|
+
When evaluating the feature request, assess any new dependencies that may be required:
|
|
6
|
+
|
|
7
|
+
1. **Maturity**: Is the package well-established? Check download counts, GitHub stars, age
|
|
8
|
+
2. **Bundle size**: Will it significantly increase the bundle? Are there lighter alternatives?
|
|
9
|
+
3. **Maintenance**: Is it actively maintained? Last publish date, open issues ratio, bus factor
|
|
10
|
+
4. **Transitive dependencies**: How deep is the dependency tree? Does it pull in large subtrees?
|
|
11
|
+
5. **Alternatives**: List at least one alternative for each new dependency with pros/cons
|
|
12
|
+
|
|
13
|
+
Include dependency assessment in your analysis output under a `## Dependencies` section.
|
|
14
|
+
|
|
15
|
+
## For QA Agent
|
|
16
|
+
|
|
17
|
+
Audit all new and existing dependencies referenced in the changed code:
|
|
18
|
+
|
|
19
|
+
### Vulnerability checks
|
|
20
|
+
- Flag any dependency with known CVEs at or above the configured `maxSeverity` (default: high)
|
|
21
|
+
- Check for advisories in npm/GitHub advisory database
|
|
22
|
+
- Flag dependencies that are more than 2 major versions behind latest
|
|
23
|
+
|
|
24
|
+
### License compliance
|
|
25
|
+
- Flag dependencies using blocked licenses (default: GPL-3.0, AGPL-3.0)
|
|
26
|
+
- Verify license compatibility with the project's license
|
|
27
|
+
- Flag dependencies with no declared license
|
|
28
|
+
|
|
29
|
+
### Stability checks
|
|
30
|
+
- Flag pre-release versions (alpha, beta, rc) in production dependencies
|
|
31
|
+
- Flag dependencies with fewer than 100 weekly downloads
|
|
32
|
+
- Flag dependencies not updated in over 2 years
|
|
33
|
+
|
|
34
|
+
### Output Format
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
DEPENDENCY_FINDING:
|
|
38
|
+
- package: <name@version>
|
|
39
|
+
- type: vulnerability | license | stability | size
|
|
40
|
+
- severity: critical | high | medium | low
|
|
41
|
+
- description: <what was found>
|
|
42
|
+
- recommendation: <update | replace | accept-risk | remove>
|
|
43
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: dependency-audit
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: Audit dependencies for vulnerabilities, license compliance, and maturity
|
|
4
|
+
agents:
|
|
5
|
+
- analyst
|
|
6
|
+
- qa
|
|
7
|
+
modes:
|
|
8
|
+
- standard
|
|
9
|
+
- enterprise
|
|
10
|
+
priority: 20
|
|
11
|
+
enabled: true
|
|
12
|
+
config:
|
|
13
|
+
maxSeverity: high
|
|
14
|
+
blockedLicenses:
|
|
15
|
+
- GPL-3.0
|
|
16
|
+
- AGPL-3.0
|
|
17
|
+
allowedLicenses: []
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# HIPAA Guard
|
|
2
|
+
|
|
3
|
+
## For Analyst Agent
|
|
4
|
+
|
|
5
|
+
When analyzing features that involve Protected Health Information (PHI), assess:
|
|
6
|
+
|
|
7
|
+
1. **PHI identification**: Flag any data field matching configured PHI fields (name, dob, ssn, mrn, address, phone, email, insurance_id)
|
|
8
|
+
2. **Data flow mapping**: Trace where PHI enters, is stored, transmitted, and displayed
|
|
9
|
+
3. **Minimum necessary**: Verify the feature only accesses PHI that is strictly required
|
|
10
|
+
4. **Risk level**: Rate the PHI exposure risk (high/medium/low) based on volume and sensitivity
|
|
11
|
+
|
|
12
|
+
Include a `## HIPAA Assessment` section in your analysis output.
|
|
13
|
+
|
|
14
|
+
## For Dev Agent
|
|
15
|
+
|
|
16
|
+
When implementing features that handle PHI:
|
|
17
|
+
|
|
18
|
+
### Encryption
|
|
19
|
+
- All PHI at rest MUST be encrypted with AES-256 (or configured algorithm)
|
|
20
|
+
- All PHI in transit MUST use TLS 1.2+
|
|
21
|
+
- Encryption keys MUST be managed via a key management service, never hardcoded
|
|
22
|
+
|
|
23
|
+
### Access control
|
|
24
|
+
- All PHI access MUST require authentication and authorization
|
|
25
|
+
- Implement role-based access control (RBAC) for PHI endpoints
|
|
26
|
+
- Implement "break-the-glass" emergency access with mandatory audit logging
|
|
27
|
+
|
|
28
|
+
### Audit logging
|
|
29
|
+
- Log ALL PHI access events: who accessed what, when, from where
|
|
30
|
+
- Log ALL PHI modifications with before/after values (encrypted)
|
|
31
|
+
- Audit logs MUST be retained for minimum 2190 days (6 years) per config
|
|
32
|
+
- Audit logs MUST be tamper-evident (append-only, integrity checks)
|
|
33
|
+
|
|
34
|
+
### Data handling
|
|
35
|
+
- Never log PHI in plain text — mask or redact in all log outputs
|
|
36
|
+
- Never include PHI in error messages or stack traces
|
|
37
|
+
- Implement data retention policies with automated purge
|
|
38
|
+
- Support patient data export and deletion requests
|
|
39
|
+
|
|
40
|
+
## For QA Agent
|
|
41
|
+
|
|
42
|
+
Verify all HIPAA requirements are met in the implementation:
|
|
43
|
+
|
|
44
|
+
1. PHI fields are encrypted at rest and in transit
|
|
45
|
+
2. Access control is enforced on all PHI endpoints
|
|
46
|
+
3. Audit logging captures all required events
|
|
47
|
+
4. No PHI leaks into logs, error messages, or client-side storage
|
|
48
|
+
5. Break-the-glass mechanism exists for emergency access
|
|
49
|
+
|
|
50
|
+
### Output Format
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
HIPAA_FINDING:
|
|
54
|
+
- rule: encryption | access-control | audit-log | data-handling | minimum-necessary
|
|
55
|
+
- severity: critical | high | medium
|
|
56
|
+
- file: <path>
|
|
57
|
+
- line: <line number>
|
|
58
|
+
- description: <what violates HIPAA>
|
|
59
|
+
- remediation: <specific fix>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Any `critical` HIPAA finding MUST cause QA to fail.
|