spec-first-claude 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +144 -147
  2. package/bin/cli.js +52 -52
  3. package/lib/init.js +89 -93
  4. package/package.json +24 -23
  5. package/templates/.ai/memory/napkin.md +68 -68
  6. package/templates/.claude/agents/backend-coder.md +215 -215
  7. package/templates/.claude/agents/db-coder.md +165 -165
  8. package/templates/.claude/agents/doc-writer.md +51 -51
  9. package/templates/.claude/agents/frontend-coder.md +222 -222
  10. package/templates/.claude/agents/infra-coder.md +341 -341
  11. package/templates/.claude/agents/reviewer.md +99 -99
  12. package/templates/.claude/agents/security-reviewer.md +153 -153
  13. package/templates/.claude/commands/design.md +107 -107
  14. package/templates/.claude/commands/dev.md +189 -167
  15. package/templates/.claude/commands/extract.md +137 -137
  16. package/templates/.claude/commands/feature.md +60 -60
  17. package/templates/.claude/commands/merge-delta.md +70 -70
  18. package/templates/.claude/commands/plan.md +86 -86
  19. package/templates/.claude/commands/{pausar.md → session-finish.md} +83 -83
  20. package/templates/.claude/commands/setup-projeto.md +68 -68
  21. package/templates/.claude/settings.local.json +6 -6
  22. package/templates/CLAUDE.md +198 -199
  23. package/templates/docs/Desenvolvimento/rules.md +229 -229
  24. package/templates/docs/_templates/estrutura/ADRs.template.md +91 -91
  25. package/templates/docs/_templates/estrutura/API.template.md +144 -144
  26. package/templates/docs/_templates/estrutura/Arquitetura.template.md +82 -82
  27. package/templates/docs/_templates/estrutura/Infraestrutura.template.md +104 -104
  28. package/templates/docs/_templates/estrutura/Modelo_Dados.template.md +99 -99
  29. package/templates/docs/_templates/estrutura/Seguranca.template.md +138 -138
  30. package/templates/docs/_templates/estrutura/Stack.template.md +78 -78
  31. package/templates/docs/_templates/estrutura/Visao.template.md +82 -82
  32. package/templates/docs/_templates/feature/Progresso.template.md +136 -136
  33. package/templates/docs/_templates/feature/backlog-extraido.template.md +154 -154
  34. package/templates/docs/_templates/feature/context.template.md +42 -42
  35. package/templates/docs/_templates/feature/extract-log.template.md +38 -38
  36. package/templates/docs/_templates/feature/projetos.template.yaml +73 -73
  37. package/templates/docs/_templates/global/progresso_global.template.md +57 -57
