@iservu-inc/adf-cli 0.11.0 → 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/.adf/feature-audit.md +208 -0
- package/.adf/final-summary.md +347 -0
- package/.adf/implementation-plan.md +244 -0
- package/.adf/implementation-progress.md +203 -0
- package/.adf/learning/answer-history.json +995 -0
- package/.adf/learning/config.json +25 -0
- package/.adf/learning/learned-rules.json +59 -0
- package/.adf/learning/patterns.json +277 -0
- package/.adf/learning/skip-history.json +1451 -0
- package/.adf/learning/stats.json +9 -0
- package/.claude/settings.local.json +3 -1
- package/CHANGELOG.md +110 -0
- package/CLAUDE.md +479 -0
- package/lib/commands/deploy.js +42 -2
- package/lib/generators/agents-md-generator.js +431 -161
- package/lib/generators/antigravity-generator.js +140 -0
- package/lib/generators/index.js +22 -0
- package/lib/generators/zed-generator.js +252 -0
- package/lib/templates/shared/agents/architect.md +24 -24
- package/lib/templates/shared/agents/dev.md +25 -20
- package/lib/templates/shared/agents/pm.md +14 -4
- package/lib/templates/shared/agents/sm.md +18 -14
- package/lib/templates/shared/templates/openspec-delta.md +16 -0
- package/lib/templates/shared/templates/openspec-proposal.md +18 -0
- package/lib/templates/shared/templates/openspec-tasks.md +21 -0
- package/lib/utils/context-manager.js +484 -0
- package/package.json +6 -1
- package/tests/agents-md-generator.test.js +47 -10
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const ToolConfigGenerator = require('./tool-config-generator');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generator for Google Antigravity configurations
|
|
7
|
+
* Creates .antigravity/agents.yaml that mounts AGENTS.md
|
|
8
|
+
* Provides file system access to .context/ directory
|
|
9
|
+
*/
|
|
10
|
+
class AntigravityGenerator extends ToolConfigGenerator {
|
|
11
|
+
/**
|
|
12
|
+
* Generate Antigravity configurations
|
|
13
|
+
* @returns {Object} Generated file paths
|
|
14
|
+
*/
|
|
15
|
+
async generate() {
|
|
16
|
+
await this.initialize();
|
|
17
|
+
|
|
18
|
+
const antigravityDir = path.join(this.projectPath, '.antigravity');
|
|
19
|
+
await fs.ensureDir(antigravityDir);
|
|
20
|
+
|
|
21
|
+
const generated = {
|
|
22
|
+
agents: null
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// Generate agents.yaml
|
|
26
|
+
generated.agents = await this.generateAgentsYaml(antigravityDir);
|
|
27
|
+
|
|
28
|
+
return generated;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Generate .antigravity/agents.yaml
|
|
33
|
+
*/
|
|
34
|
+
async generateAgentsYaml(antigravityDir) {
|
|
35
|
+
const agentsPath = path.join(antigravityDir, 'agents.yaml');
|
|
36
|
+
|
|
37
|
+
const agentName = this.getAgentName();
|
|
38
|
+
const model = this.getModelForFramework();
|
|
39
|
+
|
|
40
|
+
// Generate YAML content
|
|
41
|
+
const yamlContent = `# Antigravity Agent Configuration
|
|
42
|
+
# Generated by ADF CLI v${this.getADFVersion()}
|
|
43
|
+
# Framework: ${this.getFrameworkName()}
|
|
44
|
+
|
|
45
|
+
agents:
|
|
46
|
+
- name: "${agentName}"
|
|
47
|
+
model: "${model}"
|
|
48
|
+
capabilities:
|
|
49
|
+
- file_system:
|
|
50
|
+
read_only:
|
|
51
|
+
- "AGENTS.md"
|
|
52
|
+
- ".context"
|
|
53
|
+
- ".adf/sessions"
|
|
54
|
+
exclude:
|
|
55
|
+
- ".adf/.env"
|
|
56
|
+
- "node_modules"
|
|
57
|
+
- ".git"
|
|
58
|
+
system_prompt: |
|
|
59
|
+
You are ${agentName}, an expert AI coding assistant.
|
|
60
|
+
|
|
61
|
+
CRITICAL INSTRUCTIONS:
|
|
62
|
+
1. Read "AGENTS.md" IMMEDIATELY upon startup to understand project rules and structure
|
|
63
|
+
2. Consult ".context/memory/architecture.md" for system design decisions
|
|
64
|
+
3. Follow all operational rules defined in AGENTS.md (they are NON-NEGOTIABLE)
|
|
65
|
+
4. Never output secrets from .env files or expose API keys
|
|
66
|
+
5. All code changes must pass the test suite defined in AGENTS.md
|
|
67
|
+
|
|
68
|
+
WORKFLOW:
|
|
69
|
+
- Before any code change, read AGENTS.md and .context/memory/architecture.md
|
|
70
|
+
- Follow the build & test commands specified in AGENTS.md
|
|
71
|
+
- Adhere to the project structure and workflow directives
|
|
72
|
+
- Ask clarifying questions if requirements are unclear
|
|
73
|
+
|
|
74
|
+
PROJECT CONTEXT:
|
|
75
|
+
- Framework: ${this.getFrameworkName()}
|
|
76
|
+
- Session: ${this.getSessionId()}
|
|
77
|
+
- Complete requirements: .adf/sessions/${this.getSessionId()}/outputs/
|
|
78
|
+
|
|
79
|
+
Remember: AGENTS.md is your single source of truth. Read it first, follow it always.
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
await fs.writeFile(agentsPath, yamlContent, 'utf-8');
|
|
83
|
+
return agentsPath;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get agent name based on framework
|
|
88
|
+
*/
|
|
89
|
+
getAgentName() {
|
|
90
|
+
const projectName = this.getProjectName();
|
|
91
|
+
|
|
92
|
+
const roleMap = {
|
|
93
|
+
'rapid': 'Developer',
|
|
94
|
+
'balanced': 'Project Architect',
|
|
95
|
+
'comprehensive': 'Solutions Architect'
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const role = roleMap[this.framework] || 'Developer';
|
|
99
|
+
return `${projectName} ${role}`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Get appropriate model for framework complexity
|
|
104
|
+
*/
|
|
105
|
+
getModelForFramework() {
|
|
106
|
+
const modelMap = {
|
|
107
|
+
'rapid': 'gemini-2.0-flash-exp',
|
|
108
|
+
'balanced': 'gemini-2.0-flash-thinking-exp',
|
|
109
|
+
'comprehensive': 'gemini-exp-1206'
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return modelMap[this.framework] || 'gemini-2.0-flash-exp';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Get framework display name
|
|
117
|
+
*/
|
|
118
|
+
getFrameworkName() {
|
|
119
|
+
const names = {
|
|
120
|
+
'rapid': 'Rapid Development (PRP)',
|
|
121
|
+
'balanced': 'Balanced (Specification-Driven)',
|
|
122
|
+
'comprehensive': 'BMAD Comprehensive (Enterprise)'
|
|
123
|
+
};
|
|
124
|
+
return names[this.framework] || this.framework;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get ADF CLI version
|
|
129
|
+
*/
|
|
130
|
+
getADFVersion() {
|
|
131
|
+
try {
|
|
132
|
+
const packageJson = require('../../package.json');
|
|
133
|
+
return packageJson.version;
|
|
134
|
+
} catch (error) {
|
|
135
|
+
return '0.11.0';
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
module.exports = AntigravityGenerator;
|
package/lib/generators/index.js
CHANGED
|
@@ -7,6 +7,8 @@ const AgentsMdGenerator = require('./agents-md-generator');
|
|
|
7
7
|
const WindsurfGenerator = require('./windsurf-generator');
|
|
8
8
|
const CursorGenerator = require('./cursor-generator');
|
|
9
9
|
const VSCodeGenerator = require('./vscode-generator');
|
|
10
|
+
const ZedGenerator = require('./zed-generator');
|
|
11
|
+
const AntigravityGenerator = require('./antigravity-generator');
|
|
10
12
|
const ToolConfigGenerator = require('./tool-config-generator');
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -84,15 +86,35 @@ async function generateVSCode(sessionPath, projectPath, framework) {
|
|
|
84
86
|
return await generator.generate();
|
|
85
87
|
}
|
|
86
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Generate Zed Editor configurations
|
|
91
|
+
*/
|
|
92
|
+
async function generateZed(sessionPath, projectPath, framework) {
|
|
93
|
+
const generator = new ZedGenerator(sessionPath, projectPath, framework);
|
|
94
|
+
return await generator.generate();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Generate Google Antigravity configurations
|
|
99
|
+
*/
|
|
100
|
+
async function generateAntigravity(sessionPath, projectPath, framework) {
|
|
101
|
+
const generator = new AntigravityGenerator(sessionPath, projectPath, framework);
|
|
102
|
+
return await generator.generate();
|
|
103
|
+
}
|
|
104
|
+
|
|
87
105
|
module.exports = {
|
|
88
106
|
generateAll,
|
|
89
107
|
generateAgentsMd,
|
|
90
108
|
generateWindsurf,
|
|
91
109
|
generateCursor,
|
|
92
110
|
generateVSCode,
|
|
111
|
+
generateZed,
|
|
112
|
+
generateAntigravity,
|
|
93
113
|
AgentsMdGenerator,
|
|
94
114
|
WindsurfGenerator,
|
|
95
115
|
CursorGenerator,
|
|
96
116
|
VSCodeGenerator,
|
|
117
|
+
ZedGenerator,
|
|
118
|
+
AntigravityGenerator,
|
|
97
119
|
ToolConfigGenerator
|
|
98
120
|
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const ToolConfigGenerator = require('./tool-config-generator');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generator for Zed Editor configurations
|
|
7
|
+
* Creates .zed/settings.json with MCP integration and agent configuration
|
|
8
|
+
* Creates .zed/keymap.json for agent switching shortcuts
|
|
9
|
+
* Creates symlink .zed/rules -> ../AGENTS.md (or copies on Windows)
|
|
10
|
+
*/
|
|
11
|
+
class ZedGenerator extends ToolConfigGenerator {
|
|
12
|
+
/**
|
|
13
|
+
* Generate Zed Editor configurations
|
|
14
|
+
* @returns {Object} Generated file paths
|
|
15
|
+
*/
|
|
16
|
+
async generate() {
|
|
17
|
+
await this.initialize();
|
|
18
|
+
|
|
19
|
+
const zedDir = path.join(this.projectPath, '.zed');
|
|
20
|
+
await fs.ensureDir(zedDir);
|
|
21
|
+
|
|
22
|
+
const generated = {
|
|
23
|
+
settings: null,
|
|
24
|
+
keymap: null,
|
|
25
|
+
rules: null
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Generate settings.json
|
|
29
|
+
generated.settings = await this.generateSettings(zedDir);
|
|
30
|
+
|
|
31
|
+
// Generate keymap.json
|
|
32
|
+
generated.keymap = await this.generateKeymap(zedDir);
|
|
33
|
+
|
|
34
|
+
// Create symlink or copy AGENTS.md
|
|
35
|
+
generated.rules = await this.linkAgentsMd(zedDir);
|
|
36
|
+
|
|
37
|
+
return generated;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generate .zed/settings.json with MCP and agent configuration
|
|
42
|
+
*/
|
|
43
|
+
async generateSettings(zedDir) {
|
|
44
|
+
const settingsPath = path.join(zedDir, 'settings.json');
|
|
45
|
+
|
|
46
|
+
// Determine model configuration based on framework
|
|
47
|
+
const modelConfig = this.getModelConfiguration();
|
|
48
|
+
|
|
49
|
+
const settings = {
|
|
50
|
+
agent: {
|
|
51
|
+
default_model: modelConfig.default,
|
|
52
|
+
feature_specific_models: modelConfig.featureSpecific,
|
|
53
|
+
model_parameters: modelConfig.parameters,
|
|
54
|
+
always_allow_tool_actions: true,
|
|
55
|
+
single_file_review: true
|
|
56
|
+
},
|
|
57
|
+
context_servers: this.getMCPContextServers(),
|
|
58
|
+
terminal: {
|
|
59
|
+
env: this.getTerminalEnvironment()
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
await fs.writeJson(settingsPath, settings, { spaces: 2 });
|
|
64
|
+
return settingsPath;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get model configuration based on framework complexity
|
|
69
|
+
*/
|
|
70
|
+
getModelConfiguration() {
|
|
71
|
+
const configs = {
|
|
72
|
+
rapid: {
|
|
73
|
+
default: {
|
|
74
|
+
provider: 'anthropic',
|
|
75
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
76
|
+
},
|
|
77
|
+
featureSpecific: {
|
|
78
|
+
thread_summary_model: {
|
|
79
|
+
provider: 'google',
|
|
80
|
+
model: 'gemini-2.0-flash-exp'
|
|
81
|
+
},
|
|
82
|
+
commit_message_model: {
|
|
83
|
+
provider: 'google',
|
|
84
|
+
model: 'gemini-2.0-flash-exp'
|
|
85
|
+
},
|
|
86
|
+
inline_assistant_model: {
|
|
87
|
+
provider: 'anthropic',
|
|
88
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
parameters: [
|
|
92
|
+
{ provider: 'anthropic', temperature: 0.1 },
|
|
93
|
+
{ provider: 'google', temperature: 0.2 }
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
balanced: {
|
|
97
|
+
default: {
|
|
98
|
+
provider: 'anthropic',
|
|
99
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
100
|
+
},
|
|
101
|
+
featureSpecific: {
|
|
102
|
+
thread_summary_model: {
|
|
103
|
+
provider: 'google',
|
|
104
|
+
model: 'gemini-2.0-flash-exp'
|
|
105
|
+
},
|
|
106
|
+
commit_message_model: {
|
|
107
|
+
provider: 'google',
|
|
108
|
+
model: 'gemini-2.0-flash-exp'
|
|
109
|
+
},
|
|
110
|
+
inline_assistant_model: {
|
|
111
|
+
provider: 'anthropic',
|
|
112
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
parameters: [
|
|
116
|
+
{ provider: 'anthropic', temperature: 0.1 },
|
|
117
|
+
{ provider: 'google', temperature: 0.2 }
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
comprehensive: {
|
|
121
|
+
default: {
|
|
122
|
+
provider: 'anthropic',
|
|
123
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
124
|
+
},
|
|
125
|
+
featureSpecific: {
|
|
126
|
+
thread_summary_model: {
|
|
127
|
+
provider: 'anthropic',
|
|
128
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
129
|
+
},
|
|
130
|
+
commit_message_model: {
|
|
131
|
+
provider: 'anthropic',
|
|
132
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
133
|
+
},
|
|
134
|
+
inline_assistant_model: {
|
|
135
|
+
provider: 'anthropic',
|
|
136
|
+
model: 'claude-3-5-sonnet-20241022'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
parameters: [
|
|
140
|
+
{ provider: 'anthropic', temperature: 0.05 }
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
return configs[this.framework] || configs.balanced;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Get MCP context servers configuration
|
|
150
|
+
*/
|
|
151
|
+
getMCPContextServers() {
|
|
152
|
+
const servers = {
|
|
153
|
+
project_context: {
|
|
154
|
+
command: 'npx',
|
|
155
|
+
args: ['@modelcontextprotocol/server-filesystem', '.context']
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// Add Archon if configured
|
|
160
|
+
const archonUrl = process.env.ARCHON_MCP_URL || this.metadata?.archonUrl;
|
|
161
|
+
if (archonUrl) {
|
|
162
|
+
servers.archon = {
|
|
163
|
+
url: archonUrl
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return servers;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get terminal environment variables
|
|
172
|
+
*/
|
|
173
|
+
getTerminalEnvironment() {
|
|
174
|
+
const env = {};
|
|
175
|
+
|
|
176
|
+
// Add ARCHON_MCP_PORT if configured
|
|
177
|
+
if (process.env.ARCHON_MCP_URL) {
|
|
178
|
+
const url = new URL(process.env.ARCHON_MCP_URL);
|
|
179
|
+
if (url.port) {
|
|
180
|
+
env.ARCHON_MCP_PORT = url.port;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return env;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Generate .zed/keymap.json with agent switching shortcuts
|
|
189
|
+
*/
|
|
190
|
+
async generateKeymap(zedDir) {
|
|
191
|
+
const keymapPath = path.join(zedDir, 'keymap.json');
|
|
192
|
+
|
|
193
|
+
const keymap = [
|
|
194
|
+
{
|
|
195
|
+
context: 'Editor',
|
|
196
|
+
bindings: {
|
|
197
|
+
'ctrl-shift-a': 'assistant::Toggle',
|
|
198
|
+
'ctrl-shift-c': 'assistant::CycleMessageRole',
|
|
199
|
+
'ctrl-shift-r': 'assistant::Restart'
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
context: 'AssistantPanel',
|
|
204
|
+
bindings: {
|
|
205
|
+
'ctrl-enter': 'assistant::Assist',
|
|
206
|
+
'escape': 'assistant::Hide',
|
|
207
|
+
'ctrl-shift-n': 'assistant::NewConversation'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
];
|
|
211
|
+
|
|
212
|
+
await fs.writeJson(keymapPath, keymap, { spaces: 2 });
|
|
213
|
+
return keymapPath;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Create symlink .zed/rules -> ../AGENTS.md
|
|
218
|
+
* Falls back to file copy on Windows if symlink fails
|
|
219
|
+
*/
|
|
220
|
+
async linkAgentsMd(zedDir) {
|
|
221
|
+
const rulesPath = path.join(zedDir, 'rules');
|
|
222
|
+
const agentsMdPath = path.join(this.projectPath, 'AGENTS.md');
|
|
223
|
+
|
|
224
|
+
// Remove existing link/file if present
|
|
225
|
+
if (await fs.pathExists(rulesPath)) {
|
|
226
|
+
await fs.remove(rulesPath);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Check if AGENTS.md exists
|
|
230
|
+
if (!await fs.pathExists(agentsMdPath)) {
|
|
231
|
+
console.warn('AGENTS.md not found, skipping Zed rules link');
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
try {
|
|
236
|
+
// Try to create symlink (Unix/Mac/modern Windows)
|
|
237
|
+
await fs.symlink('../AGENTS.md', rulesPath, 'file');
|
|
238
|
+
return { type: 'symlink', path: rulesPath };
|
|
239
|
+
} catch (error) {
|
|
240
|
+
// Symlink failed (older Windows or permissions), copy file instead
|
|
241
|
+
try {
|
|
242
|
+
await fs.copy(agentsMdPath, rulesPath);
|
|
243
|
+
return { type: 'copy', path: rulesPath };
|
|
244
|
+
} catch (copyError) {
|
|
245
|
+
console.warn(`Failed to create Zed rules link: ${copyError.message}`);
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
module.exports = ZedGenerator;
|
|
@@ -9,9 +9,12 @@ dependencies:
|
|
|
9
9
|
templates:
|
|
10
10
|
- architecture-template.md
|
|
11
11
|
- tech-stack-template.md
|
|
12
|
+
- openspec-proposal.md
|
|
13
|
+
- openspec-delta.md
|
|
12
14
|
tasks:
|
|
13
15
|
- design-architecture.md
|
|
14
16
|
- validate-tech-stack.md
|
|
17
|
+
- create-openspec-proposal.md
|
|
15
18
|
data:
|
|
16
19
|
- constitution.md
|
|
17
20
|
- technical-preferences.md
|
|
@@ -222,32 +225,29 @@ Document all key decisions:
|
|
|
222
225
|
|
|
223
226
|
### Phase 6: Validation
|
|
224
227
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
- Do we have the expertise?
|
|
229
|
-
- Are there unknown unknowns?
|
|
228
|
+
...
|
|
229
|
+
|
|
230
|
+
## OpenSpec Brownfield Workflow
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
Use this workflow when modifying existing systems (1 -> n) to maintain a source of truth.
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
1. Initialize OpenSpec (if first time)
|
|
236
|
+
npx openspec init
|
|
235
237
|
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
238
|
+
2. Create Change Proposal
|
|
239
|
+
- Create directory: openspec/changes/<feature-name>/
|
|
240
|
+
- Create proposal.md using openspec-proposal.md template
|
|
241
|
+
- Create tasks.md using openspec-tasks.md template
|
|
240
242
|
|
|
241
|
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
243
|
+
3. Create Spec Deltas
|
|
244
|
+
- Identify existing specs in openspec/specs/
|
|
245
|
+
- Create delta files in openspec/changes/<feature-name>/specs/
|
|
246
|
+
- Use ## ADDED / ## MODIFIED / ## REMOVED markers
|
|
245
247
|
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
- Article 8: Security by design ✓
|
|
250
|
-
- Article 9: Performance as requirement ✓
|
|
248
|
+
4. Review & Align
|
|
249
|
+
- Present proposal and deltas to the team/user
|
|
250
|
+
- Iterate based on feedback until agreed
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
## Architecture Patterns
|
|
@@ -553,5 +553,5 @@ Ready for SM to create stories.
|
|
|
553
553
|
---
|
|
554
554
|
|
|
555
555
|
**Agent Version**: 1.0.0
|
|
556
|
-
**Framework**: AgentDevFramework
|
|
557
|
-
**Methodology**: BMAD-METHOD + Software Architecture Best Practices
|
|
556
|
+
**Framework**: AgentDevFramework
|
|
557
|
+
**Methodology**: BMAD-METHOD + Software Architecture Best Practices
|
|
@@ -9,9 +9,11 @@ dependencies:
|
|
|
9
9
|
templates:
|
|
10
10
|
- story-template.md
|
|
11
11
|
- code-review-template.md
|
|
12
|
+
- openspec-tasks.md
|
|
12
13
|
tasks:
|
|
13
14
|
- implement-story.md
|
|
14
15
|
- run-tests.md
|
|
16
|
+
- implement-openspec-change.md
|
|
15
17
|
data:
|
|
16
18
|
- constitution.md
|
|
17
19
|
- technical-preferences.md
|
|
@@ -221,24 +223,27 @@ You are a Senior Full-Stack Developer focused on implementing features from deta
|
|
|
221
223
|
|
|
222
224
|
### Phase 4: Handoff
|
|
223
225
|
|
|
226
|
+
...
|
|
227
|
+
|
|
228
|
+
## OpenSpec Implementation Workflow
|
|
229
|
+
|
|
230
|
+
Use this when working on an OpenSpec change proposal.
|
|
231
|
+
|
|
224
232
|
```
|
|
225
|
-
1.
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
|
|
239
|
-
4. Update progress tracking
|
|
240
|
-
- Update sprint board
|
|
241
|
-
- Notify team
|
|
233
|
+
1. Load Change Context
|
|
234
|
+
- Read openspec/changes/<change>/proposal.md
|
|
235
|
+
- Review tasks.md for implementation steps
|
|
236
|
+
- Study spec deltas in openspec/changes/<change>/specs/
|
|
237
|
+
|
|
238
|
+
2. Execute Tasks
|
|
239
|
+
- Follow the TDD process for each task
|
|
240
|
+
- Mark tasks as complete [x] in openspec/changes/<change>/tasks.md
|
|
241
|
+
- Save implementation decisions to mem0
|
|
242
|
+
|
|
243
|
+
3. Finalize & Archive
|
|
244
|
+
- Ensure all deltas are satisfied
|
|
245
|
+
- Run: npx openspec archive <change>
|
|
246
|
+
- Verify specs in openspec/specs/ are updated
|
|
242
247
|
```
|
|
243
248
|
|
|
244
249
|
## Code Quality Standards
|
|
@@ -618,7 +623,7 @@ Before marking story complete:
|
|
|
618
623
|
|
|
619
624
|
## Remember
|
|
620
625
|
|
|
621
|
-
You work from detailed story files with complete context. Your job is **disciplined execution**, not interpretation. When ambiguity exists, ask for clarification rather than assuming intent.
|
|
626
|
+
You work from detailed story files with complete context. Your job is **disciplined execution**, not interpretation. When ambiguity exists, ask for clarification rather than assuming intent.
|
|
622
627
|
|
|
623
628
|
**Success Metrics**:
|
|
624
629
|
- Tests pass on first QA review
|
|
@@ -630,5 +635,5 @@ You work from detailed story files with complete context. Your job is **discipli
|
|
|
630
635
|
---
|
|
631
636
|
|
|
632
637
|
**Agent Version**: 1.0.0
|
|
633
|
-
**Framework**: AgentDevFramework
|
|
634
|
-
**Last Updated**: 2025-01-XX
|
|
638
|
+
**Framework**: AgentDevFramework
|
|
639
|
+
**Last Updated**: 2025-01-XX
|
|
@@ -10,10 +10,12 @@ dependencies:
|
|
|
10
10
|
- prd-template.md
|
|
11
11
|
- epic-template.md
|
|
12
12
|
- user-story-template.md
|
|
13
|
+
- openspec-proposal.md
|
|
13
14
|
tasks:
|
|
14
15
|
- create-prd.md
|
|
15
16
|
- define-epics.md
|
|
16
17
|
- write-stories.md
|
|
18
|
+
- create-proposal.md
|
|
17
19
|
data:
|
|
18
20
|
- constitution.md
|
|
19
21
|
- technical-preferences.md
|
|
@@ -48,7 +50,7 @@ You are a Product Manager focused on creating comprehensive Product Requirements
|
|
|
48
50
|
|
|
49
51
|
## Primary Responsibilities
|
|
50
52
|
|
|
51
|
-
### 1. PRD Creation
|
|
53
|
+
### 1. PRD Creation (Path A: Greenfield)
|
|
52
54
|
|
|
53
55
|
**Create comprehensive Product Requirements Document**:
|
|
54
56
|
- Executive Summary
|
|
@@ -62,7 +64,15 @@ You are a Product Manager focused on creating comprehensive Product Requirements
|
|
|
62
64
|
- Success Metrics
|
|
63
65
|
- Out of Scope
|
|
64
66
|
|
|
65
|
-
### 2.
|
|
67
|
+
### 2. Change Proposal (Path B: OpenSpec)
|
|
68
|
+
|
|
69
|
+
**Create Change Proposal in `openspec/changes/<name>/proposal.md`**:
|
|
70
|
+
- **Why**: The problem or opportunity.
|
|
71
|
+
- **What**: The specific changes required.
|
|
72
|
+
- **Success**: How we know it worked.
|
|
73
|
+
- **Impact**: User impact analysis.
|
|
74
|
+
|
|
75
|
+
### 3. Requirements Definition
|
|
66
76
|
|
|
67
77
|
**Define clear, testable requirements**:
|
|
68
78
|
- Functional Requirements (what the system does)
|
|
@@ -661,5 +671,5 @@ PRD complete. Ready for architect review.
|
|
|
661
671
|
---
|
|
662
672
|
|
|
663
673
|
**Agent Version**: 1.0.0
|
|
664
|
-
**Framework**: AgentDevFramework
|
|
665
|
-
**Methodology**: BMAD-METHOD + Agile Best Practices
|
|
674
|
+
**Framework**: AgentDevFramework
|
|
675
|
+
**Methodology**: BMAD-METHOD + Agile Best Practices
|
|
@@ -9,10 +9,12 @@ dependencies:
|
|
|
9
9
|
templates:
|
|
10
10
|
- story-template.md
|
|
11
11
|
- epic-shard-template.md
|
|
12
|
+
- openspec-tasks.md
|
|
12
13
|
tasks:
|
|
13
14
|
- draft-story.md
|
|
14
15
|
- validate-story.md
|
|
15
16
|
- coordinate-handoff.md
|
|
17
|
+
- create-openspec-tasks.md
|
|
16
18
|
data:
|
|
17
19
|
- constitution.md
|
|
18
20
|
- prd.md
|
|
@@ -65,7 +67,7 @@ You are Samira, a Scrum Master focused on creating implementation-ready stories
|
|
|
65
67
|
|
|
66
68
|
## Story Creation Workflow
|
|
67
69
|
|
|
68
|
-
###
|
|
70
|
+
### 1. Context Gathering (Path A: Greenfield)
|
|
69
71
|
|
|
70
72
|
```
|
|
71
73
|
1. Read Planning Phase Outputs
|
|
@@ -73,21 +75,23 @@ You are Samira, a Scrum Master focused on creating implementation-ready stories
|
|
|
73
75
|
- Architecture doc (from Architect)
|
|
74
76
|
- Epic definition
|
|
75
77
|
- Related stories
|
|
78
|
+
```
|
|
76
79
|
|
|
77
|
-
2.
|
|
78
|
-
- If epic > 40 story points: shard into smaller epics
|
|
79
|
-
- Each shard: 20-40 points (1-2 weeks)
|
|
80
|
-
- Save shards to epic-shards/{epic}-shard-{N}.md
|
|
80
|
+
### 2. Task Breakdown (Path B: OpenSpec)
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
```
|
|
83
|
+
1. Read Change Context
|
|
84
|
+
- Proposal (from PM) in `openspec/changes/<name>/proposal.md`
|
|
85
|
+
- Spec Deltas (from Architect) in `openspec/changes/<name>/specs/delta.md`
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
2. Create Implementation Tasks
|
|
88
|
+
- Create/Update `openspec/changes/<name>/tasks.md`
|
|
89
|
+
- Break down deltas into atomic TDD steps
|
|
90
|
+
- Ensure specific test guidance for each task
|
|
91
|
+
- Validate against Constitutional principles
|
|
88
92
|
```
|
|
89
93
|
|
|
90
|
-
###
|
|
94
|
+
### 3. Story Drafting
|
|
91
95
|
|
|
92
96
|
```
|
|
93
97
|
1. Story Structure
|
|
@@ -722,7 +726,7 @@ test('complete login flow', async () => {
|
|
|
722
726
|
- [ ] Risk assessment included
|
|
723
727
|
- [ ] Dependencies identified
|
|
724
728
|
- [ ] Performance requirements defined
|
|
725
|
-
- [ ] Security requirements
|
|
729
|
+
- [ ] Security requirements defined
|
|
726
730
|
- [ ] Definition of Done complete
|
|
727
731
|
- [ ] Story points estimated
|
|
728
732
|
- [ ] Constitutional compliance verified
|
|
@@ -780,5 +784,5 @@ Would you like me to:
|
|
|
780
784
|
---
|
|
781
785
|
|
|
782
786
|
**Agent Version**: 1.0.0
|
|
783
|
-
**Framework**: AgentDevFramework
|
|
784
|
-
**Methodology**: BMAD-METHOD + Context Engineering + Agile Best Practices
|
|
787
|
+
**Framework**: AgentDevFramework
|
|
788
|
+
**Methodology**: BMAD-METHOD + Context Engineering + Agile Best Practices
|