mdan-cli 2.2.0 → 2.3.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/.mcp.json +46 -0
- package/AGENTS.md +246 -0
- package/README.md +30 -5
- package/agents/test.md +60 -2
- package/cli/mdan.js +129 -6
- package/install.sh +30 -167
- package/integrations/mcp.md +153 -0
- package/package.json +4 -2
- package/phases/04-verify.md +9 -3
- package/templates/prompts/README.md +108 -0
- package/templates/prompts/dev-agent.yaml +85 -0
- package/templates/prompts/orchestrator.yaml +97 -0
- package/templates/prompts.json +81 -0
- package/templates/tests/evaluations/README.md +80 -0
- package/templates/tests/evaluations/classification_eval.md +136 -0
- package/templates/tests/evaluations/rag_eval.md +116 -0
- package/templates/tests/scenarios/README.md +62 -0
- package/templates/tests/scenarios/basic_authentication.test.md +82 -0
- package/templates/tests/scenarios/user_registration.test.md +107 -0
package/install.sh
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
3
|
# ============================================================
|
|
4
|
-
# MDAN Installer
|
|
4
|
+
# MDAN Installer (Remote Fetch)
|
|
5
5
|
# ============================================================
|
|
6
6
|
|
|
7
7
|
set -e
|
|
@@ -15,6 +15,7 @@ NC='\033[0m'
|
|
|
15
15
|
|
|
16
16
|
INSTALL_DIR="$HOME/.mdan"
|
|
17
17
|
BIN_DIR="$HOME/.local/bin"
|
|
18
|
+
REPO_URL="https://github.com/khalilbenaz/MDAN/archive/refs/heads/main.tar.gz"
|
|
18
19
|
|
|
19
20
|
echo -e "${CYAN}"
|
|
20
21
|
echo " ███╗ ███╗██████╗ █████╗ ███╗ ██╗"
|
|
@@ -27,9 +28,6 @@ echo -e "${NC}"
|
|
|
27
28
|
echo -e " ${BOLD}MDAN Installer${NC}"
|
|
28
29
|
echo ""
|
|
29
30
|
|
|
30
|
-
# Get the directory where this script is located
|
|
31
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
32
|
-
|
|
33
31
|
echo -e "${YELLOW}Installing MDAN...${NC}"
|
|
34
32
|
echo ""
|
|
35
33
|
|
|
@@ -37,171 +35,35 @@ echo ""
|
|
|
37
35
|
mkdir -p "$INSTALL_DIR"
|
|
38
36
|
mkdir -p "$BIN_DIR"
|
|
39
37
|
|
|
38
|
+
# Download and extract the repository
|
|
39
|
+
echo " ⬇️ Downloading latest MDAN files..."
|
|
40
|
+
TMP_DIR=$(mktemp -d)
|
|
41
|
+
curl -sL "$REPO_URL" | tar -xz -C "$TMP_DIR"
|
|
42
|
+
MDAN_SRC="$TMP_DIR/MDAN-main"
|
|
43
|
+
|
|
40
44
|
# Copy MDAN files
|
|
41
45
|
echo " 📁 Copying files to $INSTALL_DIR..."
|
|
42
|
-
cp -r "$
|
|
43
|
-
cp -r "$
|
|
44
|
-
cp -r "$
|
|
45
|
-
cp -r "$
|
|
46
|
-
cp -r "$
|
|
47
|
-
cp -r "$
|
|
48
|
-
cp -r "$
|
|
49
|
-
cp "$
|
|
50
|
-
cp "$
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
cp -r "$MDAN_SRC/core" "$INSTALL_DIR/"
|
|
47
|
+
cp -r "$MDAN_SRC/agents" "$INSTALL_DIR/"
|
|
48
|
+
cp -r "$MDAN_SRC/phases" "$INSTALL_DIR/"
|
|
49
|
+
cp -r "$MDAN_SRC/templates" "$INSTALL_DIR/"
|
|
50
|
+
cp -r "$MDAN_SRC/integrations" "$INSTALL_DIR/"
|
|
51
|
+
cp -r "$MDAN_SRC/memory" "$INSTALL_DIR/"
|
|
52
|
+
cp -r "$MDAN_SRC/modules" "$INSTALL_DIR/" 2>/dev/null || true
|
|
53
|
+
cp -r "$MDAN_SRC/workflows" "$INSTALL_DIR/" 2>/dev/null || true
|
|
54
|
+
cp -r "$MDAN_SRC/skills" "$INSTALL_DIR/" 2>/dev/null || mkdir -p "$INSTALL_DIR/skills"
|
|
55
|
+
cp "$MDAN_SRC/MDAN.md" "$INSTALL_DIR/" 2>/dev/null || true
|
|
56
|
+
cp "$MDAN_SRC/MDAN.fr.md" "$INSTALL_DIR/" 2>/dev/null || true
|
|
57
|
+
|
|
58
|
+
# Cleanup
|
|
59
|
+
rm -rf "$TMP_DIR"
|
|
60
|
+
|
|
61
|
+
# Create the mdan command using the Node.js version instead of the bash version for better UX
|
|
62
|
+
echo " 🔧 Setting up CLI..."
|
|
54
63
|
cat > "$BIN_DIR/mdan" << 'MDAN_SCRIPT'
|
|
55
64
|
#!/bin/bash
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
MDAN_DIR="$HOME/.mdan"
|
|
59
|
-
|
|
60
|
-
# Colors
|
|
61
|
-
RED='\033[0;31m'
|
|
62
|
-
GREEN='\033[0;32m'
|
|
63
|
-
YELLOW='\033[1;33m'
|
|
64
|
-
CYAN='\033[0;36m'
|
|
65
|
-
MAGENTA='\033[0;35m'
|
|
66
|
-
BOLD='\033[1m'
|
|
67
|
-
NC='\033[0m'
|
|
68
|
-
|
|
69
|
-
banner() {
|
|
70
|
-
echo -e "${CYAN}"
|
|
71
|
-
echo " ███╗ ███╗██████╗ █████╗ ███╗ ██╗"
|
|
72
|
-
echo " ████╗ ████║██╔══██╗██╔══██╗████╗ ██║"
|
|
73
|
-
echo " ██╔████╔██║██║ ██║███████║██╔██╗ ██║"
|
|
74
|
-
echo " ██║╚██╔╝██║██║ ██║██╔══██║██║╚██╗██║"
|
|
75
|
-
echo " ██║ ╚═╝ ██║██████╔╝██║ ██║██║ ╚████║"
|
|
76
|
-
echo " ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝"
|
|
77
|
-
echo -e "${NC}"
|
|
78
|
-
echo -e " ${BOLD}Multi-Agent Development Agentic Network${NC} v${VERSION}"
|
|
79
|
-
echo ""
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
show_help() {
|
|
83
|
-
banner
|
|
84
|
-
echo -e "${BOLD}USAGE${NC}"
|
|
85
|
-
echo " mdan <command> [options]"
|
|
86
|
-
echo ""
|
|
87
|
-
echo -e "${BOLD}COMMANDS${NC}"
|
|
88
|
-
echo " init [name] Create a new project"
|
|
89
|
-
echo " attach [--rebuild] Add MDAN to existing project"
|
|
90
|
-
echo " status Show project status"
|
|
91
|
-
echo " phase [1-5] Show phase guide"
|
|
92
|
-
echo " agent [name] Show agent prompt"
|
|
93
|
-
echo " skills List available skills"
|
|
94
|
-
echo " version Show version"
|
|
95
|
-
echo ""
|
|
96
|
-
echo -e "${BOLD}EXAMPLES${NC}"
|
|
97
|
-
echo " mdan init my-app # New project"
|
|
98
|
-
echo " cd my-project && mdan attach # Existing project"
|
|
99
|
-
echo " mdan attach --rebuild # Rebuild from scratch"
|
|
100
|
-
echo ""
|
|
101
|
-
echo -e "${BOLD}AGENTS${NC}"
|
|
102
|
-
echo " product, architect, ux, dev, test, security, devops, doc"
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
cmd_init() {
|
|
106
|
-
PROJECT_NAME="${1:-my-project}"
|
|
107
|
-
echo -e "${CYAN}🚀 Creating: ${BOLD}${PROJECT_NAME}${NC}"
|
|
108
|
-
|
|
109
|
-
mkdir -p "${PROJECT_NAME}/.mdan/agents"
|
|
110
|
-
mkdir -p "${PROJECT_NAME}/.mdan/skills"
|
|
111
|
-
mkdir -p "${PROJECT_NAME}/docs"
|
|
112
|
-
mkdir -p "${PROJECT_NAME}/.claude/skills"
|
|
113
|
-
mkdir -p "${PROJECT_NAME}/.github"
|
|
114
|
-
|
|
115
|
-
cp "${MDAN_DIR}/core/orchestrator.md" "${PROJECT_NAME}/.mdan/"
|
|
116
|
-
cp "${MDAN_DIR}/core/universal-envelope.md" "${PROJECT_NAME}/.mdan/"
|
|
117
|
-
cp "${MDAN_DIR}/agents/"*.md "${PROJECT_NAME}/.mdan/agents/"
|
|
118
|
-
cp "${MDAN_DIR}/templates/"*.md "${PROJECT_NAME}/mdan_output/"
|
|
119
|
-
cp -r "${MDAN_DIR}/skills/"* "${PROJECT_NAME}/.mdan/skills/" 2>/dev/null || true
|
|
120
|
-
cp -r "${MDAN_DIR}/skills/"* "${PROJECT_NAME}/.claude/skills/" 2>/dev/null || true
|
|
121
|
-
|
|
122
|
-
cat "${MDAN_DIR}/core/orchestrator.md" > "${PROJECT_NAME}/.cursorrules"
|
|
123
|
-
echo -e "\n## CURSOR INSTRUCTIONS\nAgent files in .mdan/agents/\nSkills in .mdan/skills/" >> "${PROJECT_NAME}/.cursorrules"
|
|
124
|
-
cp "${PROJECT_NAME}/.cursorrules" "${PROJECT_NAME}/.windsurfrules"
|
|
125
|
-
cp "${MDAN_DIR}/core/orchestrator.md" "${PROJECT_NAME}/.github/copilot-instructions.md"
|
|
126
|
-
|
|
127
|
-
echo "# ${PROJECT_NAME}\n\n> Built with MDAN" > "${PROJECT_NAME}/README.md"
|
|
128
|
-
|
|
129
|
-
echo -e "${GREEN}✅ Created ${PROJECT_NAME}/${NC}"
|
|
130
|
-
echo ""
|
|
131
|
-
echo " ${BOLD}Next:${NC} cursor ${PROJECT_NAME}"
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
cmd_attach() {
|
|
135
|
-
REBUILD="${1}"
|
|
136
|
-
PROJECT_NAME=$(basename "$PWD")
|
|
137
|
-
|
|
138
|
-
if [[ "$REBUILD" == "--rebuild" ]]; then
|
|
139
|
-
echo -e "${MAGENTA}🔄 REBUILD MODE: ${BOLD}${PROJECT_NAME}${NC}"
|
|
140
|
-
else
|
|
141
|
-
echo -e "${CYAN}🔗 Attaching to: ${BOLD}${PROJECT_NAME}${NC}"
|
|
142
|
-
fi
|
|
143
|
-
|
|
144
|
-
mkdir -p .mdan/agents .mdan/skills .claude/skills .github
|
|
145
|
-
|
|
146
|
-
cp "${MDAN_DIR}/core/orchestrator.md" .mdan/
|
|
147
|
-
cp "${MDAN_DIR}/core/universal-envelope.md" .mdan/
|
|
148
|
-
cp "${MDAN_DIR}/agents/"*.md .mdan/agents/
|
|
149
|
-
cp -r "${MDAN_DIR}/skills/"* .mdan/skills/ 2>/dev/null || true
|
|
150
|
-
cp -r "${MDAN_DIR}/skills/"* .claude/skills/ 2>/dev/null || true
|
|
151
|
-
|
|
152
|
-
cat "${MDAN_DIR}/core/orchestrator.md" > .cursorrules
|
|
153
|
-
if [[ "$REBUILD" == "--rebuild" ]]; then
|
|
154
|
-
echo -e "\n## REBUILD MODE\nAnalyze existing code then rewrite from scratch." >> .cursorrules
|
|
155
|
-
else
|
|
156
|
-
echo -e "\n## EXISTING PROJECT\nAnalyze codebase before making changes." >> .cursorrules
|
|
157
|
-
fi
|
|
158
|
-
cp .cursorrules .windsurfrules
|
|
159
|
-
cp "${MDAN_DIR}/core/orchestrator.md" .github/copilot-instructions.md
|
|
160
|
-
|
|
161
|
-
echo -e "${GREEN}✅ MDAN ready!${NC}"
|
|
162
|
-
echo ""
|
|
163
|
-
if [[ "$REBUILD" == "--rebuild" ]]; then
|
|
164
|
-
echo " Start: ${CYAN}MDAN REBUILD: Analyze and rewrite this project${NC}"
|
|
165
|
-
else
|
|
166
|
-
echo " Start: ${CYAN}MDAN: Analyze this project${NC}"
|
|
167
|
-
fi
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
cmd_status() {
|
|
171
|
-
if [[ -f ".mdan/orchestrator.md" ]]; then
|
|
172
|
-
echo -e "${GREEN}✅ MDAN is active in this project${NC}"
|
|
173
|
-
[[ -f ".mdan/STATUS.md" ]] && cat .mdan/STATUS.md
|
|
174
|
-
else
|
|
175
|
-
echo -e "${YELLOW}No MDAN project here.${NC}"
|
|
176
|
-
echo " Run: mdan init [name] or mdan attach"
|
|
177
|
-
fi
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
cmd_phase() {
|
|
181
|
-
[[ -f "${MDAN_DIR}/phases/0${1}-"*.md ]] && cat "${MDAN_DIR}/phases/0${1}-"*.md || echo "Phase 1-5"
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
cmd_agent() {
|
|
185
|
-
[[ -f "${MDAN_DIR}/agents/${1}.md" ]] && cat "${MDAN_DIR}/agents/${1}.md" || echo "Agents: product, architect, ux, dev, test, security, devops, doc"
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
cmd_skills() {
|
|
189
|
-
echo -e "${CYAN}Skills:${NC}"
|
|
190
|
-
ls "${MDAN_DIR}/skills/" 2>/dev/null || echo " No skills installed"
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
# Main
|
|
194
|
-
case "${1}" in
|
|
195
|
-
init) cmd_init "$2" ;;
|
|
196
|
-
attach) cmd_attach "$2" ;;
|
|
197
|
-
status) cmd_status ;;
|
|
198
|
-
phase) cmd_phase "$2" ;;
|
|
199
|
-
agent) cmd_agent "$2" ;;
|
|
200
|
-
skills) cmd_skills ;;
|
|
201
|
-
version|-v) echo "MDAN v${VERSION}" ;;
|
|
202
|
-
help|--help|-h|"") show_help ;;
|
|
203
|
-
*) echo "Unknown: $1. Run: mdan help" ;;
|
|
204
|
-
esac
|
|
65
|
+
# Wrapper to run the npx version of mdan-cli to ensure the interactive wizard works
|
|
66
|
+
npx --yes mdan-cli "$@"
|
|
205
67
|
MDAN_SCRIPT
|
|
206
68
|
|
|
207
69
|
chmod +x "$BIN_DIR/mdan"
|
|
@@ -223,6 +85,7 @@ echo ""
|
|
|
223
85
|
echo -e "${GREEN}✅ MDAN installed successfully!${NC}"
|
|
224
86
|
echo ""
|
|
225
87
|
echo -e " ${BOLD}Usage:${NC}"
|
|
226
|
-
echo " mdan init
|
|
227
|
-
echo "
|
|
88
|
+
echo " mdan init # Interactive setup"
|
|
89
|
+
echo " mdan init my-project # Quick setup"
|
|
90
|
+
echo " cd existing && mdan attach"
|
|
228
91
|
echo ""
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# MDAN MCP Integration
|
|
2
|
+
|
|
3
|
+
> Configure Model Context Protocol for MDAN with your IDE
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
MDAN supports MCP (Model Context Protocol) to provide your coding assistant (Cursor, Claude Code, Windsurf) with deep understanding of MDAN workflows, agents, and best practices.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
### 1. Generate MCP Config
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# In your MDAN project
|
|
15
|
+
mdan mcp init
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This creates `.mcp.json` in your project root.
|
|
19
|
+
|
|
20
|
+
### 2. Configure Your IDE
|
|
21
|
+
|
|
22
|
+
#### Cursor
|
|
23
|
+
1. Open Cursor Settings → Features → Models
|
|
24
|
+
2. MCP should auto-detect `.mcp.json`
|
|
25
|
+
3. Or manually add via: Settings → Developer → Edit MCP Config
|
|
26
|
+
|
|
27
|
+
#### Claude Code
|
|
28
|
+
```bash
|
|
29
|
+
claude mcp add mdan --project path/to/your/project
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Windsurf
|
|
33
|
+
MCP configs are auto-discovered from `.mcp.json` in project root.
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
### .mcp.json Structure
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"mdan-memory": { ... }
|
|
43
|
+
},
|
|
44
|
+
"capabilities": {
|
|
45
|
+
"scenarios": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"test_paths": ["tests/scenarios/"]
|
|
48
|
+
},
|
|
49
|
+
"evaluations": {
|
|
50
|
+
"enabled": true,
|
|
51
|
+
"eval_paths": ["tests/evaluations/"]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"agent_prompts": {
|
|
55
|
+
"dev": "templates/prompts/dev-agent.yaml"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Available MCP Tools
|
|
61
|
+
|
|
62
|
+
### mdan-state
|
|
63
|
+
|
|
64
|
+
Read/write MDAN project state.
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// Read current state
|
|
68
|
+
const state = await mdan_state({ action: "read" });
|
|
69
|
+
|
|
70
|
+
// Write state
|
|
71
|
+
await mdan_state({ action: "write", data: { phase: "BUILD", progress: 50 } });
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### mdan-agents
|
|
75
|
+
|
|
76
|
+
List available MDAN agents.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const agents = await mdan_agents();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### mdan-phases
|
|
83
|
+
|
|
84
|
+
Get phase information.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
const phase = await mdan_phases({ name: "VERIFY" });
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## IDE Integration Examples
|
|
91
|
+
|
|
92
|
+
### Cursor Rules Auto-Generation
|
|
93
|
+
|
|
94
|
+
When you run `mdan init` or `mdan attach`, MDAN automatically generates:
|
|
95
|
+
|
|
96
|
+
- `.cursorrules` - Cursor-specific instructions
|
|
97
|
+
- `.windsurfrules` - Windsurf-specific instructions
|
|
98
|
+
- `.github/copilot-instructions.md` - Copilot instructions
|
|
99
|
+
|
|
100
|
+
### Agent Context
|
|
101
|
+
|
|
102
|
+
MCP provides your IDE with access to:
|
|
103
|
+
|
|
104
|
+
1. **Agent prompts** - Full agent definitions for context
|
|
105
|
+
2. **Phase workflows** - Current phase and next steps
|
|
106
|
+
3. **Quality gates** - What's required to pass
|
|
107
|
+
4. **Test templates** - Scenario and evaluation paths
|
|
108
|
+
|
|
109
|
+
## Troubleshooting
|
|
110
|
+
|
|
111
|
+
### MCP not detected
|
|
112
|
+
|
|
113
|
+
1. Check `.mcp.json` is valid JSON
|
|
114
|
+
2. Restart your IDE
|
|
115
|
+
3. Check IDE MCP documentation
|
|
116
|
+
|
|
117
|
+
### Tools not available
|
|
118
|
+
|
|
119
|
+
1. Verify MCP server is running
|
|
120
|
+
2. Check console for errors
|
|
121
|
+
3. Try regenerating config: `mdan mcp init --force`
|
|
122
|
+
|
|
123
|
+
## Commands
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
mdan mcp init # Generate MCP config
|
|
127
|
+
mdan mcp validate # Validate config
|
|
128
|
+
mdan mcp list # Show available tools
|
|
129
|
+
mdan mcp update # Update to latest version
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Framework Support
|
|
133
|
+
|
|
134
|
+
| IDE | MCP Support | Auto-detect |
|
|
135
|
+
|-----|--------------|-------------|
|
|
136
|
+
| Cursor | ✅ Full | ✅ |
|
|
137
|
+
| Claude Code | ✅ Full | ✅ |
|
|
138
|
+
| Windsurf | ✅ Full | ✅ |
|
|
139
|
+
| VS Code | ✅ Via extension | Manual |
|
|
140
|
+
|
|
141
|
+
## Integration with Better Agents
|
|
142
|
+
|
|
143
|
+
MDAN's MCP config is compatible with Better Agents:
|
|
144
|
+
|
|
145
|
+
- Scenarios in `tests/scenarios/` are auto-discovered
|
|
146
|
+
- Evaluations in `tests/evaluations/` are available
|
|
147
|
+
- Prompts from `templates/prompts/` are versioned
|
|
148
|
+
|
|
149
|
+
This allows you to use Better Agents CLI alongside MDAN:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx @langwatch/better-agents test --scenarios tests/scenarios/
|
|
153
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdan-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Multi-Agent Development Agentic Network - A modern, adaptive, LLM-agnostic methodology for building software",
|
|
5
5
|
"main": "cli/mdan.js",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"integrations/",
|
|
40
40
|
"memory/",
|
|
41
41
|
"skills/",
|
|
42
|
-
"install.sh"
|
|
42
|
+
"install.sh",
|
|
43
|
+
".mcp.json",
|
|
44
|
+
"AGENTS.md"
|
|
43
45
|
],
|
|
44
46
|
"dependencies": {
|
|
45
47
|
"@clack/prompts": "^1.0.1",
|
package/phases/04-verify.md
CHANGED
|
@@ -38,11 +38,13 @@ Implemented features: [List of completed features]
|
|
|
38
38
|
|
|
39
39
|
Expected output:
|
|
40
40
|
1. Complete test plan
|
|
41
|
-
2. Unit tests for all features
|
|
41
|
+
2. Unit tests for all features (80%+ coverage)
|
|
42
42
|
3. Integration tests for critical flows
|
|
43
43
|
4. E2E test scenarios
|
|
44
|
-
5.
|
|
45
|
-
6.
|
|
44
|
+
5. Scenario tests (Better Agents format)
|
|
45
|
+
6. Evaluation datasets (if RAG/ML features)
|
|
46
|
+
7. Performance test criteria
|
|
47
|
+
8. Test results summary
|
|
46
48
|
```
|
|
47
49
|
|
|
48
50
|
---
|
|
@@ -77,6 +79,8 @@ Testing:
|
|
|
77
79
|
[ ] Test coverage meets target (e.g., 80%)
|
|
78
80
|
[ ] Integration tests pass
|
|
79
81
|
[ ] At least 3 E2E scenarios pass
|
|
82
|
+
[ ] Scenario tests pass (Better Agents format)
|
|
83
|
+
[ ] Evaluation benchmarks pass (if RAG/ML features)
|
|
80
84
|
[ ] Performance criteria are met
|
|
81
85
|
|
|
82
86
|
Security:
|
|
@@ -99,3 +103,5 @@ Quality:
|
|
|
99
103
|
|---|---|---|---|
|
|
100
104
|
| Test Plan | `templates/TEST-PLAN.md` | Test Agent | Complete |
|
|
101
105
|
| Security Report | `templates/SECURITY-REVIEW.md` | Security Agent | Signed off |
|
|
106
|
+
| Scenarios | `templates/tests/scenarios/*.test.md` | Test Agent | Pass |
|
|
107
|
+
| Evaluations | `templates/tests/evaluations/*.md` | Test Agent | Pass thresholds |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Prompts Versioning Index
|
|
2
|
+
|
|
3
|
+
> Version-controlled prompts for MDAN agents
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Prompts are versioned using YAML files for better collaboration, tracking, and rollback capabilities.
|
|
8
|
+
|
|
9
|
+
## Available Prompts
|
|
10
|
+
|
|
11
|
+
| Prompt | Version | Agent |
|
|
12
|
+
|--------|---------|-------|
|
|
13
|
+
| [orchestrator.yaml](prompts/orchestrator.yaml) | 2.2.0 | MDAN Core |
|
|
14
|
+
| [dev-agent.yaml](prompts/dev-agent.yaml) | 2.0.0 | Haytame (Dev) |
|
|
15
|
+
| [product-agent.yaml](prompts/product-agent.yaml) | 2.0.0 | Khalil (Product) |
|
|
16
|
+
| [architect-agent.yaml](prompts/architect-agent.yaml) | 2.0.0 | Reda (Architect) |
|
|
17
|
+
| [test-agent.yaml](prompts/test-agent.yaml) | 2.0.0 | Youssef (Test) |
|
|
18
|
+
|
|
19
|
+
## Prompt Format
|
|
20
|
+
|
|
21
|
+
Each prompt file follows this structure:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
handle: agent-handle
|
|
25
|
+
scope: PROJECT # or GLOBAL
|
|
26
|
+
model: openai/gpt-4o
|
|
27
|
+
version: 1.0.0
|
|
28
|
+
last_updated: "2026-02-24"
|
|
29
|
+
maintainer: username
|
|
30
|
+
|
|
31
|
+
description: Brief description
|
|
32
|
+
|
|
33
|
+
system_prompt: |
|
|
34
|
+
Full prompt content with:
|
|
35
|
+
- Role definition
|
|
36
|
+
- Capabilities
|
|
37
|
+
- Constraints
|
|
38
|
+
- Output format
|
|
39
|
+
|
|
40
|
+
capabilities:
|
|
41
|
+
- Capability 1
|
|
42
|
+
- Capability 2
|
|
43
|
+
|
|
44
|
+
constraints:
|
|
45
|
+
- Constraint 1
|
|
46
|
+
- Constraint 2
|
|
47
|
+
|
|
48
|
+
changelog:
|
|
49
|
+
- version: 1.0.0
|
|
50
|
+
date: "2026-02-24"
|
|
51
|
+
changes:
|
|
52
|
+
- Change 1
|
|
53
|
+
- Change 2
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Using Prompts
|
|
57
|
+
|
|
58
|
+
### CLI Commands
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# List all prompts
|
|
62
|
+
mdan prompt list
|
|
63
|
+
|
|
64
|
+
# Show specific prompt
|
|
65
|
+
mdan prompt show orchestrator
|
|
66
|
+
|
|
67
|
+
# Compare versions
|
|
68
|
+
mdan prompt diff orchestrator 2.1.0 2.2.0
|
|
69
|
+
|
|
70
|
+
# Rollback prompt
|
|
71
|
+
mdan prompt rollback orchestrator 2.1.0
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Integration with IDE
|
|
75
|
+
|
|
76
|
+
Prompts are synced to:
|
|
77
|
+
- `.claude/skills/` - For Claude/Cursor
|
|
78
|
+
- `.windsurfrules` - For Windsurf
|
|
79
|
+
- `.github/copilot-instructions.md` - For Copilot
|
|
80
|
+
|
|
81
|
+
## Registry
|
|
82
|
+
|
|
83
|
+
The `prompts.json` file tracks all prompts:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"prompts": {
|
|
88
|
+
"orchestrator": {
|
|
89
|
+
"version": "2.2.0",
|
|
90
|
+
"active": true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Best Practices
|
|
97
|
+
|
|
98
|
+
1. **Version bump on any change** - Even small tweaks warrant a version bump
|
|
99
|
+
2. **Document changes** - Always add changelog entries
|
|
100
|
+
3. **Test prompts** - Validate prompts before releasing
|
|
101
|
+
4. **Use semantic versioning** - MAJOR for breaking, MINOR for features, PATCH for fixes
|
|
102
|
+
|
|
103
|
+
## Adding New Prompts
|
|
104
|
+
|
|
105
|
+
1. Create YAML file in `templates/prompts/`
|
|
106
|
+
2. Add entry to `prompts.json`
|
|
107
|
+
3. Update registry version
|
|
108
|
+
4. Commit with descriptive message
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
handle: dev-agent
|
|
2
|
+
scope: PROJECT
|
|
3
|
+
model: openai/gpt-4o
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
last_updated: "2026-02-24"
|
|
6
|
+
maintainer: khalilbenaz
|
|
7
|
+
|
|
8
|
+
description: MDAN Dev Agent (Haytame) - Senior full-stack developer responsible for implementation, code quality, and technical decisions.
|
|
9
|
+
|
|
10
|
+
system_prompt: |
|
|
11
|
+
[MDAN-AGENT]
|
|
12
|
+
NAME: Dev Agent (Haytame)
|
|
13
|
+
VERSION: 2.0.0
|
|
14
|
+
ROLE: Senior Full-Stack Developer responsible for implementation
|
|
15
|
+
PHASE: BUILD
|
|
16
|
+
REPORTS_TO: MDAN Core
|
|
17
|
+
|
|
18
|
+
You are Haytame, a senior full-stack developer with 10+ years of experience.
|
|
19
|
+
You write clean, maintainable, production-ready code. You care about:
|
|
20
|
+
- Code readability over cleverness
|
|
21
|
+
- Testing as a safety net
|
|
22
|
+
- Security by default
|
|
23
|
+
- Performance optimization when needed
|
|
24
|
+
|
|
25
|
+
Your philosophy:
|
|
26
|
+
- "Code is read more than written"
|
|
27
|
+
- "The best code is no code"
|
|
28
|
+
- "Always consider the next developer"
|
|
29
|
+
- "Security is not optional"
|
|
30
|
+
|
|
31
|
+
capabilities:
|
|
32
|
+
- Implement features from user stories
|
|
33
|
+
- Write unit, integration, and e2e tests
|
|
34
|
+
- Create API endpoints
|
|
35
|
+
- Design database schemas
|
|
36
|
+
- Set up CI/CD pipelines
|
|
37
|
+
- Perform code reviews
|
|
38
|
+
- Refactor existing code
|
|
39
|
+
- Optimize performance
|
|
40
|
+
- Fix bugs
|
|
41
|
+
|
|
42
|
+
constraints:
|
|
43
|
+
- NEVER skip tests
|
|
44
|
+
- NEVER commit secrets/keys to repository
|
|
45
|
+
- NEVER bypass security checks
|
|
46
|
+
- ALWAYS use type hints (TypeScript/Python)
|
|
47
|
+
- ALWAYS handle errors explicitly
|
|
48
|
+
- NEVER expose stack traces to users
|
|
49
|
+
- ALWAYS use environment variables for config
|
|
50
|
+
|
|
51
|
+
input_format: |
|
|
52
|
+
MDAN Core provides:
|
|
53
|
+
- User stories with acceptance criteria
|
|
54
|
+
- Architecture document
|
|
55
|
+
- UX designs/wireframes
|
|
56
|
+
- Previous implementation context (if any)
|
|
57
|
+
|
|
58
|
+
output_format: |
|
|
59
|
+
Produce implementation artifacts:
|
|
60
|
+
- Implementation Plan (file structure, dependencies, sequence)
|
|
61
|
+
- Code Files (source, types, configs)
|
|
62
|
+
- Tests (unit 80%+, integration, e2e)
|
|
63
|
+
- Setup Instructions (env vars, run locally, migrations)
|
|
64
|
+
|
|
65
|
+
quality_checklist:
|
|
66
|
+
- All acceptance criteria implemented
|
|
67
|
+
- Code follows style guide
|
|
68
|
+
- No TODO/FIXME in production
|
|
69
|
+
- All tests pass
|
|
70
|
+
- No security vulnerabilities
|
|
71
|
+
- Error handling comprehensive
|
|
72
|
+
- Logging appropriate
|
|
73
|
+
- Performance addressed
|
|
74
|
+
|
|
75
|
+
changelog:
|
|
76
|
+
- version: 2.0.0
|
|
77
|
+
date: "2026-02-24"
|
|
78
|
+
changes:
|
|
79
|
+
- Added implementation plan format
|
|
80
|
+
- Added setup instructions section
|
|
81
|
+
- Added coding standards reference
|
|
82
|
+
- version: 1.0.0
|
|
83
|
+
date: "2025-10-01"
|
|
84
|
+
changes:
|
|
85
|
+
- Initial release
|