mdan-cli 2.2.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/README.md +223 -0
- package/agents/AGENTS-REGISTRY.md +215 -0
- package/agents/architect.md +160 -0
- package/agents/dev.md +166 -0
- package/agents/devops.md +230 -0
- package/agents/doc.md +189 -0
- package/agents/learn.md +377 -0
- package/agents/product.md +124 -0
- package/agents/security.md +168 -0
- package/agents/test.md +151 -0
- package/agents/ux.md +207 -0
- package/cli/mdan.js +505 -0
- package/cli/mdan.py +259 -0
- package/cli/mdan.sh +724 -0
- package/cli/postinstall.js +4 -0
- package/core/orchestrator.md +238 -0
- package/core/universal-envelope.md +160 -0
- package/install.sh +228 -0
- package/integrations/all-integrations.md +300 -0
- package/integrations/claude.md +46 -0
- package/integrations/cursor.md +74 -0
- package/integrations/windsurf.md +48 -0
- package/memory/MDAN-STATE.template.json +44 -0
- package/memory/MEMORY-SYSTEM.md +197 -0
- package/package.json +48 -0
- package/phases/01-discover.md +136 -0
- package/phases/02-design.md +147 -0
- package/phases/03-build.md +113 -0
- package/phases/04-verify.md +101 -0
- package/phases/05-ship.md +156 -0
- package/skills/find-skills/skill.md +133 -0
- package/templates/ARCHITECTURE.md +186 -0
- package/templates/CHANGELOG.md +41 -0
- package/templates/MDAN-KNOWLEDGE.md +73 -0
- package/templates/PRD.md +120 -0
- package/templates/SECURITY-REVIEW.md +99 -0
- package/templates/TEST-PLAN.md +97 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: find-skills
|
|
3
|
+
description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Find Skills
|
|
7
|
+
|
|
8
|
+
This skill helps you discover and install skills from the open agent skills ecosystem.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Use this skill when the user:
|
|
13
|
+
|
|
14
|
+
- Asks "how do I do X" where X might be a common task with an existing skill
|
|
15
|
+
- Says "find a skill for X" or "is there a skill for X"
|
|
16
|
+
- Asks "can you do X" where X is a specialized capability
|
|
17
|
+
- Expresses interest in extending agent capabilities
|
|
18
|
+
- Wants to search for tools, templates, or workflows
|
|
19
|
+
- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
|
|
20
|
+
|
|
21
|
+
## What is the Skills CLI?
|
|
22
|
+
|
|
23
|
+
The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
|
|
24
|
+
|
|
25
|
+
**Key commands:**
|
|
26
|
+
|
|
27
|
+
- `npx skills find [query]` - Search for skills interactively or by keyword
|
|
28
|
+
- `npx skills add <package>` - Install a skill from GitHub or other sources
|
|
29
|
+
- `npx skills check` - Check for skill updates
|
|
30
|
+
- `npx skills update` - Update all installed skills
|
|
31
|
+
|
|
32
|
+
**Browse skills at:** https://skills.sh/
|
|
33
|
+
|
|
34
|
+
## How to Help Users Find Skills
|
|
35
|
+
|
|
36
|
+
### Step 1: Understand What They Need
|
|
37
|
+
|
|
38
|
+
When a user asks for help with something, identify:
|
|
39
|
+
|
|
40
|
+
1. The domain (e.g., React, testing, design, deployment)
|
|
41
|
+
2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
|
|
42
|
+
3. Whether this is a common enough task that a skill likely exists
|
|
43
|
+
|
|
44
|
+
### Step 2: Search for Skills
|
|
45
|
+
|
|
46
|
+
Run the find command with a relevant query:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx skills find [query]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For example:
|
|
53
|
+
|
|
54
|
+
- User asks "how do I make my React app faster?" → `npx skills find react performance`
|
|
55
|
+
- User asks "can you help me with PR reviews?" → `npx skills find pr review`
|
|
56
|
+
- User asks "I need to create a changelog" → `npx skills find changelog`
|
|
57
|
+
|
|
58
|
+
The command will return results like:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Install with npx skills add <owner/repo@skill>
|
|
62
|
+
|
|
63
|
+
vercel-labs/agent-skills@vercel-react-best-practices
|
|
64
|
+
└ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 3: Present Options to the User
|
|
68
|
+
|
|
69
|
+
When you find relevant skills, present them to the user with:
|
|
70
|
+
|
|
71
|
+
1. The skill name and what it does
|
|
72
|
+
2. The install command they can run
|
|
73
|
+
3. A link to learn more at skills.sh
|
|
74
|
+
|
|
75
|
+
Example response:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
I found a skill that might help! The "vercel-react-best-practices" skill provides
|
|
79
|
+
React and Next.js performance optimization guidelines from Vercel Engineering.
|
|
80
|
+
|
|
81
|
+
To install it:
|
|
82
|
+
npx skills add vercel-labs/agent-skills@vercel-react-best-practices
|
|
83
|
+
|
|
84
|
+
Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Step 4: Offer to Install
|
|
88
|
+
|
|
89
|
+
If the user wants to proceed, you can install the skill for them:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx skills add <owner/repo@skill> -g -y
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
|
|
96
|
+
|
|
97
|
+
## Common Skill Categories
|
|
98
|
+
|
|
99
|
+
When searching, consider these common categories:
|
|
100
|
+
|
|
101
|
+
| Category | Example Queries |
|
|
102
|
+
| --------------- | ---------------------------------------- |
|
|
103
|
+
| Web Development | react, nextjs, typescript, css, tailwind |
|
|
104
|
+
| Testing | testing, jest, playwright, e2e |
|
|
105
|
+
| DevOps | deploy, docker, kubernetes, ci-cd |
|
|
106
|
+
| Documentation | docs, readme, changelog, api-docs |
|
|
107
|
+
| Code Quality | review, lint, refactor, best-practices |
|
|
108
|
+
| Design | ui, ux, design-system, accessibility |
|
|
109
|
+
| Productivity | workflow, automation, git |
|
|
110
|
+
|
|
111
|
+
## Tips for Effective Searches
|
|
112
|
+
|
|
113
|
+
1. **Use specific keywords**: "react testing" is better than just "testing"
|
|
114
|
+
2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
|
|
115
|
+
3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
|
|
116
|
+
|
|
117
|
+
## When No Skills Are Found
|
|
118
|
+
|
|
119
|
+
If no relevant skills exist:
|
|
120
|
+
|
|
121
|
+
1. Acknowledge that no existing skill was found
|
|
122
|
+
2. Offer to help with the task directly using your general capabilities
|
|
123
|
+
3. Suggest the user could create their own skill with `npx skills init`
|
|
124
|
+
|
|
125
|
+
Example:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
I searched for skills related to "xyz" but didn't find any matches.
|
|
129
|
+
I can still help you with this task directly! Would you like me to proceed?
|
|
130
|
+
|
|
131
|
+
If this is something you do often, you could create your own skill:
|
|
132
|
+
npx skills init my-xyz-skill
|
|
133
|
+
```
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# MDAN Template — Architecture Document
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
**Artifact:** Architecture Document
|
|
5
|
+
**Phase:** DESIGN
|
|
6
|
+
**Agent:** Architect Agent
|
|
7
|
+
**Version:** [X.Y]
|
|
8
|
+
**Status:** Draft | Review | Validated
|
|
9
|
+
**Date:** [YYYY-MM-DD]
|
|
10
|
+
**Project:** [Project Name]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Architecture Overview
|
|
14
|
+
|
|
15
|
+
**Pattern chosen:** [Monolith / Microservices / Serverless / Event-driven / Hybrid]
|
|
16
|
+
**Justification:** [Why this pattern for this project]
|
|
17
|
+
|
|
18
|
+
## 2. System Diagram
|
|
19
|
+
|
|
20
|
+
```mermaid
|
|
21
|
+
graph TD
|
|
22
|
+
Client[Client - Web/Mobile] --> API[API Gateway]
|
|
23
|
+
API --> Auth[Auth Service]
|
|
24
|
+
API --> App[Application Service]
|
|
25
|
+
App --> DB[(Database)]
|
|
26
|
+
App --> Cache[(Cache)]
|
|
27
|
+
App --> Queue[Message Queue]
|
|
28
|
+
Queue --> Worker[Background Worker]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 3. Technology Stack
|
|
32
|
+
|
|
33
|
+
| Layer | Technology | Version | Justification |
|
|
34
|
+
|-------|-----------|---------|---------------|
|
|
35
|
+
| Frontend | [e.g., React] | [18.x] | [Reason] |
|
|
36
|
+
| Backend | [e.g., Node.js] | [20.x] | [Reason] |
|
|
37
|
+
| Database | [e.g., PostgreSQL] | [16.x] | [Reason] |
|
|
38
|
+
| Cache | [e.g., Redis] | [7.x] | [Reason] |
|
|
39
|
+
| Auth | [e.g., Auth0] | Latest | [Reason] |
|
|
40
|
+
| Search | [e.g., N/A] | — | — |
|
|
41
|
+
| Queue | [e.g., N/A] | — | — |
|
|
42
|
+
| Storage | [e.g., S3] | — | [Reason] |
|
|
43
|
+
| Hosting | [e.g., Railway] | — | [Reason] |
|
|
44
|
+
| CDN | [e.g., Cloudflare] | — | [Reason] |
|
|
45
|
+
|
|
46
|
+
## 4. Data Models
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Entity: User
|
|
50
|
+
Fields:
|
|
51
|
+
- id: UUID (PK, auto-generated)
|
|
52
|
+
- email: VARCHAR(255) (UNIQUE, NOT NULL)
|
|
53
|
+
- password_hash: VARCHAR(255) (NOT NULL)
|
|
54
|
+
- display_name: VARCHAR(100) (NOT NULL)
|
|
55
|
+
- role: ENUM('user', 'admin') (DEFAULT 'user')
|
|
56
|
+
- created_at: TIMESTAMP (DEFAULT NOW())
|
|
57
|
+
- updated_at: TIMESTAMP (DEFAULT NOW())
|
|
58
|
+
- deleted_at: TIMESTAMP (NULL, soft delete)
|
|
59
|
+
|
|
60
|
+
Entity: [Name]
|
|
61
|
+
Fields:
|
|
62
|
+
- [field]: [type] ([constraints])
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Relationships:**
|
|
66
|
+
- User has many [Entity] (1:N)
|
|
67
|
+
- [Entity] belongs to User (N:1)
|
|
68
|
+
|
|
69
|
+
## 5. API Design
|
|
70
|
+
|
|
71
|
+
**Base URL:** `/api/v1`
|
|
72
|
+
**Auth:** Bearer JWT token in `Authorization` header
|
|
73
|
+
**Format:** JSON request/response
|
|
74
|
+
**Versioning:** URL path versioning (`/v1`, `/v2`)
|
|
75
|
+
|
|
76
|
+
### Endpoints
|
|
77
|
+
|
|
78
|
+
| Method | Path | Description | Auth Required |
|
|
79
|
+
|--------|------|-------------|---------------|
|
|
80
|
+
| POST | `/auth/register` | Register new user | No |
|
|
81
|
+
| POST | `/auth/login` | Login | No |
|
|
82
|
+
| POST | `/auth/refresh` | Refresh token | Yes |
|
|
83
|
+
| GET | `/users/me` | Get current user | Yes |
|
|
84
|
+
| GET | `/[resource]` | List resources | Yes |
|
|
85
|
+
| POST | `/[resource]` | Create resource | Yes |
|
|
86
|
+
| GET | `/[resource]/:id` | Get resource | Yes |
|
|
87
|
+
| PUT | `/[resource]/:id` | Update resource | Yes |
|
|
88
|
+
| DELETE | `/[resource]/:id` | Delete resource | Yes |
|
|
89
|
+
|
|
90
|
+
### Error Response Format
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"error": {
|
|
94
|
+
"code": "VALIDATION_ERROR",
|
|
95
|
+
"message": "Human-readable message",
|
|
96
|
+
"details": [
|
|
97
|
+
{ "field": "email", "message": "Invalid email format" }
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 6. Authentication & Authorization
|
|
104
|
+
|
|
105
|
+
**Authentication:** JWT (access token 15min, refresh token 7 days)
|
|
106
|
+
**Authorization:** Role-Based Access Control (RBAC)
|
|
107
|
+
|
|
108
|
+
Roles:
|
|
109
|
+
- `user` — Standard access to own resources
|
|
110
|
+
- `admin` — Full access to all resources
|
|
111
|
+
|
|
112
|
+
**Token storage:** HttpOnly cookies (not localStorage)
|
|
113
|
+
|
|
114
|
+
## 7. Security Architecture
|
|
115
|
+
|
|
116
|
+
| Concern | Solution |
|
|
117
|
+
|---------|----------|
|
|
118
|
+
| Password storage | Argon2id, min cost 3 |
|
|
119
|
+
| API rate limiting | 100 req/min per IP, 1000 req/min per user |
|
|
120
|
+
| CORS | Whitelist: [domains] |
|
|
121
|
+
| HTTPS | Enforced, HSTS header |
|
|
122
|
+
| Secret management | Environment variables only |
|
|
123
|
+
| SQL injection | ORM with parameterized queries |
|
|
124
|
+
| XSS | Output encoding, CSP headers |
|
|
125
|
+
|
|
126
|
+
## 8. Non-Functional Requirements
|
|
127
|
+
|
|
128
|
+
| Requirement | Target | Strategy |
|
|
129
|
+
|-------------|--------|----------|
|
|
130
|
+
| Response time | p95 < 200ms | Caching, DB indexing |
|
|
131
|
+
| Availability | 99.9% | Health checks, auto-restart |
|
|
132
|
+
| Data retention | [X months] | Soft deletes, archiving |
|
|
133
|
+
| Backup | Daily | Automated DB backup |
|
|
134
|
+
|
|
135
|
+
## 9. Project Structure
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
[project-name]/
|
|
139
|
+
├── src/
|
|
140
|
+
│ ├── config/ # Environment and app configuration
|
|
141
|
+
│ ├── middleware/ # Express/framework middleware
|
|
142
|
+
│ ├── modules/
|
|
143
|
+
│ │ └── [feature]/
|
|
144
|
+
│ │ ├── [feature].controller.ts
|
|
145
|
+
│ │ ├── [feature].service.ts
|
|
146
|
+
│ │ ├── [feature].repository.ts
|
|
147
|
+
│ │ ├── [feature].dto.ts
|
|
148
|
+
│ │ └── [feature].test.ts
|
|
149
|
+
│ ├── shared/ # Shared utilities, types, constants
|
|
150
|
+
│ └── index.ts # App entry point
|
|
151
|
+
├── tests/
|
|
152
|
+
│ ├── integration/
|
|
153
|
+
│ └── e2e/
|
|
154
|
+
├── mdan_output/
|
|
155
|
+
├── .env.example
|
|
156
|
+
├── Dockerfile
|
|
157
|
+
├── docker-compose.yml
|
|
158
|
+
└── README.md
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## 10. Coding Conventions
|
|
162
|
+
|
|
163
|
+
- **Language:** [TypeScript 5.x]
|
|
164
|
+
- **Style guide:** [Airbnb / Standard / PEP8]
|
|
165
|
+
- **Linting:** [ESLint + Prettier / Ruff]
|
|
166
|
+
- **Naming:**
|
|
167
|
+
- Variables/functions: camelCase
|
|
168
|
+
- Classes: PascalCase
|
|
169
|
+
- Constants: UPPER_SNAKE_CASE
|
|
170
|
+
- Files: kebab-case
|
|
171
|
+
- **Git branches:** `main` → `develop` → `feature/[name]`
|
|
172
|
+
- **Commit format:** `type(scope): description` (Conventional Commits)
|
|
173
|
+
|
|
174
|
+
## 11. Architecture Decision Records
|
|
175
|
+
|
|
176
|
+
### ADR-001: [Decision Title]
|
|
177
|
+
- **Status:** Accepted
|
|
178
|
+
- **Date:** [YYYY-MM-DD]
|
|
179
|
+
- **Context:** [Why this decision was needed]
|
|
180
|
+
- **Decision:** [What was decided]
|
|
181
|
+
- **Consequences:** [Trade-offs, positive and negative]
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
*Architecture validated by:* ________________
|
|
186
|
+
*Date:* ________________
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
-
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
-
|
|
17
|
+
|
|
18
|
+
### Deprecated
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
-
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
-
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
-
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [1.0.0] — YYYY-MM-DD
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- Initial release
|
|
36
|
+
- [Feature 1]
|
|
37
|
+
- [Feature 2]
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
*Generated by MDAN Doc Agent*
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# MDAN-KNOWLEDGE.md
|
|
2
|
+
|
|
3
|
+
> Fichier de connaissance du projet, généré et maintenu par le Learn Agent.
|
|
4
|
+
> Ce fichier est la source de vérité pour toute la connaissance ingérée.
|
|
5
|
+
> Ne pas modifier manuellement — utiliser `mdan learn` ou activer Learn Agent.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Métadonnées
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Projet : {{PROJECT_NAME}}
|
|
13
|
+
Généré le : {{DATE}}
|
|
14
|
+
Dernière MAJ : {{DATE}}
|
|
15
|
+
Learn Agent : v1.0.0
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Skills actifs
|
|
21
|
+
|
|
22
|
+
*(Vide — aucun skill appris pour l'instant)*
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## MCP Servers actifs
|
|
27
|
+
|
|
28
|
+
*(Vide — aucun MCP configuré pour l'instant)*
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Règles actives
|
|
33
|
+
|
|
34
|
+
*(Vide — aucune règle ingérée pour l'instant)*
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Capsules par agent
|
|
39
|
+
|
|
40
|
+
### Dev Agent
|
|
41
|
+
*(Aucune capsule)*
|
|
42
|
+
|
|
43
|
+
### Architect Agent
|
|
44
|
+
*(Aucune capsule)*
|
|
45
|
+
|
|
46
|
+
### Security Agent
|
|
47
|
+
*(Aucune capsule)*
|
|
48
|
+
|
|
49
|
+
### Test Agent
|
|
50
|
+
*(Aucune capsule)*
|
|
51
|
+
|
|
52
|
+
### DevOps Agent
|
|
53
|
+
*(Aucune capsule)*
|
|
54
|
+
|
|
55
|
+
### Doc Agent
|
|
56
|
+
*(Aucune capsule)*
|
|
57
|
+
|
|
58
|
+
### Product Agent
|
|
59
|
+
*(Aucune capsule)*
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Conflits détectés
|
|
64
|
+
|
|
65
|
+
*(Aucun conflit)*
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Historique d'apprentissage
|
|
70
|
+
|
|
71
|
+
| ID | Source | Type | Date | Agents ciblés | Statut |
|
|
72
|
+
|----|--------|------|------|---------------|--------|
|
|
73
|
+
| — | — | — | — | — | — |
|
package/templates/PRD.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# MDAN Template — Product Requirements Document (PRD)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
**Artifact:** Product Requirements Document
|
|
5
|
+
**Phase:** DISCOVER
|
|
6
|
+
**Agent:** Product Agent
|
|
7
|
+
**Version:** [X.Y]
|
|
8
|
+
**Status:** Draft | Review | Validated
|
|
9
|
+
**Date:** [YYYY-MM-DD]
|
|
10
|
+
**Project:** [Project Name]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Executive Summary
|
|
14
|
+
|
|
15
|
+
[2-3 sentences. What this product does. Who it's for. Why it exists now.]
|
|
16
|
+
|
|
17
|
+
## 2. Problem Statement
|
|
18
|
+
|
|
19
|
+
**The problem:** [Specific, concrete description of the problem]
|
|
20
|
+
**Who has this problem:** [Target users]
|
|
21
|
+
**Current pain:** [What users do today and why it's insufficient]
|
|
22
|
+
**Cost of inaction:** [What happens if this problem isn't solved]
|
|
23
|
+
|
|
24
|
+
## 3. Target Users
|
|
25
|
+
|
|
26
|
+
### Primary Persona: [Persona Name]
|
|
27
|
+
| Attribute | Detail |
|
|
28
|
+
|-----------|--------|
|
|
29
|
+
| Role | [Job title or life role] |
|
|
30
|
+
| Age range | [Optional] |
|
|
31
|
+
| Goals | [What they want to achieve] |
|
|
32
|
+
| Pain points | [What frustrates them today] |
|
|
33
|
+
| Technical level | Beginner / Intermediate / Expert |
|
|
34
|
+
| Usage context | [Where/when they use the product] |
|
|
35
|
+
|
|
36
|
+
### Secondary Persona: [Persona Name] *(if applicable)*
|
|
37
|
+
[Same structure]
|
|
38
|
+
|
|
39
|
+
## 4. Solution Overview
|
|
40
|
+
|
|
41
|
+
[High-level description of the proposed solution. NOT a technical spec. What it does for the user.]
|
|
42
|
+
|
|
43
|
+
## 5. User Stories
|
|
44
|
+
|
|
45
|
+
### Epic 1: [Epic Name]
|
|
46
|
+
*[Brief description of what this epic covers]*
|
|
47
|
+
|
|
48
|
+
- [ ] **US-001:** As a [persona], I want to [action] so that [benefit]
|
|
49
|
+
**Priority:** Must Have
|
|
50
|
+
**Acceptance Criteria:**
|
|
51
|
+
- Given [context], When [action], Then [outcome]
|
|
52
|
+
- Given [context], When [edge case], Then [outcome]
|
|
53
|
+
|
|
54
|
+
- [ ] **US-002:** As a [persona], I want to [action] so that [benefit]
|
|
55
|
+
**Priority:** Must Have
|
|
56
|
+
**Acceptance Criteria:**
|
|
57
|
+
- Given [context], When [action], Then [outcome]
|
|
58
|
+
|
|
59
|
+
### Epic 2: [Epic Name]
|
|
60
|
+
|
|
61
|
+
- [ ] **US-003:** ...
|
|
62
|
+
|
|
63
|
+
## 6. Feature Prioritization (MoSCoW)
|
|
64
|
+
|
|
65
|
+
### 🔴 Must Have — MVP (without these, the product cannot launch)
|
|
66
|
+
- **[Feature Name]:** [One sentence description]
|
|
67
|
+
- **[Feature Name]:** [One sentence description]
|
|
68
|
+
|
|
69
|
+
### 🟡 Should Have — Version 1.1 (important but not blocking)
|
|
70
|
+
- **[Feature Name]:** [One sentence description]
|
|
71
|
+
|
|
72
|
+
### 🟢 Could Have — Backlog (nice to have)
|
|
73
|
+
- **[Feature Name]:** [One sentence description]
|
|
74
|
+
|
|
75
|
+
### ⚪ Won't Have — Explicitly excluded
|
|
76
|
+
- **[Feature Name]:** [Reason for exclusion]
|
|
77
|
+
|
|
78
|
+
## 7. Success Metrics
|
|
79
|
+
|
|
80
|
+
| Metric | Type | Current Baseline | Target | Timeframe |
|
|
81
|
+
|--------|------|-----------------|--------|-----------|
|
|
82
|
+
| [e.g., Daily Active Users] | KPI | [Now or N/A] | [Goal] | [3 months] |
|
|
83
|
+
| [e.g., Task completion time] | KPI | [Now] | [Goal] | [Launch] |
|
|
84
|
+
| [e.g., Error rate] | Technical | [Now] | [< X%] | [Launch] |
|
|
85
|
+
|
|
86
|
+
## 8. Constraints & Assumptions
|
|
87
|
+
|
|
88
|
+
### Constraints (hard limits)
|
|
89
|
+
- **Timeline:** [Deadline if any]
|
|
90
|
+
- **Budget:** [Budget if any]
|
|
91
|
+
- **Team:** [Size and skills]
|
|
92
|
+
- **Technology:** [Existing tech that must be kept]
|
|
93
|
+
- **Regulatory:** [Compliance requirements]
|
|
94
|
+
|
|
95
|
+
### Assumptions (things believed to be true, unverified)
|
|
96
|
+
- [Assumption 1]
|
|
97
|
+
- [Assumption 2]
|
|
98
|
+
|
|
99
|
+
## 9. Risks
|
|
100
|
+
|
|
101
|
+
| Risk | Probability | Impact | Mitigation Plan |
|
|
102
|
+
|------|-------------|--------|-----------------|
|
|
103
|
+
| [Risk description] | High / Med / Low | High / Med / Low | [Mitigation] |
|
|
104
|
+
|
|
105
|
+
## 10. Explicitly Out of Scope
|
|
106
|
+
|
|
107
|
+
The following will NOT be built in this version:
|
|
108
|
+
- [Item 1] — [Reason]
|
|
109
|
+
- [Item 2] — [Reason]
|
|
110
|
+
|
|
111
|
+
## 11. Open Questions
|
|
112
|
+
|
|
113
|
+
| Question | Owner | Due Date | Status |
|
|
114
|
+
|----------|-------|----------|--------|
|
|
115
|
+
| [Question] | [Person/Agent] | [Date] | Open |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
*PRD validated by:* ________________
|
|
120
|
+
*Date:* ________________
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# MDAN Template — Security Review
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
**Artifact:** Security Review
|
|
5
|
+
**Phase:** VERIFY
|
|
6
|
+
**Agent:** Security Agent v1.0.0
|
|
7
|
+
**Version:** [X.Y]
|
|
8
|
+
**Status:** Draft | Review | Signed Off
|
|
9
|
+
**Date:** [YYYY-MM-DD]
|
|
10
|
+
**Project:** [Project Name]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Threat Model (STRIDE)
|
|
14
|
+
|
|
15
|
+
### Assets à protéger
|
|
16
|
+
| Asset | Sensibilité | Localisation |
|
|
17
|
+
|-------|-------------|--------------|
|
|
18
|
+
| Credentials utilisateurs | Critique | DB (hashés) |
|
|
19
|
+
| Données personnelles | Élevée | DB |
|
|
20
|
+
| Clés API | Critique | Variables d'environnement |
|
|
21
|
+
|
|
22
|
+
### Surface d'attaque
|
|
23
|
+
| Point d'entrée | Description | Niveau de risque |
|
|
24
|
+
|---------------|-------------|-----------------|
|
|
25
|
+
| API REST | Endpoints HTTP publics | Élevé |
|
|
26
|
+
| Interface admin | Dashboard interne | Moyen |
|
|
27
|
+
|
|
28
|
+
### Analyse STRIDE
|
|
29
|
+
| Menace | Composant | Mitigation |
|
|
30
|
+
|--------|-----------|-----------|
|
|
31
|
+
| Spoofing | Auth | JWT + refresh tokens |
|
|
32
|
+
| Tampering | API inputs | Validation stricte |
|
|
33
|
+
| Repudiation | Actions user | Audit logging |
|
|
34
|
+
| Info Disclosure | API responses | Filtrage des réponses |
|
|
35
|
+
| DoS | Endpoints publics | Rate limiting |
|
|
36
|
+
| Elevation of Privilege | RBAC | Vérification sur chaque endpoint |
|
|
37
|
+
|
|
38
|
+
## 2. Findings
|
|
39
|
+
|
|
40
|
+
### 🔴 CRITICAL — Bloquer la release
|
|
41
|
+
|
|
42
|
+
#### VULN-001: [Nom]
|
|
43
|
+
- **Type :** [Catégorie OWASP]
|
|
44
|
+
- **Localisation :** [Fichier/Endpoint]
|
|
45
|
+
- **Description :** [Ce que c'est]
|
|
46
|
+
- **Impact :** [Ce qu'un attaquant peut faire]
|
|
47
|
+
- **Reproduction :** [Comment reproduire]
|
|
48
|
+
- **Remédiation :** [Fix exact avec code si applicable]
|
|
49
|
+
- **Statut :** ⏳ Open | ✅ Fixed | ⚠️ Accepted
|
|
50
|
+
|
|
51
|
+
### 🟠 HIGH — Corriger avant release
|
|
52
|
+
|
|
53
|
+
### 🟡 MEDIUM — Corriger dans le prochain sprint
|
|
54
|
+
|
|
55
|
+
### 🔵 LOW — Tracker et corriger éventuellement
|
|
56
|
+
|
|
57
|
+
## 3. Security Checklist
|
|
58
|
+
|
|
59
|
+
### Authentification
|
|
60
|
+
- [ ] Mots de passe hashés avec bcrypt/argon2 (cost factor ≥ 12)
|
|
61
|
+
- [ ] Tokens JWT avec expiration + refresh
|
|
62
|
+
- [ ] Protection brute force (rate limiting sur /auth)
|
|
63
|
+
- [ ] Invalidation de session au logout
|
|
64
|
+
|
|
65
|
+
### Autorisation
|
|
66
|
+
- [ ] Vérification auth sur CHAQUE endpoint protégé
|
|
67
|
+
- [ ] Contrôle d'accès horizontal (user A ne peut pas accéder aux données de user B)
|
|
68
|
+
- [ ] RBAC implémenté correctement
|
|
69
|
+
- [ ] Fonctions admin séparément protégées
|
|
70
|
+
|
|
71
|
+
### Validation des inputs
|
|
72
|
+
- [ ] Tous les inputs validés côté serveur
|
|
73
|
+
- [ ] Requêtes SQL paramétrées (jamais d'interpolation)
|
|
74
|
+
- [ ] Uploads : validation type, taille, stockage hors web root
|
|
75
|
+
- [ ] Encoding des outputs pour prévenir XSS
|
|
76
|
+
|
|
77
|
+
### Protection des données
|
|
78
|
+
- [ ] HTTPS enforced partout
|
|
79
|
+
- [ ] Données sensibles non loggées
|
|
80
|
+
- [ ] PII traité selon exigences réglementaires
|
|
81
|
+
- [ ] Backups chiffrés
|
|
82
|
+
|
|
83
|
+
### Dépendances
|
|
84
|
+
- [ ] Aucune CVE critique connue dans les dépendances
|
|
85
|
+
- [ ] Lockfile commité
|
|
86
|
+
- [ ] Scan CVE automatisé en CI/CD
|
|
87
|
+
|
|
88
|
+
## 4. Sign-Off
|
|
89
|
+
|
|
90
|
+
| Findings | Total | Résolus | Acceptés | Restants |
|
|
91
|
+
|----------|-------|---------|----------|---------|
|
|
92
|
+
| Critical | — | — | — | — |
|
|
93
|
+
| High | — | — | — | — |
|
|
94
|
+
| Medium | — | — | — | — |
|
|
95
|
+
| Low | — | — | — | — |
|
|
96
|
+
|
|
97
|
+
**Security sign-off :** ________________ **Date :** ________________
|
|
98
|
+
|
|
99
|
+
*Conditions de sign-off : 0 Critical open, 0 High open (ou acceptés avec justification documentée)*
|