package/README.md CHANGED
@@ -1,147 +1,144 @@
1
- # spec-first-claude
2
-
3
- Kit completo para desenvolvimento **spec-first** com [Claude Code](https://claude.ai/code). A IA segue um pipeline disciplinado — da especificacao ao codigo — com checkpoints humanos e rastreabilidade ponta a ponta.
4
-
5
- ## O que e spec-first?
6
-
7
- Em vez de pedir pra IA "cria um CRUD de usuarios", voce fornece insumos brutos (docs, SQLs, rascunhos) e a IA:
8
-
9
- 1. **Extrai** requisitos estruturados (PRD/TRD)
10
- 2. **Espera sua aprovacao** (checkpoint humano)
11
- 3. **Gera design tecnico** (SDD) — fonte unica de verdade
12
- 4. **Planeja tasks** com dependencias e fases
13
- 5. **Implementa** com agentes especializados por area + security review
14
- 6. **Atualiza docs** automaticamente (delta specs)
15
-
16
- Resultado: codigo previsivel, seguro e rastreavel.
17
-
18
- ## Pre-requisitos
19
-
20
- - **Node.js** 18+
21
- - **Git** instalado
22
- - **Claude Code** instalado e configurado
23
-
24
- ### Windows (PowerShell)
25
-
26
- Se encontrar erro de script nao assinado ao rodar o CLI, execute:
27
-
28
- ```powershell
29
- Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
30
- ```
31
-
32
- ## Instalacao
33
-
34
- ```bash
35
- npm i -g spec-first-claude
36
- ```
37
-
38
- ## Uso
39
-
40
- ```bash
41
- spec-first-claude init --name=MeuProjeto
42
- ```
43
-
44
- Isso cria a pasta `MeuProjeto/` com toda a estrutura pronta:
45
-
46
- ```
47
- MeuProjeto/
48
- ├── .ai/memory/napkin.md <- Memoria persistente do projeto
49
- ├── .claude/
50
- │ ├── commands/ <- 9 commands do workflow
51
- │ │ ├── setup-projeto.md <- Bootstrap do projeto
52
- │ │ ├── feature.md <- Pipeline de feature
53
- │ │ ├── discovery.md <- Analise profunda de insumos
54
- │ │ ├── extract.md <- PM -> PRD/TRD
55
- │ │ ├── design.md <- PRD/TRD -> SDD
56
- │ │ ├── plan.md <- SDD -> tasks
57
- │ │ ├── dev.md <- Executa tasks
58
- │ │ ├── merge-delta.md <- Atualiza docs globais
59
- │ │ └── pausar.md <- Encerra sessao
60
- │ └── agents/ <- 7 agentes especializados
61
- │ ├── backend-coder.md <- .NET 8 / C#
62
- │ ├── frontend-coder.md <- React
63
- │ ├── db-coder.md <- PostgreSQL
64
- │ ├── infra-coder.md <- Docker
65
- │ ├── doc-writer.md <- Documentacao
66
- │ ├── reviewer.md <- Code review
67
- │ └── security-reviewer.md <- Auditoria de seguranca
68
- ├── docs/
69
- │ ├── PM/ <- Jogue seus insumos aqui
70
- │ │ └── setup_projeto/ <- Insumos do bootstrap
71
- │ ├── _templates/ <- 18 templates do workflow
72
- │ ├── Estrutura/ <- Docs globais (gerados)
73
- │ └── Desenvolvimento/ <- Docs por feature (gerados)
74
- │ └── rules.md <- Regras de desenvolvimento
75
- ├── CLAUDE.md <- Regras globais pro agente
76
- └── .gitignore
77
- ```
78
-
79
- ## Como comecar
80
-
81
- 1. Crie o projeto:
82
- ```bash
83
- spec-first-claude init --name=MeuProjeto
84
- cd MeuProjeto
85
- ```
86
-
87
- 2. Jogue seus insumos em `docs/PM/setup_projeto/` — qualquer formato:
88
- - `.md`, `.txt` (descricoes, requisitos, decisoes)
89
- - `.sql` (modelagem de banco)
90
- - `.csv`, `.xml`, `.html` (dados, configs)
91
- - `.png`, `.jpg`, `.pdf` (telas, diagramas)
92
-
93
- 3. Abra o Claude Code e rode:
94
- ```
95
- /setup-projeto
96
- ```
97
-
98
- 4. O pipeline comeca. A IA vai:
99
- - Extrair um TRD dos seus insumos
100
- - Parar e pedir sua aprovacao
101
- - Depois voce roda `/design`, `/plan`, `/dev` na sequencia
102
-
103
- ## Pipeline completo
104
-
105
- ```
106
- docs/PM/ (seus arquivos)
107
- |
108
- v
109
- /setup-projeto --> /extract --> TRD (voce revisa e aprova)
110
- |
111
- v
112
- /design --> SDD + docs/Estrutura/
113
- |
114
- v
115
- /plan --> tasks + Progresso.md
116
- |
117
- v
118
- /dev --> codigo nos repos
119
- |
120
- v
121
- /merge-delta --> docs atualizados
122
- ```
123
-
124
- Para features (apos o setup):
125
-
126
- ```
127
- /feature nome_da_feature --> /extract --> PRD --> /design --> /plan --> /dev --> /merge-delta
128
- ```
129
-
130
- ## Opcoes do CLI
131
-
132
- ```
133
- spec-first-claude init --name=<nome> [--target=<caminho>]
134
- ```
135
-
136
- | Opcao | Descricao |
137
- |-------|-----------|
138
- | `--name` | Nome do projeto (obrigatorio) |
139
- | `--target` | Diretorio destino (default: `./<nome>`) |
140
-
141
- ## Links
142
-
143
- - [Repositorio](https://github.com/gustavomaritan-labs/spec-first-workflow)
144
-
145
- ## Licenca
146
-
147
- MIT
1
+ # spec-first-claude
2
+
3
+ Kit completo para desenvolvimento **spec-first** com [Claude Code](https://claude.ai/code). A IA segue um pipeline disciplinado — da especificacao ao codigo — com checkpoints humanos e rastreabilidade ponta a ponta.
4
+
5
+ ## O que e spec-first?
6
+
7
+ Em vez de pedir pra IA "cria um CRUD de usuarios", voce fornece insumos brutos (docs, SQLs, rascunhos) e a IA:
8
+
9
+ 1. **Extrai** requisitos estruturados (PRD/TRD)
10
+ 2. **Espera sua aprovacao** (checkpoint humano)
11
+ 3. **Gera design tecnico** (SDD) — fonte unica de verdade
12
+ 4. **Planeja tasks** com dependencias e fases
13
+ 5. **Implementa** com agentes especializados por area + security review
14
+ 6. **Atualiza docs** automaticamente (delta specs)
15
+
16
+ Resultado: codigo previsivel, seguro e rastreavel.
17
+
18
+ ## Pre-requisitos
19
+
20
+ - **Node.js** 18+
21
+ - **Git** instalado
22
+ - **Claude Code** instalado e configurado
23
+
24
+ ### Windows (PowerShell)
25
+
26
+ Se encontrar erro de script nao assinado ao rodar o CLI, execute:
27
+
28
+ ```powershell
29
+ Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
30
+ ```
31
+
32
+ ## Instalacao
33
+
34
+ ```bash
35
+ npm i -g spec-first-claude
36
+ ```
37
+
38
+ ## Uso
39
+
40
+ ```bash
41
+ spec-first-claude init --name=MeuProjeto
42
+ ```
43
+
44
+ Isso cria a pasta `MeuProjeto/` com toda a estrutura pronta:
45
+
46
+ ```
47
+ MeuProjeto/
48
+ ├── .ai/memory/napkin.md <- Memoria persistente do projeto
49
+ ├── .claude/
50
+ │ ├── commands/ <- 9 commands do workflow
51
+ │ │ ├── setup-projeto.md <- Bootstrap do projeto
52
+ │ │ ├── feature.md <- Pipeline de feature
53
+ │ │ ├── discovery.md <- Analise profunda de insumos
54
+ │ │ ├── extract.md <- PM -> PRD/TRD
55
+ │ │ ├── design.md <- PRD/TRD -> SDD
56
+ │ │ ├── plan.md <- SDD -> tasks
57
+ │ │ ├── dev.md <- Executa tasks
58
+ │ │ ├── merge-delta.md <- Atualiza docs globais
59
+ │ │ └── session-finish.md <- Encerra sessao
60
+ │ └── agents/ <- 7 agentes especializados
61
+ │ ├── backend-coder.md <- .NET 8 / C#
62
+ │ ├── frontend-coder.md <- React
63
+ │ ├── db-coder.md <- PostgreSQL
64
+ │ ├── infra-coder.md <- Docker
65
+ │ ├── doc-writer.md <- Documentacao
66
+ │ ├── reviewer.md <- Code review
67
+ │ └── security-reviewer.md <- Auditoria de seguranca
68
+ ├── docs/
69
+ │ ├── PM/ <- Jogue seus insumos aqui
70
+ │ │ └── setup_projeto/ <- Insumos do bootstrap
71
+ │ ├── _templates/ <- 18 templates do workflow
72
+ │ ├── Estrutura/ <- Docs globais (gerados)
73
+ │ └── Desenvolvimento/ <- Docs por feature (gerados)
74
+ │ └── rules.md <- Regras de desenvolvimento
75
+ ├── CLAUDE.md <- Regras globais pro agente
76
+ └── .gitignore
77
+ ```
78
+
79
+ ## Como comecar
80
+
81
+ 1. Crie o projeto:
82
+ ```bash
83
+ spec-first-claude init --name=MeuProjeto
84
+ cd MeuProjeto
85
+ ```
86
+
87
+ 2. Jogue seus insumos em `docs/PM/setup_projeto/` — qualquer formato:
88
+ - `.md`, `.txt` (descricoes, requisitos, decisoes)
89
+ - `.sql` (modelagem de banco)
90
+ - `.csv`, `.xml`, `.html` (dados, configs)
91
+ - `.png`, `.jpg`, `.pdf` (telas, diagramas)
92
+
93
+ 3. Abra o Claude Code e rode:
94
+ ```
95
+ /setup-projeto
96
+ ```
97
+
98
+ 4. O pipeline comeca. A IA vai:
99
+ - Extrair um TRD dos seus insumos
100
+ - Parar e pedir sua aprovacao
101
+ - Depois voce roda `/design`, `/plan`, `/dev` na sequencia
102
+
103
+ ## Pipeline completo
104
+
105
+ ```
106
+ docs/PM/ (seus arquivos)
107
+ |
108
+ v
109
+ /setup-projeto --> /extract --> TRD (voce revisa e aprova)
110
+ |
111
+ v
112
+ /design --> SDD + docs/Estrutura/
113
+ |
114
+ v
115
+ /plan --> tasks + Progresso.md
116
+ |
117
+ v
118
+ /dev --> codigo nos repos + merge-delta automatico
119
+ ```
120
+
121
+ Para features (apos o setup):
122
+
123
+ ```
124
+ /feature nome_da_feature --> /extract --> PRD --> /design --> /plan --> /dev (inclui merge-delta)
125
+ ```
126
+
127
+ ## Opcoes do CLI
128
+
129
+ ```
130
+ spec-first-claude init --name=<nome> [--target=<caminho>]
131
+ ```
132
+
133
+ | Opcao | Descricao |
134
+ |-------|-----------|
135
+ | `--name` | Nome do projeto (obrigatorio) |
136
+ | `--target` | Diretorio destino (default: `./<nome>`) |
137
+
138
+ ## Links
139
+
140
+ - [Repositorio](https://github.com/gustavomaritan-labs/spec-first-workflow)
141
+
142
+ ## Licenca
143
+
144
+ MIT
package/bin/cli.js CHANGED
@@ -1,52 +1,52 @@
1
- #!/usr/bin/env node
2
-
3
- const path = require('path');
4
- const { init } = require('../lib/init');
5
-
6
- const args = process.argv.slice(2);
7
- const command = args[0];
8
-
9
- function printUsage() {
10
- console.log('Usage: spec-first-claude init --name=<project-name> [--target=<path>]');
11
- console.log('');
12
- console.log('Creates a new spec-first project configured for Claude Code.');
13
- console.log('');
14
- console.log('Options:');
15
- console.log(' --name=<name> Project name (required)');
16
- console.log(' --target=<path> Target directory (defaults to ./<name>)');
17
- }
18
-
19
- function parseArgs(args) {
20
- const parsed = {};
21
- for (const arg of args) {
22
- const match = arg.match(/^--(\w+)=(.+)$/);
23
- if (match) {
24
- parsed[match[1]] = match[2];
25
- }
26
- }
27
- return parsed;
28
- }
29
-
30
- if (command === 'init') {
31
- const opts = parseArgs(args.slice(1));
32
-
33
- if (!opts.name) {
34
- console.error('Error: --name is required.\n');
35
- printUsage();
36
- process.exit(1);
37
- }
38
-
39
- const templatesDir = path.join(__dirname, '..', 'templates');
40
-
41
- init({
42
- name: opts.name,
43
- templatesDir,
44
- targetDir: opts.target || undefined,
45
- });
46
- } else {
47
- printUsage();
48
- if (command) {
49
- console.error(`\nUnknown command: "${command}"`);
50
- }
51
- process.exit(command ? 1 : 0);
52
- }
1
+ #!/usr/bin/env node
2
+
3
+ const path = require('path');
4
+ const { init } = require('../lib/init');
5
+
6
+ const args = process.argv.slice(2);
7
+ const command = args[0];
8
+
9
+ function printUsage() {
10
+ console.log('Usage: spec-first-claude init --name=<project-name> [--target=<path>]');
11
+ console.log('');
12
+ console.log('Creates a new spec-first project configured for Claude Code.');
13
+ console.log('');
14
+ console.log('Options:');
15
+ console.log(' --name=<name> Project name (required)');
16
+ console.log(' --target=<path> Target directory (defaults to ./<name>)');
17
+ }
18
+
19
+ function parseArgs(args) {
20
+ const parsed = {};
21
+ for (const arg of args) {
22
+ const match = arg.match(/^--(\w+)=(.+)$/);
23
+ if (match) {
24
+ parsed[match[1]] = match[2];
25
+ }
26
+ }
27
+ return parsed;
28
+ }
29
+
30
+ if (command === 'init') {
31
+ const opts = parseArgs(args.slice(1));
32
+
33
+ if (!opts.name) {
34
+ console.error('Error: --name is required.\n');
35
+ printUsage();
36
+ process.exit(1);
37
+ }
38
+
39
+ const templatesDir = path.join(__dirname, '..', 'templates');
40
+
41
+ init({
42
+ name: opts.name,
43
+ templatesDir,
44
+ targetDir: opts.target || undefined,
45
+ });
46
+ } else {
47
+ printUsage();
48
+ if (command) {
49
+ console.error(`\nUnknown command: "${command}"`);
50
+ }
51
+ process.exit(command ? 1 : 0);
52
+ }
package/lib/init.js CHANGED
@@ -1,93 +1,89 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
-
5
- const PLACEHOLDER = '{{PROJECT_NAME}}';
6
-
7
- function copyDir(src, dest, replacements) {
8
- fs.mkdirSync(dest, { recursive: true });
9
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
10
- const srcPath = path.join(src, entry.name);
11
- const destPath = path.join(dest, entry.name);
12
- if (entry.isDirectory()) {
13
- copyDir(srcPath, destPath, replacements);
14
- } else {
15
- copyFile(srcPath, destPath, replacements);
16
- }
17
- }
18
- }
19
-
20
- function copyFile(src, dest, replacements) {
21
- const textExtensions = ['.md', '.yaml', '.yml', '.json', '.js', '.ts', '.gitignore', '.gitkeep', ''];
22
- const ext = path.extname(src).toLowerCase();
23
- const basename = path.basename(src);
24
- const isText = textExtensions.includes(ext) || basename.startsWith('.');
25
-
26
- if (isText) {
27
- let content = fs.readFileSync(src, 'utf-8');
28
- for (const [placeholder, value] of Object.entries(replacements)) {
29
- content = content.split(placeholder).join(value);
30
- }
31
- fs.writeFileSync(dest, content, 'utf-8');
32
- } else {
33
- fs.copyFileSync(src, dest);
34
- }
35
- }
36
-
37
- function init({ name, templatesDir, targetDir }) {
38
- const dest = targetDir || path.resolve(process.cwd(), name);
39
-
40
- if (fs.existsSync(dest)) {
41
- const files = fs.readdirSync(dest);
42
- if (files.length > 0) {
43
- console.error(`Error: directory "${dest}" already exists and is not empty.`);
44
- process.exit(1);
45
- }
46
- }
47
-
48
- console.log(`\nCreating project "${name}" in ${dest}\n`);
49
-
50
- const replacements = { [PLACEHOLDER]: name };
51
- copyDir(templatesDir, dest, replacements);
52
- patchProjectName(dest, name);
53
-
54
- try {
55
- execSync('git init', { cwd: dest, stdio: 'pipe' });
56
- execSync('git add -A', { cwd: dest, stdio: 'pipe' });
57
- execSync(`git commit -m "chore: init project ${name} via spec-first-workflow"`, {
58
- cwd: dest,
59
- stdio: 'pipe',
60
- });
61
- console.log('Git initialized with initial commit.');
62
- } catch {
63
- console.log('Git init skipped (git not available or error).');
64
- }
65
-
66
- console.log(`\nDone! Project "${name}" is ready.`);
67
- console.log('\nNext steps:');
68
- console.log(` 1. cd ${name}`);
69
- console.log(' 2. Add your input files to docs/PM/setup_projeto/');
70
- console.log(' 3. Run /setup-projeto to start the pipeline');
71
- console.log('');
72
- }
73
-
74
- function patchProjectName(dest, name) {
75
- const filesToPatch = [
76
- path.join('.ai', 'memory', 'napkin.md'),
77
- path.join('.github', 'copilot-instructions.md'),
78
- 'CLAUDE.md',
79
- ];
80
-
81
- for (const relPath of filesToPatch) {
82
- const filePath = path.join(dest, relPath);
83
- if (!fs.existsSync(filePath)) continue;
84
-
85
- let content = fs.readFileSync(filePath, 'utf-8');
86
- content = content.replace(/# Napkin Runbook\b/, `# Napkin Runbook — ${name}`);
87
- content = content.replace(/# Copilot Instructions — Projeto\b/, `# Copilot Instructions — ${name}`);
88
- content = content.replace(/# CLAUDE\.md — Projeto\b/, `# CLAUDE.md — ${name}`);
89
- fs.writeFileSync(filePath, content, 'utf-8');
90
- }
91
- }
92
-
93
- module.exports = { init };
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const { execSync } = require('child_process');
4
+
5
+ const PLACEHOLDER = '{{PROJECT_NAME}}';
6
+
7
+ function copyDir(src, dest, replacements) {
8
+ fs.mkdirSync(dest, { recursive: true });
9
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
10
+ const srcPath = path.join(src, entry.name);
11
+ const destPath = path.join(dest, entry.name);
12
+ if (entry.isDirectory()) {
13
+ copyDir(srcPath, destPath, replacements);
14
+ } else {
15
+ copyFile(srcPath, destPath, replacements);
16
+ }
17
+ }
18
+ }
19
+
20
+ function copyFile(src, dest, replacements) {
21
+ // Skip if file already exists (preserve user's files)
22
+ if (fs.existsSync(dest)) return;
23
+
24
+ const textExtensions = ['.md', '.yaml', '.yml', '.json', '.js', '.ts', '.gitignore', '.gitkeep', ''];
25
+ const ext = path.extname(src).toLowerCase();
26
+ const basename = path.basename(src);
27
+ const isText = textExtensions.includes(ext) || basename.startsWith('.');
28
+
29
+ if (isText) {
30
+ let content = fs.readFileSync(src, 'utf-8');
31
+ for (const [placeholder, value] of Object.entries(replacements)) {
32
+ content = content.split(placeholder).join(value);
33
+ }
34
+ fs.writeFileSync(dest, content, 'utf-8');
35
+ } else {
36
+ fs.copyFileSync(src, dest);
37
+ }
38
+ }
39
+
40
+ function init({ name, templatesDir, targetDir }) {
41
+ const dest = targetDir || path.resolve(process.cwd(), name);
42
+
43
+ const existed = fs.existsSync(dest);
44
+ console.log(`\n${existed ? 'Initializing' : 'Creating'} project "${name}" in ${dest}\n`);
45
+
46
+ const replacements = { [PLACEHOLDER]: name };
47
+ copyDir(templatesDir, dest, replacements);
48
+ patchProjectName(dest, name);
49
+
50
+ try {
51
+ execSync('git init', { cwd: dest, stdio: 'pipe' });
52
+ execSync('git add -A', { cwd: dest, stdio: 'pipe' });
53
+ execSync(`git commit -m "chore: init project ${name} via spec-first-workflow"`, {
54
+ cwd: dest,
55
+ stdio: 'pipe',
56
+ });
57
+ console.log('Git initialized with initial commit.');
58
+ } catch {
59
+ console.log('Git init skipped (git not available or error).');
60
+ }
61
+
62
+ console.log(`\nDone! Project "${name}" is ready.`);
63
+ console.log('\nNext steps:');
64
+ console.log(` 1. cd ${name}`);
65
+ console.log(' 2. Add your input files to docs/PM/setup_projeto/');
66
+ console.log(' 3. Run /setup-projeto to start the pipeline');
67
+ console.log('');
68
+ }
69
+
70
+ function patchProjectName(dest, name) {
71
+ const filesToPatch = [
72
+ path.join('.ai', 'memory', 'napkin.md'),
73
+ path.join('.github', 'copilot-instructions.md'),
74
+ 'CLAUDE.md',
75
+ ];
76
+
77
+ for (const relPath of filesToPatch) {
78
+ const filePath = path.join(dest, relPath);
79
+ if (!fs.existsSync(filePath)) continue;
80
+
81
+ let content = fs.readFileSync(filePath, 'utf-8');
82
+ content = content.replace(/# Napkin Runbook\b/, `# Napkin Runbook — ${name}`);
83
+ content = content.replace(/# Copilot Instructions — Projeto\b/, `# Copilot Instructions — ${name}`);
84
+ content = content.replace(/# CLAUDE\.md — Projeto\b/, `# CLAUDE.md — ${name}`);
85
+ fs.writeFileSync(filePath, content, 'utf-8');
86
+ }
87
+ }
88
+
89
+ module.exports = { init };
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
- {
2
- "name": "spec-first-claude",
3
- "version": "0.2.0",
4
- "description": "Spec-first workflow kit for Claude Code — AI-driven development with specs, not guesswork",
5
- "bin": {
6
- "spec-first-claude": "./bin/cli.js"
7
- },
8
- "files": [
9
- "bin/",
10
- "lib/",
11
- "templates/"
12
- ],
13
- "author": "gustavomaritan",
14
- "keywords": ["spec-first", "workflow", "ai", "claude", "anthropic", "scaffolding"],
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/gustavomaritan-labs/spec-first-workflow"
18
- },
19
- "scripts": {
20
- "test": "echo \"No tests yet\""
21
- },
22
- "license": "MIT"
23
- }
1
+ {
2
+ "name": "spec-first-claude",
3
+ "version": "0.4.0",
4
+ "description": "Spec-first workflow kit for Claude Code — AI-driven development with specs, not guesswork",
5
+ "bin": {
6
+ "spec-first-claude": "./bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "lib/",
11
+ "templates/"
12
+ ],
13
+ "author": "gustavomaritan",
14
+ "keywords": ["spec-first", "workflow", "ai", "claude", "anthropic", "scaffolding"],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/gustavomaritan-labs/spec-first-workflow",
18
+ "directory": "packages/spec-first-claude"
19
+ },
20
+ "scripts": {
21
+ "test": "echo \"No tests yet\""
22
+ },
23
+ "license": "MIT"
24
+ }