@dedesfr/prompter 0.7.0 → 0.7.2

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [0.7.2] - 2026-02-06
4
+
5
+ ### 🔄 Changed
6
+ - Remove `prompter update` command from agents-template documentation
7
+ - Prevents confusion since `prompter update` is no longer a valid command
8
+ - Updated AGENTS.md template to reflect current command set
9
+
10
+ ## [0.7.1] - 2026-02-06
11
+
12
+ ### 🔧 Fixed
13
+ - **AGENTS.md Creation**: Fixed AGENTS.md not being created during first-time initialization
14
+ - Added proper error handling for both project.md and AGENTS.md creation
15
+ - Fixed AGENTS.md path to be created inside `prompter/` directory instead of root
16
+ - Added template validation to prevent undefined template errors
17
+ - Clear error messages now displayed if file creation fails
18
+
3
19
  ## [0.7.0] - 2026-02-06
4
20
 
5
21
  ### ✨ 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.0');
17
+ .version('0.7.2');
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;YAmSzC,UAAU;YASV,qBAAqB;YAwBrB,eAAe;YAkBf,eAAe;YAkBf,sBAAsB;YActB,cAAc;YAiCd,aAAa;YAuBb,6BAA6B;CA2B9C"}
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"}
@@ -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
- await fs.writeFile(projectMdPath, projectTemplate, 'utf-8');
111
- console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/project.md')}`);
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(projectPath, 'AGENTS.md');
125
+ const agentsMdPath = path.join(prompterPath, 'AGENTS.md');
118
126
  const agentsExists = await this.fileExists(agentsMdPath);
