@dewtech/dare-cli 2.15.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +659 -561
- package/dist/__tests__/refine.test.d.ts +2 -0
- package/dist/__tests__/refine.test.d.ts.map +1 -0
- package/dist/__tests__/refine.test.js +186 -0
- package/dist/__tests__/refine.test.js.map +1 -0
- package/dist/__tests__/review.test.d.ts +2 -0
- package/dist/__tests__/review.test.d.ts.map +1 -0
- package/dist/__tests__/review.test.js +242 -0
- package/dist/__tests__/review.test.js.map +1 -0
- package/dist/__tests__/update.test.d.ts +2 -0
- package/dist/__tests__/update.test.d.ts.map +1 -0
- package/dist/__tests__/update.test.js +150 -0
- package/dist/__tests__/update.test.js.map +1 -0
- package/dist/bin/dare.js +6 -0
- package/dist/bin/dare.js.map +1 -1
- package/dist/commands/dag.d.ts.map +1 -1
- package/dist/commands/dag.js +27 -9
- package/dist/commands/dag.js.map +1 -1
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +76 -0
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/refine.d.ts +16 -0
- package/dist/commands/refine.d.ts.map +1 -0
- package/dist/commands/refine.js +167 -0
- package/dist/commands/refine.js.map +1 -0
- package/dist/commands/review.d.ts +16 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +106 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +149 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/types/Refine.types.d.ts +96 -0
- package/dist/types/Refine.types.d.ts.map +1 -0
- package/dist/types/Refine.types.js +19 -0
- package/dist/types/Refine.types.js.map +1 -0
- package/dist/types/Review.types.d.ts +86 -0
- package/dist/types/Review.types.d.ts.map +1 -0
- package/dist/types/Review.types.js +15 -0
- package/dist/types/Review.types.js.map +1 -0
- package/dist/types/UpdateManifest.types.d.ts +91 -0
- package/dist/types/UpdateManifest.types.d.ts.map +1 -0
- package/dist/types/UpdateManifest.types.js +13 -0
- package/dist/types/UpdateManifest.types.js.map +1 -0
- package/dist/utils/ReviewRunner.d.ts +42 -0
- package/dist/utils/ReviewRunner.d.ts.map +1 -0
- package/dist/utils/ReviewRunner.js +175 -0
- package/dist/utils/ReviewRunner.js.map +1 -0
- package/dist/utils/UpdateApplier.d.ts +42 -0
- package/dist/utils/UpdateApplier.d.ts.map +1 -0
- package/dist/utils/UpdateApplier.js +207 -0
- package/dist/utils/UpdateApplier.js.map +1 -0
- package/dist/utils/UpdateDetector.d.ts +56 -0
- package/dist/utils/UpdateDetector.d.ts.map +1 -0
- package/dist/utils/UpdateDetector.js +164 -0
- package/dist/utils/UpdateDetector.js.map +1 -0
- package/dist/utils/complexity-analyzer.d.ts +60 -0
- package/dist/utils/complexity-analyzer.d.ts.map +1 -0
- package/dist/utils/complexity-analyzer.js +292 -0
- package/dist/utils/complexity-analyzer.js.map +1 -0
- package/dist/utils/excalidraw-renderer.d.ts +79 -0
- package/dist/utils/excalidraw-renderer.d.ts.map +1 -0
- package/dist/utils/excalidraw-renderer.js +188 -0
- package/dist/utils/excalidraw-renderer.js.map +1 -0
- package/dist/utils/excalidraw-renderer.test.d.ts +2 -0
- package/dist/utils/excalidraw-renderer.test.d.ts.map +1 -0
- package/dist/utils/excalidraw-renderer.test.js +135 -0
- package/dist/utils/excalidraw-renderer.test.js.map +1 -0
- package/dist/utils/project-generator.d.ts.map +1 -1
- package/dist/utils/project-generator.js +21 -2
- package/dist/utils/project-generator.js.map +1 -1
- package/dist/utils/stack-bootstrap.js +3 -1
- package/dist/utils/stack-bootstrap.js.map +1 -1
- package/dist/utils/static-analyzer.d.ts +29 -0
- package/dist/utils/static-analyzer.d.ts.map +1 -0
- package/dist/utils/static-analyzer.js +390 -0
- package/dist/utils/static-analyzer.js.map +1 -0
- package/dist/utils/version-compare.d.ts +27 -0
- package/dist/utils/version-compare.d.ts.map +1 -0
- package/dist/utils/version-compare.js +47 -0
- package/dist/utils/version-compare.js.map +1 -0
- package/package.json +1 -1
- package/templates/DARE-dag-example.yaml +280 -0
- package/templates/UPDATE-MANIFEST.json +48 -0
- package/templates/ide/antigravity/.agents/skills/dare-blueprint/SKILL.md +180 -36
- package/templates/ide/antigravity/.agents/skills/dare-refine/SKILL.md +114 -0
- package/templates/ide/antigravity/.agents/skills/dare-review/SKILL.md +111 -0
- package/templates/ide/antigravity/.agents/skills/dare-tasks/SKILL.md +41 -0
- package/templates/ide/antigravity/templates/TASK-SPEC-template.md +45 -4
- package/templates/ide/claude/.claude/commands/dare-blueprint.md +56 -0
- package/templates/ide/claude/.claude/commands/dare-dag-build.md +41 -0
- package/templates/ide/claude/.claude/commands/dare-dag-viz.md +197 -0
- package/templates/ide/claude/.claude/commands/dare-refine.md +145 -0
- package/templates/ide/claude/.claude/commands/dare-review.md +113 -0
- package/templates/ide/claude/templates/TASK-SPEC-template.md +45 -4
- package/templates/ide/cursor/.cursor/commands/generate-blueprint.md +45 -0
- package/templates/ide/cursor/.cursor/commands/generate-tasks.md +42 -0
- package/templates/ide/cursor/.cursor/commands/refine-task.md +107 -0
- package/templates/ide/cursor/.cursor/commands/review-task.md +91 -0
- package/templates/ide/cursor/templates/TASK-SPEC-template.md +45 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/commands/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,kEAAkE,CAAC;KAC/E,QAAQ,CAAC,WAAW,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
|
4
|
+
* skills shipped by the installed CLI version.
|
|
5
|
+
*
|
|
6
|
+
* Crucially, this does NOT bump the CLI itself (use `npm update -g
|
|
7
|
+
* @dewtech/dare-cli` for that). It rewrites the project artifacts that DARE
|
|
8
|
+
* controls — `.cursor/`, `.claude/`, `.agents/`, `DARE/templates/`, etc — so
|
|
9
|
+
* a dev who started on v2.16 can pick up the v2.17 improvements without
|
|
10
|
+
* blowing away their DESIGN.md / BLUEPRINT.md / TASKS.md.
|
|
11
|
+
*/
|
|
12
|
+
export declare const updateCommand: Command;
|
|
13
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,SAwJvB,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import inquirer from 'inquirer';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { buildUpdatePlan, getCliVersion, loadManifest, readProjectConfig, resolveProjectVersion, } from '../utils/UpdateDetector.js';
|
|
6
|
+
import { applyPlan } from '../utils/UpdateApplier.js';
|
|
7
|
+
import { compareVersions } from '../utils/version-compare.js';
|
|
8
|
+
/**
|
|
9
|
+
* `dare update` — sync the *project on disk* with the templates / commands /
|
|
10
|
+
* skills shipped by the installed CLI version.
|
|
11
|
+
*
|
|
12
|
+
* Crucially, this does NOT bump the CLI itself (use `npm update -g
|
|
13
|
+
* @dewtech/dare-cli` for that). It rewrites the project artifacts that DARE
|
|
14
|
+
* controls — `.cursor/`, `.claude/`, `.agents/`, `DARE/templates/`, etc — so
|
|
15
|
+
* a dev who started on v2.16 can pick up the v2.17 improvements without
|
|
16
|
+
* blowing away their DESIGN.md / BLUEPRINT.md / TASKS.md.
|
|
17
|
+
*/
|
|
18
|
+
export const updateCommand = new Command('update')
|
|
19
|
+
.description("Atualiza o setup do projeto para a versão atual do DARE CLI")
|
|
20
|
+
.option('--dry-run', 'Mostra o que seria feito, sem escrever nada', false)
|
|
21
|
+
.option('-y, --yes', 'Não pergunta nada — aplica tudo e mantém customizações', false)
|
|
22
|
+
.option('--force', 'Sobrescreve até arquivos customizados (perigoso)', false)
|
|
23
|
+
.option('--target <version>', 'Atualiza para uma versão específica (default: CLI instalado)')
|
|
24
|
+
.action(async (options) => {
|
|
25
|
+
const cwd = process.cwd();
|
|
26
|
+
const cliVersion = getCliVersion();
|
|
27
|
+
const targetVersion = options.target ?? cliVersion;
|
|
28
|
+
console.log(chalk.blue.bold('\n🔄 DARE Update\n'));
|
|
29
|
+
// 1. Read project config -----------------------------------------------
|
|
30
|
+
let cfg;
|
|
31
|
+
try {
|
|
32
|
+
cfg = await readProjectConfig(cwd);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
console.error(chalk.red(`❌ ${err instanceof Error ? err.message : String(err)}`));
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
const { version: fromVersion, isLegacy } = resolveProjectVersion(cfg);
|
|
39
|
+
const ide = cfg.ide;
|
|
40
|
+
console.log(` Projeto : ${chalk.cyan(path.basename(cwd))}`);
|
|
41
|
+
console.log(` Versão atual : ${chalk.cyan(fromVersion)}${isLegacy ? chalk.gray(' (assumida — projeto pré-2.17 sem version DARE)') : ''}`);
|
|
42
|
+
console.log(` CLI instalado: ${chalk.cyan(cliVersion)}`);
|
|
43
|
+
console.log(` Alvo : ${chalk.cyan(targetVersion)}`);
|
|
44
|
+
console.log(` IDE : ${chalk.cyan(ide ?? 'desconhecido')}`);
|
|
45
|
+
// 2. Compare versions ---------------------------------------------------
|
|
46
|
+
const cmp = compareVersions(fromVersion, targetVersion);
|
|
47
|
+
if (cmp === 0) {
|
|
48
|
+
console.log(chalk.green('\n✅ Projeto já está na versão atual. Nada a fazer.\n'));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (cmp === 1) {
|
|
52
|
+
console.log(chalk.yellow(`\n⚠ Projeto está em versão mais nova que o CLI alvo (${fromVersion} > ${targetVersion}).`));
|
|
53
|
+
console.log(chalk.yellow(' Atualize o CLI primeiro: npm install -g @dewtech/dare-cli@latest\n'));
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
// 3. Build plan ---------------------------------------------------------
|
|
57
|
+
const manifest = await loadManifest();
|
|
58
|
+
const plan = buildUpdatePlan(manifest, fromVersion, targetVersion, ide);
|
|
59
|
+
if (plan.pendingReleases.length === 0) {
|
|
60
|
+
console.log(chalk.gray('\n Nenhuma release no manifest entre essas versões.'));
|
|
61
|
+
console.log(chalk.green(`✅ Marcando projeto como ${targetVersion}.\n`));
|
|
62
|
+
if (!options.dryRun) {
|
|
63
|
+
await applyPlan(plan, { projectRoot: cwd, force: true });
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// 4. Show changelog -----------------------------------------------------
|
|
68
|
+
console.log(chalk.bold('\n📋 Mudanças que serão aplicadas:\n'));
|
|
69
|
+
for (const { version, release } of plan.pendingReleases) {
|
|
70
|
+
console.log(chalk.cyan.bold(` v${version}`) + chalk.gray(` (${release.releasedAt})`));
|
|
71
|
+
console.log(` ${release.summary}`);
|
|
72
|
+
const changelogLines = release.changelog.split('\n');
|
|
73
|
+
for (const line of changelogLines) {
|
|
74
|
+
console.log(chalk.gray(` ${line}`));
|
|
75
|
+
}
|
|
76
|
+
const ideChanges = release.changes.filter((c) => plan.applicableChanges.includes(c));
|
|
77
|
+
if (ideChanges.length > 0) {
|
|
78
|
+
console.log(chalk.bold('\n Arquivos:'));
|
|
79
|
+
for (const change of ideChanges) {
|
|
80
|
+
console.log(` ${formatChange(change)}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (release.migrations && release.migrations.length > 0) {
|
|
84
|
+
console.log(chalk.bold('\n Migrações:'));
|
|
85
|
+
for (const mig of release.migrations) {
|
|
86
|
+
console.log(` • ${chalk.magenta(mig.id)} — ${chalk.gray(mig.description)}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
console.log();
|
|
90
|
+
}
|
|
91
|
+
console.log(chalk.gray(` ${plan.applicableChanges.length} arquivo(s) afetado(s) para IDE "${ide ?? '?'}".`));
|
|
92
|
+
if (options.dryRun) {
|
|
93
|
+
console.log(chalk.yellow('\n🧪 Dry-run — nenhuma escrita realizada.\n'));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// 5. Confirm ------------------------------------------------------------
|
|
97
|
+
if (!options.yes && !options.force) {
|
|
98
|
+
const { proceed } = (await inquirer.prompt([
|
|
99
|
+
{
|
|
100
|
+
type: 'confirm',
|
|
101
|
+
name: 'proceed',
|
|
102
|
+
message: `Aplicar atualização de ${fromVersion} → ${targetVersion}?`,
|
|
103
|
+
default: true,
|
|
104
|
+
},
|
|
105
|
+
]));
|
|
106
|
+
if (!proceed) {
|
|
107
|
+
console.log(chalk.gray('\nCancelado.\n'));
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// 6. Apply --------------------------------------------------------------
|
|
112
|
+
const result = await applyPlan(plan, {
|
|
113
|
+
projectRoot: cwd,
|
|
114
|
+
force: options.force,
|
|
115
|
+
conflictPolicy: options.yes ? 'keep' : options.force ? 'replace' : 'ask',
|
|
116
|
+
});
|
|
117
|
+
// 7. Summary ------------------------------------------------------------
|
|
118
|
+
const wrote = result.outcomes.filter((o) => o.action === 'wrote').length;
|
|
119
|
+
const deleted = result.outcomes.filter((o) => o.action === 'deleted').length;
|
|
120
|
+
const skipped = result.outcomes.filter((o) => o.action === 'skipped').length;
|
|
121
|
+
const kept = result.outcomes.filter((o) => o.action === 'kept-custom').length;
|
|
122
|
+
console.log(chalk.green.bold(`\n✅ Atualizado para ${targetVersion}\n`));
|
|
123
|
+
console.log(` ${chalk.green(wrote)} arquivo(s) escrito(s)`);
|
|
124
|
+
if (deleted > 0)
|
|
125
|
+
console.log(` ${chalk.red(deleted)} arquivo(s) removido(s)`);
|
|
126
|
+
if (kept > 0)
|
|
127
|
+
console.log(` ${chalk.yellow(kept)} customização(ões) preservada(s)`);
|
|
128
|
+
if (skipped > 0)
|
|
129
|
+
console.log(` ${chalk.gray(skipped)} já estavam atualizados`);
|
|
130
|
+
if (result.migrationsRan.length > 0) {
|
|
131
|
+
console.log(` ${chalk.magenta(result.migrationsRan.length)} migração(ões) executada(s)`);
|
|
132
|
+
}
|
|
133
|
+
if (result.backupPath && result.backupFilesCount > 0) {
|
|
134
|
+
console.log(chalk.gray(`\n 💾 Backup: ${result.backupFilesCount} arquivo(s) em ${path.relative(cwd, result.backupPath) || result.backupPath}`));
|
|
135
|
+
}
|
|
136
|
+
console.log();
|
|
137
|
+
});
|
|
138
|
+
function formatChange(change) {
|
|
139
|
+
const icon = change.type === 'added'
|
|
140
|
+
? chalk.green('+')
|
|
141
|
+
: change.type === 'removed'
|
|
142
|
+
? chalk.red('-')
|
|
143
|
+
: change.type === 'renamed'
|
|
144
|
+
? chalk.yellow('↻')
|
|
145
|
+
: chalk.cyan('~');
|
|
146
|
+
const renamedFrom = change.previousPath ? chalk.gray(` (was ${change.previousPath})`) : '';
|
|
147
|
+
return `${icon} ${change.path}${renamedFrom} ${chalk.gray('— ' + change.description)}`;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,eAAe,EACf,aAA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IAAI,GACR,MAAM,CAAC,IAAI,KAAK,OAAO;QACrB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;QAClB,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YACzB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAChB,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;gBACzB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;gBACnB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3F,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,IAAI,GAAG,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for `dare refine` — the planning-time and on-demand check that
|
|
3
|
+
* keeps individual tasks small enough for the agent to implement in a
|
|
4
|
+
* single conversation without hand-waving.
|
|
5
|
+
*
|
|
6
|
+
* Two ways to invoke it:
|
|
7
|
+
* 1. Implicit (during `/dare-tasks` skill): the IDE agent calls
|
|
8
|
+
* `dare refine <task-id>` for each just-generated task and uses the
|
|
9
|
+
* report to decide whether to split or keep.
|
|
10
|
+
* 2. Manual (`dare refine <id> [--split]`): the dev kicks it off when a
|
|
11
|
+
* task feels too heavy or after a scope change.
|
|
12
|
+
*
|
|
13
|
+
* The complexity heuristic is intentionally cheap and deterministic — it
|
|
14
|
+
* counts well-known signals from the task spec (files, functions, tests,
|
|
15
|
+
* deps, prompt keywords). The IDE agent layer can add semantic nuance with
|
|
16
|
+
* `--from-agent <verdict.json>`, mirroring the review pattern.
|
|
17
|
+
*/
|
|
18
|
+
/** Coarse complexity buckets. Stable strings for cross-process consumers. */
|
|
19
|
+
export type ComplexityLevel = 'LOW' | 'MED' | 'HIGH' | 'CRITICAL';
|
|
20
|
+
/** Individual contributor to the total score. Used for transparency. */
|
|
21
|
+
export interface ComplexitySignal {
|
|
22
|
+
/** Short, lowercase id. Examples: `files`, `functions`, `keywords`. */
|
|
23
|
+
kind: string;
|
|
24
|
+
/** Numeric weight added to the score. */
|
|
25
|
+
weight: number;
|
|
26
|
+
/** Human-readable explanation: "5 arquivos a criar/modificar". */
|
|
27
|
+
detail: string;
|
|
28
|
+
}
|
|
29
|
+
/** Output of running the heuristic against a single task. */
|
|
30
|
+
export interface ComplexityReport {
|
|
31
|
+
/** Task id under analysis. */
|
|
32
|
+
taskId: string;
|
|
33
|
+
/** Path to the spec file that was parsed (relative to project root). */
|
|
34
|
+
specPath: string | null;
|
|
35
|
+
/** Raw score — sum of all signal weights. */
|
|
36
|
+
score: number;
|
|
37
|
+
/** Bucket derived from `score`. */
|
|
38
|
+
level: ComplexityLevel;
|
|
39
|
+
/** Whether the heuristic recommends splitting this task. */
|
|
40
|
+
recommendsSplit: boolean;
|
|
41
|
+
/** Ordered list of signals that contributed to the score (largest first). */
|
|
42
|
+
signals: ComplexitySignal[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Proposed sub-task produced by `--split`. Not yet committed to `dare-dag.yaml`
|
|
46
|
+
* — the agent / dev confirms before writing.
|
|
47
|
+
*/
|
|
48
|
+
export interface ProposedSubtask {
|
|
49
|
+
/** Suggested kebab-case id (e.g. `task-034a`, `task-034b`). */
|
|
50
|
+
id: string;
|
|
51
|
+
/** Short title. */
|
|
52
|
+
title: string;
|
|
53
|
+
/** Files this sub-task should own (subset of the parent's files). */
|
|
54
|
+
files: string[];
|
|
55
|
+
/** Why this slice exists — surfaced to the dev for sanity-check. */
|
|
56
|
+
rationale: string;
|
|
57
|
+
/** Coarse complexity of the sub-task itself (best-effort). */
|
|
58
|
+
estimatedLevel: ComplexityLevel;
|
|
59
|
+
}
|
|
60
|
+
/** Result of `dare refine <id> --split` before any write happens. */
|
|
61
|
+
export interface SplitProposal {
|
|
62
|
+
/** Source task that's being split. */
|
|
63
|
+
originalTaskId: string;
|
|
64
|
+
/** Subtasks the dev / agent will replace it with. */
|
|
65
|
+
subtasks: ProposedSubtask[];
|
|
66
|
+
/** Free-form note from the analyzer about the split shape. */
|
|
67
|
+
notes: string;
|
|
68
|
+
}
|
|
69
|
+
/** CLI options for `dare refine`. */
|
|
70
|
+
export interface RefineOptions {
|
|
71
|
+
/** Project root, defaults to `process.cwd()`. */
|
|
72
|
+
projectRoot?: string;
|
|
73
|
+
/** When true, emit a split proposal alongside the complexity report. */
|
|
74
|
+
split?: boolean;
|
|
75
|
+
/** When true, write the split back into `dare-dag.yaml` after approval. */
|
|
76
|
+
apply?: boolean;
|
|
77
|
+
/** Output format. */
|
|
78
|
+
format?: 'human' | 'json';
|
|
79
|
+
/** Optional semantic verdict from the IDE agent (JSON path). */
|
|
80
|
+
fromAgent?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Optional semantic input the IDE agent can supply via `--from-agent`. The
|
|
84
|
+
* agent gets a richer view of the spec and may flag tasks the heuristic
|
|
85
|
+
* couldn't see (e.g. "this task needs a new service abstraction we don't
|
|
86
|
+
* have yet — that's a refactor task on its own").
|
|
87
|
+
*/
|
|
88
|
+
export interface RefineVerdict {
|
|
89
|
+
/** Whether the agent considers the task small enough to ship cleanly. */
|
|
90
|
+
manageable: boolean;
|
|
91
|
+
/** Reasons the agent thinks splitting would help. */
|
|
92
|
+
reasons: string[];
|
|
93
|
+
/** Optional pre-baked subtask proposals from the agent. */
|
|
94
|
+
proposedSubtasks?: ProposedSubtask[];
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=Refine.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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C,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qBAAqB;IACrB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for `dare refine` — the planning-time and on-demand check that
|
|
3
|
+
* keeps individual tasks small enough for the agent to implement in a
|
|
4
|
+
* single conversation without hand-waving.
|
|
5
|
+
*
|
|
6
|
+
* Two ways to invoke it:
|
|
7
|
+
* 1. Implicit (during `/dare-tasks` skill): the IDE agent calls
|
|
8
|
+
* `dare refine <task-id>` for each just-generated task and uses the
|
|
9
|
+
* report to decide whether to split or keep.
|
|
10
|
+
* 2. Manual (`dare refine <id> [--split]`): the dev kicks it off when a
|
|
11
|
+
* task feels too heavy or after a scope change.
|
|
12
|
+
*
|
|
13
|
+
* The complexity heuristic is intentionally cheap and deterministic — it
|
|
14
|
+
* counts well-known signals from the task spec (files, functions, tests,
|
|
15
|
+
* deps, prompt keywords). The IDE agent layer can add semantic nuance with
|
|
16
|
+
* `--from-agent <verdict.json>`, mirroring the review pattern.
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Refine.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Refine.types.js","sourceRoot":"","sources":["../../src/types/Refine.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for `dare review` — the post-execution sanity check that catches
|
|
3
|
+
* stubs, mocks, TODOs, empty functions and similar "fake completeness"
|
|
4
|
+
* patterns in the files a task touched.
|
|
5
|
+
*
|
|
6
|
+
* Two complementary layers:
|
|
7
|
+
* 1. Static analysis (deterministic, this module) — regex / AST-lite scanning
|
|
8
|
+
* of files modified by the task.
|
|
9
|
+
* 2. Semantic review (opt-in, agent-driven) — the IDE agent re-reads the
|
|
10
|
+
* spec and implementation and answers "does this satisfy the spec?".
|
|
11
|
+
* That layer lives in the IDE skills, not here; this types file only
|
|
12
|
+
* models its output so the command can merge both reports.
|
|
13
|
+
*/
|
|
14
|
+
/** Severity of a violation. `error` blocks DONE; `warning` is informational. */
|
|
15
|
+
export type ViolationSeverity = 'error' | 'warning';
|
|
16
|
+
/** Stable identifiers for each detector. Used in reports and ignore-lists. */
|
|
17
|
+
export type ViolationKind = 'todo-marker' | 'empty-function' | 'not-implemented-stub' | 'phantom-return' | 'production-mock' | 'placeholder-comment' | 'hardcoded-response';
|
|
18
|
+
/** A single finding in a file. */
|
|
19
|
+
export interface Violation {
|
|
20
|
+
kind: ViolationKind;
|
|
21
|
+
severity: ViolationSeverity;
|
|
22
|
+
/** Project-relative path. */
|
|
23
|
+
file: string;
|
|
24
|
+
/** 1-based line number where the offense was found. */
|
|
25
|
+
line: number;
|
|
26
|
+
/** Trimmed snippet of the offending line (max ~200 chars). */
|
|
27
|
+
snippet: string;
|
|
28
|
+
/** Short, actionable message for the dev. */
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
/** Aggregated outcome of analyzing one file. */
|
|
32
|
+
export interface FileReport {
|
|
33
|
+
/** Project-relative path. */
|
|
34
|
+
file: string;
|
|
35
|
+
/** True if the file matched a "test file" pattern (mocks are allowed). */
|
|
36
|
+
isTestFile: boolean;
|
|
37
|
+
violations: Violation[];
|
|
38
|
+
}
|
|
39
|
+
/** Final report of a `dare review` invocation. */
|
|
40
|
+
export interface ReviewReport {
|
|
41
|
+
/** Task id under review. */
|
|
42
|
+
taskId: string;
|
|
43
|
+
/** Files the task is supposed to have touched (from the spec or git). */
|
|
44
|
+
filesScanned: string[];
|
|
45
|
+
/** Per-file findings, including clean files (empty `violations`). */
|
|
46
|
+
reports: FileReport[];
|
|
47
|
+
/** True when there is at least one `error`-severity violation. */
|
|
48
|
+
failed: boolean;
|
|
49
|
+
/** Quick counts for the summary line. */
|
|
50
|
+
totals: {
|
|
51
|
+
errors: number;
|
|
52
|
+
warnings: number;
|
|
53
|
+
filesWithFindings: number;
|
|
54
|
+
};
|
|
55
|
+
/** Optional semantic verdict from the IDE agent (merged if present). */
|
|
56
|
+
semantic?: SemanticVerdict;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Verdict produced by the IDE agent in the semantic review layer. The CLI
|
|
60
|
+
* accepts this via `dare review <id> --from-agent <path-to-json>` or via
|
|
61
|
+
* stdin, and merges it into the final report.
|
|
62
|
+
*/
|
|
63
|
+
export interface SemanticVerdict {
|
|
64
|
+
/** Whether the agent considers the implementation faithful to the spec. */
|
|
65
|
+
passed: boolean;
|
|
66
|
+
/** Spec criteria the agent could not match against implementation. */
|
|
67
|
+
unmetCriteria: string[];
|
|
68
|
+
/** Free-form notes the agent wants to surface. */
|
|
69
|
+
notes?: string;
|
|
70
|
+
}
|
|
71
|
+
/** Options passed to `runReview`. */
|
|
72
|
+
export interface ReviewOptions {
|
|
73
|
+
/** Project root, defaults to `process.cwd()`. */
|
|
74
|
+
projectRoot?: string;
|
|
75
|
+
/** Optional explicit file list (overrides spec/git detection). */
|
|
76
|
+
files?: string[];
|
|
77
|
+
/** Suppress warnings, only print errors. */
|
|
78
|
+
errorsOnly?: boolean;
|
|
79
|
+
/** Treat warnings as errors. */
|
|
80
|
+
strict?: boolean;
|
|
81
|
+
/** Path to JSON file with a `SemanticVerdict` from the IDE agent. */
|
|
82
|
+
fromAgent?: string;
|
|
83
|
+
/** Output format. `json` produces a machine-readable report for hooks. */
|
|
84
|
+
format?: 'human' | 'json';
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=Review.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Review.types.d.ts","sourceRoot":"","sources":["../../src/types/Review.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB,kCAAkC;AAClC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,gDAAgD;AAChD,MAAM,WAAW,UAAU;IACzB,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qEAAqE;IACrE,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,wEAAwE;IACxE,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,MAAM,EAAE,OAAO,CAAC;IAChB,sEAAsE;IACtE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for `dare review` — the post-execution sanity check that catches
|
|
3
|
+
* stubs, mocks, TODOs, empty functions and similar "fake completeness"
|
|
4
|
+
* patterns in the files a task touched.
|
|
5
|
+
*
|
|
6
|
+
* Two complementary layers:
|
|
7
|
+
* 1. Static analysis (deterministic, this module) — regex / AST-lite scanning
|
|
8
|
+
* of files modified by the task.
|
|
9
|
+
* 2. Semantic review (opt-in, agent-driven) — the IDE agent re-reads the
|
|
10
|
+
* spec and implementation and answers "does this satisfy the spec?".
|
|
11
|
+
* That layer lives in the IDE skills, not here; this types file only
|
|
12
|
+
* models its output so the command can merge both reports.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=Review.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Review.types.js","sourceRoot":"","sources":["../../src/types/Review.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the DARE Update Manifest system.
|
|
3
|
+
*
|
|
4
|
+
* The manifest lives in `templates/UPDATE-MANIFEST.json` and describes — for
|
|
5
|
+
* every CLI version released — which template files changed, were added or
|
|
6
|
+
* removed, plus optional migrations the `dare update` command must run.
|
|
7
|
+
*
|
|
8
|
+
* `dare update` reads the project's `dareVersion` from `dare.config.json`,
|
|
9
|
+
* compares it with the installed CLI version, and applies every intermediate
|
|
10
|
+
* version's entries in order.
|
|
11
|
+
*/
|
|
12
|
+
/** IDE targets a change applies to. `'*'` means every IDE / all setups. */
|
|
13
|
+
export type IdeTarget = '*' | 'cursor' | 'claude-code' | 'antigravity' | 'hybrid' | 'claude-hybrid';
|
|
14
|
+
/** Kind of file-level change. */
|
|
15
|
+
export type ChangeKind = 'added' | 'modified' | 'removed' | 'renamed';
|
|
16
|
+
/** A single file-level change shipped in a release. */
|
|
17
|
+
export interface ManifestChange {
|
|
18
|
+
/** What happened to the file. */
|
|
19
|
+
type: ChangeKind;
|
|
20
|
+
/**
|
|
21
|
+
* Project-relative path that will be touched on the dev's machine
|
|
22
|
+
* (e.g. `.cursor/commands/generate-design.md`).
|
|
23
|
+
*/
|
|
24
|
+
path: string;
|
|
25
|
+
/**
|
|
26
|
+
* For `renamed` changes: the path the file used to live at, so we can
|
|
27
|
+
* delete the old file before laying down the new one.
|
|
28
|
+
*/
|
|
29
|
+
previousPath?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Source path inside the CLI's `templates/` directory. When omitted, the
|
|
32
|
+
* applier assumes the source mirrors `path` under `templates/`.
|
|
33
|
+
*/
|
|
34
|
+
templateSource?: string;
|
|
35
|
+
/** Short, human-readable description shown to the dev. */
|
|
36
|
+
description: string;
|
|
37
|
+
/** Which IDE setups this change applies to. Defaults to `['*']`. */
|
|
38
|
+
appliesTo?: IdeTarget[];
|
|
39
|
+
/**
|
|
40
|
+
* Hash (SHA-256) of the **previous** template content. Used to detect
|
|
41
|
+
* customizations: if the file in the project doesn't match this hash, we
|
|
42
|
+
* treat it as customized and prompt the dev.
|
|
43
|
+
*/
|
|
44
|
+
previousHash?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Optional migration step (code transformation, not a file copy). */
|
|
47
|
+
export interface ManifestMigration {
|
|
48
|
+
/** Stable id, e.g. `rename-dare-meta-to-config`. */
|
|
49
|
+
id: string;
|
|
50
|
+
/** What the migration does — shown to the dev. */
|
|
51
|
+
description: string;
|
|
52
|
+
/** Whether the dev can skip this safely. Defaults to `false`. */
|
|
53
|
+
optional?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Everything that ships in a single CLI release. */
|
|
56
|
+
export interface ManifestRelease {
|
|
57
|
+
/** ISO-8601 release date. */
|
|
58
|
+
releasedAt: string;
|
|
59
|
+
/** One-line summary suitable for a changelog header. */
|
|
60
|
+
summary: string;
|
|
61
|
+
/** Longer explanation shown when the dev runs `dare update`. */
|
|
62
|
+
changelog: string;
|
|
63
|
+
/** File-level changes. */
|
|
64
|
+
changes: ManifestChange[];
|
|
65
|
+
/** Optional migrations (executed after file changes). */
|
|
66
|
+
migrations?: ManifestMigration[];
|
|
67
|
+
}
|
|
68
|
+
/** Top-level shape of `templates/UPDATE-MANIFEST.json`. */
|
|
69
|
+
export interface UpdateManifest {
|
|
70
|
+
/** Schema version of the manifest itself. Bump on breaking changes. */
|
|
71
|
+
schemaVersion: 1;
|
|
72
|
+
/** Keyed by semver version string, e.g. `"2.17.0"`. */
|
|
73
|
+
releases: Record<string, ManifestRelease>;
|
|
74
|
+
}
|
|
75
|
+
/** Result of comparing project state with a target CLI version. */
|
|
76
|
+
export interface UpdatePlan {
|
|
77
|
+
/** Version recorded in the project's `dare.config.json` (or `'legacy'`). */
|
|
78
|
+
fromVersion: string;
|
|
79
|
+
/** Version of the CLI currently installed. */
|
|
80
|
+
toVersion: string;
|
|
81
|
+
/** Ordered list of releases that need to be applied. */
|
|
82
|
+
pendingReleases: Array<{
|
|
83
|
+
version: string;
|
|
84
|
+
release: ManifestRelease;
|
|
85
|
+
}>;
|
|
86
|
+
/** Total file changes across all pending releases (post-filter). */
|
|
87
|
+
applicableChanges: ManifestChange[];
|
|
88
|
+
}
|
|
89
|
+
/** How a file change resolves on the dev's disk. */
|
|
90
|
+
export type ConflictResolution = 'apply' | 'customized' | 'missing' | 'identical';
|
|
91
|
+
//# sourceMappingURL=UpdateManifest.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateManifest.types.d.ts","sourceRoot":"","sources":["../../src/types/UpdateManifest.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GACjB,GAAG,GACH,QAAQ,GACR,aAAa,GACb,aAAa,GACb,QAAQ,GACR,eAAe,CAAC;AAEpB,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtE,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,IAAI,EAAE,UAAU,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IAEpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,yDAAyD;IACzD,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAClC;AAED,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,aAAa,EAAE,CAAC,CAAC;IACjB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC3C;AAED,mEAAmE;AACnE,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,eAAe,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;IACtE,oEAAoE;IACpE,iBAAiB,EAAE,cAAc,EAAE,CAAC;CACrC;AAED,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,YAAY,GACZ,SAAS,GACT,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the DARE Update Manifest system.
|
|
3
|
+
*
|
|
4
|
+
* The manifest lives in `templates/UPDATE-MANIFEST.json` and describes — for
|
|
5
|
+
* every CLI version released — which template files changed, were added or
|
|
6
|
+
* removed, plus optional migrations the `dare update` command must run.
|
|
7
|
+
*
|
|
8
|
+
* `dare update` reads the project's `dareVersion` from `dare.config.json`,
|
|
9
|
+
* compares it with the installed CLI version, and applies every intermediate
|
|
10
|
+
* version's entries in order.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=UpdateManifest.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateManifest.types.js","sourceRoot":"","sources":["../../src/types/UpdateManifest.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrates `dare review`:
|
|
3
|
+
* 1. Resolve the task spec from `DARE/EXECUTION/task-<id>.md` (or other
|
|
4
|
+
* common locations).
|
|
5
|
+
* 2. Discover which files the task touched — by parsing the spec's
|
|
6
|
+
* "ARQUIVOS A CRIAR / MODIFICAR" table, falling back to `git diff`
|
|
7
|
+
* against the merge base when the spec doesn't list files.
|
|
8
|
+
* 3. Run the static analyzer over those files.
|
|
9
|
+
* 4. Optionally merge a `SemanticVerdict` provided by the IDE agent
|
|
10
|
+
* (via `--from-agent <path>`).
|
|
11
|
+
*
|
|
12
|
+
* Pure data manipulation — file I/O happens through `fs-extra` and `child_process`.
|
|
13
|
+
* The CLI command (`commands/review.ts`) wraps this with chalk output.
|
|
14
|
+
*/
|
|
15
|
+
import type { ReviewOptions, ReviewReport } from '../types/Review.types.js';
|
|
16
|
+
export declare function findSpecFile(projectRoot: string, taskId: string): Promise<string | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Parse the "ARQUIVOS A CRIAR / MODIFICAR" markdown table from a spec.
|
|
19
|
+
*
|
|
20
|
+
* Expected shape (from `TASK-SPEC-template.md`):
|
|
21
|
+
*
|
|
22
|
+
* | Ação | Caminho | Descrição |
|
|
23
|
+
* |------|---------|-----------|
|
|
24
|
+
* | CRIAR | `src/foo.ts` | ... |
|
|
25
|
+
* | MODIFICAR | `src/bar.ts` | ... |
|
|
26
|
+
*
|
|
27
|
+
* We grab anything in backticks within rows where the first column is
|
|
28
|
+
* CRIAR/MODIFICAR/CREATE/MODIFY/UPDATE. Returns project-relative paths.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseFilesFromSpec(specMarkdown: string): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Fallback: ask git which files diverge from the merge base with the default
|
|
33
|
+
* branch. Returns project-relative paths; on any git error, returns `[]`
|
|
34
|
+
* silently — the caller is expected to surface a friendlier message.
|
|
35
|
+
*/
|
|
36
|
+
export declare function discoverFilesFromGit(projectRoot: string): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Main entry point. Resolves files, runs the analyzer, merges semantic input
|
|
39
|
+
* if any, and returns a fully populated `ReviewReport`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function runReview(taskId: string, options?: ReviewOptions): Promise<ReviewReport>;
|
|
42
|
+
//# sourceMappingURL=ReviewRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewRunner.d.ts","sourceRoot":"","sources":["../../src/utils/ReviewRunner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EAEb,MAAM,0BAA0B,CAAC;AAalC,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAyBlE;AA6BD;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAwDvB"}
|