@dedesfr/prompter 0.7.0 → 0.7.1
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/CHANGELOG.md +9 -0
- package/dist/cli/index.js +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +21 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/core/templates/agents-template.d.ts +1 -1
- package/dist/core/templates/agents-template.d.ts.map +1 -1
- package/dist/core/templates/agents-template.js +443 -19
- package/dist/core/templates/agents-template.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/index.ts +1 -1
- package/src/commands/init.ts +19 -5
- package/src/core/templates/agents-template.ts +443 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [0.7.1] - 2026-02-06
|
|
4
|
+
|
|
5
|
+
### 🔧 Fixed
|
|
6
|
+
- **AGENTS.md Creation**: Fixed AGENTS.md not being created during first-time initialization
|
|
7
|
+
- Added proper error handling for both project.md and AGENTS.md creation
|
|
8
|
+
- Fixed AGENTS.md path to be created inside `prompter/` directory instead of root
|
|
9
|
+
- Added template validation to prevent undefined template errors
|
|
10
|
+
- Clear error messages now displayed if file creation fails
|
|
11
|
+
|
|
3
12
|
## [0.7.0] - 2026-02-06
|
|
4
13
|
|
|
5
14
|
### ✨ Added
|
package/dist/cli/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const program = new Command();
|
|
|
14
14
|
program
|
|
15
15
|
.name('prompter')
|
|
16
16
|
.description('Enhance prompts directly in your AI coding workflow')
|
|
17
|
-
.version('0.7.
|
|
17
|
+
.version('0.7.1');
|
|
18
18
|
program
|
|
19
19
|
.command('init')
|
|
20
20
|
.description('Initialize Prompter in your project')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,WAAW;IACd,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,WAAW;IACd,OAAO,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YAiTzC,UAAU;YASV,qBAAqB;YAwBrB,eAAe;YAkBf,eAAe;YAkBf,sBAAsB;YActB,cAAc;YAiCd,aAAa;YAuBb,6BAA6B;CA2B9C"}
|
package/dist/commands/init.js
CHANGED
|
@@ -107,18 +107,34 @@ export class InitCommand {
|
|
|
107
107
|
const projectMdPath = path.join(prompterPath, 'project.md');
|
|
108
108
|
const projectMdExists = await this.fileExists(projectMdPath);
|
|
109
109
|
if (!projectMdExists) {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
try {
|
|
111
|
+
if (!projectTemplate) {
|
|
112
|
+
throw new Error('project.md template is undefined');
|
|
113
|
+
}
|
|
114
|
+
await fs.writeFile(projectMdPath, projectTemplate, 'utf-8');
|
|
115
|
+
console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/project.md')}`);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
console.error(chalk.red('✗') + ` Failed to create project.md: ${error}`);
|
|
119
|
+
}
|
|
112
120
|
}
|
|
113
121
|
else if (isReInitialization) {
|
|
114
122
|
console.log(chalk.gray(' project.md already exists, keeping it'));
|
|
115
123
|
}
|
|
116
124
|
// Create AGENTS.md for universal support
|
|
117
|
-
const agentsMdPath = path.join(
|
|
125
|
+
const agentsMdPath = path.join(prompterPath, 'AGENTS.md');
|
|
118
126
|
const agentsExists = await this.fileExists(agentsMdPath);
|
|
119
127
|
if (!agentsExists) {
|
|
120
|
-
|
|
121
|
-
|
|
128
|
+
try {
|
|
129
|
+
if (!agentsTemplate) {
|
|
130
|
+
throw new Error('AGENTS.md template is undefined');
|
|
131
|
+
}
|
|
132
|
+
await fs.writeFile(agentsMdPath, agentsTemplate, 'utf-8');
|
|
133
|
+
console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/AGENTS.md')}`);
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
console.error(chalk.red('✗') + ` Failed to create AGENTS.md: ${error}`);
|
|
137
|
+
}
|
|
122
138
|
}
|
|
123
139
|
else {
|
|
124
140
|
console.log(chalk.gray(' AGENTS.md already exists, skipping'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAShE,MAAM,OAAO,WAAW;IACpB,KAAK,CAAC,OAAO,CAAC,UAAuB,EAAE;QACnC,M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AC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;gBAErD,IAAI,CAAC;oBACD,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;wBAClC,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBAEvE,kCAAkC;wBAClC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC;oBACpE,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,mDAAmD;gBACvD,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const agentsTemplate = "# Prompter Workflow\n\nThis project uses Prompter to enhance rough prompts into professional specifications.\n\n## Available Commands\n\n- `/prompter-enhance` - Transform a rough idea into a comprehensive specification\n\n## How It Works\n\n1. Invoke `/prompter-enhance` with your rough idea (e.g., \"Create a todo app\")\n2. The AI will enhance your prompt into a detailed specification\n3. The enhanced specification is saved to `prompter/<slug>/enhanced-prompt.md`\n4. Use the enhanced specification to guide implementation\n\n## Output Location\n\nEnhanced prompts are saved in the `prompter/` directory:\n\n```\nprompter/\n\u251C\u2500\u2500 project.md # Project context (edit this!)\n\u251C\u2500\u2500 todo-app/\n\u2502 \u2514\u2500\u2500 enhanced-prompt.md # Enhanced specification\n\u2514\u2500\u2500 ...\n```\n\n## Tips\n\n- Edit `prompter/project.md` to provide context about your project\n- Be specific in your initial prompt for better results\n- Review and refine the enhanced specification before implementing\n";
|
|
1
|
+
export declare const agentsTemplate = "# Prompter Instructions\n\nInstructions for AI coding assistants using Prompter for spec-driven development.\n\n## TL;DR Quick Checklist\n\n- Search existing work: `prompter spec list --long`, `prompter list` (use `rg` only for full-text search)\n- Decide scope: new capability vs modify existing capability\n- Pick a unique `change-id`: kebab-case, verb-led (`add-`, `update-`, `remove-`, `refactor-`)\n- Scaffold: `proposal.md`, `tasks.md`, `design.md` (only if needed), and delta specs per affected capability\n- Write deltas: use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`; include at least one `#### Scenario:` per requirement\n- Validate: `prompter validate [change-id] --strict --no-interactive` and fix issues\n- Request approval: Do not start implementation until proposal is approved\n\n## Three-Stage Workflow\n\n### Stage 1: Creating Changes\nCreate proposal when you need to:\n- Add features or functionality\n- Make breaking changes (API, schema)\n- Change architecture or patterns \n- Optimize performance (changes behavior)\n- Update security patterns\n\nTriggers (examples):\n- \"Help me create a change proposal\"\n- \"Help me plan a change\"\n- \"Help me create a proposal\"\n- \"I want to create a spec proposal\"\n- \"I want to create a spec\"\n\nLoose matching guidance:\n- Contains one of: `proposal`, `change`, `spec`\n- With one of: `create`, `plan`, `make`, `start`, `help`\n\nSkip proposal for:\n- Bug fixes (restore intended behavior)\n- Typos, formatting, comments\n- Dependency updates (non-breaking)\n- Configuration changes\n- Tests for existing behavior\n\n**Workflow**\n1. Review `prompter/project.md`, `prompter list`, and `prompter list --specs` to understand current context.\n2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, optional `design.md`, and spec deltas under `prompter/changes/<id>/`.\n3. Draft spec deltas using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement.\n4. Run `prompter validate <id> --strict --no-interactive` and resolve any issues before sharing the proposal.\n\n### Stage 2: Implementing Changes\nTrack these steps as TODOs and complete them one by one.\n1. **Read proposal.md** - Understand what's being built\n2. **Read design.md** (if exists) - Review technical decisions\n3. **Read tasks.md** - Get implementation checklist\n4. **Implement tasks sequentially** - Complete in order\n5. **Confirm completion** - Ensure every item in `tasks.md` is finished before updating statuses\n6. **Update checklist** - After all work is done, set every task to `- [x]` so the list reflects reality\n7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved\n\n### Stage 3: Archiving Changes\nAfter deployment, create separate PR to:\n- Move `changes/[name]/` \u2192 `changes/archive/YYYY-MM-DD-[name]/`\n- Update `specs/` if capabilities changed\n- Use `prompter archive <change-id> --skip-specs --yes` for tooling-only changes (always pass the change ID explicitly)\n- Run `prompter validate --strict --no-interactive` to confirm the archived change passes checks\n\n## Before Any Task\n\n**Context Checklist:**\n- [ ] Read relevant specs in `specs/[capability]/spec.md`\n- [ ] Check pending changes in `changes/` for conflicts\n- [ ] Read `prompter/project.md` for conventions\n- [ ] Run `prompter list` to see active changes\n- [ ] Run `prompter list --specs` to see existing capabilities\n\n**Before Creating Specs:**\n- Always check if capability already exists\n- Prefer modifying existing specs over creating duplicates\n- Use `prompter show [spec]` to review current state\n- If request is ambiguous, ask 1\u20132 clarifying questions before scaffolding\n\n### Search Guidance\n- Enumerate specs: `prompter spec list --long` (or `--json` for scripts)\n- Enumerate changes: `prompter list` (or `prompter change list --json` - deprecated but available)\n- Show details:\n - Spec: `prompter show <spec-id> --type spec` (use `--json` for filters)\n - Change: `prompter show <change-id> --json --deltas-only`\n- Full-text search (use ripgrep): `rg -n \"Requirement:|Scenario:\" prompter/specs`\n\n## Quick Start\n\n### CLI Commands\n\n```bash\n# Essential commands\nprompter list # List active changes\nprompter list --specs # List specifications\nprompter show [item] # Display change or spec\nprompter validate [item] # Validate changes or specs\nprompter archive <change-id> [--yes|-y] # Archive after deployment (add --yes for non-interactive runs)\n\n# Project management\nprompter init [path] # Initialize Prompter\nprompter update [path] # Update instruction files\n\n# Interactive mode\nprompter show # Prompts for selection\nprompter validate # Bulk validation mode\n\n# Debugging\nprompter show [change] --json --deltas-only\nprompter validate [change] --strict --no-interactive\n```\n\n### Command Flags\n\n- `--json` - Machine-readable output\n- `--type change|spec` - Disambiguate items\n- `--strict` - Comprehensive validation\n- `--no-interactive` - Disable prompts\n- `--skip-specs` - Archive without spec updates\n- `--yes`/`-y` - Skip confirmation prompts (non-interactive archive)\n\n## Directory Structure\n\n```\nprompter/\n\u251C\u2500\u2500 project.md # Project conventions\n\u251C\u2500\u2500 specs/ # Current truth - what IS built\n\u2502 \u2514\u2500\u2500 [capability]/ # Single focused capability\n\u2502 \u251C\u2500\u2500 spec.md # Requirements and scenarios\n\u2502 \u2514\u2500\u2500 design.md # Technical patterns\n\u251C\u2500\u2500 changes/ # Proposals - what SHOULD change\n\u2502 \u251C\u2500\u2500 [change-name]/\n\u2502 \u2502 \u251C\u2500\u2500 proposal.md # Why, what, impact\n\u2502 \u2502 \u251C\u2500\u2500 tasks.md # Implementation checklist\n\u2502 \u2502 \u251C\u2500\u2500 design.md # Technical decisions (optional; see criteria)\n\u2502 \u2502 \u2514\u2500\u2500 specs/ # Delta changes\n\u2502 \u2502 \u2514\u2500\u2500 [capability]/\n\u2502 \u2502 \u2514\u2500\u2500 spec.md # ADDED/MODIFIED/REMOVED\n\u2502 \u2514\u2500\u2500 archive/ # Completed changes\n```\n\n## Creating Change Proposals\n\n### Decision Tree\n\n```\nNew request?\n\u251C\u2500 Bug fix restoring spec behavior? \u2192 Fix directly\n\u251C\u2500 Typo/format/comment? \u2192 Fix directly \n\u251C\u2500 New feature/capability? \u2192 Create proposal\n\u251C\u2500 Breaking change? \u2192 Create proposal\n\u251C\u2500 Architecture change? \u2192 Create proposal\n\u2514\u2500 Unclear? \u2192 Create proposal (safer)\n```\n\n### Proposal Structure\n\n1. **Create directory:** `changes/[change-id]/` (kebab-case, verb-led, unique)\n\n2. **Write proposal.md:**\n```markdown\n# Change: [Brief description of change]\n\n## Why\n[1-2 sentences on problem/opportunity]\n\n## What Changes\n- [Bullet list of changes]\n- [Mark breaking changes with **BREAKING**]\n\n## Impact\n- Affected specs: [list capabilities]\n- Affected code: [key files/systems]\n```\n\n3. **Create spec deltas:** `specs/[capability]/spec.md`\n```markdown\n## ADDED Requirements\n### Requirement: New Feature\nThe system SHALL provide...\n\n#### Scenario: Success case\n- **WHEN** user performs action\n- **THEN** expected result\n\n## MODIFIED Requirements\n### Requirement: Existing Feature\n[Complete modified requirement]\n\n## REMOVED Requirements\n### Requirement: Old Feature\n**Reason**: [Why removing]\n**Migration**: [How to handle]\n```\nIf multiple capabilities are affected, create multiple delta files under `changes/[change-id]/specs/<capability>/spec.md`\u2014one per capability.\n\n4. **Create tasks.md:**\n```markdown\n## 1. Implementation\n- [ ] 1.1 Create database schema\n- [ ] 1.2 Implement API endpoint\n- [ ] 1.3 Add frontend component\n- [ ] 1.4 Write tests\n```\n\n5. **Create design.md when needed:**\nCreate `design.md` if any of the following apply; otherwise omit it:\n- Cross-cutting change (multiple services/modules) or a new architectural pattern\n- New external dependency or significant data model changes\n- Security, performance, or migration complexity\n- Ambiguity that benefits from technical decisions before coding\n\nMinimal `design.md` skeleton:\n```markdown\n## Context\n[Background, constraints, stakeholders]\n\n## Goals / Non-Goals\n- Goals: [...]\n- Non-Goals: [...]\n\n## Decisions\n- Decision: [What and why]\n- Alternatives considered: [Options + rationale]\n\n## Risks / Trade-offs\n- [Risk] \u2192 Mitigation\n\n## Migration Plan\n[Steps, rollback]\n\n## Open Questions\n- [...]\n```\n\n## Spec File Format\n\n### Critical: Scenario Formatting\n\n**CORRECT** (use #### headers):\n```markdown\n#### Scenario: User login success\n- **WHEN** valid credentials provided\n- **THEN** return JWT token\n```\n\n**WRONG** (don't use bullets or bold):\n```markdown\n- **Scenario: User login** \u274C\n**Scenario**: User login \u274C\n### Scenario: User login \u274C\n```\n\nEvery requirement MUST have at least one scenario.\n\n### Requirement Wording\n- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)\n\n### Delta Operations\n\n- `## ADDED Requirements` - New capabilities\n- `## MODIFIED Requirements` - Changed behavior\n- `## REMOVED Requirements` - Deprecated features\n- `## RENAMED Requirements` - Name changes\n\nHeaders matched with `trim(header)` - whitespace ignored.\n\n#### When to use ADDED vs MODIFIED\n- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding \"Slash Command Configuration\") rather than altering the semantics of an existing requirement.\n- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.\n- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.\n\nCommon pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren\u2019t explicitly changing the existing requirement, add a new requirement under ADDED instead.\n\nAuthoring a MODIFIED requirement correctly:\n1) Locate the existing requirement in `prompter/specs/<capability>/spec.md`.\n2) Copy the entire requirement block (from `### Requirement: ...` through its scenarios).\n3) Paste it under `## MODIFIED Requirements` and edit to reflect the new behavior.\n4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one `#### Scenario:`.\n\nExample for RENAMED:\n```markdown\n## RENAMED Requirements\n- FROM: `### Requirement: Login`\n- TO: `### Requirement: User Authentication`\n```\n\n## Troubleshooting\n\n### Common Errors\n\n**\"Change must have at least one delta\"**\n- Check `changes/[name]/specs/` exists with .md files\n- Verify files have operation prefixes (## ADDED Requirements)\n\n**\"Requirement must have at least one scenario\"**\n- Check scenarios use `#### Scenario:` format (4 hashtags)\n- Don't use bullet points or bold for scenario headers\n\n**Silent scenario parsing failures**\n- Exact format required: `#### Scenario: Name`\n- Debug with: `prompter show [change] --json --deltas-only`\n\n### Validation Tips\n\n```bash\n# Always use strict mode for comprehensive checks\nprompter validate [change] --strict --no-interactive\n\n# Debug delta parsing\nprompter show [change] --json | jq '.deltas'\n\n# Check specific requirement\nprompter show [spec] --json -r 1\n```\n\n## Happy Path Script\n\n```bash\n# 1) Explore current state\nprompter spec list --long\nprompter list\n# Optional full-text search:\n# rg -n \"Requirement:|Scenario:\" prompter/specs\n# rg -n \"^#|Requirement:\" prompter/changes\n\n# 2) Choose change id and scaffold\nCHANGE=add-two-factor-auth\nmkdir -p prompter/changes/$CHANGE/{specs/auth}\nprintf \"## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n\" > prompter/changes/$CHANGE/proposal.md\nprintf \"## 1. Implementation\\n- [ ] 1.1 ...\\n\" > prompter/changes/$CHANGE/tasks.md\n\n# 3) Add deltas (example)\ncat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'\n## ADDED Requirements\n### Requirement: Two-Factor Authentication\nUsers MUST provide a second factor during login.\n\n#### Scenario: OTP required\n- **WHEN** valid credentials are provided\n- **THEN** an OTP challenge is required\nEOF\n\n# 4) Validate\nprompter validate $CHANGE --strict --no-interactive\n```\n\n## Multi-Capability Example\n\n```\nprompter/changes/add-2fa-notify/\n\u251C\u2500\u2500 proposal.md\n\u251C\u2500\u2500 tasks.md\n\u2514\u2500\u2500 specs/\n \u251C\u2500\u2500 auth/\n \u2502 \u2514\u2500\u2500 spec.md # ADDED: Two-Factor Authentication\n \u2514\u2500\u2500 notifications/\n \u2514\u2500\u2500 spec.md # ADDED: OTP email notification\n```\n\nauth/spec.md\n```markdown\n## ADDED Requirements\n### Requirement: Two-Factor Authentication\n...\n```\n\nnotifications/spec.md\n```markdown\n## ADDED Requirements\n### Requirement: OTP Email Notification\n...\n```\n\n## Best Practices\n\n### Simplicity First\n- Default to <100 lines of new code\n- Single-file implementations until proven insufficient\n- Avoid frameworks without clear justification\n- Choose boring, proven patterns\n\n### Complexity Triggers\nOnly add complexity with:\n- Performance data showing current solution too slow\n- Concrete scale requirements (>1000 users, >100MB data)\n- Multiple proven use cases requiring abstraction\n\n### Clear References\n- Use `file.ts:42` format for code locations\n- Reference specs as `specs/auth/spec.md`\n- Link related changes and PRs\n\n### Capability Naming\n- Use verb-noun: `user-auth`, `payment-capture`\n- Single purpose per capability\n- 10-minute understandability rule\n- Split if description needs \"AND\"\n\n### Change ID Naming\n- Use kebab-case, short and descriptive: `add-two-factor-auth`\n- Prefer verb-led prefixes: `add-`, `update-`, `remove-`, `refactor-`\n- Ensure uniqueness; if taken, append `-2`, `-3`, etc.\n\n## Tool Selection Guide\n\n| Task | Tool | Why |\n|------|------|-----|\n| Find files by pattern | Glob | Fast pattern matching |\n| Search code content | Grep | Optimized regex search |\n| Read specific files | Read | Direct file access |\n| Explore unknown scope | Task | Multi-step investigation |\n\n## Error Recovery\n\n### Change Conflicts\n1. Run `prompter list` to see active changes\n2. Check for overlapping specs\n3. Coordinate with change owners\n4. Consider combining proposals\n\n### Validation Failures\n1. Run with `--strict` flag\n2. Check JSON output for details\n3. Verify spec file format\n4. Ensure scenarios properly formatted\n\n### Missing Context\n1. Read project.md first\n2. Check related specs\n3. Review recent archives\n4. Ask for clarification\n\n## Quick Reference\n\n### Stage Indicators\n- `changes/` - Proposed, not yet built\n- `specs/` - Built and deployed\n- `archive/` - Completed changes\n\n### File Purposes\n- `proposal.md` - Why and what\n- `tasks.md` - Implementation steps\n- `design.md` - Technical decisions\n- `spec.md` - Requirements and behavior\n\n### CLI Essentials\n```bash\nprompter list # What's in progress?\nprompter show [item] # View details\nprompter validate --strict --no-interactive # Is it correct?\nprompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)\n```\n\nRemember: Specs are truth. Changes are proposals. Keep them in sync.\n";
|
|
2
2
|
//# sourceMappingURL=agents-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mifAwc1B,CAAC"}
|
|
@@ -1,34 +1,458 @@
|
|
|
1
|
-
export const agentsTemplate = `# Prompter
|
|
1
|
+
export const agentsTemplate = `# Prompter Instructions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Instructions for AI coding assistants using Prompter for spec-driven development.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## TL;DR Quick Checklist
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Search existing work: \`prompter spec list --long\`, \`prompter list\` (use \`rg\` only for full-text search)
|
|
8
|
+
- Decide scope: new capability vs modify existing capability
|
|
9
|
+
- Pick a unique \`change-id\`: kebab-case, verb-led (\`add-\`, \`update-\`, \`remove-\`, \`refactor-\`)
|
|
10
|
+
- Scaffold: \`proposal.md\`, \`tasks.md\`, \`design.md\` (only if needed), and delta specs per affected capability
|
|
11
|
+
- Write deltas: use \`## ADDED|MODIFIED|REMOVED|RENAMED Requirements\`; include at least one \`#### Scenario:\` per requirement
|
|
12
|
+
- Validate: \`prompter validate [change-id] --strict --no-interactive\` and fix issues
|
|
13
|
+
- Request approval: Do not start implementation until proposal is approved
|
|
8
14
|
|
|
9
|
-
##
|
|
15
|
+
## Three-Stage Workflow
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
### Stage 1: Creating Changes
|
|
18
|
+
Create proposal when you need to:
|
|
19
|
+
- Add features or functionality
|
|
20
|
+
- Make breaking changes (API, schema)
|
|
21
|
+
- Change architecture or patterns
|
|
22
|
+
- Optimize performance (changes behavior)
|
|
23
|
+
- Update security patterns
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
Triggers (examples):
|
|
26
|
+
- "Help me create a change proposal"
|
|
27
|
+
- "Help me plan a change"
|
|
28
|
+
- "Help me create a proposal"
|
|
29
|
+
- "I want to create a spec proposal"
|
|
30
|
+
- "I want to create a spec"
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
Loose matching guidance:
|
|
33
|
+
- Contains one of: \`proposal\`, \`change\`, \`spec\`
|
|
34
|
+
- With one of: \`create\`, \`plan\`, \`make\`, \`start\`, \`help\`
|
|
35
|
+
|
|
36
|
+
Skip proposal for:
|
|
37
|
+
- Bug fixes (restore intended behavior)
|
|
38
|
+
- Typos, formatting, comments
|
|
39
|
+
- Dependency updates (non-breaking)
|
|
40
|
+
- Configuration changes
|
|
41
|
+
- Tests for existing behavior
|
|
42
|
+
|
|
43
|
+
**Workflow**
|
|
44
|
+
1. Review \`prompter/project.md\`, \`prompter list\`, and \`prompter list --specs\` to understand current context.
|
|
45
|
+
2. Choose a unique verb-led \`change-id\` and scaffold \`proposal.md\`, \`tasks.md\`, optional \`design.md\`, and spec deltas under \`prompter/changes/<id>/\`.
|
|
46
|
+
3. Draft spec deltas using \`## ADDED|MODIFIED|REMOVED Requirements\` with at least one \`#### Scenario:\` per requirement.
|
|
47
|
+
4. Run \`prompter validate <id> --strict --no-interactive\` and resolve any issues before sharing the proposal.
|
|
48
|
+
|
|
49
|
+
### Stage 2: Implementing Changes
|
|
50
|
+
Track these steps as TODOs and complete them one by one.
|
|
51
|
+
1. **Read proposal.md** - Understand what's being built
|
|
52
|
+
2. **Read design.md** (if exists) - Review technical decisions
|
|
53
|
+
3. **Read tasks.md** - Get implementation checklist
|
|
54
|
+
4. **Implement tasks sequentially** - Complete in order
|
|
55
|
+
5. **Confirm completion** - Ensure every item in \`tasks.md\` is finished before updating statuses
|
|
56
|
+
6. **Update checklist** - After all work is done, set every task to \`- [x]\` so the list reflects reality
|
|
57
|
+
7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved
|
|
58
|
+
|
|
59
|
+
### Stage 3: Archiving Changes
|
|
60
|
+
After deployment, create separate PR to:
|
|
61
|
+
- Move \`changes/[name]/\` → \`changes/archive/YYYY-MM-DD-[name]/\`
|
|
62
|
+
- Update \`specs/\` if capabilities changed
|
|
63
|
+
- Use \`prompter archive <change-id> --skip-specs --yes\` for tooling-only changes (always pass the change ID explicitly)
|
|
64
|
+
- Run \`prompter validate --strict --no-interactive\` to confirm the archived change passes checks
|
|
65
|
+
|
|
66
|
+
## Before Any Task
|
|
67
|
+
|
|
68
|
+
**Context Checklist:**
|
|
69
|
+
- [ ] Read relevant specs in \`specs/[capability]/spec.md\`
|
|
70
|
+
- [ ] Check pending changes in \`changes/\` for conflicts
|
|
71
|
+
- [ ] Read \`prompter/project.md\` for conventions
|
|
72
|
+
- [ ] Run \`prompter list\` to see active changes
|
|
73
|
+
- [ ] Run \`prompter list --specs\` to see existing capabilities
|
|
74
|
+
|
|
75
|
+
**Before Creating Specs:**
|
|
76
|
+
- Always check if capability already exists
|
|
77
|
+
- Prefer modifying existing specs over creating duplicates
|
|
78
|
+
- Use \`prompter show [spec]\` to review current state
|
|
79
|
+
- If request is ambiguous, ask 1–2 clarifying questions before scaffolding
|
|
80
|
+
|
|
81
|
+
### Search Guidance
|
|
82
|
+
- Enumerate specs: \`prompter spec list --long\` (or \`--json\` for scripts)
|
|
83
|
+
- Enumerate changes: \`prompter list\` (or \`prompter change list --json\` - deprecated but available)
|
|
84
|
+
- Show details:
|
|
85
|
+
- Spec: \`prompter show <spec-id> --type spec\` (use \`--json\` for filters)
|
|
86
|
+
- Change: \`prompter show <change-id> --json --deltas-only\`
|
|
87
|
+
- Full-text search (use ripgrep): \`rg -n "Requirement:|Scenario:" prompter/specs\`
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
### CLI Commands
|
|
92
|
+
|
|
93
|
+
\`\`\`bash
|
|
94
|
+
# Essential commands
|
|
95
|
+
prompter list # List active changes
|
|
96
|
+
prompter list --specs # List specifications
|
|
97
|
+
prompter show [item] # Display change or spec
|
|
98
|
+
prompter validate [item] # Validate changes or specs
|
|
99
|
+
prompter archive <change-id> [--yes|-y] # Archive after deployment (add --yes for non-interactive runs)
|
|
100
|
+
|
|
101
|
+
# Project management
|
|
102
|
+
prompter init [path] # Initialize Prompter
|
|
103
|
+
prompter update [path] # Update instruction files
|
|
104
|
+
|
|
105
|
+
# Interactive mode
|
|
106
|
+
prompter show # Prompts for selection
|
|
107
|
+
prompter validate # Bulk validation mode
|
|
108
|
+
|
|
109
|
+
# Debugging
|
|
110
|
+
prompter show [change] --json --deltas-only
|
|
111
|
+
prompter validate [change] --strict --no-interactive
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
### Command Flags
|
|
115
|
+
|
|
116
|
+
- \`--json\` - Machine-readable output
|
|
117
|
+
- \`--type change|spec\` - Disambiguate items
|
|
118
|
+
- \`--strict\` - Comprehensive validation
|
|
119
|
+
- \`--no-interactive\` - Disable prompts
|
|
120
|
+
- \`--skip-specs\` - Archive without spec updates
|
|
121
|
+
- \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
|
|
122
|
+
|
|
123
|
+
## Directory Structure
|
|
19
124
|
|
|
20
125
|
\`\`\`
|
|
21
126
|
prompter/
|
|
22
|
-
├── project.md # Project
|
|
23
|
-
├──
|
|
24
|
-
│ └──
|
|
25
|
-
|
|
127
|
+
├── project.md # Project conventions
|
|
128
|
+
├── specs/ # Current truth - what IS built
|
|
129
|
+
│ └── [capability]/ # Single focused capability
|
|
130
|
+
│ ├── spec.md # Requirements and scenarios
|
|
131
|
+
│ └── design.md # Technical patterns
|
|
132
|
+
├── changes/ # Proposals - what SHOULD change
|
|
133
|
+
│ ├── [change-name]/
|
|
134
|
+
│ │ ├── proposal.md # Why, what, impact
|
|
135
|
+
│ │ ├── tasks.md # Implementation checklist
|
|
136
|
+
│ │ ├── design.md # Technical decisions (optional; see criteria)
|
|
137
|
+
│ │ └── specs/ # Delta changes
|
|
138
|
+
│ │ └── [capability]/
|
|
139
|
+
│ │ └── spec.md # ADDED/MODIFIED/REMOVED
|
|
140
|
+
│ └── archive/ # Completed changes
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
## Creating Change Proposals
|
|
144
|
+
|
|
145
|
+
### Decision Tree
|
|
146
|
+
|
|
147
|
+
\`\`\`
|
|
148
|
+
New request?
|
|
149
|
+
├─ Bug fix restoring spec behavior? → Fix directly
|
|
150
|
+
├─ Typo/format/comment? → Fix directly
|
|
151
|
+
├─ New feature/capability? → Create proposal
|
|
152
|
+
├─ Breaking change? → Create proposal
|
|
153
|
+
├─ Architecture change? → Create proposal
|
|
154
|
+
└─ Unclear? → Create proposal (safer)
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
### Proposal Structure
|
|
158
|
+
|
|
159
|
+
1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
|
|
160
|
+
|
|
161
|
+
2. **Write proposal.md:**
|
|
162
|
+
\`\`\`markdown
|
|
163
|
+
# Change: [Brief description of change]
|
|
164
|
+
|
|
165
|
+
## Why
|
|
166
|
+
[1-2 sentences on problem/opportunity]
|
|
167
|
+
|
|
168
|
+
## What Changes
|
|
169
|
+
- [Bullet list of changes]
|
|
170
|
+
- [Mark breaking changes with **BREAKING**]
|
|
171
|
+
|
|
172
|
+
## Impact
|
|
173
|
+
- Affected specs: [list capabilities]
|
|
174
|
+
- Affected code: [key files/systems]
|
|
175
|
+
\`\`\`
|
|
176
|
+
|
|
177
|
+
3. **Create spec deltas:** \`specs/[capability]/spec.md\`
|
|
178
|
+
\`\`\`markdown
|
|
179
|
+
## ADDED Requirements
|
|
180
|
+
### Requirement: New Feature
|
|
181
|
+
The system SHALL provide...
|
|
182
|
+
|
|
183
|
+
#### Scenario: Success case
|
|
184
|
+
- **WHEN** user performs action
|
|
185
|
+
- **THEN** expected result
|
|
186
|
+
|
|
187
|
+
## MODIFIED Requirements
|
|
188
|
+
### Requirement: Existing Feature
|
|
189
|
+
[Complete modified requirement]
|
|
190
|
+
|
|
191
|
+
## REMOVED Requirements
|
|
192
|
+
### Requirement: Old Feature
|
|
193
|
+
**Reason**: [Why removing]
|
|
194
|
+
**Migration**: [How to handle]
|
|
195
|
+
\`\`\`
|
|
196
|
+
If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
|
|
197
|
+
|
|
198
|
+
4. **Create tasks.md:**
|
|
199
|
+
\`\`\`markdown
|
|
200
|
+
## 1. Implementation
|
|
201
|
+
- [ ] 1.1 Create database schema
|
|
202
|
+
- [ ] 1.2 Implement API endpoint
|
|
203
|
+
- [ ] 1.3 Add frontend component
|
|
204
|
+
- [ ] 1.4 Write tests
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
5. **Create design.md when needed:**
|
|
208
|
+
Create \`design.md\` if any of the following apply; otherwise omit it:
|
|
209
|
+
- Cross-cutting change (multiple services/modules) or a new architectural pattern
|
|
210
|
+
- New external dependency or significant data model changes
|
|
211
|
+
- Security, performance, or migration complexity
|
|
212
|
+
- Ambiguity that benefits from technical decisions before coding
|
|
213
|
+
|
|
214
|
+
Minimal \`design.md\` skeleton:
|
|
215
|
+
\`\`\`markdown
|
|
216
|
+
## Context
|
|
217
|
+
[Background, constraints, stakeholders]
|
|
218
|
+
|
|
219
|
+
## Goals / Non-Goals
|
|
220
|
+
- Goals: [...]
|
|
221
|
+
- Non-Goals: [...]
|
|
222
|
+
|
|
223
|
+
## Decisions
|
|
224
|
+
- Decision: [What and why]
|
|
225
|
+
- Alternatives considered: [Options + rationale]
|
|
226
|
+
|
|
227
|
+
## Risks / Trade-offs
|
|
228
|
+
- [Risk] → Mitigation
|
|
229
|
+
|
|
230
|
+
## Migration Plan
|
|
231
|
+
[Steps, rollback]
|
|
232
|
+
|
|
233
|
+
## Open Questions
|
|
234
|
+
- [...]
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
## Spec File Format
|
|
238
|
+
|
|
239
|
+
### Critical: Scenario Formatting
|
|
240
|
+
|
|
241
|
+
**CORRECT** (use #### headers):
|
|
242
|
+
\`\`\`markdown
|
|
243
|
+
#### Scenario: User login success
|
|
244
|
+
- **WHEN** valid credentials provided
|
|
245
|
+
- **THEN** return JWT token
|
|
246
|
+
\`\`\`
|
|
247
|
+
|
|
248
|
+
**WRONG** (don't use bullets or bold):
|
|
249
|
+
\`\`\`markdown
|
|
250
|
+
- **Scenario: User login** ❌
|
|
251
|
+
**Scenario**: User login ❌
|
|
252
|
+
### Scenario: User login ❌
|
|
26
253
|
\`\`\`
|
|
27
254
|
|
|
28
|
-
|
|
255
|
+
Every requirement MUST have at least one scenario.
|
|
256
|
+
|
|
257
|
+
### Requirement Wording
|
|
258
|
+
- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
|
|
259
|
+
|
|
260
|
+
### Delta Operations
|
|
261
|
+
|
|
262
|
+
- \`## ADDED Requirements\` - New capabilities
|
|
263
|
+
- \`## MODIFIED Requirements\` - Changed behavior
|
|
264
|
+
- \`## REMOVED Requirements\` - Deprecated features
|
|
265
|
+
- \`## RENAMED Requirements\` - Name changes
|
|
266
|
+
|
|
267
|
+
Headers matched with \`trim(header)\` - whitespace ignored.
|
|
268
|
+
|
|
269
|
+
#### When to use ADDED vs MODIFIED
|
|
270
|
+
- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing requirement.
|
|
271
|
+
- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.
|
|
272
|
+
- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
|
|
273
|
+
|
|
274
|
+
Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead.
|
|
275
|
+
|
|
276
|
+
Authoring a MODIFIED requirement correctly:
|
|
277
|
+
1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
|
|
278
|
+
2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
|
|
279
|
+
3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
|
|
280
|
+
4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
|
|
281
|
+
|
|
282
|
+
Example for RENAMED:
|
|
283
|
+
\`\`\`markdown
|
|
284
|
+
## RENAMED Requirements
|
|
285
|
+
- FROM: \`### Requirement: Login\`
|
|
286
|
+
- TO: \`### Requirement: User Authentication\`
|
|
287
|
+
\`\`\`
|
|
288
|
+
|
|
289
|
+
## Troubleshooting
|
|
290
|
+
|
|
291
|
+
### Common Errors
|
|
292
|
+
|
|
293
|
+
**"Change must have at least one delta"**
|
|
294
|
+
- Check \`changes/[name]/specs/\` exists with .md files
|
|
295
|
+
- Verify files have operation prefixes (## ADDED Requirements)
|
|
296
|
+
|
|
297
|
+
**"Requirement must have at least one scenario"**
|
|
298
|
+
- Check scenarios use \`#### Scenario:\` format (4 hashtags)
|
|
299
|
+
- Don't use bullet points or bold for scenario headers
|
|
300
|
+
|
|
301
|
+
**Silent scenario parsing failures**
|
|
302
|
+
- Exact format required: \`#### Scenario: Name\`
|
|
303
|
+
- Debug with: \`prompter show [change] --json --deltas-only\`
|
|
304
|
+
|
|
305
|
+
### Validation Tips
|
|
306
|
+
|
|
307
|
+
\`\`\`bash
|
|
308
|
+
# Always use strict mode for comprehensive checks
|
|
309
|
+
prompter validate [change] --strict --no-interactive
|
|
310
|
+
|
|
311
|
+
# Debug delta parsing
|
|
312
|
+
prompter show [change] --json | jq '.deltas'
|
|
313
|
+
|
|
314
|
+
# Check specific requirement
|
|
315
|
+
prompter show [spec] --json -r 1
|
|
316
|
+
\`\`\`
|
|
317
|
+
|
|
318
|
+
## Happy Path Script
|
|
319
|
+
|
|
320
|
+
\`\`\`bash
|
|
321
|
+
# 1) Explore current state
|
|
322
|
+
prompter spec list --long
|
|
323
|
+
prompter list
|
|
324
|
+
# Optional full-text search:
|
|
325
|
+
# rg -n "Requirement:|Scenario:" prompter/specs
|
|
326
|
+
# rg -n "^#|Requirement:" prompter/changes
|
|
327
|
+
|
|
328
|
+
# 2) Choose change id and scaffold
|
|
329
|
+
CHANGE=add-two-factor-auth
|
|
330
|
+
mkdir -p prompter/changes/$CHANGE/{specs/auth}
|
|
331
|
+
printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
|
|
332
|
+
printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
|
|
333
|
+
|
|
334
|
+
# 3) Add deltas (example)
|
|
335
|
+
cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
|
|
336
|
+
## ADDED Requirements
|
|
337
|
+
### Requirement: Two-Factor Authentication
|
|
338
|
+
Users MUST provide a second factor during login.
|
|
339
|
+
|
|
340
|
+
#### Scenario: OTP required
|
|
341
|
+
- **WHEN** valid credentials are provided
|
|
342
|
+
- **THEN** an OTP challenge is required
|
|
343
|
+
EOF
|
|
344
|
+
|
|
345
|
+
# 4) Validate
|
|
346
|
+
prompter validate $CHANGE --strict --no-interactive
|
|
347
|
+
\`\`\`
|
|
348
|
+
|
|
349
|
+
## Multi-Capability Example
|
|
350
|
+
|
|
351
|
+
\`\`\`
|
|
352
|
+
prompter/changes/add-2fa-notify/
|
|
353
|
+
├── proposal.md
|
|
354
|
+
├── tasks.md
|
|
355
|
+
└── specs/
|
|
356
|
+
├── auth/
|
|
357
|
+
│ └── spec.md # ADDED: Two-Factor Authentication
|
|
358
|
+
└── notifications/
|
|
359
|
+
└── spec.md # ADDED: OTP email notification
|
|
360
|
+
\`\`\`
|
|
361
|
+
|
|
362
|
+
auth/spec.md
|
|
363
|
+
\`\`\`markdown
|
|
364
|
+
## ADDED Requirements
|
|
365
|
+
### Requirement: Two-Factor Authentication
|
|
366
|
+
...
|
|
367
|
+
\`\`\`
|
|
368
|
+
|
|
369
|
+
notifications/spec.md
|
|
370
|
+
\`\`\`markdown
|
|
371
|
+
## ADDED Requirements
|
|
372
|
+
### Requirement: OTP Email Notification
|
|
373
|
+
...
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
## Best Practices
|
|
377
|
+
|
|
378
|
+
### Simplicity First
|
|
379
|
+
- Default to <100 lines of new code
|
|
380
|
+
- Single-file implementations until proven insufficient
|
|
381
|
+
- Avoid frameworks without clear justification
|
|
382
|
+
- Choose boring, proven patterns
|
|
383
|
+
|
|
384
|
+
### Complexity Triggers
|
|
385
|
+
Only add complexity with:
|
|
386
|
+
- Performance data showing current solution too slow
|
|
387
|
+
- Concrete scale requirements (>1000 users, >100MB data)
|
|
388
|
+
- Multiple proven use cases requiring abstraction
|
|
389
|
+
|
|
390
|
+
### Clear References
|
|
391
|
+
- Use \`file.ts:42\` format for code locations
|
|
392
|
+
- Reference specs as \`specs/auth/spec.md\`
|
|
393
|
+
- Link related changes and PRs
|
|
394
|
+
|
|
395
|
+
### Capability Naming
|
|
396
|
+
- Use verb-noun: \`user-auth\`, \`payment-capture\`
|
|
397
|
+
- Single purpose per capability
|
|
398
|
+
- 10-minute understandability rule
|
|
399
|
+
- Split if description needs "AND"
|
|
400
|
+
|
|
401
|
+
### Change ID Naming
|
|
402
|
+
- Use kebab-case, short and descriptive: \`add-two-factor-auth\`
|
|
403
|
+
- Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
|
|
404
|
+
- Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
|
|
405
|
+
|
|
406
|
+
## Tool Selection Guide
|
|
407
|
+
|
|
408
|
+
| Task | Tool | Why |
|
|
409
|
+
|------|------|-----|
|
|
410
|
+
| Find files by pattern | Glob | Fast pattern matching |
|
|
411
|
+
| Search code content | Grep | Optimized regex search |
|
|
412
|
+
| Read specific files | Read | Direct file access |
|
|
413
|
+
| Explore unknown scope | Task | Multi-step investigation |
|
|
414
|
+
|
|
415
|
+
## Error Recovery
|
|
416
|
+
|
|
417
|
+
### Change Conflicts
|
|
418
|
+
1. Run \`prompter list\` to see active changes
|
|
419
|
+
2. Check for overlapping specs
|
|
420
|
+
3. Coordinate with change owners
|
|
421
|
+
4. Consider combining proposals
|
|
422
|
+
|
|
423
|
+
### Validation Failures
|
|
424
|
+
1. Run with \`--strict\` flag
|
|
425
|
+
2. Check JSON output for details
|
|
426
|
+
3. Verify spec file format
|
|
427
|
+
4. Ensure scenarios properly formatted
|
|
428
|
+
|
|
429
|
+
### Missing Context
|
|
430
|
+
1. Read project.md first
|
|
431
|
+
2. Check related specs
|
|
432
|
+
3. Review recent archives
|
|
433
|
+
4. Ask for clarification
|
|
434
|
+
|
|
435
|
+
## Quick Reference
|
|
436
|
+
|
|
437
|
+
### Stage Indicators
|
|
438
|
+
- \`changes/\` - Proposed, not yet built
|
|
439
|
+
- \`specs/\` - Built and deployed
|
|
440
|
+
- \`archive/\` - Completed changes
|
|
441
|
+
|
|
442
|
+
### File Purposes
|
|
443
|
+
- \`proposal.md\` - Why and what
|
|
444
|
+
- \`tasks.md\` - Implementation steps
|
|
445
|
+
- \`design.md\` - Technical decisions
|
|
446
|
+
- \`spec.md\` - Requirements and behavior
|
|
447
|
+
|
|
448
|
+
### CLI Essentials
|
|
449
|
+
\`\`\`bash
|
|
450
|
+
prompter list # What's in progress?
|
|
451
|
+
prompter show [item] # View details
|
|
452
|
+
prompter validate --strict --no-interactive # Is it correct?
|
|
453
|
+
prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
|
|
454
|
+
\`\`\`
|
|
29
455
|
|
|
30
|
-
|
|
31
|
-
- Be specific in your initial prompt for better results
|
|
32
|
-
- Review and refine the enhanced specification before implementing
|
|
456
|
+
Remember: Specs are truth. Changes are proposals. Keep them in sync.
|
|
33
457
|
`;
|
|
34
458
|
//# sourceMappingURL=agents-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG
|
|
1
|
+
{"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwc7B,CAAC"}
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -120,18 +120,32 @@ export class InitCommand {
|
|
|
120
120
|
const projectMdPath = path.join(prompterPath, 'project.md');
|
|
121
121
|
const projectMdExists = await this.fileExists(projectMdPath);
|
|
122
122
|
if (!projectMdExists) {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
try {
|
|
124
|
+
if (!projectTemplate) {
|
|
125
|
+
throw new Error('project.md template is undefined');
|
|
126
|
+
}
|
|
127
|
+
await fs.writeFile(projectMdPath, projectTemplate, 'utf-8');
|
|
128
|
+
console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/project.md')}`);
|
|
129
|
+
} catch (error) {
|
|
130
|
+
console.error(chalk.red('✗') + ` Failed to create project.md: ${error}`);
|
|
131
|
+
}
|
|
125
132
|
} else if (isReInitialization) {
|
|
126
133
|
console.log(chalk.gray(' project.md already exists, keeping it'));
|
|
127
134
|
}
|
|
128
135
|
|
|
129
136
|
// Create AGENTS.md for universal support
|
|
130
|
-
const agentsMdPath = path.join(
|
|
137
|
+
const agentsMdPath = path.join(prompterPath, 'AGENTS.md');
|
|
131
138
|
const agentsExists = await this.fileExists(agentsMdPath);
|
|
132
139
|
if (!agentsExists) {
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
try {
|
|
141
|
+
if (!agentsTemplate) {
|
|
142
|
+
throw new Error('AGENTS.md template is undefined');
|
|
143
|
+
}
|
|
144
|
+
await fs.writeFile(agentsMdPath, agentsTemplate, 'utf-8');
|
|
145
|
+
console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/AGENTS.md')}`);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error(chalk.red('✗') + ` Failed to create AGENTS.md: ${error}`);
|
|
148
|
+
}
|
|
135
149
|
} else {
|
|
136
150
|
console.log(chalk.gray(' AGENTS.md already exists, skipping'));
|
|
137
151
|
}
|
|
@@ -1,33 +1,457 @@
|
|
|
1
|
-
export const agentsTemplate = `# Prompter
|
|
1
|
+
export const agentsTemplate = `# Prompter Instructions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Instructions for AI coding assistants using Prompter for spec-driven development.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## TL;DR Quick Checklist
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Search existing work: \`prompter spec list --long\`, \`prompter list\` (use \`rg\` only for full-text search)
|
|
8
|
+
- Decide scope: new capability vs modify existing capability
|
|
9
|
+
- Pick a unique \`change-id\`: kebab-case, verb-led (\`add-\`, \`update-\`, \`remove-\`, \`refactor-\`)
|
|
10
|
+
- Scaffold: \`proposal.md\`, \`tasks.md\`, \`design.md\` (only if needed), and delta specs per affected capability
|
|
11
|
+
- Write deltas: use \`## ADDED|MODIFIED|REMOVED|RENAMED Requirements\`; include at least one \`#### Scenario:\` per requirement
|
|
12
|
+
- Validate: \`prompter validate [change-id] --strict --no-interactive\` and fix issues
|
|
13
|
+
- Request approval: Do not start implementation until proposal is approved
|
|
8
14
|
|
|
9
|
-
##
|
|
15
|
+
## Three-Stage Workflow
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
### Stage 1: Creating Changes
|
|
18
|
+
Create proposal when you need to:
|
|
19
|
+
- Add features or functionality
|
|
20
|
+
- Make breaking changes (API, schema)
|
|
21
|
+
- Change architecture or patterns
|
|
22
|
+
- Optimize performance (changes behavior)
|
|
23
|
+
- Update security patterns
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
Triggers (examples):
|
|
26
|
+
- "Help me create a change proposal"
|
|
27
|
+
- "Help me plan a change"
|
|
28
|
+
- "Help me create a proposal"
|
|
29
|
+
- "I want to create a spec proposal"
|
|
30
|
+
- "I want to create a spec"
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
Loose matching guidance:
|
|
33
|
+
- Contains one of: \`proposal\`, \`change\`, \`spec\`
|
|
34
|
+
- With one of: \`create\`, \`plan\`, \`make\`, \`start\`, \`help\`
|
|
35
|
+
|
|
36
|
+
Skip proposal for:
|
|
37
|
+
- Bug fixes (restore intended behavior)
|
|
38
|
+
- Typos, formatting, comments
|
|
39
|
+
- Dependency updates (non-breaking)
|
|
40
|
+
- Configuration changes
|
|
41
|
+
- Tests for existing behavior
|
|
42
|
+
|
|
43
|
+
**Workflow**
|
|
44
|
+
1. Review \`prompter/project.md\`, \`prompter list\`, and \`prompter list --specs\` to understand current context.
|
|
45
|
+
2. Choose a unique verb-led \`change-id\` and scaffold \`proposal.md\`, \`tasks.md\`, optional \`design.md\`, and spec deltas under \`prompter/changes/<id>/\`.
|
|
46
|
+
3. Draft spec deltas using \`## ADDED|MODIFIED|REMOVED Requirements\` with at least one \`#### Scenario:\` per requirement.
|
|
47
|
+
4. Run \`prompter validate <id> --strict --no-interactive\` and resolve any issues before sharing the proposal.
|
|
48
|
+
|
|
49
|
+
### Stage 2: Implementing Changes
|
|
50
|
+
Track these steps as TODOs and complete them one by one.
|
|
51
|
+
1. **Read proposal.md** - Understand what's being built
|
|
52
|
+
2. **Read design.md** (if exists) - Review technical decisions
|
|
53
|
+
3. **Read tasks.md** - Get implementation checklist
|
|
54
|
+
4. **Implement tasks sequentially** - Complete in order
|
|
55
|
+
5. **Confirm completion** - Ensure every item in \`tasks.md\` is finished before updating statuses
|
|
56
|
+
6. **Update checklist** - After all work is done, set every task to \`- [x]\` so the list reflects reality
|
|
57
|
+
7. **Approval gate** - Do not start implementation until the proposal is reviewed and approved
|
|
58
|
+
|
|
59
|
+
### Stage 3: Archiving Changes
|
|
60
|
+
After deployment, create separate PR to:
|
|
61
|
+
- Move \`changes/[name]/\` → \`changes/archive/YYYY-MM-DD-[name]/\`
|
|
62
|
+
- Update \`specs/\` if capabilities changed
|
|
63
|
+
- Use \`prompter archive <change-id> --skip-specs --yes\` for tooling-only changes (always pass the change ID explicitly)
|
|
64
|
+
- Run \`prompter validate --strict --no-interactive\` to confirm the archived change passes checks
|
|
65
|
+
|
|
66
|
+
## Before Any Task
|
|
67
|
+
|
|
68
|
+
**Context Checklist:**
|
|
69
|
+
- [ ] Read relevant specs in \`specs/[capability]/spec.md\`
|
|
70
|
+
- [ ] Check pending changes in \`changes/\` for conflicts
|
|
71
|
+
- [ ] Read \`prompter/project.md\` for conventions
|
|
72
|
+
- [ ] Run \`prompter list\` to see active changes
|
|
73
|
+
- [ ] Run \`prompter list --specs\` to see existing capabilities
|
|
74
|
+
|
|
75
|
+
**Before Creating Specs:**
|
|
76
|
+
- Always check if capability already exists
|
|
77
|
+
- Prefer modifying existing specs over creating duplicates
|
|
78
|
+
- Use \`prompter show [spec]\` to review current state
|
|
79
|
+
- If request is ambiguous, ask 1–2 clarifying questions before scaffolding
|
|
80
|
+
|
|
81
|
+
### Search Guidance
|
|
82
|
+
- Enumerate specs: \`prompter spec list --long\` (or \`--json\` for scripts)
|
|
83
|
+
- Enumerate changes: \`prompter list\` (or \`prompter change list --json\` - deprecated but available)
|
|
84
|
+
- Show details:
|
|
85
|
+
- Spec: \`prompter show <spec-id> --type spec\` (use \`--json\` for filters)
|
|
86
|
+
- Change: \`prompter show <change-id> --json --deltas-only\`
|
|
87
|
+
- Full-text search (use ripgrep): \`rg -n "Requirement:|Scenario:" prompter/specs\`
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
### CLI Commands
|
|
92
|
+
|
|
93
|
+
\`\`\`bash
|
|
94
|
+
# Essential commands
|
|
95
|
+
prompter list # List active changes
|
|
96
|
+
prompter list --specs # List specifications
|
|
97
|
+
prompter show [item] # Display change or spec
|
|
98
|
+
prompter validate [item] # Validate changes or specs
|
|
99
|
+
prompter archive <change-id> [--yes|-y] # Archive after deployment (add --yes for non-interactive runs)
|
|
100
|
+
|
|
101
|
+
# Project management
|
|
102
|
+
prompter init [path] # Initialize Prompter
|
|
103
|
+
prompter update [path] # Update instruction files
|
|
104
|
+
|
|
105
|
+
# Interactive mode
|
|
106
|
+
prompter show # Prompts for selection
|
|
107
|
+
prompter validate # Bulk validation mode
|
|
108
|
+
|
|
109
|
+
# Debugging
|
|
110
|
+
prompter show [change] --json --deltas-only
|
|
111
|
+
prompter validate [change] --strict --no-interactive
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
### Command Flags
|
|
115
|
+
|
|
116
|
+
- \`--json\` - Machine-readable output
|
|
117
|
+
- \`--type change|spec\` - Disambiguate items
|
|
118
|
+
- \`--strict\` - Comprehensive validation
|
|
119
|
+
- \`--no-interactive\` - Disable prompts
|
|
120
|
+
- \`--skip-specs\` - Archive without spec updates
|
|
121
|
+
- \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
|
|
122
|
+
|
|
123
|
+
## Directory Structure
|
|
19
124
|
|
|
20
125
|
\`\`\`
|
|
21
126
|
prompter/
|
|
22
|
-
├── project.md # Project
|
|
23
|
-
├──
|
|
24
|
-
│ └──
|
|
25
|
-
|
|
127
|
+
├── project.md # Project conventions
|
|
128
|
+
├── specs/ # Current truth - what IS built
|
|
129
|
+
│ └── [capability]/ # Single focused capability
|
|
130
|
+
│ ├── spec.md # Requirements and scenarios
|
|
131
|
+
│ └── design.md # Technical patterns
|
|
132
|
+
├── changes/ # Proposals - what SHOULD change
|
|
133
|
+
│ ├── [change-name]/
|
|
134
|
+
│ │ ├── proposal.md # Why, what, impact
|
|
135
|
+
│ │ ├── tasks.md # Implementation checklist
|
|
136
|
+
│ │ ├── design.md # Technical decisions (optional; see criteria)
|
|
137
|
+
│ │ └── specs/ # Delta changes
|
|
138
|
+
│ │ └── [capability]/
|
|
139
|
+
│ │ └── spec.md # ADDED/MODIFIED/REMOVED
|
|
140
|
+
│ └── archive/ # Completed changes
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
## Creating Change Proposals
|
|
144
|
+
|
|
145
|
+
### Decision Tree
|
|
146
|
+
|
|
147
|
+
\`\`\`
|
|
148
|
+
New request?
|
|
149
|
+
├─ Bug fix restoring spec behavior? → Fix directly
|
|
150
|
+
├─ Typo/format/comment? → Fix directly
|
|
151
|
+
├─ New feature/capability? → Create proposal
|
|
152
|
+
├─ Breaking change? → Create proposal
|
|
153
|
+
├─ Architecture change? → Create proposal
|
|
154
|
+
└─ Unclear? → Create proposal (safer)
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
### Proposal Structure
|
|
158
|
+
|
|
159
|
+
1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
|
|
160
|
+
|
|
161
|
+
2. **Write proposal.md:**
|
|
162
|
+
\`\`\`markdown
|
|
163
|
+
# Change: [Brief description of change]
|
|
164
|
+
|
|
165
|
+
## Why
|
|
166
|
+
[1-2 sentences on problem/opportunity]
|
|
167
|
+
|
|
168
|
+
## What Changes
|
|
169
|
+
- [Bullet list of changes]
|
|
170
|
+
- [Mark breaking changes with **BREAKING**]
|
|
171
|
+
|
|
172
|
+
## Impact
|
|
173
|
+
- Affected specs: [list capabilities]
|
|
174
|
+
- Affected code: [key files/systems]
|
|
175
|
+
\`\`\`
|
|
176
|
+
|
|
177
|
+
3. **Create spec deltas:** \`specs/[capability]/spec.md\`
|
|
178
|
+
\`\`\`markdown
|
|
179
|
+
## ADDED Requirements
|
|
180
|
+
### Requirement: New Feature
|
|
181
|
+
The system SHALL provide...
|
|
182
|
+
|
|
183
|
+
#### Scenario: Success case
|
|
184
|
+
- **WHEN** user performs action
|
|
185
|
+
- **THEN** expected result
|
|
186
|
+
|
|
187
|
+
## MODIFIED Requirements
|
|
188
|
+
### Requirement: Existing Feature
|
|
189
|
+
[Complete modified requirement]
|
|
190
|
+
|
|
191
|
+
## REMOVED Requirements
|
|
192
|
+
### Requirement: Old Feature
|
|
193
|
+
**Reason**: [Why removing]
|
|
194
|
+
**Migration**: [How to handle]
|
|
195
|
+
\`\`\`
|
|
196
|
+
If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
|
|
197
|
+
|
|
198
|
+
4. **Create tasks.md:**
|
|
199
|
+
\`\`\`markdown
|
|
200
|
+
## 1. Implementation
|
|
201
|
+
- [ ] 1.1 Create database schema
|
|
202
|
+
- [ ] 1.2 Implement API endpoint
|
|
203
|
+
- [ ] 1.3 Add frontend component
|
|
204
|
+
- [ ] 1.4 Write tests
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
5. **Create design.md when needed:**
|
|
208
|
+
Create \`design.md\` if any of the following apply; otherwise omit it:
|
|
209
|
+
- Cross-cutting change (multiple services/modules) or a new architectural pattern
|
|
210
|
+
- New external dependency or significant data model changes
|
|
211
|
+
- Security, performance, or migration complexity
|
|
212
|
+
- Ambiguity that benefits from technical decisions before coding
|
|
213
|
+
|
|
214
|
+
Minimal \`design.md\` skeleton:
|
|
215
|
+
\`\`\`markdown
|
|
216
|
+
## Context
|
|
217
|
+
[Background, constraints, stakeholders]
|
|
218
|
+
|
|
219
|
+
## Goals / Non-Goals
|
|
220
|
+
- Goals: [...]
|
|
221
|
+
- Non-Goals: [...]
|
|
222
|
+
|
|
223
|
+
## Decisions
|
|
224
|
+
- Decision: [What and why]
|
|
225
|
+
- Alternatives considered: [Options + rationale]
|
|
226
|
+
|
|
227
|
+
## Risks / Trade-offs
|
|
228
|
+
- [Risk] → Mitigation
|
|
229
|
+
|
|
230
|
+
## Migration Plan
|
|
231
|
+
[Steps, rollback]
|
|
232
|
+
|
|
233
|
+
## Open Questions
|
|
234
|
+
- [...]
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
## Spec File Format
|
|
238
|
+
|
|
239
|
+
### Critical: Scenario Formatting
|
|
240
|
+
|
|
241
|
+
**CORRECT** (use #### headers):
|
|
242
|
+
\`\`\`markdown
|
|
243
|
+
#### Scenario: User login success
|
|
244
|
+
- **WHEN** valid credentials provided
|
|
245
|
+
- **THEN** return JWT token
|
|
246
|
+
\`\`\`
|
|
247
|
+
|
|
248
|
+
**WRONG** (don't use bullets or bold):
|
|
249
|
+
\`\`\`markdown
|
|
250
|
+
- **Scenario: User login** ❌
|
|
251
|
+
**Scenario**: User login ❌
|
|
252
|
+
### Scenario: User login ❌
|
|
26
253
|
\`\`\`
|
|
27
254
|
|
|
28
|
-
|
|
255
|
+
Every requirement MUST have at least one scenario.
|
|
256
|
+
|
|
257
|
+
### Requirement Wording
|
|
258
|
+
- Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
|
|
259
|
+
|
|
260
|
+
### Delta Operations
|
|
261
|
+
|
|
262
|
+
- \`## ADDED Requirements\` - New capabilities
|
|
263
|
+
- \`## MODIFIED Requirements\` - Changed behavior
|
|
264
|
+
- \`## REMOVED Requirements\` - Deprecated features
|
|
265
|
+
- \`## RENAMED Requirements\` - Name changes
|
|
266
|
+
|
|
267
|
+
Headers matched with \`trim(header)\` - whitespace ignored.
|
|
268
|
+
|
|
269
|
+
#### When to use ADDED vs MODIFIED
|
|
270
|
+
- ADDED: Introduces a new capability or sub-capability that can stand alone as a requirement. Prefer ADDED when the change is orthogonal (e.g., adding "Slash Command Configuration") rather than altering the semantics of an existing requirement.
|
|
271
|
+
- MODIFIED: Changes the behavior, scope, or acceptance criteria of an existing requirement. Always paste the full, updated requirement content (header + all scenarios). The archiver will replace the entire requirement with what you provide here; partial deltas will drop previous details.
|
|
272
|
+
- RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
|
|
273
|
+
|
|
274
|
+
Common pitfall: Using MODIFIED to add a new concern without including the previous text. This causes loss of detail at archive time. If you aren’t explicitly changing the existing requirement, add a new requirement under ADDED instead.
|
|
275
|
+
|
|
276
|
+
Authoring a MODIFIED requirement correctly:
|
|
277
|
+
1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
|
|
278
|
+
2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
|
|
279
|
+
3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
|
|
280
|
+
4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
|
|
281
|
+
|
|
282
|
+
Example for RENAMED:
|
|
283
|
+
\`\`\`markdown
|
|
284
|
+
## RENAMED Requirements
|
|
285
|
+
- FROM: \`### Requirement: Login\`
|
|
286
|
+
- TO: \`### Requirement: User Authentication\`
|
|
287
|
+
\`\`\`
|
|
288
|
+
|
|
289
|
+
## Troubleshooting
|
|
290
|
+
|
|
291
|
+
### Common Errors
|
|
292
|
+
|
|
293
|
+
**"Change must have at least one delta"**
|
|
294
|
+
- Check \`changes/[name]/specs/\` exists with .md files
|
|
295
|
+
- Verify files have operation prefixes (## ADDED Requirements)
|
|
296
|
+
|
|
297
|
+
**"Requirement must have at least one scenario"**
|
|
298
|
+
- Check scenarios use \`#### Scenario:\` format (4 hashtags)
|
|
299
|
+
- Don't use bullet points or bold for scenario headers
|
|
300
|
+
|
|
301
|
+
**Silent scenario parsing failures**
|
|
302
|
+
- Exact format required: \`#### Scenario: Name\`
|
|
303
|
+
- Debug with: \`prompter show [change] --json --deltas-only\`
|
|
304
|
+
|
|
305
|
+
### Validation Tips
|
|
306
|
+
|
|
307
|
+
\`\`\`bash
|
|
308
|
+
# Always use strict mode for comprehensive checks
|
|
309
|
+
prompter validate [change] --strict --no-interactive
|
|
310
|
+
|
|
311
|
+
# Debug delta parsing
|
|
312
|
+
prompter show [change] --json | jq '.deltas'
|
|
313
|
+
|
|
314
|
+
# Check specific requirement
|
|
315
|
+
prompter show [spec] --json -r 1
|
|
316
|
+
\`\`\`
|
|
317
|
+
|
|
318
|
+
## Happy Path Script
|
|
319
|
+
|
|
320
|
+
\`\`\`bash
|
|
321
|
+
# 1) Explore current state
|
|
322
|
+
prompter spec list --long
|
|
323
|
+
prompter list
|
|
324
|
+
# Optional full-text search:
|
|
325
|
+
# rg -n "Requirement:|Scenario:" prompter/specs
|
|
326
|
+
# rg -n "^#|Requirement:" prompter/changes
|
|
327
|
+
|
|
328
|
+
# 2) Choose change id and scaffold
|
|
329
|
+
CHANGE=add-two-factor-auth
|
|
330
|
+
mkdir -p prompter/changes/$CHANGE/{specs/auth}
|
|
331
|
+
printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
|
|
332
|
+
printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
|
|
333
|
+
|
|
334
|
+
# 3) Add deltas (example)
|
|
335
|
+
cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
|
|
336
|
+
## ADDED Requirements
|
|
337
|
+
### Requirement: Two-Factor Authentication
|
|
338
|
+
Users MUST provide a second factor during login.
|
|
339
|
+
|
|
340
|
+
#### Scenario: OTP required
|
|
341
|
+
- **WHEN** valid credentials are provided
|
|
342
|
+
- **THEN** an OTP challenge is required
|
|
343
|
+
EOF
|
|
344
|
+
|
|
345
|
+
# 4) Validate
|
|
346
|
+
prompter validate $CHANGE --strict --no-interactive
|
|
347
|
+
\`\`\`
|
|
348
|
+
|
|
349
|
+
## Multi-Capability Example
|
|
350
|
+
|
|
351
|
+
\`\`\`
|
|
352
|
+
prompter/changes/add-2fa-notify/
|
|
353
|
+
├── proposal.md
|
|
354
|
+
├── tasks.md
|
|
355
|
+
└── specs/
|
|
356
|
+
├── auth/
|
|
357
|
+
│ └── spec.md # ADDED: Two-Factor Authentication
|
|
358
|
+
└── notifications/
|
|
359
|
+
└── spec.md # ADDED: OTP email notification
|
|
360
|
+
\`\`\`
|
|
361
|
+
|
|
362
|
+
auth/spec.md
|
|
363
|
+
\`\`\`markdown
|
|
364
|
+
## ADDED Requirements
|
|
365
|
+
### Requirement: Two-Factor Authentication
|
|
366
|
+
...
|
|
367
|
+
\`\`\`
|
|
368
|
+
|
|
369
|
+
notifications/spec.md
|
|
370
|
+
\`\`\`markdown
|
|
371
|
+
## ADDED Requirements
|
|
372
|
+
### Requirement: OTP Email Notification
|
|
373
|
+
...
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
## Best Practices
|
|
377
|
+
|
|
378
|
+
### Simplicity First
|
|
379
|
+
- Default to <100 lines of new code
|
|
380
|
+
- Single-file implementations until proven insufficient
|
|
381
|
+
- Avoid frameworks without clear justification
|
|
382
|
+
- Choose boring, proven patterns
|
|
383
|
+
|
|
384
|
+
### Complexity Triggers
|
|
385
|
+
Only add complexity with:
|
|
386
|
+
- Performance data showing current solution too slow
|
|
387
|
+
- Concrete scale requirements (>1000 users, >100MB data)
|
|
388
|
+
- Multiple proven use cases requiring abstraction
|
|
389
|
+
|
|
390
|
+
### Clear References
|
|
391
|
+
- Use \`file.ts:42\` format for code locations
|
|
392
|
+
- Reference specs as \`specs/auth/spec.md\`
|
|
393
|
+
- Link related changes and PRs
|
|
394
|
+
|
|
395
|
+
### Capability Naming
|
|
396
|
+
- Use verb-noun: \`user-auth\`, \`payment-capture\`
|
|
397
|
+
- Single purpose per capability
|
|
398
|
+
- 10-minute understandability rule
|
|
399
|
+
- Split if description needs "AND"
|
|
400
|
+
|
|
401
|
+
### Change ID Naming
|
|
402
|
+
- Use kebab-case, short and descriptive: \`add-two-factor-auth\`
|
|
403
|
+
- Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
|
|
404
|
+
- Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
|
|
405
|
+
|
|
406
|
+
## Tool Selection Guide
|
|
407
|
+
|
|
408
|
+
| Task | Tool | Why |
|
|
409
|
+
|------|------|-----|
|
|
410
|
+
| Find files by pattern | Glob | Fast pattern matching |
|
|
411
|
+
| Search code content | Grep | Optimized regex search |
|
|
412
|
+
| Read specific files | Read | Direct file access |
|
|
413
|
+
| Explore unknown scope | Task | Multi-step investigation |
|
|
414
|
+
|
|
415
|
+
## Error Recovery
|
|
416
|
+
|
|
417
|
+
### Change Conflicts
|
|
418
|
+
1. Run \`prompter list\` to see active changes
|
|
419
|
+
2. Check for overlapping specs
|
|
420
|
+
3. Coordinate with change owners
|
|
421
|
+
4. Consider combining proposals
|
|
422
|
+
|
|
423
|
+
### Validation Failures
|
|
424
|
+
1. Run with \`--strict\` flag
|
|
425
|
+
2. Check JSON output for details
|
|
426
|
+
3. Verify spec file format
|
|
427
|
+
4. Ensure scenarios properly formatted
|
|
428
|
+
|
|
429
|
+
### Missing Context
|
|
430
|
+
1. Read project.md first
|
|
431
|
+
2. Check related specs
|
|
432
|
+
3. Review recent archives
|
|
433
|
+
4. Ask for clarification
|
|
434
|
+
|
|
435
|
+
## Quick Reference
|
|
436
|
+
|
|
437
|
+
### Stage Indicators
|
|
438
|
+
- \`changes/\` - Proposed, not yet built
|
|
439
|
+
- \`specs/\` - Built and deployed
|
|
440
|
+
- \`archive/\` - Completed changes
|
|
441
|
+
|
|
442
|
+
### File Purposes
|
|
443
|
+
- \`proposal.md\` - Why and what
|
|
444
|
+
- \`tasks.md\` - Implementation steps
|
|
445
|
+
- \`design.md\` - Technical decisions
|
|
446
|
+
- \`spec.md\` - Requirements and behavior
|
|
447
|
+
|
|
448
|
+
### CLI Essentials
|
|
449
|
+
\`\`\`bash
|
|
450
|
+
prompter list # What's in progress?
|
|
451
|
+
prompter show [item] # View details
|
|
452
|
+
prompter validate --strict --no-interactive # Is it correct?
|
|
453
|
+
prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
|
|
454
|
+
\`\`\`
|
|
29
455
|
|
|
30
|
-
|
|
31
|
-
- Be specific in your initial prompt for better results
|
|
32
|
-
- Review and refine the enhanced specification before implementing
|
|
456
|
+
Remember: Specs are truth. Changes are proposals. Keep them in sync.
|
|
33
457
|
`;
|