119
127
  if (!agentsExists) {
120
- await fs.writeFile(agentsMdPath, agentsTemplate, 'utf-8');
121
- console.log(chalk.green('✓') + ` Created ${chalk.cyan('AGENTS.md')}`);
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,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,kBAAkB,GAAG,MAAM,cAAc,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAE/E,6CAA6C;QAC7C,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;;;;;;CAMlC,CAAC,CAAC,CAAC;YACQ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CA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,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\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,uhCAgC1B,CAAC"}
1
+ {"version":3,"file":"agents-template.d.ts","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,w+eAuc1B,CAAC"}
@@ -1,34 +1,457 @@
1
- export const agentsTemplate = `# Prompter Workflow
1
+ export const agentsTemplate = `# Prompter Instructions
2
2
 
3
- This project uses Prompter to enhance rough prompts into professional specifications.
3
+ Instructions for AI coding assistants using Prompter for spec-driven development.
4
4
 
5
- ## Available Commands
5
+ ## TL;DR Quick Checklist
6
6
 
7
- - \`/prompter-enhance\` - Transform a rough idea into a comprehensive specification
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
- ## How It Works
15
+ ## Three-Stage Workflow
10
16
 
11
- 1. Invoke \`/prompter-enhance\` with your rough idea (e.g., "Create a todo app")
12
- 2. The AI will enhance your prompt into a detailed specification
13
- 3. The enhanced specification is saved to \`prompter/<slug>/enhanced-prompt.md\`
14
- 4. Use the enhanced specification to guide implementation
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
- ## Output Location
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
- Enhanced prompts are saved in the \`prompter/\` directory:
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
+
104
+ # Interactive mode
105
+ prompter show # Prompts for selection
106
+ prompter validate # Bulk validation mode
107
+
108
+ # Debugging
109
+ prompter show [change] --json --deltas-only
110
+ prompter validate [change] --strict --no-interactive
111
+ \`\`\`
112
+
113
+ ### Command Flags
114
+
115
+ - \`--json\` - Machine-readable output
116
+ - \`--type change|spec\` - Disambiguate items
117
+ - \`--strict\` - Comprehensive validation
118
+ - \`--no-interactive\` - Disable prompts
119
+ - \`--skip-specs\` - Archive without spec updates
120
+ - \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
121
+
122
+ ## Directory Structure
19
123
 
20
124
  \`\`\`
21
125
  prompter/
22
- ├── project.md # Project context (edit this!)
23
- ├── todo-app/
24
- │ └── enhanced-prompt.md # Enhanced specification
25
- └── ...
126
+ ├── project.md # Project conventions
127
+ ├── specs/ # Current truth - what IS built
128
+ │ └── [capability]/ # Single focused capability
129
+ │ ├── spec.md # Requirements and scenarios
130
+ │ └── design.md # Technical patterns
131
+ ├── changes/ # Proposals - what SHOULD change
132
+ │ ├── [change-name]/
133
+ │ │ ├── proposal.md # Why, what, impact
134
+ │ │ ├── tasks.md # Implementation checklist
135
+ │ │ ├── design.md # Technical decisions (optional; see criteria)
136
+ │ │ └── specs/ # Delta changes
137
+ │ │ └── [capability]/
138
+ │ │ └── spec.md # ADDED/MODIFIED/REMOVED
139
+ │ └── archive/ # Completed changes
140
+ \`\`\`
141
+
142
+ ## Creating Change Proposals
143
+
144
+ ### Decision Tree
145
+
146
+ \`\`\`
147
+ New request?
148
+ ├─ Bug fix restoring spec behavior? → Fix directly
149
+ ├─ Typo/format/comment? → Fix directly
150
+ ├─ New feature/capability? → Create proposal
151
+ ├─ Breaking change? → Create proposal
152
+ ├─ Architecture change? → Create proposal
153
+ └─ Unclear? → Create proposal (safer)
154
+ \`\`\`
155
+
156
+ ### Proposal Structure
157
+
158
+ 1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
159
+
160
+ 2. **Write proposal.md:**
161
+ \`\`\`markdown
162
+ # Change: [Brief description of change]
163
+
164
+ ## Why
165
+ [1-2 sentences on problem/opportunity]
166
+
167
+ ## What Changes
168
+ - [Bullet list of changes]
169
+ - [Mark breaking changes with **BREAKING**]
170
+
171
+ ## Impact
172
+ - Affected specs: [list capabilities]
173
+ - Affected code: [key files/systems]
174
+ \`\`\`
175
+
176
+ 3. **Create spec deltas:** \`specs/[capability]/spec.md\`
177
+ \`\`\`markdown
178
+ ## ADDED Requirements
179
+ ### Requirement: New Feature
180
+ The system SHALL provide...
181
+
182
+ #### Scenario: Success case
183
+ - **WHEN** user performs action
184
+ - **THEN** expected result
185
+
186
+ ## MODIFIED Requirements
187
+ ### Requirement: Existing Feature
188
+ [Complete modified requirement]
189
+
190
+ ## REMOVED Requirements
191
+ ### Requirement: Old Feature
192
+ **Reason**: [Why removing]
193
+ **Migration**: [How to handle]
194
+ \`\`\`
195
+ If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
196
+
197
+ 4. **Create tasks.md:**
198
+ \`\`\`markdown
199
+ ## 1. Implementation
200
+ - [ ] 1.1 Create database schema
201
+ - [ ] 1.2 Implement API endpoint
202
+ - [ ] 1.3 Add frontend component
203
+ - [ ] 1.4 Write tests
204
+ \`\`\`
205
+
206
+ 5. **Create design.md when needed:**
207
+ Create \`design.md\` if any of the following apply; otherwise omit it:
208
+ - Cross-cutting change (multiple services/modules) or a new architectural pattern
209
+ - New external dependency or significant data model changes
210
+ - Security, performance, or migration complexity
211
+ - Ambiguity that benefits from technical decisions before coding
212
+
213
+ Minimal \`design.md\` skeleton:
214
+ \`\`\`markdown
215
+ ## Context
216
+ [Background, constraints, stakeholders]
217
+
218
+ ## Goals / Non-Goals
219
+ - Goals: [...]
220
+ - Non-Goals: [...]
221
+
222
+ ## Decisions
223
+ - Decision: [What and why]
224
+ - Alternatives considered: [Options + rationale]
225
+
226
+ ## Risks / Trade-offs
227
+ - [Risk] → Mitigation
228
+
229
+ ## Migration Plan
230
+ [Steps, rollback]
231
+
232
+ ## Open Questions
233
+ - [...]
234
+ \`\`\`
235
+
236
+ ## Spec File Format
237
+
238
+ ### Critical: Scenario Formatting
239
+
240
+ **CORRECT** (use #### headers):
241
+ \`\`\`markdown
242
+ #### Scenario: User login success
243
+ - **WHEN** valid credentials provided
244
+ - **THEN** return JWT token
245
+ \`\`\`
246
+
247
+ **WRONG** (don't use bullets or bold):
248
+ \`\`\`markdown
249
+ - **Scenario: User login** ❌
250
+ **Scenario**: User login ❌
251
+ ### Scenario: User login ❌
26
252
  \`\`\`
27
253
 
28
- ## Tips
254
+ Every requirement MUST have at least one scenario.
255
+
256
+ ### Requirement Wording
257
+ - Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
258
+
259
+ ### Delta Operations
260
+
261
+ - \`## ADDED Requirements\` - New capabilities
262
+ - \`## MODIFIED Requirements\` - Changed behavior
263
+ - \`## REMOVED Requirements\` - Deprecated features
264
+ - \`## RENAMED Requirements\` - Name changes
265
+
266
+ Headers matched with \`trim(header)\` - whitespace ignored.
267
+
268
+ #### When to use ADDED vs MODIFIED
269
+ - 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.
270
+ - 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.
271
+ - RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
272
+
273
+ 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.
274
+
275
+ Authoring a MODIFIED requirement correctly:
276
+ 1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
277
+ 2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
278
+ 3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
279
+ 4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
280
+
281
+ Example for RENAMED:
282
+ \`\`\`markdown
283
+ ## RENAMED Requirements
284
+ - FROM: \`### Requirement: Login\`
285
+ - TO: \`### Requirement: User Authentication\`
286
+ \`\`\`
287
+
288
+ ## Troubleshooting
289
+
290
+ ### Common Errors
291
+
292
+ **"Change must have at least one delta"**
293
+ - Check \`changes/[name]/specs/\` exists with .md files
294
+ - Verify files have operation prefixes (## ADDED Requirements)
295
+
296
+ **"Requirement must have at least one scenario"**
297
+ - Check scenarios use \`#### Scenario:\` format (4 hashtags)
298
+ - Don't use bullet points or bold for scenario headers
299
+
300
+ **Silent scenario parsing failures**
301
+ - Exact format required: \`#### Scenario: Name\`
302
+ - Debug with: \`prompter show [change] --json --deltas-only\`
303
+
304
+ ### Validation Tips
305
+
306
+ \`\`\`bash
307
+ # Always use strict mode for comprehensive checks
308
+ prompter validate [change] --strict --no-interactive
309
+
310
+ # Debug delta parsing
311
+ prompter show [change] --json | jq '.deltas'
312
+
313
+ # Check specific requirement
314
+ prompter show [spec] --json -r 1
315
+ \`\`\`
316
+
317
+ ## Happy Path Script
318
+
319
+ \`\`\`bash
320
+ # 1) Explore current state
321
+ prompter spec list --long
322
+ prompter list
323
+ # Optional full-text search:
324
+ # rg -n "Requirement:|Scenario:" prompter/specs
325
+ # rg -n "^#|Requirement:" prompter/changes
326
+
327
+ # 2) Choose change id and scaffold
328
+ CHANGE=add-two-factor-auth
329
+ mkdir -p prompter/changes/$CHANGE/{specs/auth}
330
+ printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
331
+ printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
332
+
333
+ # 3) Add deltas (example)
334
+ cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
335
+ ## ADDED Requirements
336
+ ### Requirement: Two-Factor Authentication
337
+ Users MUST provide a second factor during login.
338
+
339
+ #### Scenario: OTP required
340
+ - **WHEN** valid credentials are provided
341
+ - **THEN** an OTP challenge is required
342
+ EOF
343
+
344
+ # 4) Validate
345
+ prompter validate $CHANGE --strict --no-interactive
346
+ \`\`\`
347
+
348
+ ## Multi-Capability Example
349
+
350
+ \`\`\`
351
+ prompter/changes/add-2fa-notify/
352
+ ├── proposal.md
353
+ ├── tasks.md
354
+ └── specs/
355
+ ├── auth/
356
+ │ └── spec.md # ADDED: Two-Factor Authentication
357
+ └── notifications/
358
+ └── spec.md # ADDED: OTP email notification
359
+ \`\`\`
360
+
361
+ auth/spec.md
362
+ \`\`\`markdown
363
+ ## ADDED Requirements
364
+ ### Requirement: Two-Factor Authentication
365
+ ...
366
+ \`\`\`
367
+
368
+ notifications/spec.md
369
+ \`\`\`markdown
370
+ ## ADDED Requirements
371
+ ### Requirement: OTP Email Notification
372
+ ...
373
+ \`\`\`
374
+
375
+ ## Best Practices
376
+
377
+ ### Simplicity First
378
+ - Default to <100 lines of new code
379
+ - Single-file implementations until proven insufficient
380
+ - Avoid frameworks without clear justification
381
+ - Choose boring, proven patterns
382
+
383
+ ### Complexity Triggers
384
+ Only add complexity with:
385
+ - Performance data showing current solution too slow
386
+ - Concrete scale requirements (>1000 users, >100MB data)
387
+ - Multiple proven use cases requiring abstraction
388
+
389
+ ### Clear References
390
+ - Use \`file.ts:42\` format for code locations
391
+ - Reference specs as \`specs/auth/spec.md\`
392
+ - Link related changes and PRs
393
+
394
+ ### Capability Naming
395
+ - Use verb-noun: \`user-auth\`, \`payment-capture\`
396
+ - Single purpose per capability
397
+ - 10-minute understandability rule
398
+ - Split if description needs "AND"
399
+
400
+ ### Change ID Naming
401
+ - Use kebab-case, short and descriptive: \`add-two-factor-auth\`
402
+ - Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
403
+ - Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
404
+
405
+ ## Tool Selection Guide
406
+
407
+ | Task | Tool | Why |
408
+ |------|------|-----|
409
+ | Find files by pattern | Glob | Fast pattern matching |
410
+ | Search code content | Grep | Optimized regex search |
411
+ | Read specific files | Read | Direct file access |
412
+ | Explore unknown scope | Task | Multi-step investigation |
413
+
414
+ ## Error Recovery
415
+
416
+ ### Change Conflicts
417
+ 1. Run \`prompter list\` to see active changes
418
+ 2. Check for overlapping specs
419
+ 3. Coordinate with change owners
420
+ 4. Consider combining proposals
421
+
422
+ ### Validation Failures
423
+ 1. Run with \`--strict\` flag
424
+ 2. Check JSON output for details
425
+ 3. Verify spec file format
426
+ 4. Ensure scenarios properly formatted
427
+
428
+ ### Missing Context
429
+ 1. Read project.md first
430
+ 2. Check related specs
431
+ 3. Review recent archives
432
+ 4. Ask for clarification
433
+
434
+ ## Quick Reference
435
+
436
+ ### Stage Indicators
437
+ - \`changes/\` - Proposed, not yet built
438
+ - \`specs/\` - Built and deployed
439
+ - \`archive/\` - Completed changes
440
+
441
+ ### File Purposes
442
+ - \`proposal.md\` - Why and what
443
+ - \`tasks.md\` - Implementation steps
444
+ - \`design.md\` - Technical decisions
445
+ - \`spec.md\` - Requirements and behavior
446
+
447
+ ### CLI Essentials
448
+ \`\`\`bash
449
+ prompter list # What's in progress?
450
+ prompter show [item] # View details
451
+ prompter validate --strict --no-interactive # Is it correct?
452
+ prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
453
+ \`\`\`
29
454
 
30
- - Edit \`prompter/project.md\` to provide context about your project
31
- - Be specific in your initial prompt for better results
32
- - Review and refine the enhanced specification before implementing
455
+ Remember: Specs are truth. Changes are proposals. Keep them in sync.
33
456
  `;
34
457
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC7B,CAAC"}
1
+ {"version":3,"file":"agents-template.js","sourceRoot":"","sources":["../../../src/core/templates/agents-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuc7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedesfr/prompter",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Enhance prompts directly in your AI coding workflow",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/cli/index.ts CHANGED
@@ -16,7 +16,7 @@ const program = new Command();
16
16
  program
17
17
  .name('prompter')
18
18
  .description('Enhance prompts directly in your AI coding workflow')
19
- .version('0.7.0');
19
+ .version('0.7.2');
20
20
 
21
21
  program
22
22
  .command('init')
@@ -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
- await fs.writeFile(projectMdPath, projectTemplate, 'utf-8');
124
- console.log(chalk.green('✓') + ` Created ${chalk.cyan(PROMPTER_DIR + '/project.md')}`);
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(projectPath, 'AGENTS.md');
137
+ const agentsMdPath = path.join(prompterPath, 'AGENTS.md');
131
138
  const agentsExists = await this.fileExists(agentsMdPath);
132
139
  if (!agentsExists) {
133
- await fs.writeFile(agentsMdPath, agentsTemplate, 'utf-8');
134
- console.log(chalk.green('✓') + ` Created ${chalk.cyan('AGENTS.md')}`);
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,456 @@
1
- export const agentsTemplate = `# Prompter Workflow
1
+ export const agentsTemplate = `# Prompter Instructions
2
2
 
3
- This project uses Prompter to enhance rough prompts into professional specifications.
3
+ Instructions for AI coding assistants using Prompter for spec-driven development.
4
4
 
5
- ## Available Commands
5
+ ## TL;DR Quick Checklist
6
6
 
7
- - \`/prompter-enhance\` - Transform a rough idea into a comprehensive specification
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
- ## How It Works
15
+ ## Three-Stage Workflow
10
16
 
11
- 1. Invoke \`/prompter-enhance\` with your rough idea (e.g., "Create a todo app")
12
- 2. The AI will enhance your prompt into a detailed specification
13
- 3. The enhanced specification is saved to \`prompter/<slug>/enhanced-prompt.md\`
14
- 4. Use the enhanced specification to guide implementation
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
- ## Output Location
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
- Enhanced prompts are saved in the \`prompter/\` directory:
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
+
104
+ # Interactive mode
105
+ prompter show # Prompts for selection
106
+ prompter validate # Bulk validation mode
107
+
108
+ # Debugging
109
+ prompter show [change] --json --deltas-only
110
+ prompter validate [change] --strict --no-interactive
111
+ \`\`\`
112
+
113
+ ### Command Flags
114
+
115
+ - \`--json\` - Machine-readable output
116
+ - \`--type change|spec\` - Disambiguate items
117
+ - \`--strict\` - Comprehensive validation
118
+ - \`--no-interactive\` - Disable prompts
119
+ - \`--skip-specs\` - Archive without spec updates
120
+ - \`--yes\`/\`-y\` - Skip confirmation prompts (non-interactive archive)
121
+
122
+ ## Directory Structure
19
123
 
20
124
  \`\`\`
21
125
  prompter/
22
- ├── project.md # Project context (edit this!)
23
- ├── todo-app/
24
- │ └── enhanced-prompt.md # Enhanced specification
25
- └── ...
126
+ ├── project.md # Project conventions
127
+ ├── specs/ # Current truth - what IS built
128
+ │ └── [capability]/ # Single focused capability
129
+ │ ├── spec.md # Requirements and scenarios
130
+ │ └── design.md # Technical patterns
131
+ ├── changes/ # Proposals - what SHOULD change
132
+ │ ├── [change-name]/
133
+ │ │ ├── proposal.md # Why, what, impact
134
+ │ │ ├── tasks.md # Implementation checklist
135
+ │ │ ├── design.md # Technical decisions (optional; see criteria)
136
+ │ │ └── specs/ # Delta changes
137
+ │ │ └── [capability]/
138
+ │ │ └── spec.md # ADDED/MODIFIED/REMOVED
139
+ │ └── archive/ # Completed changes
140
+ \`\`\`
141
+
142
+ ## Creating Change Proposals
143
+
144
+ ### Decision Tree
145
+
146
+ \`\`\`
147
+ New request?
148
+ ├─ Bug fix restoring spec behavior? → Fix directly
149
+ ├─ Typo/format/comment? → Fix directly
150
+ ├─ New feature/capability? → Create proposal
151
+ ├─ Breaking change? → Create proposal
152
+ ├─ Architecture change? → Create proposal
153
+ └─ Unclear? → Create proposal (safer)
154
+ \`\`\`
155
+
156
+ ### Proposal Structure
157
+
158
+ 1. **Create directory:** \`changes/[change-id]/\` (kebab-case, verb-led, unique)
159
+
160
+ 2. **Write proposal.md:**
161
+ \`\`\`markdown
162
+ # Change: [Brief description of change]
163
+
164
+ ## Why
165
+ [1-2 sentences on problem/opportunity]
166
+
167
+ ## What Changes
168
+ - [Bullet list of changes]
169
+ - [Mark breaking changes with **BREAKING**]
170
+
171
+ ## Impact
172
+ - Affected specs: [list capabilities]
173
+ - Affected code: [key files/systems]
174
+ \`\`\`
175
+
176
+ 3. **Create spec deltas:** \`specs/[capability]/spec.md\`
177
+ \`\`\`markdown
178
+ ## ADDED Requirements
179
+ ### Requirement: New Feature
180
+ The system SHALL provide...
181
+
182
+ #### Scenario: Success case
183
+ - **WHEN** user performs action
184
+ - **THEN** expected result
185
+
186
+ ## MODIFIED Requirements
187
+ ### Requirement: Existing Feature
188
+ [Complete modified requirement]
189
+
190
+ ## REMOVED Requirements
191
+ ### Requirement: Old Feature
192
+ **Reason**: [Why removing]
193
+ **Migration**: [How to handle]
194
+ \`\`\`
195
+ If multiple capabilities are affected, create multiple delta files under \`changes/[change-id]/specs/<capability>/spec.md\`—one per capability.
196
+
197
+ 4. **Create tasks.md:**
198
+ \`\`\`markdown
199
+ ## 1. Implementation
200
+ - [ ] 1.1 Create database schema
201
+ - [ ] 1.2 Implement API endpoint
202
+ - [ ] 1.3 Add frontend component
203
+ - [ ] 1.4 Write tests
204
+ \`\`\`
205
+
206
+ 5. **Create design.md when needed:**
207
+ Create \`design.md\` if any of the following apply; otherwise omit it:
208
+ - Cross-cutting change (multiple services/modules) or a new architectural pattern
209
+ - New external dependency or significant data model changes
210
+ - Security, performance, or migration complexity
211
+ - Ambiguity that benefits from technical decisions before coding
212
+
213
+ Minimal \`design.md\` skeleton:
214
+ \`\`\`markdown
215
+ ## Context
216
+ [Background, constraints, stakeholders]
217
+
218
+ ## Goals / Non-Goals
219
+ - Goals: [...]
220
+ - Non-Goals: [...]
221
+
222
+ ## Decisions
223
+ - Decision: [What and why]
224
+ - Alternatives considered: [Options + rationale]
225
+
226
+ ## Risks / Trade-offs
227
+ - [Risk] → Mitigation
228
+
229
+ ## Migration Plan
230
+ [Steps, rollback]
231
+
232
+ ## Open Questions
233
+ - [...]
234
+ \`\`\`
235
+
236
+ ## Spec File Format
237
+
238
+ ### Critical: Scenario Formatting
239
+
240
+ **CORRECT** (use #### headers):
241
+ \`\`\`markdown
242
+ #### Scenario: User login success
243
+ - **WHEN** valid credentials provided
244
+ - **THEN** return JWT token
245
+ \`\`\`
246
+
247
+ **WRONG** (don't use bullets or bold):
248
+ \`\`\`markdown
249
+ - **Scenario: User login** ❌
250
+ **Scenario**: User login ❌
251
+ ### Scenario: User login ❌
26
252
  \`\`\`
27
253
 
28
- ## Tips
254
+ Every requirement MUST have at least one scenario.
255
+
256
+ ### Requirement Wording
257
+ - Use SHALL/MUST for normative requirements (avoid should/may unless intentionally non-normative)
258
+
259
+ ### Delta Operations
260
+
261
+ - \`## ADDED Requirements\` - New capabilities
262
+ - \`## MODIFIED Requirements\` - Changed behavior
263
+ - \`## REMOVED Requirements\` - Deprecated features
264
+ - \`## RENAMED Requirements\` - Name changes
265
+
266
+ Headers matched with \`trim(header)\` - whitespace ignored.
267
+
268
+ #### When to use ADDED vs MODIFIED
269
+ - 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.
270
+ - 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.
271
+ - RENAMED: Use when only the name changes. If you also change behavior, use RENAMED (name) plus MODIFIED (content) referencing the new name.
272
+
273
+ 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.
274
+
275
+ Authoring a MODIFIED requirement correctly:
276
+ 1) Locate the existing requirement in \`prompter/specs/<capability>/spec.md\`.
277
+ 2) Copy the entire requirement block (from \`### Requirement: ...\` through its scenarios).
278
+ 3) Paste it under \`## MODIFIED Requirements\` and edit to reflect the new behavior.
279
+ 4) Ensure the header text matches exactly (whitespace-insensitive) and keep at least one \`#### Scenario:\`.
280
+
281
+ Example for RENAMED:
282
+ \`\`\`markdown
283
+ ## RENAMED Requirements
284
+ - FROM: \`### Requirement: Login\`
285
+ - TO: \`### Requirement: User Authentication\`
286
+ \`\`\`
287
+
288
+ ## Troubleshooting
289
+
290
+ ### Common Errors
291
+
292
+ **"Change must have at least one delta"**
293
+ - Check \`changes/[name]/specs/\` exists with .md files
294
+ - Verify files have operation prefixes (## ADDED Requirements)
295
+
296
+ **"Requirement must have at least one scenario"**
297
+ - Check scenarios use \`#### Scenario:\` format (4 hashtags)
298
+ - Don't use bullet points or bold for scenario headers
299
+
300
+ **Silent scenario parsing failures**
301
+ - Exact format required: \`#### Scenario: Name\`
302
+ - Debug with: \`prompter show [change] --json --deltas-only\`
303
+
304
+ ### Validation Tips
305
+
306
+ \`\`\`bash
307
+ # Always use strict mode for comprehensive checks
308
+ prompter validate [change] --strict --no-interactive
309
+
310
+ # Debug delta parsing
311
+ prompter show [change] --json | jq '.deltas'
312
+
313
+ # Check specific requirement
314
+ prompter show [spec] --json -r 1
315
+ \`\`\`
316
+
317
+ ## Happy Path Script
318
+
319
+ \`\`\`bash
320
+ # 1) Explore current state
321
+ prompter spec list --long
322
+ prompter list
323
+ # Optional full-text search:
324
+ # rg -n "Requirement:|Scenario:" prompter/specs
325
+ # rg -n "^#|Requirement:" prompter/changes
326
+
327
+ # 2) Choose change id and scaffold
328
+ CHANGE=add-two-factor-auth
329
+ mkdir -p prompter/changes/$CHANGE/{specs/auth}
330
+ printf "## Why\\n...\\n\\n## What Changes\\n- ...\\n\\n## Impact\\n- ...\\n" > prompter/changes/$CHANGE/proposal.md
331
+ printf "## 1. Implementation\\n- [ ] 1.1 ...\\n" > prompter/changes/$CHANGE/tasks.md
332
+
333
+ # 3) Add deltas (example)
334
+ cat > prompter/changes/$CHANGE/specs/auth/spec.md << 'EOF'
335
+ ## ADDED Requirements
336
+ ### Requirement: Two-Factor Authentication
337
+ Users MUST provide a second factor during login.
338
+
339
+ #### Scenario: OTP required
340
+ - **WHEN** valid credentials are provided
341
+ - **THEN** an OTP challenge is required
342
+ EOF
343
+
344
+ # 4) Validate
345
+ prompter validate $CHANGE --strict --no-interactive
346
+ \`\`\`
347
+
348
+ ## Multi-Capability Example
349
+
350
+ \`\`\`
351
+ prompter/changes/add-2fa-notify/
352
+ ├── proposal.md
353
+ ├── tasks.md
354
+ └── specs/
355
+ ├── auth/
356
+ │ └── spec.md # ADDED: Two-Factor Authentication
357
+ └── notifications/
358
+ └── spec.md # ADDED: OTP email notification
359
+ \`\`\`
360
+
361
+ auth/spec.md
362
+ \`\`\`markdown
363
+ ## ADDED Requirements
364
+ ### Requirement: Two-Factor Authentication
365
+ ...
366
+ \`\`\`
367
+
368
+ notifications/spec.md
369
+ \`\`\`markdown
370
+ ## ADDED Requirements
371
+ ### Requirement: OTP Email Notification
372
+ ...
373
+ \`\`\`
374
+
375
+ ## Best Practices
376
+
377
+ ### Simplicity First
378
+ - Default to <100 lines of new code
379
+ - Single-file implementations until proven insufficient
380
+ - Avoid frameworks without clear justification
381
+ - Choose boring, proven patterns
382
+
383
+ ### Complexity Triggers
384
+ Only add complexity with:
385
+ - Performance data showing current solution too slow
386
+ - Concrete scale requirements (>1000 users, >100MB data)
387
+ - Multiple proven use cases requiring abstraction
388
+
389
+ ### Clear References
390
+ - Use \`file.ts:42\` format for code locations
391
+ - Reference specs as \`specs/auth/spec.md\`
392
+ - Link related changes and PRs
393
+
394
+ ### Capability Naming
395
+ - Use verb-noun: \`user-auth\`, \`payment-capture\`
396
+ - Single purpose per capability
397
+ - 10-minute understandability rule
398
+ - Split if description needs "AND"
399
+
400
+ ### Change ID Naming
401
+ - Use kebab-case, short and descriptive: \`add-two-factor-auth\`
402
+ - Prefer verb-led prefixes: \`add-\`, \`update-\`, \`remove-\`, \`refactor-\`
403
+ - Ensure uniqueness; if taken, append \`-2\`, \`-3\`, etc.
404
+
405
+ ## Tool Selection Guide
406
+
407
+ | Task | Tool | Why |
408
+ |------|------|-----|
409
+ | Find files by pattern | Glob | Fast pattern matching |
410
+ | Search code content | Grep | Optimized regex search |
411
+ | Read specific files | Read | Direct file access |
412
+ | Explore unknown scope | Task | Multi-step investigation |
413
+
414
+ ## Error Recovery
415
+
416
+ ### Change Conflicts
417
+ 1. Run \`prompter list\` to see active changes
418
+ 2. Check for overlapping specs
419
+ 3. Coordinate with change owners
420
+ 4. Consider combining proposals
421
+
422
+ ### Validation Failures
423
+ 1. Run with \`--strict\` flag
424
+ 2. Check JSON output for details
425
+ 3. Verify spec file format
426
+ 4. Ensure scenarios properly formatted
427
+
428
+ ### Missing Context
429
+ 1. Read project.md first
430
+ 2. Check related specs
431
+ 3. Review recent archives
432
+ 4. Ask for clarification
433
+
434
+ ## Quick Reference
435
+
436
+ ### Stage Indicators
437
+ - \`changes/\` - Proposed, not yet built
438
+ - \`specs/\` - Built and deployed
439
+ - \`archive/\` - Completed changes
440
+
441
+ ### File Purposes
442
+ - \`proposal.md\` - Why and what
443
+ - \`tasks.md\` - Implementation steps
444
+ - \`design.md\` - Technical decisions
445
+ - \`spec.md\` - Requirements and behavior
446
+
447
+ ### CLI Essentials
448
+ \`\`\`bash
449
+ prompter list # What's in progress?
450
+ prompter show [item] # View details
451
+ prompter validate --strict --no-interactive # Is it correct?
452
+ prompter archive <change-id> [--yes|-y] # Mark complete (add --yes for automation)
453
+ \`\`\`
29
454
 
30
- - Edit \`prompter/project.md\` to provide context about your project
31
- - Be specific in your initial prompt for better results
32
- - Review and refine the enhanced specification before implementing
455
+ Remember: Specs are truth. Changes are proposals. Keep them in sync.
33
456
  `;