@pcoliveira90/pdd 0.2.6 → 0.3.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Paula Oliveira
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Paula Oliveira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.en.md CHANGED
@@ -1,60 +1,75 @@
1
- # PDD Patch-Driven Development
2
- ![npm](https://img.shields.io/npm/v/@pcoliveira90/pdd)
3
- ![license](https://img.shields.io/github/license/pcoliveira90/pdd)
4
- ![stars](https://img.shields.io/github/stars/pcoliveira90/pdd)
5
- ![issues](https://img.shields.io/github/issues/pcoliveira90/pdd)
6
- > Ship safe changes in living systems.
7
-
8
- PDD is an open-source framework focused on **bugfixes and incremental feature development in existing systems**.
9
-
10
- ---
11
-
12
- ## The Problem
13
-
14
- Most development is not greenfield.
15
-
16
- It is:
17
- - fixing bugs in production
18
- - evolving legacy systems
19
- - adding features without breaking things
20
-
21
- ---
22
-
23
- ## The Solution: PDD
24
-
25
- PDD focuses on:
26
- - understanding existing systems
27
- - identifying root causes
28
- - applying minimal safe changes
29
- - validating with evidence
30
-
31
- ---
32
-
33
- ## Core Flow
34
-
35
- Issue Recon → Delta Spec → Patch Plan → Change → Verify
36
-
37
- ---
38
-
39
- ## Principles
40
-
41
- - Change-first
42
- - Evidence before edit
43
- - Minimal safe delta
44
- - Root-cause over symptom patch
45
- - Regression-aware
46
- - Reuse existing patterns
47
- - Verifiable outcomes
48
-
49
- ---
50
-
51
- ## Structure
52
-
53
- .pdd/
54
- examples/
55
-
56
- ---
57
-
58
- ## Vision
59
-
60
- Make AI-assisted development safe for real-world systems.
1
+ # PDD - Patch-Driven Development
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pcoliveira90/pdd)](https://www.npmjs.com/package/@pcoliveira90/pdd)
4
+ [![CLI Self Validation](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml/badge.svg)](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml)
5
+ [![License: MIT](https://img.shields.io/github/license/pcoliveira90/pdd)](https://github.com/pcoliveira90/pdd/blob/main/LICENSE)
6
+ [![Node >=18](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
7
+
8
+ > Safe changes in real systems.
9
+
10
+ PDD is a CLI-first framework for bugfix and feature work in existing codebases.
11
+ It standardizes how teams investigate, plan, validate, and document changes.
12
+
13
+ Language versions: [Default README](README.md) | [Português (Brasil)](README.pt-BR.md)
14
+
15
+ ## Why PDD
16
+
17
+ - Worktree-first execution for safer parallel development
18
+ - Structured change artifacts (`delta-spec`, `patch-plan`, `verification-report`)
19
+ - Consistent workflow for Cursor, Claude Code, and GitHub Copilot
20
+ - Built-in quality gates (`doctor`, validation, baseline CI checks)
21
+
22
+ ## Quick Start
23
+
24
+ ```bash
25
+ # 1) Create a linked worktree (recommended and enforced for mutating flows)
26
+ git worktree add ../pdd-worktrees/my-change -b feature/my-change
27
+
28
+ # 2) Initialize PDD in the repository
29
+ pdd init --here
30
+
31
+ # 3) Run a fix workflow
32
+ pdd fix "login not saving incomeStatus"
33
+ ```
34
+
35
+ ## Core Commands
36
+
37
+ ```bash
38
+ pdd init --here
39
+ pdd doctor
40
+ pdd status
41
+ pdd fix "bug description" [--dry-run] [--no-validate] [--open-pr]
42
+ pdd version
43
+ ```
44
+
45
+ AI analysis command:
46
+
47
+ ```bash
48
+ pdd-ai --provider=openai --task=analysis "bug description"
49
+ ```
50
+
51
+ ## Workflow Summary
52
+
53
+ 1. Understand current behavior and root cause
54
+ 2. Generate change artifacts under `changes/<change-id>/`
55
+ 3. Validate tests/lint/build
56
+ 4. Prepare PR artifacts and review in IDE
57
+
58
+ ## IDE Alignment
59
+
60
+ PDD keeps equivalent intents across tools:
61
+
62
+ - Cursor: `.cursor/commands/pdd-*.md`
63
+ - Claude Code: `.claude/commands/pdd-*.md`
64
+ - GitHub Copilot: `.github/prompts/pdd-*.prompt.md`
65
+
66
+ ## Documentation
67
+
68
+ - `docs/getting-started.md`
69
+ - `docs/installation-and-setup.md`
70
+ - `docs/fix-workflow.md`
71
+ - `docs/manifesto.md`
72
+
73
+ ## Goal
74
+
75
+ Reliable execution engine for safe software changes.
package/README.md CHANGED
@@ -1,26 +1,75 @@
1
- # PDD Patch-Driven Development
2
-
3
- > Safe changes in real systems.
4
-
5
- PDD is a framework focused on executing safe changes in existing systems.
6
-
7
- ## CLI
8
-
9
- ```bash
10
- pdd init
11
- pdd fix "bug"
12
- pdd fix "bug" --dry-run
13
- pdd fix "bug" --no-validate
14
- pdd fix "bug" --open-pr
15
- ```
16
-
17
- ## Flow
18
-
19
- 1. describe issue
20
- 2. generate artifacts
21
- 3. validate
22
- 4. prepare PR (IDE handles opening)
23
-
24
- ## Goal
25
-
26
- Reliable execution engine for safe software changes.
1
+ # PDD - Patch-Driven Development
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pcoliveira90/pdd)](https://www.npmjs.com/package/@pcoliveira90/pdd)
4
+ [![CLI Self Validation](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml/badge.svg)](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml)
5
+ [![License: MIT](https://img.shields.io/github/license/pcoliveira90/pdd)](https://github.com/pcoliveira90/pdd/blob/main/LICENSE)
6
+ [![Node >=18](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
7
+
8
+ > Safe changes in real systems.
9
+
10
+ PDD is a CLI-first framework for bugfix and feature work in existing codebases.
11
+ It standardizes how teams investigate, plan, validate, and document changes.
12
+
13
+ Language versions: [English](README.en.md) | [Português (Brasil)](README.pt-BR.md)
14
+
15
+ ## Why PDD
16
+
17
+ - Worktree-first execution for safer parallel development
18
+ - Structured change artifacts (`delta-spec`, `patch-plan`, `verification-report`)
19
+ - Consistent workflow for Cursor, Claude Code, and GitHub Copilot
20
+ - Built-in quality gates (`doctor`, validation, baseline CI checks)
21
+
22
+ ## Quick Start
23
+
24
+ ```bash
25
+ # 1) Create a linked worktree (recommended and enforced for mutating flows)
26
+ git worktree add ../pdd-worktrees/my-change -b feature/my-change
27
+
28
+ # 2) Initialize PDD in the repository
29
+ pdd init --here
30
+
31
+ # 3) Run a fix workflow
32
+ pdd fix "login not saving incomeStatus"
33
+ ```
34
+
35
+ ## Core Commands
36
+
37
+ ```bash
38
+ pdd init --here
39
+ pdd doctor
40
+ pdd status
41
+ pdd fix "bug description" [--dry-run] [--no-validate] [--open-pr]
42
+ pdd version
43
+ ```
44
+
45
+ AI analysis command:
46
+
47
+ ```bash
48
+ pdd-ai --provider=openai --task=analysis "bug description"
49
+ ```
50
+
51
+ ## Workflow Summary
52
+
53
+ 1. Understand current behavior and root cause
54
+ 2. Generate change artifacts under `changes/<change-id>/`
55
+ 3. Validate tests/lint/build
56
+ 4. Prepare PR artifacts and review in IDE
57
+
58
+ ## IDE Alignment
59
+
60
+ PDD keeps equivalent intents across tools:
61
+
62
+ - Cursor: `.cursor/commands/pdd-*.md`
63
+ - Claude Code: `.claude/commands/pdd-*.md`
64
+ - GitHub Copilot: `.github/prompts/pdd-*.prompt.md`
65
+
66
+ ## Documentation
67
+
68
+ - `docs/getting-started.md`
69
+ - `docs/installation-and-setup.md`
70
+ - `docs/fix-workflow.md`
71
+ - `docs/manifesto.md`
72
+
73
+ ## Goal
74
+
75
+ Reliable execution engine for safe software changes.
package/README.pt-BR.md CHANGED
@@ -1,12 +1,75 @@
1
- # PDD Patch-Driven Development
2
-
3
- > Entregue mudanças seguras em sistemas existentes.
4
-
5
- PDD é um framework focado em aplicar mudanças seguras em sistemas reais.
6
-
7
- ## CLI
8
-
9
- ```bash
10
- pdd init
11
- pdd fix "bug"
12
- ```
1
+ # PDD - Patch-Driven Development
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pcoliveira90/pdd)](https://www.npmjs.com/package/@pcoliveira90/pdd)
4
+ [![CLI Self Validation](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml/badge.svg)](https://github.com/pcoliveira90/pdd/actions/workflows/cli-self-validation.yml)
5
+ [![License: MIT](https://img.shields.io/github/license/pcoliveira90/pdd)](https://github.com/pcoliveira90/pdd/blob/main/LICENSE)
6
+ [![Node >=18](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
7
+
8
+ > Entregue mudancas seguras em sistemas reais.
9
+
10
+ PDD e um framework orientado a CLI para bugfix e evolucao de features em sistemas existentes.
11
+ Ele padroniza como o time investiga, planeja, valida e documenta mudancas.
12
+
13
+ Versoes por idioma: [README padrao](README.md) | [English](README.en.md)
14
+
15
+ ## Por que usar PDD
16
+
17
+ - Execucao worktree-first para desenvolvimento paralelo mais seguro
18
+ - Artefatos estruturados de mudanca (`delta-spec`, `patch-plan`, `verification-report`)
19
+ - Fluxo consistente para Cursor, Claude Code e GitHub Copilot
20
+ - Quality gates nativos (`doctor`, validacao e checagens de CI)
21
+
22
+ ## Inicio rapido
23
+
24
+ ```bash
25
+ # 1) Crie uma worktree vinculada (recomendado e exigido para fluxos mutaveis)
26
+ git worktree add ../pdd-worktrees/minha-mudanca -b feature/minha-mudanca
27
+
28
+ # 2) Inicialize o PDD no repositorio
29
+ pdd init --here
30
+
31
+ # 3) Rode um fluxo de correcao
32
+ pdd fix "login nao salva incomeStatus"
33
+ ```
34
+
35
+ ## Comandos principais
36
+
37
+ ```bash
38
+ pdd init --here
39
+ pdd doctor
40
+ pdd status
41
+ pdd fix "descricao do bug" [--dry-run] [--no-validate] [--open-pr]
42
+ pdd version
43
+ ```
44
+
45
+ Comando de analise por IA:
46
+
47
+ ```bash
48
+ pdd-ai --provider=openai --task=analysis "descricao do bug"
49
+ ```
50
+
51
+ ## Resumo do fluxo
52
+
53
+ 1. Entender comportamento atual e causa raiz
54
+ 2. Gerar artefatos em `changes/<change-id>/`
55
+ 3. Validar testes/lint/build
56
+ 4. Preparar artefatos de PR e revisar na IDE
57
+
58
+ ## Alinhamento entre IDEs
59
+
60
+ O PDD mantem intencoes equivalentes entre ferramentas:
61
+
62
+ - Cursor: `.cursor/commands/pdd-*.md`
63
+ - Claude Code: `.claude/commands/pdd-*.md`
64
+ - GitHub Copilot: `.github/prompts/pdd-*.prompt.md`
65
+
66
+ ## Documentacao
67
+
68
+ - `docs/getting-started.md`
69
+ - `docs/installation-and-setup.md`
70
+ - `docs/fix-workflow.md`
71
+ - `docs/manifesto.md`
72
+
73
+ ## Objetivo
74
+
75
+ Motor de execucao confiavel para mudancas seguras em software real.
package/bin/pdd-ai.js CHANGED
@@ -1,23 +1,24 @@
1
- #!/usr/bin/env node
2
-
3
- import { runAiFixAnalysis } from '../src/ai/run-fix-analysis.js';
4
-
5
- async function main() {
6
- try {
7
- const result = await runAiFixAnalysis(process.argv.slice(2));
8
-
9
- console.log('\n🤖 PDD AI Analysis');
10
- console.log('----------------------');
11
- console.log(`Provider: ${result.provider}`);
12
- console.log(`Model: ${result.model}`);
13
- console.log(`Issue: ${result.issue}`);
14
- console.log('\nResult:\n');
15
-
16
- console.log(JSON.stringify(result.result, null, 2));
17
- } catch (err) {
18
- console.error('❌ Error:', err.message);
19
- process.exit(1);
20
- }
21
- }
22
-
23
- main();
1
+ #!/usr/bin/env node
2
+
3
+ import { runAiFixAnalysis } from '../src/ai/run-fix-analysis.js';
4
+
5
+ async function main() {
6
+ try {
7
+ const result = await runAiFixAnalysis(process.argv.slice(2));
8
+
9
+ console.log('\n🤖 PDD AI Analysis');
10
+ console.log('----------------------');
11
+ console.log(`Provider: ${result.provider}`);
12
+ console.log(`Task: ${result.task}`);
13
+ console.log(`Model: ${result.model}`);
14
+ console.log(`Issue: ${result.issue}`);
15
+ console.log('\nResult:\n');
16
+
17
+ console.log(JSON.stringify(result.result, null, 2));
18
+ } catch (err) {
19
+ console.error('❌ Error:', err.message);
20
+ process.exit(1);
21
+ }
22
+ }
23
+
24
+ main();
package/bin/pdd-pro.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
-
3
- import { runCli } from '../src/cli/index.js';
4
-
5
- runCli().catch(err => {
6
- console.error(err);
7
- process.exitCode = 1;
8
- });
2
+
3
+ import { runCli } from '../src/cli/index.js';
4
+
5
+ runCli().catch(err => {
6
+ console.error(err);
7
+ process.exitCode = 1;
8
+ });
package/bin/pdd.js CHANGED
@@ -1,27 +1,8 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'fs';
4
- import path from 'path';
5
-
6
- const command = process.argv[2];
7
-
8
- if (command === 'init') {
9
- const targetDir = process.cwd();
10
- const pddDir = path.join(targetDir, '.pdd');
11
-
12
- if (fs.existsSync(pddDir)) {
13
- console.log('PDD already initialized.');
14
- process.exit(0);
15
- }
16
-
17
- fs.mkdirSync(pddDir, { recursive: true });
18
- fs.mkdirSync(path.join(pddDir, 'templates'));
19
- fs.mkdirSync(path.join(pddDir, 'commands'));
20
- fs.mkdirSync(path.join(pddDir, 'memory'));
21
-
22
- fs.writeFileSync(path.join(pddDir, 'README.md'), 'PDD initialized');
23
-
24
- console.log('✅ PDD initialized successfully.');
25
- } else {
26
- console.log('Usage: pdd init');
27
- }
1
+ #!/usr/bin/env node
2
+
3
+ import { runCli } from '../src/cli/index.js';
4
+
5
+ runCli(process.argv.slice(2)).catch(err => {
6
+ console.error(err);
7
+ process.exitCode = 1;
8
+ });
package/package.json CHANGED
@@ -1,42 +1,43 @@
1
- {
2
- "name": "@pcoliveira90/pdd",
3
- "version": "0.2.6",
4
- "description": "Patch-Driven Development CLI — safe, resilient and guided code changes",
5
- "type": "module",
6
- "bin": {
7
- "pdd": "bin/pdd-pro.js"
8
- },
9
- "files": [
10
- "bin",
11
- "src"
12
- ],
13
- "scripts": {
14
- "start": "node bin/pdd-pro.js",
15
- "dev": "node bin/pdd-pro.js",
16
- "test": "echo \"No tests yet\"",
17
- "lint": "echo \"No lint configured\"",
18
- "prepublishOnly": "npm pack"
19
- },
20
- "engines": {
21
- "node": ">=18"
22
- },
23
- "keywords": [
24
- "cli",
25
- "developer-tools",
26
- "patch",
27
- "refactoring",
28
- "ai-workflow",
29
- "engineering",
30
- "pdd"
31
- ],
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/pcoliveira90/pdd.git"
35
- },
36
- "bugs": {
37
- "url": "https://github.com/pcoliveira90/pdd/issues"
38
- },
39
- "homepage": "https://github.com/pcoliveira90/pdd#readme",
40
- "author": "Paula Oliveira",
41
- "license": "MIT"
42
- }
1
+ {
2
+ "name": "@pcoliveira90/pdd",
3
+ "version": "0.3.1",
4
+ "description": "Patch-Driven Development CLI — safe, resilient and guided code changes",
5
+ "type": "module",
6
+ "bin": {
7
+ "pdd": "bin/pdd-pro.js",
8
+ "pdd-ai": "bin/pdd-ai.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "src"
13
+ ],
14
+ "scripts": {
15
+ "start": "node bin/pdd-pro.js",
16
+ "dev": "node bin/pdd-pro.js",
17
+ "test": "node --test",
18
+ "lint": "node ./scripts/lint-js.mjs",
19
+ "prepublishOnly": "npm pack"
20
+ },
21
+ "engines": {
22
+ "node": ">=18"
23
+ },
24
+ "keywords": [
25
+ "cli",
26
+ "developer-tools",
27
+ "patch",
28
+ "refactoring",
29
+ "ai-workflow",
30
+ "engineering",
31
+ "pdd"
32
+ ],
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/pcoliveira90/pdd.git"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/pcoliveira90/pdd/issues"
39
+ },
40
+ "homepage": "https://github.com/pcoliveira90/pdd#readme",
41
+ "author": "Paula Oliveira",
42
+ "license": "MIT"
43
+ }
@@ -1,41 +1,41 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- function readIfExists(filePath) {
5
- if (!fs.existsSync(filePath)) return null;
6
- return fs.readFileSync(filePath, 'utf-8');
7
- }
8
-
9
- export function buildAiAnalysisContext(baseDir = process.cwd()) {
10
- const context = {
11
- constitution: readIfExists(path.join(baseDir, '.pdd', 'constitution.md')),
12
- deltaSpec: readIfExists(path.join(baseDir, '.pdd', 'templates', 'delta-spec.md')),
13
- patchPlan: readIfExists(path.join(baseDir, '.pdd', 'templates', 'patch-plan.md')),
14
- verification: readIfExists(path.join(baseDir, '.pdd', 'templates', 'verification-report.md'))
15
- };
16
-
17
- return context;
18
- }
19
-
20
- export function buildBugfixPrompt({ issue, baseDir = process.cwd() }) {
21
- const context = buildAiAnalysisContext(baseDir);
22
-
23
- return [
24
- 'You are a senior engineer working in an existing system.',
25
- 'Follow Patch-Driven Development principles.',
26
- 'Focus on root cause, minimal safe delta, and regression awareness.',
27
- '',
28
- 'Issue:',
29
- issue,
30
- '',
31
- 'Available context:',
32
- JSON.stringify(context, null, 2),
33
- '',
34
- 'Return:',
35
- '- root cause hypothesis',
36
- '- impacted areas',
37
- '- minimal safe delta',
38
- '- regression risks',
39
- '- validation plan'
40
- ].join('\n');
41
- }
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+
4
+ function readIfExists(filePath) {
5
+ if (!fs.existsSync(filePath)) return null;
6
+ return fs.readFileSync(filePath, 'utf-8');
7
+ }
8
+
9
+ export function buildAiAnalysisContext(baseDir = process.cwd()) {
10
+ const context = {
11
+ constitution: readIfExists(path.join(baseDir, '.pdd', 'constitution.md')),
12
+ deltaSpec: readIfExists(path.join(baseDir, '.pdd', 'templates', 'delta-spec.md')),
13
+ patchPlan: readIfExists(path.join(baseDir, '.pdd', 'templates', 'patch-plan.md')),
14
+ verification: readIfExists(path.join(baseDir, '.pdd', 'templates', 'verification-report.md'))
15
+ };
16
+
17
+ return context;
18
+ }
19
+
20
+ export function buildBugfixPrompt({ issue, baseDir = process.cwd() }) {
21
+ const context = buildAiAnalysisContext(baseDir);
22
+
23
+ return [
24
+ 'You are a senior engineer working in an existing system.',
25
+ 'Follow Patch-Driven Development principles.',
26
+ 'Focus on root cause, minimal safe delta, and regression awareness.',
27
+ '',
28
+ 'Issue:',
29
+ issue,
30
+ '',
31
+ 'Available context:',
32
+ JSON.stringify(context, null, 2),
33
+ '',
34
+ 'Return:',
35
+ '- root cause hypothesis',
36
+ '- impacted areas',
37
+ '- minimal safe delta',
38
+ '- regression risks',
39
+ '- validation plan'
40
+ ].join('\n');
41
+ }