@useshifu/coding-harness 0.3.36 → 0.3.37
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 +43 -42
- package/bin/continuity-preparation.js +4 -2
- package/bin/continuity-state.js +101 -9
- package/bin/cursor-sessions.js +2 -1
- package/bin/native-preparation.js +104 -22
- package/bin/onboarding-ui.js +6 -4
- package/bin/onboarding.js +44 -17
- package/bin/recovery-state.js +132 -0
- package/bin/run-deadline.js +11 -0
- package/bin/secret-check.js +32 -0
- package/bin/setup-options.js +3 -4
- package/bin/shifu-harness.js +862 -149
- package/bin/sync-controls.js +97 -0
- package/bin/v5-payload.js +2 -0
- package/commands/shifu-sync.md +9 -7
- package/package.json +1 -1
- package/skills/shifu-context/SKILL.md +3 -3
- package/skills/shifu-onboarding/SKILL.md +7 -3
- package/skills/shifu-sync/SKILL.md +17 -32
- package/wizard/index.html +45 -52
- package/wizard/wizard.css +8 -3
- package/wizard/wizard.js +223 -45
package/bin/setup-options.js
CHANGED
|
@@ -7,16 +7,16 @@ function toggle(value, name) {
|
|
|
7
7
|
return value === "on";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
async function chooseSetupOptions(config, { option = () => undefined, ask } = {}) {
|
|
10
|
+
async function chooseSetupOptions(config, { option = () => undefined, ask, includeHistory = true } = {}) {
|
|
11
11
|
const preferences = normalizeContextPreferences(config?.contextPreferences);
|
|
12
12
|
const growth = toggle(option("--growth-feedback"), "growth feedback");
|
|
13
13
|
const alignment = toggle(option("--decision-alignment"), "decision alignment");
|
|
14
14
|
const days = option("--backfill-days");
|
|
15
|
-
let initialBackfill = days === undefined ? config?.initialBackfill : createInitialBackfill(days);
|
|
15
|
+
let initialBackfill = !includeHistory || days === undefined ? config?.initialBackfill : createInitialBackfill(days);
|
|
16
16
|
if (growth !== undefined) preferences.growthFeedback = growth;
|
|
17
17
|
if (alignment !== undefined) preferences.decisionAlignment = alignment;
|
|
18
18
|
if (ask) {
|
|
19
|
-
if (initialBackfill === undefined) {
|
|
19
|
+
if (includeHistory && initialBackfill === undefined) {
|
|
20
20
|
const answer = (await ask("Initial history: [1] Last 15 days (recommended), [2] Last 30 days, [3] Custom days, [4] Start from now. Choose [1]: ")).trim();
|
|
21
21
|
if (!["", "1", "2", "3", "4"].includes(answer)) throw new Error("Choose history option 1, 2, 3 or 4. Nothing was changed.");
|
|
22
22
|
const selectedDays = answer === "3" ? (await ask("How many days? ")).trim() : answer === "2" ? 30 : answer === "4" ? 0 : 15;
|
|
@@ -32,7 +32,6 @@ async function chooseSetupOptions(config, { option = () => undefined, ask } = {}
|
|
|
32
32
|
preferences[key] = !["off", "no", "n"].includes(answer);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
if (!config && initialBackfill === undefined) initialBackfill = createInitialBackfill(15);
|
|
36
35
|
return { contextPreferences: preferences, ...(initialBackfill === undefined ? {} : { initialBackfill }) };
|
|
37
36
|
}
|
|
38
37
|
|