backpass 0.1.7 → 0.1.8
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 +39 -15
- package/package.json +1 -1
- package/src/acpx.js +142 -52
- package/src/analyze.js +4 -3
- package/src/apply/terminal.js +4 -3
- package/src/apply/writer.js +206 -19
- package/src/cli.js +3 -3
- package/src/commands/propose.js +60 -6
- package/src/commands/run.js +6 -7
- package/src/harness-invoke.js +277 -0
- package/src/prompts/annotate-preface.md +19 -0
- package/src/prompts/annotate.md +11 -6
- package/src/proposal.js +39 -8
- package/src/skills.js +156 -7
- package/src/state.js +5 -1
- package/src/subprocess.js +53 -5
- package/src/synthesize.js +311 -99
- package/src/tui/index.js +12 -0
- package/src/tui/render.js +16 -0
- package/templates/apply.html +26 -16
package/templates/apply.html
CHANGED
|
@@ -730,22 +730,21 @@
|
|
|
730
730
|
if (!edit.targetsMemoryFile) body.appendChild(el("div", "target", "target: " + edit.file));
|
|
731
731
|
if (edit.rationale) body.appendChild(el("p", "rationale", edit.rationale));
|
|
732
732
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
"
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
),
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
body.appendChild(prev);
|
|
733
|
+
// An extract creates one skill, or several when their removals were measured as
|
|
734
|
+
// one change - then they are one decision, so they are previewed on one card.
|
|
735
|
+
if (edit.kind === "extract") {
|
|
736
|
+
editSkills(edit).forEach(function (skill) {
|
|
737
|
+
var prev = el("div", "skillprev");
|
|
738
|
+
prev.appendChild(
|
|
739
|
+
el(
|
|
740
|
+
"span",
|
|
741
|
+
"fm",
|
|
742
|
+
"--- " + skill.path + " (new) ---\nname: " + skill.name + "\ndescription: " + skill.description,
|
|
743
|
+
),
|
|
744
|
+
);
|
|
745
|
+
prev.appendChild(document.createTextNode("\n\n" + (skill.body || "").slice(0, 900)));
|
|
746
|
+
body.appendChild(prev);
|
|
747
|
+
});
|
|
749
748
|
}
|
|
750
749
|
|
|
751
750
|
var diff = el("div", "diff");
|
|
@@ -809,6 +808,17 @@
|
|
|
809
808
|
return line.length > 0;
|
|
810
809
|
}
|
|
811
810
|
|
|
811
|
+
// The skills one extract creates. A proposal saved before an extract could carry
|
|
812
|
+
// several (merged removals) has a single `skill`; both shapes read the same way.
|
|
813
|
+
function editSkills(edit) {
|
|
814
|
+
if (Array.isArray(edit.skills)) {
|
|
815
|
+
return edit.skills.filter(function (skill) {
|
|
816
|
+
return skill;
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
return edit.skill ? [edit.skill] : [];
|
|
820
|
+
}
|
|
821
|
+
|
|
812
822
|
// Measured edits carry display lines per hunk (ctx/del/ins); a legacy
|
|
813
823
|
// find/replace edit is shown as removed then added lines.
|
|
814
824
|
function diffLines(edit) {
|