@iservu-inc/adf-cli 0.2.0 → 0.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/.project/chats/current/2025-10-03_AGENTS-MD-AND-TOOL-GENERATORS.md +699 -0
- package/.project/docs/tool-integrations/RESEARCH-FINDINGS.md +828 -0
- package/CHANGELOG.md +177 -0
- package/lib/commands/deploy.js +122 -3
- package/lib/generators/agents-md-generator.js +388 -0
- package/lib/generators/cursor-generator.js +374 -0
- package/lib/generators/index.js +98 -0
- package/lib/generators/tool-config-generator.js +188 -0
- package/lib/generators/vscode-generator.js +403 -0
- package/lib/generators/windsurf-generator.js +596 -0
- package/package.json +1 -1
- package/tests/agents-md-generator.test.js +245 -0
- package/tests/cursor-generator.test.js +326 -0
- package/tests/vscode-generator.test.js +436 -0
- package/tests/windsurf-generator.test.js +320 -0
- /package/.project/chats/{current → complete}/2025-10-03_ADF-CLI-QUALITY-BASED-PROGRESS-AND-RESUME.md +0 -0
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
# Tool Integration Research Findings
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-10-03
|
|
4
|
+
**Status:** Complete - Ready for Implementation
|
|
5
|
+
**Phase:** Option B - IDE Tool Integrations
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Executive Summary
|
|
10
|
+
|
|
11
|
+
Research identified **4 primary integration strategies**:
|
|
12
|
+
|
|
13
|
+
1. **AGENTS.md** - Universal open standard (recommended primary approach)
|
|
14
|
+
2. **Windsurf** - .windsurfrules, memories, workflows
|
|
15
|
+
3. **Cursor** - .cursorrules, .cursor/rules, modes, MCP
|
|
16
|
+
4. **VS Code** - .github/copilot-instructions.md, chat modes, tools API
|
|
17
|
+
|
|
18
|
+
**Key Insight:** AGENTS.md should be the **foundation** with tool-specific configurations as **supplements**.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. AGENTS.md - Universal Standard
|
|
23
|
+
|
|
24
|
+
### Overview
|
|
25
|
+
|
|
26
|
+
AGENTS.md is an **open, markdown-based specification** for AI coding agent instructions, developed collaboratively by:
|
|
27
|
+
- OpenAI (Codex/Copilot)
|
|
28
|
+
- Google (Gemini/Jules)
|
|
29
|
+
- Cursor
|
|
30
|
+
- Factory
|
|
31
|
+
- Amp
|
|
32
|
+
- RooCode
|
|
33
|
+
- Aider
|
|
34
|
+
|
|
35
|
+
### Adoption (2025)
|
|
36
|
+
|
|
37
|
+
- **20,000+** open-source projects on GitHub
|
|
38
|
+
- **All major AI coding tools** support it
|
|
39
|
+
- **Industry standard** for agent configuration
|
|
40
|
+
|
|
41
|
+
### Why It Matters for ADF CLI
|
|
42
|
+
|
|
43
|
+
1. **Universal Compatibility**: Works across all tools automatically
|
|
44
|
+
2. **Future-Proof**: New tools will support it
|
|
45
|
+
3. **Simplicity**: Just markdown, no complex syntax
|
|
46
|
+
4. **Nesting**: Can have project-level + submodule-level files
|
|
47
|
+
5. **Complements Tools**: Doesn't replace tool-specific configs, enhances them
|
|
48
|
+
|
|
49
|
+
### File Format
|
|
50
|
+
|
|
51
|
+
**Location:** `AGENTS.md` at project root
|
|
52
|
+
|
|
53
|
+
**Format:** Standard Markdown (any headings)
|
|
54
|
+
|
|
55
|
+
**Nesting:** Agents read nearest file in directory tree
|
|
56
|
+
|
|
57
|
+
### Structure (Recommended Sections)
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Project Name
|
|
61
|
+
|
|
62
|
+
## Overview
|
|
63
|
+
[Brief description of what this project does]
|
|
64
|
+
|
|
65
|
+
## Build Commands
|
|
66
|
+
\`\`\`bash
|
|
67
|
+
npm install
|
|
68
|
+
npm run build
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
## Test Commands
|
|
72
|
+
\`\`\`bash
|
|
73
|
+
npm test
|
|
74
|
+
npm run test:coverage
|
|
75
|
+
\`\`\`
|
|
76
|
+
|
|
77
|
+
## Architecture Overview
|
|
78
|
+
[High-level architecture description]
|
|
79
|
+
|
|
80
|
+
## Coding Style
|
|
81
|
+
- Use TypeScript strict mode
|
|
82
|
+
- Functional components for React
|
|
83
|
+
- Async/await (no callbacks)
|
|
84
|
+
|
|
85
|
+
## Development Workflow
|
|
86
|
+
1. Create feature branch
|
|
87
|
+
2. Write tests first
|
|
88
|
+
3. Implement feature
|
|
89
|
+
4. Run tests and linter
|
|
90
|
+
5. Create PR
|
|
91
|
+
|
|
92
|
+
## CI/PR Instructions
|
|
93
|
+
- All tests must pass
|
|
94
|
+
- Coverage must be >= 80%
|
|
95
|
+
- No linting errors
|
|
96
|
+
|
|
97
|
+
## Security Notes
|
|
98
|
+
- Never commit secrets
|
|
99
|
+
- Use environment variables for API keys
|
|
100
|
+
- Validate all user input
|
|
101
|
+
|
|
102
|
+
## Key Files
|
|
103
|
+
- src/index.ts - Entry point
|
|
104
|
+
- src/lib/ - Core library code
|
|
105
|
+
- tests/ - Test files
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### ADF CLI Integration Strategy
|
|
109
|
+
|
|
110
|
+
**Generate AGENTS.md from framework outputs:**
|
|
111
|
+
|
|
112
|
+
**From PRP:**
|
|
113
|
+
```markdown
|
|
114
|
+
# {PROJECT_NAME}
|
|
115
|
+
|
|
116
|
+
## Goal
|
|
117
|
+
{PRP_GOAL}
|
|
118
|
+
|
|
119
|
+
## Tech Stack
|
|
120
|
+
{PRP_CONTEXT_TECH_STACK}
|
|
121
|
+
|
|
122
|
+
## Implementation Blueprint
|
|
123
|
+
{PRP_IMPLEMENTATION_BLUEPRINT}
|
|
124
|
+
|
|
125
|
+
## Success Criteria
|
|
126
|
+
{PRP_VALIDATION_SUCCESS_CRITERIA}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**From Balanced:**
|
|
130
|
+
```markdown
|
|
131
|
+
# {PROJECT_NAME}
|
|
132
|
+
|
|
133
|
+
## Constitution
|
|
134
|
+
{CONSTITUTION_PRINCIPLES}
|
|
135
|
+
|
|
136
|
+
## Architecture
|
|
137
|
+
{SPECIFICATION_ARCHITECTURE}
|
|
138
|
+
|
|
139
|
+
## Technical Plan
|
|
140
|
+
{PLAN_ARCHITECTURE_DECISIONS}
|
|
141
|
+
|
|
142
|
+
## Tasks
|
|
143
|
+
{TASKS_IMPLEMENTATION_PHASES}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**From BMAD:**
|
|
147
|
+
```markdown
|
|
148
|
+
# {PROJECT_NAME}
|
|
149
|
+
|
|
150
|
+
## Product Overview
|
|
151
|
+
{PRD_EXECUTIVE_SUMMARY}
|
|
152
|
+
|
|
153
|
+
## Architecture
|
|
154
|
+
{ARCHITECTURE_SYSTEM_DESIGN}
|
|
155
|
+
|
|
156
|
+
## User Stories
|
|
157
|
+
{STORIES_LIST}
|
|
158
|
+
|
|
159
|
+
## Technical Requirements
|
|
160
|
+
{PRD_TECHNICAL_REQUIREMENTS}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Nested AGENTS.md Strategy
|
|
164
|
+
|
|
165
|
+
**Root Level:** `AGENTS.md` - Project-wide instructions
|
|
166
|
+
|
|
167
|
+
**Submodule Level:** `packages/frontend/AGENTS.md` - Frontend-specific
|
|
168
|
+
|
|
169
|
+
**Example:**
|
|
170
|
+
```
|
|
171
|
+
project/
|
|
172
|
+
├── AGENTS.md (general project context)
|
|
173
|
+
├── frontend/
|
|
174
|
+
│ └── AGENTS.md (React-specific instructions)
|
|
175
|
+
├── backend/
|
|
176
|
+
│ └── AGENTS.md (API-specific instructions)
|
|
177
|
+
└── shared/
|
|
178
|
+
└── AGENTS.md (shared library instructions)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 2. Windsurf Integration
|
|
184
|
+
|
|
185
|
+
### Overview
|
|
186
|
+
|
|
187
|
+
**Windsurf** (by Codeium) is an agentic IDE with Cascade AI assistant.
|
|
188
|
+
|
|
189
|
+
### Configuration Files
|
|
190
|
+
|
|
191
|
+
#### .windsurfrules (Legacy, Still Supported)
|
|
192
|
+
|
|
193
|
+
**Location:** Project root
|
|
194
|
+
|
|
195
|
+
**Format:** Markdown
|
|
196
|
+
|
|
197
|
+
**Character Limit:** 12,000 per file
|
|
198
|
+
|
|
199
|
+
**Alternative:** Paste via Settings → Set Workspace AI Rules → Edit Rules
|
|
200
|
+
|
|
201
|
+
#### .windsurf/rules/ (Modern, Recommended)
|
|
202
|
+
|
|
203
|
+
**Location:** `.windsurf/rules/*.md`
|
|
204
|
+
|
|
205
|
+
**Format:** Markdown files
|
|
206
|
+
|
|
207
|
+
**Activation Modes:**
|
|
208
|
+
1. **Manual** - Via @mention in Cascade
|
|
209
|
+
2. **Model Decision** - AI decides when to apply
|
|
210
|
+
3. **Always On** - Applied to all conversations
|
|
211
|
+
4. **File Glob** - Applied to specific file patterns
|
|
212
|
+
|
|
213
|
+
**Example File:** `.windsurf/rules/typescript-strict.md`
|
|
214
|
+
```markdown
|
|
215
|
+
# TypeScript Strict Mode Rule
|
|
216
|
+
|
|
217
|
+
When working with TypeScript files:
|
|
218
|
+
- Enable strict mode in tsconfig.json
|
|
219
|
+
- Use explicit types (no `any`)
|
|
220
|
+
- Handle all null/undefined cases
|
|
221
|
+
- Use readonly for immutable data
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### .windsurf/workflows/
|
|
225
|
+
|
|
226
|
+
**Location:** `.windsurf/workflows/*.md`
|
|
227
|
+
|
|
228
|
+
**Purpose:** Saved prompts invoked via slash commands
|
|
229
|
+
|
|
230
|
+
**Example:** `.windsurf/workflows/implement-feature.md`
|
|
231
|
+
```markdown
|
|
232
|
+
# Implement Feature Workflow
|
|
233
|
+
|
|
234
|
+
1. Review requirements from PRD
|
|
235
|
+
2. Create feature branch
|
|
236
|
+
3. Write tests first
|
|
237
|
+
4. Implement feature following architecture
|
|
238
|
+
5. Verify all tests pass
|
|
239
|
+
6. Create pull request
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Usage:** Type `/implement-feature` in Cascade
|
|
243
|
+
|
|
244
|
+
#### Cascade Memories
|
|
245
|
+
|
|
246
|
+
**Types:**
|
|
247
|
+
1. **User-Generated Memories** (Rules) - Explicitly defined
|
|
248
|
+
2. **Auto-Generated Memories** - Cascade creates based on interactions
|
|
249
|
+
|
|
250
|
+
**Access:** Customizations icon → Manage memories
|
|
251
|
+
|
|
252
|
+
**Purpose:** Remember important context between conversations
|
|
253
|
+
|
|
254
|
+
### Windsurf Best Practices
|
|
255
|
+
|
|
256
|
+
**Formatting:**
|
|
257
|
+
- Use bullet points and numbered lists
|
|
258
|
+
- Markdown > long paragraphs
|
|
259
|
+
- Short, focused rules
|
|
260
|
+
|
|
261
|
+
**Organization:**
|
|
262
|
+
- Separate rules by concern (style, architecture, testing)
|
|
263
|
+
- Use descriptive filenames
|
|
264
|
+
- Keep rules under 12K characters
|
|
265
|
+
|
|
266
|
+
**Templates:**
|
|
267
|
+
- Official directory: https://windsurf.com/editor/directory
|
|
268
|
+
- Community: github.com/SchneiderSam/awesome-windsurfrules
|
|
269
|
+
|
|
270
|
+
### ADF CLI Generator for Windsurf
|
|
271
|
+
|
|
272
|
+
**Files to Generate:**
|
|
273
|
+
|
|
274
|
+
1. **`.windsurfrules`** (Compatibility)
|
|
275
|
+
- Contains project-level rules from framework outputs
|
|
276
|
+
- Combines constitution + key principles + tech stack
|
|
277
|
+
|
|
278
|
+
2. **`.windsurf/rules/project-context.md`**
|
|
279
|
+
- From PRP Goal + Context
|
|
280
|
+
|
|
281
|
+
3. **`.windsurf/rules/architecture.md`**
|
|
282
|
+
- From Spec-Kit or BMAD Architecture
|
|
283
|
+
|
|
284
|
+
4. **`.windsurf/rules/coding-standards.md`**
|
|
285
|
+
- From Technical Plan
|
|
286
|
+
|
|
287
|
+
5. **`.windsurf/workflows/implement-story.md`**
|
|
288
|
+
- Workflow for implementing user stories
|
|
289
|
+
|
|
290
|
+
6. **`.windsurf/workflows/review-requirements.md`**
|
|
291
|
+
- Workflow to review PRD before coding
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 3. Cursor Integration
|
|
296
|
+
|
|
297
|
+
### Overview
|
|
298
|
+
|
|
299
|
+
**Cursor** is an AI-first code editor with multiple configuration strategies.
|
|
300
|
+
|
|
301
|
+
### Configuration Files
|
|
302
|
+
|
|
303
|
+
#### .cursorrules (Legacy, Being Deprecated)
|
|
304
|
+
|
|
305
|
+
**Location:** Project root
|
|
306
|
+
|
|
307
|
+
**Status:** Still supported but migrate to Project Rules
|
|
308
|
+
|
|
309
|
+
**Format:** Plain text or Markdown
|
|
310
|
+
|
|
311
|
+
#### .cursor/rules (Modern, Recommended)
|
|
312
|
+
|
|
313
|
+
**Location:** `.cursor/rules` (file, not directory)
|
|
314
|
+
|
|
315
|
+
**Scope:** Project-specific (version-controlled)
|
|
316
|
+
|
|
317
|
+
**Alternative User Rules:** Global to Cursor environment (in settings)
|
|
318
|
+
|
|
319
|
+
**Format:** Markdown
|
|
320
|
+
|
|
321
|
+
**Example:**
|
|
322
|
+
```markdown
|
|
323
|
+
# Project Rules
|
|
324
|
+
|
|
325
|
+
## Context
|
|
326
|
+
You are working on {PROJECT_NAME}, a {DESCRIPTION}.
|
|
327
|
+
|
|
328
|
+
## Tech Stack
|
|
329
|
+
- Frontend: React 18, TypeScript
|
|
330
|
+
- Backend: Node.js, Express
|
|
331
|
+
- Database: PostgreSQL
|
|
332
|
+
|
|
333
|
+
## Code Style
|
|
334
|
+
- Use TypeScript strict mode
|
|
335
|
+
- Functional components only
|
|
336
|
+
- Async/await for all async code
|
|
337
|
+
|
|
338
|
+
## Before Implementing
|
|
339
|
+
1. Read PRD: .adf/sessions/{SESSION}/outputs/prd.md
|
|
340
|
+
2. Review architecture: .adf/sessions/{SESSION}/outputs/architecture.md
|
|
341
|
+
3. Check constraints: .adf/sessions/{SESSION}/outputs/constitution.md
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
#### .cursor/mcp.json (Model Context Protocol)
|
|
345
|
+
|
|
346
|
+
**Location:** `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global)
|
|
347
|
+
|
|
348
|
+
**Purpose:** Add MCP servers for extended functionality
|
|
349
|
+
|
|
350
|
+
**Example:**
|
|
351
|
+
```json
|
|
352
|
+
{
|
|
353
|
+
"mcpServers": {
|
|
354
|
+
"requirement-checker": {
|
|
355
|
+
"command": "node",
|
|
356
|
+
"args": ["./tools/requirement-checker.js"],
|
|
357
|
+
"env": {
|
|
358
|
+
"PRD_PATH": ".adf/sessions/latest/outputs/prd.md"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
**Use Case:** Custom tool to validate code against requirements
|
|
366
|
+
|
|
367
|
+
#### Custom Modes
|
|
368
|
+
|
|
369
|
+
**Purpose:** Specific prompts + available tools per mode
|
|
370
|
+
|
|
371
|
+
**Example Modes:**
|
|
372
|
+
- **Architect Mode** - Focus on design, read-only tools
|
|
373
|
+
- **Implementer Mode** - Write code, full access
|
|
374
|
+
- **Reviewer Mode** - Check compliance, linting tools
|
|
375
|
+
|
|
376
|
+
**Configuration:** Via Cursor settings UI (no file format documented yet)
|
|
377
|
+
|
|
378
|
+
### Cursor Resources
|
|
379
|
+
|
|
380
|
+
**Official:** https://docs.cursor.com/
|
|
381
|
+
|
|
382
|
+
**Community:**
|
|
383
|
+
- https://cursor.directory/ - Custom rules & MCP servers
|
|
384
|
+
- https://github.com/PatrickJS/awesome-cursorrules
|
|
385
|
+
- https://github.com/ample-education/cursor-resources
|
|
386
|
+
|
|
387
|
+
### ADF CLI Generator for Cursor
|
|
388
|
+
|
|
389
|
+
**Files to Generate:**
|
|
390
|
+
|
|
391
|
+
1. **`.cursor/rules`** (Primary)
|
|
392
|
+
- Combines all framework outputs
|
|
393
|
+
- References session outputs for context
|
|
394
|
+
- Includes tech stack, principles, constraints
|
|
395
|
+
|
|
396
|
+
2. **`.cursor/mcp.json`** (Optional, Advanced)
|
|
397
|
+
- MCP server for requirement validation
|
|
398
|
+
- Tool to check code against PRD
|
|
399
|
+
|
|
400
|
+
3. **Migration Note in README**
|
|
401
|
+
- Inform users about .cursorrules deprecation
|
|
402
|
+
- Guide to .cursor/rules
|
|
403
|
+
|
|
404
|
+
**Template for .cursor/rules:**
|
|
405
|
+
```markdown
|
|
406
|
+
# {PROJECT_NAME} - Cursor Rules
|
|
407
|
+
|
|
408
|
+
## Project Context
|
|
409
|
+
{PRP_GOAL or PRD_OVERVIEW}
|
|
410
|
+
|
|
411
|
+
## Technical Stack
|
|
412
|
+
{TECH_STACK}
|
|
413
|
+
|
|
414
|
+
## Core Principles
|
|
415
|
+
{CONSTITUTION_PRINCIPLES}
|
|
416
|
+
|
|
417
|
+
## Architecture
|
|
418
|
+
Reference: .adf/sessions/{SESSION_ID}/outputs/architecture.md
|
|
419
|
+
|
|
420
|
+
{ARCHITECTURE_SUMMARY}
|
|
421
|
+
|
|
422
|
+
## Coding Standards
|
|
423
|
+
{TECHNICAL_PLAN_CODE_STYLE}
|
|
424
|
+
|
|
425
|
+
## Before Writing Code
|
|
426
|
+
1. Review PRD: .adf/sessions/{SESSION_ID}/outputs/prd.md
|
|
427
|
+
2. Check architecture patterns: {ARCH_FILE}
|
|
428
|
+
3. Verify constraints: {CONSTITUTION_FILE}
|
|
429
|
+
|
|
430
|
+
## Forbidden
|
|
431
|
+
{CONSTITUTION_NON_NEGOTIABLES}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 4. VS Code Integration
|
|
437
|
+
|
|
438
|
+
### Overview
|
|
439
|
+
|
|
440
|
+
**VS Code** with **GitHub Copilot** or **Claude Code** extension.
|
|
441
|
+
|
|
442
|
+
### Configuration Files
|
|
443
|
+
|
|
444
|
+
#### .github/copilot-instructions.md
|
|
445
|
+
|
|
446
|
+
**Location:** `.github/copilot-instructions.md`
|
|
447
|
+
|
|
448
|
+
**Purpose:** Instructions for GitHub Copilot
|
|
449
|
+
|
|
450
|
+
**Format:** Markdown
|
|
451
|
+
|
|
452
|
+
**Example:**
|
|
453
|
+
```markdown
|
|
454
|
+
# Copilot Instructions for {PROJECT_NAME}
|
|
455
|
+
|
|
456
|
+
## Project Overview
|
|
457
|
+
{DESCRIPTION}
|
|
458
|
+
|
|
459
|
+
## Tech Stack
|
|
460
|
+
- React 18, TypeScript, Node.js
|
|
461
|
+
|
|
462
|
+
## Code Style
|
|
463
|
+
- Use functional components
|
|
464
|
+
- Async/await only
|
|
465
|
+
- Descriptive variable names
|
|
466
|
+
|
|
467
|
+
## Patterns to Use
|
|
468
|
+
- Custom hooks for logic reuse
|
|
469
|
+
- Context for global state
|
|
470
|
+
- Error boundaries for error handling
|
|
471
|
+
|
|
472
|
+
## Patterns to Avoid
|
|
473
|
+
- Class components
|
|
474
|
+
- Inline styles
|
|
475
|
+
- Direct DOM manipulation
|
|
476
|
+
|
|
477
|
+
## Testing
|
|
478
|
+
- Jest + React Testing Library
|
|
479
|
+
- Test files: *.test.ts
|
|
480
|
+
- Coverage minimum: 80%
|
|
481
|
+
|
|
482
|
+
## When Generating Code
|
|
483
|
+
1. Check PRD in .adf/sessions/{SESSION}/outputs/
|
|
484
|
+
2. Follow architecture patterns
|
|
485
|
+
3. Include error handling
|
|
486
|
+
4. Add TypeScript types
|
|
487
|
+
5. Write accompanying tests
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### .chatmode.md (Custom Chat Modes)
|
|
491
|
+
|
|
492
|
+
**Location:** Workspace or user profile
|
|
493
|
+
|
|
494
|
+
**Purpose:** Define custom chat modes with instructions + tools
|
|
495
|
+
|
|
496
|
+
**Example:** `.chatmode/architect.md`
|
|
497
|
+
```markdown
|
|
498
|
+
# Architect Mode
|
|
499
|
+
|
|
500
|
+
## Instructions
|
|
501
|
+
Focus on system design and architecture patterns.
|
|
502
|
+
Check component boundaries, data flow, scalability.
|
|
503
|
+
|
|
504
|
+
## Context
|
|
505
|
+
- .adf/sessions/{SESSION}/outputs/architecture.md
|
|
506
|
+
- .adf/sessions/{SESSION}/outputs/prd.md
|
|
507
|
+
|
|
508
|
+
## Tools
|
|
509
|
+
- Read-only access
|
|
510
|
+
- Diagram generation
|
|
511
|
+
- Architecture validation
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
#### Language Model Tools API
|
|
515
|
+
|
|
516
|
+
**Purpose:** VS Code extensions can register custom tools
|
|
517
|
+
|
|
518
|
+
**Example Tool:**
|
|
519
|
+
```typescript
|
|
520
|
+
import * as vscode from 'vscode';
|
|
521
|
+
|
|
522
|
+
export function registerTools(context: vscode.ExtensionContext) {
|
|
523
|
+
const tool = vscode.lm.registerTool('requirement-lookup', {
|
|
524
|
+
description: 'Look up requirements from PRD',
|
|
525
|
+
async invoke(params: { feature_id: string }) {
|
|
526
|
+
const prdPath = '.adf/sessions/latest/outputs/prd.md';
|
|
527
|
+
const content = await vscode.workspace.fs.readFile(
|
|
528
|
+
vscode.Uri.file(prdPath)
|
|
529
|
+
);
|
|
530
|
+
return parseRequirement(content.toString(), params.feature_id);
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
context.subscriptions.push(tool);
|
|
535
|
+
}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### VS Code Resources
|
|
539
|
+
|
|
540
|
+
**Official:**
|
|
541
|
+
- https://code.visualstudio.com/api/extension-guides/ai/language-model
|
|
542
|
+
- https://code.visualstudio.com/api/extension-guides/ai/tools
|
|
543
|
+
- https://code.visualstudio.com/docs/copilot/customization/custom-chat-modes
|
|
544
|
+
|
|
545
|
+
### ADF CLI Generator for VS Code
|
|
546
|
+
|
|
547
|
+
**Files to Generate:**
|
|
548
|
+
|
|
549
|
+
1. **`.github/copilot-instructions.md`**
|
|
550
|
+
- From all framework outputs
|
|
551
|
+
- Includes tech stack, patterns, testing requirements
|
|
552
|
+
|
|
553
|
+
2. **`.vscode/settings.json`** (Enhancement)
|
|
554
|
+
- Add custom chat modes configuration
|
|
555
|
+
- Reference framework outputs
|
|
556
|
+
|
|
557
|
+
**Template for copilot-instructions.md:**
|
|
558
|
+
```markdown
|
|
559
|
+
# Copilot Instructions for {PROJECT_NAME}
|
|
560
|
+
|
|
561
|
+
## Project Context
|
|
562
|
+
{PRP_GOAL or PRD_OVERVIEW}
|
|
563
|
+
|
|
564
|
+
## Tech Stack
|
|
565
|
+
{TECH_STACK}
|
|
566
|
+
|
|
567
|
+
## Architecture
|
|
568
|
+
{ARCHITECTURE_SUMMARY}
|
|
569
|
+
|
|
570
|
+
See full architecture: .adf/sessions/{SESSION}/outputs/architecture.md
|
|
571
|
+
|
|
572
|
+
## Code Standards
|
|
573
|
+
{TECHNICAL_PLAN_CODE_STYLE}
|
|
574
|
+
|
|
575
|
+
## Patterns to Use
|
|
576
|
+
{RECOMMENDED_PATTERNS}
|
|
577
|
+
|
|
578
|
+
## Patterns to Avoid
|
|
579
|
+
{ANTI_PATTERNS}
|
|
580
|
+
|
|
581
|
+
## Testing Requirements
|
|
582
|
+
{TESTING_APPROACH}
|
|
583
|
+
|
|
584
|
+
## Security Requirements
|
|
585
|
+
{SECURITY_NOTES}
|
|
586
|
+
|
|
587
|
+
## When Generating Code
|
|
588
|
+
1. Review requirements: .adf/sessions/{SESSION}/outputs/
|
|
589
|
+
2. Follow architecture: {ARCH_PATTERNS}
|
|
590
|
+
3. Include error handling
|
|
591
|
+
4. Add type definitions
|
|
592
|
+
5. Write tests
|
|
593
|
+
|
|
594
|
+
## Reference Documents
|
|
595
|
+
- PRD: .adf/sessions/{SESSION}/outputs/prd.md
|
|
596
|
+
- Architecture: .adf/sessions/{SESSION}/outputs/architecture.md
|
|
597
|
+
- Constitution: .adf/sessions/{SESSION}/outputs/constitution.md
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
## Implementation Strategy
|
|
603
|
+
|
|
604
|
+
### Unified Generator Architecture
|
|
605
|
+
|
|
606
|
+
```javascript
|
|
607
|
+
class ToolConfigGenerator {
|
|
608
|
+
constructor(sessionPath, framework) {
|
|
609
|
+
this.sessionPath = sessionPath;
|
|
610
|
+
this.framework = framework;
|
|
611
|
+
this.outputs = this.loadOutputs();
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
loadOutputs() {
|
|
615
|
+
// Load all generated framework outputs
|
|
616
|
+
// (prp.md, prd.md, architecture.md, etc.)
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
generateAll() {
|
|
620
|
+
// Generate all tool configurations
|
|
621
|
+
this.generateAgentsMd(); // Universal
|
|
622
|
+
this.generateWindsurf(); // Windsurf-specific
|
|
623
|
+
this.generateCursor(); // Cursor-specific
|
|
624
|
+
this.generateVSCode(); // VS Code-specific
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
generateAgentsMd() {
|
|
628
|
+
// Create AGENTS.md from framework outputs
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
generateWindsurf() {
|
|
632
|
+
// Create .windsurfrules, .windsurf/rules/, .windsurf/workflows/
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
generateCursor() {
|
|
636
|
+
// Create .cursor/rules, .cursor/mcp.json
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
generateVSCode() {
|
|
640
|
+
// Create .github/copilot-instructions.md, .vscode/settings.json
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
### Priority Order
|
|
646
|
+
|
|
647
|
+
1. **AGENTS.md** (Universal) - ALWAYS generate
|
|
648
|
+
2. **Windsurf** - If user selects Windsurf as tool
|
|
649
|
+
3. **Cursor** - If user selects Cursor as tool
|
|
650
|
+
4. **VS Code** - If user selects VS Code as tool
|
|
651
|
+
|
|
652
|
+
### Template Variables
|
|
653
|
+
|
|
654
|
+
All generators use:
|
|
655
|
+
```javascript
|
|
656
|
+
{
|
|
657
|
+
PROJECT_NAME,
|
|
658
|
+
SESSION_ID,
|
|
659
|
+
FRAMEWORK, // rapid/balanced/comprehensive
|
|
660
|
+
PRP_GOAL,
|
|
661
|
+
PRP_CONTEXT,
|
|
662
|
+
PRP_IMPLEMENTATION,
|
|
663
|
+
PRD_OVERVIEW,
|
|
664
|
+
ARCHITECTURE_SUMMARY,
|
|
665
|
+
CONSTITUTION_PRINCIPLES,
|
|
666
|
+
TECH_STACK,
|
|
667
|
+
CODE_STYLE,
|
|
668
|
+
TESTING_APPROACH,
|
|
669
|
+
SECURITY_NOTES
|
|
670
|
+
}
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### File Organization
|
|
674
|
+
|
|
675
|
+
```
|
|
676
|
+
project/
|
|
677
|
+
├── AGENTS.md # Universal (ALWAYS)
|
|
678
|
+
├── .windsurfrules # Windsurf (legacy compat)
|
|
679
|
+
├── .windsurf/
|
|
680
|
+
│ ├── rules/
|
|
681
|
+
│ │ ├── project-context.md
|
|
682
|
+
│ │ ├── architecture.md
|
|
683
|
+
│ │ └── coding-standards.md
|
|
684
|
+
│ └── workflows/
|
|
685
|
+
│ ├── implement-story.md
|
|
686
|
+
│ └── review-requirements.md
|
|
687
|
+
├── .cursor/
|
|
688
|
+
│ ├── rules # Cursor (primary)
|
|
689
|
+
│ └── mcp.json # MCP servers (optional)
|
|
690
|
+
├── .github/
|
|
691
|
+
│ └── copilot-instructions.md # GitHub Copilot
|
|
692
|
+
└── .vscode/
|
|
693
|
+
└── settings.json # VS Code chat modes
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
---
|
|
697
|
+
|
|
698
|
+
## Next Steps for Implementation
|
|
699
|
+
|
|
700
|
+
### Phase 2A: Core Generator (Priority 1)
|
|
701
|
+
|
|
702
|
+
1. **Create tool-config-generator.js**
|
|
703
|
+
- Base class for all generators
|
|
704
|
+
- Template variable substitution
|
|
705
|
+
- Output file writing
|
|
706
|
+
|
|
707
|
+
2. **Implement AGENTS.md Generator**
|
|
708
|
+
- Works for all frameworks (PRP, Balanced, BMAD)
|
|
709
|
+
- Simple, focused content
|
|
710
|
+
- Nested support for monorepos
|
|
711
|
+
|
|
712
|
+
3. **Test with Real Outputs**
|
|
713
|
+
- Use existing framework outputs
|
|
714
|
+
- Verify generated AGENTS.md quality
|
|
715
|
+
- Test with Cursor, Windsurf, Copilot
|
|
716
|
+
|
|
717
|
+
### Phase 2B: Tool-Specific Generators (Priority 2)
|
|
718
|
+
|
|
719
|
+
4. **Windsurf Generator**
|
|
720
|
+
- .windsurfrules (compatibility)
|
|
721
|
+
- .windsurf/rules/*.md (modern)
|
|
722
|
+
- .windsurf/workflows/*.md (slash commands)
|
|
723
|
+
|
|
724
|
+
5. **Cursor Generator**
|
|
725
|
+
- .cursor/rules (primary)
|
|
726
|
+
- Migration guide for .cursorrules
|
|
727
|
+
|
|
728
|
+
6. **VS Code Generator**
|
|
729
|
+
- .github/copilot-instructions.md
|
|
730
|
+
- .vscode/settings.json enhancements
|
|
731
|
+
|
|
732
|
+
### Phase 2C: Advanced Features (Priority 3)
|
|
733
|
+
|
|
734
|
+
7. **MCP Server Generation**
|
|
735
|
+
- Custom requirement validation tool
|
|
736
|
+
- PRD lookup tool
|
|
737
|
+
- Architecture compliance checker
|
|
738
|
+
|
|
739
|
+
8. **Custom Mode Templates**
|
|
740
|
+
- Architect mode
|
|
741
|
+
- Implementer mode
|
|
742
|
+
- Reviewer mode
|
|
743
|
+
|
|
744
|
+
9. **Nested AGENTS.md Support**
|
|
745
|
+
- Detect monorepo structure
|
|
746
|
+
- Generate submodule-specific AGENTS.md
|
|
747
|
+
- Maintain hierarchy
|
|
748
|
+
|
|
749
|
+
### Phase 2D: Integration & Testing (Priority 4)
|
|
750
|
+
|
|
751
|
+
10. **Deploy Command Enhancement**
|
|
752
|
+
- Update `adf deploy` to generate configs
|
|
753
|
+
- Add `--generate-configs` flag
|
|
754
|
+
- Support `--tool` selection
|
|
755
|
+
|
|
756
|
+
11. **End-to-End Testing**
|
|
757
|
+
- Test with real projects
|
|
758
|
+
- Verify all tools read configs correctly
|
|
759
|
+
- User acceptance testing
|
|
760
|
+
|
|
761
|
+
12. **Documentation**
|
|
762
|
+
- User guide for generated configs
|
|
763
|
+
- Customization guide
|
|
764
|
+
- Tool-specific tips
|
|
765
|
+
|
|
766
|
+
---
|
|
767
|
+
|
|
768
|
+
## Success Criteria
|
|
769
|
+
|
|
770
|
+
### For Each Tool Integration
|
|
771
|
+
|
|
772
|
+
- [ ] Generated config is syntactically valid
|
|
773
|
+
- [ ] Tool recognizes and uses config
|
|
774
|
+
- [ ] All framework outputs mapped correctly
|
|
775
|
+
- [ ] Template variables substituted properly
|
|
776
|
+
- [ ] File permissions correct
|
|
777
|
+
- [ ] Works on Windows, Mac, Linux
|
|
778
|
+
|
|
779
|
+
### For Overall System
|
|
780
|
+
|
|
781
|
+
- [ ] AGENTS.md works in Cursor, Windsurf, Copilot
|
|
782
|
+
- [ ] Tool-specific configs enhance AGENTS.md (don't conflict)
|
|
783
|
+
- [ ] Users can customize generated configs
|
|
784
|
+
- [ ] Clear documentation for each tool
|
|
785
|
+
- [ ] Migration guides from manual to ADF-generated
|
|
786
|
+
|
|
787
|
+
---
|
|
788
|
+
|
|
789
|
+
## Key Takeaways
|
|
790
|
+
|
|
791
|
+
1. **AGENTS.md is the future** - Universal standard, all tools support it
|
|
792
|
+
2. **Tool-specific = Enhancement** - Not replacement for AGENTS.md
|
|
793
|
+
3. **Simple > Complex** - Markdown beats proprietary formats
|
|
794
|
+
4. **Nesting = Power** - Monorepo support via nested files
|
|
795
|
+
5. **Community-Driven** - Leverage existing templates and best practices
|
|
796
|
+
|
|
797
|
+
---
|
|
798
|
+
|
|
799
|
+
## Resources
|
|
800
|
+
|
|
801
|
+
### AGENTS.md
|
|
802
|
+
- Spec: https://github.com/openai/agents.md
|
|
803
|
+
- Site: https://agents.md/
|
|
804
|
+
- Factory Docs: https://docs.factory.ai/factory-cli/configuration/agents-md
|
|
805
|
+
- Examples: https://www.builder.io/blog/agents-md
|
|
806
|
+
|
|
807
|
+
### Windsurf
|
|
808
|
+
- Docs: https://docs.windsurf.com/
|
|
809
|
+
- Rules Directory: https://windsurf.com/editor/directory
|
|
810
|
+
- Awesome List: https://github.com/SchneiderSam/awesome-windsurfrules
|
|
811
|
+
- Guide: https://www.paulmduvall.com/using-windsurf-rules-workflows-and-memories/
|
|
812
|
+
|
|
813
|
+
### Cursor
|
|
814
|
+
- Docs: https://docs.cursor.com/context/rules
|
|
815
|
+
- Directory: https://cursor.directory/
|
|
816
|
+
- Awesome List: https://github.com/PatrickJS/awesome-cursorrules
|
|
817
|
+
- Resources: https://github.com/ample-education/cursor-resources
|
|
818
|
+
|
|
819
|
+
### VS Code
|
|
820
|
+
- Language Model API: https://code.visualstudio.com/api/extension-guides/ai/language-model
|
|
821
|
+
- Tools API: https://code.visualstudio.com/api/extension-guides/ai/tools
|
|
822
|
+
- Chat Modes: https://code.visualstudio.com/docs/copilot/customization/custom-chat-modes
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
**Research Complete:** 2025-10-03
|
|
827
|
+
**Ready for Implementation:** YES ✅
|
|
828
|
+
**Recommended Start:** AGENTS.md Generator (universal compatibility)
|