@tarcisiopgs/lisa 1.34.0 → 1.35.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/dist/{chunk-S2PRXET6.js → chunk-6SNT7TND.js} +1 -1
- package/dist/{chunk-2DONWCCQ.js → chunk-6VIN5PMW.js} +33 -19
- package/dist/{chunk-5FODVMWF.js → chunk-BWND35E5.js} +1 -1
- package/dist/index.js +5 -5
- package/dist/{loop-D4AKZUXG.js → loop-N5D27JQX.js} +2 -2
- package/dist/{tui-bridge-6C4IRKUQ.js → tui-bridge-LQDYRWHY.js} +2 -2
- package/package.json +1 -1
|
@@ -1195,6 +1195,7 @@ function buildPrompt(opts) {
|
|
|
1195
1195
|
const depBlock = issue.dependency ? buildDependencyContext(issue.dependency) : "";
|
|
1196
1196
|
const specWarningBlock = buildSpecWarningBlock(issue.specWarning);
|
|
1197
1197
|
const contextMdBlock = buildContextMdBlock(repoContextMd ?? null);
|
|
1198
|
+
const dodBlock = buildDefinitionOfDone(issue.description ?? "");
|
|
1198
1199
|
const relevantFilesBlock = relevantFiles ?? "";
|
|
1199
1200
|
const prBase = issue.dependency ? issue.dependency.branch : baseBranch;
|
|
1200
1201
|
const prCreateBlock = buildPrCreateInstruction(platform2, prBase);
|
|
@@ -1267,10 +1268,7 @@ ${repoEntries}
|
|
|
1267
1268
|
- Verify each acceptance criteria (if present)
|
|
1268
1269
|
- Respect any stack or technical constraints (if present)
|
|
1269
1270
|
${testBlock}${hookBlock}
|
|
1270
|
-
4.
|
|
1271
|
-
- Check \`package.json\` (or equivalent) for lint, typecheck, check, or test scripts.
|
|
1272
|
-
- Run whichever validation scripts exist (e.g., \`npm run lint\`, \`npm run typecheck\`).
|
|
1273
|
-
- Fix any errors before proceeding.
|
|
1271
|
+
4. ${buildValidateStep(testRunner ?? null, pm)}
|
|
1274
1272
|
${readmeBlock}
|
|
1275
1273
|
**CRITICAL \u2014 Do NOT stop here. The following steps (commit, push, PR, manifest) are MANDATORY. Skipping them means the task has FAILED.**
|
|
1276
1274
|
|
|
@@ -1306,10 +1304,7 @@ ${readmeBlock}
|
|
|
1306
1304
|
- Follow the implementation instructions exactly
|
|
1307
1305
|
- Verify each acceptance criteria relevant to your scope
|
|
1308
1306
|
${testBlock}${hookBlock}
|
|
1309
|
-
2.
|
|
1310
|
-
- Check \`package.json\` (or equivalent) for lint, typecheck, check, or test scripts.
|
|
1311
|
-
- Run whichever validation scripts exist (e.g., \`npm run lint\`, \`npm run typecheck\`).
|
|
1312
|
-
- Fix any errors before proceeding.
|
|
1307
|
+
2. ${buildValidateStep(testRunner ?? null, pm)}
|
|
1313
1308
|
${readmeBlock}
|
|
1314
1309
|
**CRITICAL \u2014 Do NOT stop here. The following steps (commit, push, PR, manifest) are MANDATORY. Skipping them means the task has FAILED.**
|
|
1315
1310
|
|
|
@@ -1342,10 +1337,7 @@ ${trackerStep}
|
|
|
1342
1337
|
- Verify each acceptance criteria (if present)
|
|
1343
1338
|
- Respect any stack or technical constraints (if present)
|
|
1344
1339
|
${testBlock}${hookBlock}
|
|
1345
|
-
2.
|
|
1346
|
-
- Check \`package.json\` (or equivalent) for lint, typecheck, check, or test scripts.
|
|
1347
|
-
- Run whichever validation scripts exist (e.g., \`npm run lint\`, \`npm run typecheck\`).
|
|
1348
|
-
- Fix any errors before proceeding.
|
|
1340
|
+
2. ${buildValidateStep(testRunner ?? null, pm)}
|
|
1349
1341
|
${readmeBlock}
|
|
1350
1342
|
**CRITICAL \u2014 Do NOT stop here. The following steps (commit, push, PR, manifest) are MANDATORY. Skipping them means the task has FAILED.**
|
|
1351
1343
|
|
|
@@ -1405,7 +1397,7 @@ ${lineageSection}
|
|
|
1405
1397
|
### Description
|
|
1406
1398
|
|
|
1407
1399
|
${issue.description}
|
|
1408
|
-
${specWarningBlock}${scopeSection}${GUARDRAILS_PLACEHOLDER}
|
|
1400
|
+
${specWarningBlock}${dodBlock}${scopeSection}${GUARDRAILS_PLACEHOLDER}
|
|
1409
1401
|
${instructions}
|
|
1410
1402
|
|
|
1411
1403
|
${rulesSection}
|
|
@@ -1490,12 +1482,26 @@ function buildTestInstructions(testRunner, pm = "npm") {
|
|
|
1490
1482
|
if (!testRunner) return "";
|
|
1491
1483
|
const testCmd = pm === "bun" ? "bun run test" : `${pm} run test`;
|
|
1492
1484
|
return `
|
|
1493
|
-
**MANDATORY \u2014
|
|
1494
|
-
This project uses **${testRunner}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1485
|
+
**MANDATORY \u2014 Test-Driven Development (TDD):**
|
|
1486
|
+
This project uses **${testRunner}**. Follow the RED \u2192 GREEN \u2192 REFACTOR cycle strictly:
|
|
1487
|
+
1. **RED**: Write the failing tests first \u2014 before writing any implementation code.
|
|
1488
|
+
Run \`${testCmd}\` and confirm the new tests fail. If they pass immediately, the tests are wrong.
|
|
1489
|
+
2. **GREEN**: Write the minimum implementation to make the tests pass.
|
|
1490
|
+
Run \`${testCmd}\` \u2014 all tests must pass before continuing.
|
|
1491
|
+
3. **REFACTOR**: Clean up the code without breaking tests. Run \`${testCmd}\` one final time to confirm.
|
|
1492
|
+
- Cover the main functionality, edge cases, and error scenarios.
|
|
1493
|
+
- Do NOT write implementation before tests. The PR will be blocked if tests are missing or written after the fact.
|
|
1494
|
+
`;
|
|
1495
|
+
}
|
|
1496
|
+
function buildDefinitionOfDone(description) {
|
|
1497
|
+
const criteria = description.split("\n").map((l) => l.trim()).filter((l) => /^- \[ \]/.test(l));
|
|
1498
|
+
if (criteria.length === 0) return "";
|
|
1499
|
+
return `
|
|
1500
|
+
## Definition of Done
|
|
1501
|
+
|
|
1502
|
+
Verify each item before finishing:
|
|
1503
|
+
|
|
1504
|
+
${criteria.join("\n")}
|
|
1499
1505
|
`;
|
|
1500
1506
|
}
|
|
1501
1507
|
function buildSpecWarningBlock(warning) {
|
|
@@ -1531,6 +1537,14 @@ function buildEnvironmentDependencyRule(env) {
|
|
|
1531
1537
|
}
|
|
1532
1538
|
return "";
|
|
1533
1539
|
}
|
|
1540
|
+
function buildValidateStep(testRunner, pm = "npm") {
|
|
1541
|
+
const testCmd = pm === "bun" ? "bun run test" : `${pm} run test`;
|
|
1542
|
+
const testLine = testRunner ? ` - Run \`${testCmd}\` \u2014 ALL tests must pass (final gate after the TDD cycle).
|
|
1543
|
+
` : "";
|
|
1544
|
+
return `**Validate**: Confirm all quality gates before committing:
|
|
1545
|
+
${testLine} - Run lint/typecheck scripts if available (e.g., \`npm run lint\`, \`npm run typecheck\`).
|
|
1546
|
+
- Fix every error. Do NOT commit with failing tests or lint errors.`;
|
|
1547
|
+
}
|
|
1534
1548
|
function buildPreCommitHookInstructions() {
|
|
1535
1549
|
return `
|
|
1536
1550
|
**Pre-commit hooks:**
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
parseStructuredOutput,
|
|
8
8
|
runPlanWizard,
|
|
9
9
|
savePlan
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6SNT7TND.js";
|
|
11
11
|
import {
|
|
12
12
|
detectDefaultBranch,
|
|
13
13
|
detectGitRepos,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
runLoop,
|
|
38
38
|
saveConfig,
|
|
39
39
|
validateConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-BWND35E5.js";
|
|
41
41
|
import {
|
|
42
42
|
buildContextMdBlock,
|
|
43
43
|
createProvider,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
readContext,
|
|
50
50
|
resolveModels,
|
|
51
51
|
runWithFallback
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6VIN5PMW.js";
|
|
53
53
|
import {
|
|
54
54
|
banner,
|
|
55
55
|
error,
|
|
@@ -1555,7 +1555,7 @@ async function reviewAndCreate(plan2, planPath, opts) {
|
|
|
1555
1555
|
log("Run `lisa run` when ready.");
|
|
1556
1556
|
return;
|
|
1557
1557
|
}
|
|
1558
|
-
const { runLoop: runLoop2 } = await import("./loop-
|
|
1558
|
+
const { runLoop: runLoop2 } = await import("./loop-N5D27JQX.js");
|
|
1559
1559
|
await runLoop2(config2, {
|
|
1560
1560
|
once: false,
|
|
1561
1561
|
watch: false,
|
|
@@ -2023,7 +2023,7 @@ Add them to your ${shell} and run: source ${shell}`));
|
|
|
2023
2023
|
const initialCards = persistence.load();
|
|
2024
2024
|
persistedCards = initialCards;
|
|
2025
2025
|
persistence.start();
|
|
2026
|
-
const { registerPlanBridge } = await import("./tui-bridge-
|
|
2026
|
+
const { registerPlanBridge } = await import("./tui-bridge-LQDYRWHY.js");
|
|
2027
2027
|
const cleanupPlan = registerPlanBridge(merged);
|
|
2028
2028
|
onBeforeExit = () => {
|
|
2029
2029
|
persistence.stop();
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
checkoutBaseBranches,
|
|
4
4
|
runDemoLoop,
|
|
5
5
|
runLoop
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BWND35E5.js";
|
|
7
7
|
import {
|
|
8
8
|
WATCH_POLL_INTERVAL_MS
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6VIN5PMW.js";
|
|
10
10
|
import "./chunk-V44FTYWZ.js";
|
|
11
11
|
import "./chunk-3EOEDL3T.js";
|
|
12
12
|
import "./chunk-7OCDGYDM.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
markdownToIssue,
|
|
7
7
|
parseStructuredOutput,
|
|
8
8
|
savePlan
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6SNT7TND.js";
|
|
10
10
|
import {
|
|
11
11
|
createSource,
|
|
12
12
|
resolveModels,
|
|
13
13
|
runWithFallback
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6VIN5PMW.js";
|
|
15
15
|
import {
|
|
16
16
|
error,
|
|
17
17
|
kanbanEmitter,
|