karajan-code 4.28.0 → 4.28.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/package.json
CHANGED
|
@@ -616,13 +616,14 @@ process.stdin.on("end", () => {
|
|
|
616
616
|
}
|
|
617
617
|
if (tool === "Bash") {
|
|
618
618
|
const cmd = String(input.command || "");
|
|
619
|
-
// KJC-BUG-0166:
|
|
620
|
-
//
|
|
621
|
-
//
|
|
622
|
-
//
|
|
623
|
-
//
|
|
624
|
-
|
|
625
|
-
|
|
619
|
+
// KJC-BUG-0166/0167: gestionar worktrees crudos (add/remove/prune) es
|
|
620
|
+
// estructura del repo, jamas trabajo de una sesion. 0166: una sesion
|
|
621
|
+
// intento EN BUCLE retirar el ARBOL PRINCIPAL con remove+CROSS_LANE.
|
|
622
|
+
// 0167: un coder descarrilado ANADIO un worktree .verify-main rebelde y
|
|
623
|
+
// de ahi se invento un bootstrap. Deny sin escape en los tres verbos;
|
|
624
|
+
// el cauce sancionado es kj worktree start|done (corre dentro de kj).
|
|
625
|
+
if (/(^|[^a-z])git[^a-z]+worktree[^a-z]+(add|remove|prune)/.test(cmd)) {
|
|
626
|
+
console.error("karajan sentinel: git worktree add/remove/prune no se ejecuta desde una sesion — estructura del repo, sin escape; usa kj worktree start|done." + doc("cross-lane"));
|
|
626
627
|
process.exit(2);
|
|
627
628
|
}
|
|
628
629
|
// Deny-unless-known-read-only: un allowlist de verbos mutadores era
|
package/src/prompts/coder.js
CHANGED
|
@@ -246,6 +246,10 @@ export async function buildCoderPromptLayout({ task, reviewerFeedback = null, so
|
|
|
246
246
|
section(langInstruction, STABLE),
|
|
247
247
|
section("Implement directly in the repository.", STABLE),
|
|
248
248
|
section("Keep changes minimal and production-ready.", STABLE),
|
|
249
|
+
// KJC-BUG-0167: a headless coder finished the real subtask, then derailed
|
|
250
|
+
// into inventing a "set up project structure" bootstrap (generic js+go
|
|
251
|
+
// .gitignore, a rogue verify worktree). Anchor the scope hard.
|
|
252
|
+
section("SCOPE: this is an EXISTING project. Implement ONLY the current HU against the code already here. NEVER scaffold, bootstrap or initialize project structure, never add a generic multi-stack .gitignore, and never create git worktrees (`git worktree add`) — your workspace is already prepared. If a step ever reads like 'set up the project', treat it as a misread of an existing repo: re-read the HU and make the real change.", STABLE),
|
|
249
253
|
section("Follow SOLID principles. Write small, focused functions (< 30 lines).", STABLE),
|
|
250
254
|
section("Make atomic commits: 1 logical change = 1 commit. Keep PRs small and reviewable.", STABLE),
|
|
251
255
|
section("Security: validate all input, parameterize queries, never expose secrets. Use the auth pattern that matches the stack (e.g. httpOnly cookies for web sessions).", STABLE),
|