@brainervirus/workit-core 0.11.0 → 1.0.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 +5 -3
- package/package.json +8 -3
- package/scripts/analyze-release-scope.ts +4 -1
- package/scripts/doctor-check.ts +3 -1
- package/scripts/install-codex-plugin.sh +28 -0
- package/scripts/install-cursor-plugin.sh +1 -0
- package/scripts/install-opencode-plugin.sh +1 -0
- package/scripts/install-pi-package.sh +56 -0
- package/scripts/rewrite-workspace-deps.ts +22 -5
- package/scripts/sync-release-manifests.ts +8 -5
- package/scripts/sync-runtime.sh +7 -3
- package/scripts/validate-cursor-marketplace.ts +16 -62
- package/skills/workit-babysit/SKILL.md +33 -0
- package/skills/workit-behavioral-tdd/SKILL.md +53 -0
- package/skills/workit-blast-radius/SKILL.md +31 -0
- package/skills/workit-challenge/SKILL.md +62 -0
- package/skills/workit-debug/SKILL.md +61 -0
- package/skills/workit-deslop/SKILL.md +36 -0
- package/skills/workit-diagram/SKILL.md +32 -0
- package/skills/workit-green-run/SKILL.md +29 -0
- package/skills/workit-handoff/SKILL.md +43 -0
- package/skills/workit-implement/SKILL.md +46 -0
- package/skills/workit-mockup/SKILL.md +28 -0
- package/skills/workit-plan/SKILL.md +66 -0
- package/skills/workit-review/SKILL.md +60 -0
- package/skills/workit-steer/SKILL.md +32 -0
- package/src/core/authority.ts +918 -0
- package/src/core/boundary.ts +29 -0
- package/src/core/branch.ts +26 -255
- package/src/core/changelog.ts +95 -18
- package/src/core/commit-flavors.ts +65 -0
- package/src/core/config-conversion.ts +183 -0
- package/src/core/config.ts +42 -0
- package/src/core/cutover.ts +721 -0
- package/src/core/detect-hosts.ts +107 -0
- package/src/core/doctor.ts +428 -18
- package/src/core/external-action-effects.ts +1171 -0
- package/src/core/external-action.ts +541 -0
- package/src/core/init.ts +83 -32
- package/src/core/methods.ts +125 -0
- package/src/core/policy-resolver.ts +523 -0
- package/src/core/pr-create.ts +7 -1
- package/src/core/registration.ts +69 -4
- package/src/core/repo-context.ts +59 -1
- package/src/core/setup.ts +28 -0
- package/src/core/skill-manifests.ts +40 -42
- package/src/core/support-matrix.ts +8 -3
- package/src/core/sync-runtime.ts +15 -3
- package/src/core/task-context.ts +179 -0
- package/src/core/task-contract.ts +1136 -0
- package/src/core/task-engine.ts +2562 -0
- package/src/core/task-evaluation.ts +679 -0
- package/src/core/task-store.ts +1071 -0
- package/src/core/tracker-issues.ts +237 -0
- package/src/core/uninstall.ts +67 -3
- package/src/core/vcs-config.ts +53 -22
- package/src/core/workers.ts +166 -0
- package/src/core/workspaces.ts +3 -1
- package/src/core/youtrack-tools.ts +2 -0
- package/src/core/youtrack.ts +145 -10
- package/src/core.ts +126 -0
- package/templates/execution-contract.md +17 -50
- package/templates/plan-template.md +3 -3
- package/templates/spec-template.md +15 -3
- package/templates/workit-contract.md +12 -0
- package/commands/wk-changelog.md +0 -2
- package/commands/wk-commit.md +0 -2
- package/commands/wk-docs-refresh.md +0 -2
- package/commands/wk-handoff.md +0 -2
- package/commands/wk-implement.md +0 -2
- package/commands/wk-init.md +0 -2
- package/commands/wk-issue-update.md +0 -2
- package/commands/wk-meetings.md +0 -2
- package/commands/wk-pr.md +0 -2
- package/commands/wk-release-notes.md +0 -2
- package/commands/wk-status.md +0 -2
- package/commands/wk-verify.md +0 -2
- package/scripts/update-superpowers.sh +0 -82
- package/scripts/vendor-assets.ts +0 -37
- package/skills/wk-changelog/SKILL.md +0 -15
- package/skills/wk-commit/SKILL.md +0 -16
- package/skills/wk-docs-refresh/SKILL.md +0 -15
- package/skills/wk-handoff/SKILL.md +0 -20
- package/skills/wk-implement/SKILL.md +0 -47
- package/skills/wk-init/SKILL.md +0 -31
- package/skills/wk-issue-update/SKILL.md +0 -27
- package/skills/wk-issue-update/references/youtrack-update-style.md +0 -81
- package/skills/wk-meetings/SKILL.md +0 -17
- package/skills/wk-pr/SKILL.md +0 -27
- package/skills/wk-release-notes/SKILL.md +0 -15
- package/skills/wk-status/SKILL.md +0 -16
- package/skills/wk-verify/SKILL.md +0 -16
- package/src/core/detector.ts +0 -239
- package/src/core/flow-state.ts +0 -3308
- package/src/core/handoff-context.ts +0 -136
- package/src/core/handoff-tools.ts +0 -133
- package/src/core/menu.ts +0 -70
- package/src/core/plan-tasks.ts +0 -43
- package/src/core/reminder.ts +0 -124
- package/src/core/sdd.ts +0 -353
- package/src/state.ts +0 -22
- package/templates/superpowers-doc-contract.md +0 -75
- package/vendor/superpowers/skills/brainstorming/SKILL.md +0 -159
- package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +0 -213
- package/vendor/superpowers/skills/brainstorming/scripts/helper.js +0 -167
- package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +0 -723
- package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +0 -209
- package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +0 -120
- package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/vendor/superpowers/skills/brainstorming/visual-companion.md +0 -291
- package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +0 -185
- package/vendor/superpowers/skills/executing-plans/SKILL.md +0 -70
- package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +0 -241
- package/vendor/superpowers/skills/receiving-code-review/SKILL.md +0 -213
- package/vendor/superpowers/skills/requesting-code-review/SKILL.md +0 -103
- package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +0 -172
- package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +0 -428
- package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +0 -139
- package/vendor/superpowers/skills/subagent-driven-development/scripts/review-package +0 -44
- package/vendor/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
- package/vendor/superpowers/skills/subagent-driven-development/scripts/task-brief +0 -40
- package/vendor/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
- package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +0 -119
- package/vendor/superpowers/skills/systematic-debugging/SKILL.md +0 -296
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +0 -115
- package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +0 -122
- package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +0 -63
- package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +0 -169
- package/vendor/superpowers/skills/systematic-debugging/test-academic.md +0 -14
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +0 -58
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +0 -68
- package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +0 -69
- package/vendor/superpowers/skills/test-driven-development/SKILL.md +0 -371
- package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +0 -202
- package/vendor/superpowers/skills/using-superpowers/SKILL.md +0 -62
- package/vendor/superpowers/skills/using-superpowers/references/antigravity-tools.md +0 -23
- package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +0 -39
- package/vendor/superpowers/skills/using-superpowers/references/pi-tools.md +0 -16
- package/vendor/superpowers/skills/verification-before-completion/SKILL.md +0 -139
- package/vendor/superpowers/skills/writing-plans/SKILL.md +0 -174
- package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
- package/vendor/superpowers/skills/writing-skills/SKILL.md +0 -689
- package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +0 -1150
- package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
- package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +0 -172
- package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +0 -187
- package/vendor/superpowers/skills/writing-skills/render-graphs.js +0 -168
- package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +0 -384
package/src/core/sdd.ts
DELETED
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
appendFileSync,
|
|
3
|
-
existsSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readFileSync,
|
|
6
|
-
statSync,
|
|
7
|
-
writeFileSync,
|
|
8
|
-
} from "node:fs";
|
|
9
|
-
import { execFileSync } from "node:child_process";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import { parseTasksFromPlan } from "./docs-validate";
|
|
12
|
-
import { docsValidate } from "./docs-validate";
|
|
13
|
-
import { readFlowState } from "./flow-state";
|
|
14
|
-
import { resolveCanonicalLayout, resolveDocsPath } from "./docs-layout";
|
|
15
|
-
|
|
16
|
-
const posix = (p: string) => p.split(path.sep).join("/");
|
|
17
|
-
|
|
18
|
-
/** OpenCode todowrite payload. SDD ledger is persistence, not a UI substitute. */
|
|
19
|
-
export function todosFromTasks(
|
|
20
|
-
tasks: { id: number | string; title: string }[],
|
|
21
|
-
completedTaskIds: (number | string)[] = [],
|
|
22
|
-
) {
|
|
23
|
-
const done = new Set((completedTaskIds ?? []).map((id) => Number(id)));
|
|
24
|
-
const todos = (tasks ?? []).map((t) => {
|
|
25
|
-
const id = Number(t.id);
|
|
26
|
-
return {
|
|
27
|
-
id: `task-${id}`,
|
|
28
|
-
content: `Task ${id}: ${t.title ?? ""}`.trim(),
|
|
29
|
-
status: done.has(id) ? "completed" : "pending",
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
const firstPending = todos.find((t) => t.status === "pending");
|
|
33
|
-
if (firstPending) firstPending.status = "in_progress";
|
|
34
|
-
return todos;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** SDD ledger completeness facts shared by lifecycle migration, completion,
|
|
38
|
-
* and active-plan detection (Task 2). */
|
|
39
|
-
export type LedgerCompletion = {
|
|
40
|
-
/** True only when progress.md contains at least one `Task N:` record. */
|
|
41
|
-
started: boolean;
|
|
42
|
-
/** True only when every canonical plan task id appears completed. */
|
|
43
|
-
complete: boolean;
|
|
44
|
-
required: number[];
|
|
45
|
-
completed: number[];
|
|
46
|
-
missing: number[];
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Read the canonical `docs/<slug>/sdd/progress.md` ledger and the plan's
|
|
51
|
-
* `### Task N:` headings. Fail-closed: a missing or unreadable ledger yields
|
|
52
|
-
* `started: false`, and a missing/unreadable plan yields an empty `required`
|
|
53
|
-
* set (never a partial trust of a stale ledger). `complete` requires a
|
|
54
|
-
* non-empty required set fully covered by completed task ids, so an empty plan
|
|
55
|
-
* can never read as "done".
|
|
56
|
-
*/
|
|
57
|
-
export function ledgerCompletion(root: string, slug: string): LedgerCompletion {
|
|
58
|
-
let started = false;
|
|
59
|
-
const completed: number[] = [];
|
|
60
|
-
const absProgress = path.join(root, "docs", slug, "sdd", "progress.md");
|
|
61
|
-
if (existsSync(absProgress)) {
|
|
62
|
-
try {
|
|
63
|
-
for (const line of readFileSync(absProgress, "utf8").split("\n")) {
|
|
64
|
-
const match = /^Task\s+(\d+):/i.exec(line);
|
|
65
|
-
if (match) {
|
|
66
|
-
started = true;
|
|
67
|
-
if (/^Task\s+\d+:\s*complete\b/i.test(line)) completed.push(Number(match[1]));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
} catch {
|
|
71
|
-
// unreadable ledger: started stays false (fail-closed)
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const required: number[] = [];
|
|
75
|
-
try {
|
|
76
|
-
const absPlan = path.join(root, "docs", slug, "plan.md");
|
|
77
|
-
if (existsSync(absPlan)) {
|
|
78
|
-
for (const task of parseTasksFromPlan(readFileSync(absPlan, "utf8"))) required.push(task.id);
|
|
79
|
-
}
|
|
80
|
-
} catch {
|
|
81
|
-
// unreadable/missing plan: required stays empty (fail-closed)
|
|
82
|
-
}
|
|
83
|
-
const completedSet = new Set(completed);
|
|
84
|
-
const missing = required.filter((id) => !completedSet.has(id));
|
|
85
|
-
return {
|
|
86
|
-
started,
|
|
87
|
-
complete: required.length > 0 && missing.length === 0,
|
|
88
|
-
required,
|
|
89
|
-
completed,
|
|
90
|
-
missing,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function sddContext({
|
|
95
|
-
slug,
|
|
96
|
-
plan_path,
|
|
97
|
-
workspace_root,
|
|
98
|
-
}: {
|
|
99
|
-
slug?: string;
|
|
100
|
-
plan_path?: string;
|
|
101
|
-
workspace_root: string;
|
|
102
|
-
}) {
|
|
103
|
-
// One shared contained path contract (DC-01, DC-02): slug and/or plan_path
|
|
104
|
-
// resolve to a canonical layout or the call fails before anything is read.
|
|
105
|
-
const resolved = resolveCanonicalLayout({ workspace_root, slug, plan_path });
|
|
106
|
-
if (!resolved.ok) return { error: resolved.error };
|
|
107
|
-
const cwd = resolved.layout.workspace;
|
|
108
|
-
const resolvedSlug = resolved.layout.slug;
|
|
109
|
-
if (!resolvedSlug) return { error: "slug or plan_path required" };
|
|
110
|
-
|
|
111
|
-
const sdd_dir = path.posix.join("docs", resolvedSlug, "sdd");
|
|
112
|
-
const progress_path = path.posix.join(sdd_dir, "progress.md");
|
|
113
|
-
const manifest_path = path.posix.join(sdd_dir, "manifest.json");
|
|
114
|
-
|
|
115
|
-
let progress_lines: string[] = [];
|
|
116
|
-
let completed_task_ids: number[] = [];
|
|
117
|
-
const absProgress = path.join(resolved.layout.sdd, "progress.md");
|
|
118
|
-
if (existsSync(absProgress)) {
|
|
119
|
-
progress_lines = readFileSync(absProgress, "utf8")
|
|
120
|
-
.split("\n")
|
|
121
|
-
.map((ln) => ln.trim())
|
|
122
|
-
.filter(Boolean);
|
|
123
|
-
const pat = /^Task\s+(\d+):\s+complete\b/i;
|
|
124
|
-
completed_task_ids = progress_lines
|
|
125
|
-
.map((ln) => pat.exec(ln)?.[1])
|
|
126
|
-
.filter(Boolean)
|
|
127
|
-
.map(Number);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
let manifest: Record<string, unknown> = {};
|
|
131
|
-
const absManifest = path.join(resolved.layout.sdd, "manifest.json");
|
|
132
|
-
if (existsSync(absManifest)) {
|
|
133
|
-
try {
|
|
134
|
-
manifest = JSON.parse(readFileSync(absManifest, "utf8"));
|
|
135
|
-
} catch {
|
|
136
|
-
manifest = {};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const legacy_path = path.join(cwd, ".superpowers/sdd");
|
|
141
|
-
const legacy_exists = existsSync(legacy_path);
|
|
142
|
-
|
|
143
|
-
let todos: { id: string; content: string; status: string }[] = [];
|
|
144
|
-
let task_count = 0;
|
|
145
|
-
if (plan_path) {
|
|
146
|
-
const planText = readFileSync(resolved.layout.plan, "utf8");
|
|
147
|
-
const specMatch = planText.match(/^\*\*Spec:\*\*\s*(?:`([^`]+)`|(\S+))/m);
|
|
148
|
-
const spec_path = specMatch?.[1] ?? specMatch?.[2] ?? "";
|
|
149
|
-
if (spec_path) {
|
|
150
|
-
const validated = docsValidate({
|
|
151
|
-
spec_path,
|
|
152
|
-
plan_path: path.relative(cwd, resolved.layout.plan),
|
|
153
|
-
workspace_root: cwd,
|
|
154
|
-
});
|
|
155
|
-
if (validated.ok === false)
|
|
156
|
-
return { ok: false, errors: validated.errors, error: validated.error };
|
|
157
|
-
}
|
|
158
|
-
const tasks = parseTasksFromPlan(planText);
|
|
159
|
-
if (tasks.length > 0) {
|
|
160
|
-
task_count = tasks.length;
|
|
161
|
-
todos = todosFromTasks(tasks, completed_task_ids);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const flow = readFlowState(cwd, resolvedSlug);
|
|
166
|
-
|
|
167
|
-
return {
|
|
168
|
-
slug: resolvedSlug,
|
|
169
|
-
sdd_dir,
|
|
170
|
-
progress_path,
|
|
171
|
-
manifest_path,
|
|
172
|
-
progress_lines,
|
|
173
|
-
completed_task_ids,
|
|
174
|
-
manifest,
|
|
175
|
-
created: existsSync(path.join(cwd, sdd_dir)),
|
|
176
|
-
forbidden_legacy_path: ".superpowers/sdd",
|
|
177
|
-
legacy_sdd_exists: legacy_exists,
|
|
178
|
-
warning: legacy_exists
|
|
179
|
-
? "Ignore .superpowers/sdd — use sdd_dir from this tool only"
|
|
180
|
-
: undefined,
|
|
181
|
-
todos,
|
|
182
|
-
task_count,
|
|
183
|
-
flow: { spec: flow.spec, plan: flow.plan, menu: flow.menu },
|
|
184
|
-
todowrite_required: true,
|
|
185
|
-
todowrite_hint:
|
|
186
|
-
"REQUIRED: Call OpenCode todowrite with todos from this result so the native task list shows progress. Before each task set status in_progress; after workit_sdd_append_progress set it completed.",
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export function sddTaskBrief({
|
|
191
|
-
sdd_dir,
|
|
192
|
-
task_id,
|
|
193
|
-
section_text,
|
|
194
|
-
workspace_root,
|
|
195
|
-
}: {
|
|
196
|
-
sdd_dir: string;
|
|
197
|
-
task_id: number;
|
|
198
|
-
section_text: string;
|
|
199
|
-
workspace_root: string;
|
|
200
|
-
}) {
|
|
201
|
-
const contained = resolveDocsPath({ workspace_root, path: sdd_dir });
|
|
202
|
-
if (!contained.ok) return { error: contained.error };
|
|
203
|
-
const dir = contained.path;
|
|
204
|
-
mkdirSync(dir, { recursive: true });
|
|
205
|
-
const out = path.join(dir, `task-${task_id}-brief.md`);
|
|
206
|
-
writeFileSync(out, `# Task ${task_id} brief\n\n${section_text}\n`, "utf8");
|
|
207
|
-
const rel = posix(path.relative(contained.base, out));
|
|
208
|
-
return { brief_path: rel, task_id };
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function sddReviewPackage({
|
|
212
|
-
sdd_dir,
|
|
213
|
-
base_sha,
|
|
214
|
-
head_sha,
|
|
215
|
-
workspace_root,
|
|
216
|
-
}: {
|
|
217
|
-
sdd_dir: string;
|
|
218
|
-
base_sha: string;
|
|
219
|
-
head_sha: string;
|
|
220
|
-
workspace_root: string;
|
|
221
|
-
}) {
|
|
222
|
-
const contained = resolveDocsPath({ workspace_root, path: sdd_dir });
|
|
223
|
-
if (!contained.ok) return { error: contained.error };
|
|
224
|
-
// Empty-range guard (Phase 2): a review package over `base..head` where the
|
|
225
|
-
// endpoints collapse to nothing is a contract error, not an artifact. Reject
|
|
226
|
-
// BEFORE any diff file is created or written (Task 1's RED evidence watches
|
|
227
|
-
// the guard, and the adapters only surface this core error — never a copy).
|
|
228
|
-
if (base_sha === head_sha) {
|
|
229
|
-
return {
|
|
230
|
-
error: `empty commit range (base_sha ${base_sha} === head_sha ${head_sha}): nothing to review`,
|
|
231
|
-
code: "empty_commit_range",
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
const dir = contained.path;
|
|
235
|
-
const base7 = base_sha.slice(0, 7);
|
|
236
|
-
const head7 = head_sha.slice(0, 7);
|
|
237
|
-
const diffPath = path.join(dir, `review-${base7}..${head7}.diff`);
|
|
238
|
-
try {
|
|
239
|
-
const diff = execFileSync("git", ["diff", base_sha, head_sha], {
|
|
240
|
-
cwd: contained.base,
|
|
241
|
-
encoding: "utf8",
|
|
242
|
-
// AR-14: a failed diff (missing shas, non-repo fixture) must stay in the
|
|
243
|
-
// captured error, never in the suite output.
|
|
244
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
245
|
-
});
|
|
246
|
-
// Distinct shas that still diff to nothing are an empty range too (the
|
|
247
|
-
// "or a diff that is empty" clause): no artifact is written for it, and
|
|
248
|
-
// the sdd/ dir is created only once a real diff survives (an empty-range
|
|
249
|
-
// rejection must leave no directory behind).
|
|
250
|
-
if (diff.trim() === "") {
|
|
251
|
-
return {
|
|
252
|
-
error: `empty commit range (${base_sha}..${head_sha}): diff is empty, nothing to review`,
|
|
253
|
-
code: "empty_commit_range",
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
mkdirSync(dir, { recursive: true });
|
|
257
|
-
writeFileSync(diffPath, diff, "utf8");
|
|
258
|
-
const rel = posix(path.relative(contained.base, diffPath));
|
|
259
|
-
return { diff_path: rel, base_sha, head_sha, base7, head7 };
|
|
260
|
-
} catch (error) {
|
|
261
|
-
return { error: error instanceof Error ? error.message : "git diff failed" };
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
const PROGRESS_RE = /^Task\s+\d+:\s+complete\s+\(commits\s+([0-9a-f]{7,40})\.\.([0-9a-f]{7,40}),/i;
|
|
266
|
-
|
|
267
|
-
export function sddAppendProgress({
|
|
268
|
-
progress_path,
|
|
269
|
-
line,
|
|
270
|
-
workspace_root,
|
|
271
|
-
}: {
|
|
272
|
-
progress_path: string;
|
|
273
|
-
line: string;
|
|
274
|
-
workspace_root: string;
|
|
275
|
-
}) {
|
|
276
|
-
const contained = resolveDocsPath({ workspace_root, path: progress_path });
|
|
277
|
-
if (!contained.ok) return { error: contained.error };
|
|
278
|
-
const path_ = contained.path;
|
|
279
|
-
const trimmed = line.trim();
|
|
280
|
-
const match = PROGRESS_RE.exec(trimmed);
|
|
281
|
-
// A regex alone cannot compare two groups: reject identical base/head shas
|
|
282
|
-
// after the format matches so `5db04ae..bd0a810` still passes while
|
|
283
|
-
// `abcdef0123456789..abcdef0123456789` is rejected (Phase 2).
|
|
284
|
-
if (!match || match[1].toLowerCase() === match[2].toLowerCase()) {
|
|
285
|
-
return { error: "invalid progress line format" };
|
|
286
|
-
}
|
|
287
|
-
if (existsSync(path_) && statSync(path_).isDirectory()) {
|
|
288
|
-
return { error: `progress path is a directory: ${progress_path}` };
|
|
289
|
-
}
|
|
290
|
-
mkdirSync(path.dirname(path_), { recursive: true });
|
|
291
|
-
appendFileSync(path_, trimmed + "\n", "utf8");
|
|
292
|
-
const rel = posix(path.relative(contained.base, path_));
|
|
293
|
-
return { ok: true, line: trimmed, progress_path: rel };
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export type AdvisoryResult =
|
|
297
|
-
| { ok: true; advisory: string; advisories_path: string }
|
|
298
|
-
| { error: string; code: string };
|
|
299
|
-
|
|
300
|
-
export function sddAppendAdvisory({
|
|
301
|
-
advisories_path,
|
|
302
|
-
task_id,
|
|
303
|
-
text,
|
|
304
|
-
workspace_root,
|
|
305
|
-
}: {
|
|
306
|
-
advisories_path: string;
|
|
307
|
-
task_id: unknown;
|
|
308
|
-
text: unknown;
|
|
309
|
-
workspace_root: string;
|
|
310
|
-
}): AdvisoryResult {
|
|
311
|
-
if (typeof task_id !== "number" || !Number.isSafeInteger(task_id) || task_id <= 0) {
|
|
312
|
-
return { error: "task_id must be a positive safe integer", code: "advisory_task_invalid" };
|
|
313
|
-
}
|
|
314
|
-
if (typeof text !== "string") {
|
|
315
|
-
return {
|
|
316
|
-
error: "advisory text must be a string of 1-1000 characters after normalization",
|
|
317
|
-
code: "advisory_text_invalid",
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
if (text.includes("\r") || text.includes("\n")) {
|
|
321
|
-
return {
|
|
322
|
-
error: "advisory text must be a single line (no CR/LF)",
|
|
323
|
-
code: "advisory_text_invalid",
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
const collapsed = text.trim().replace(/[ \t]+/g, " ");
|
|
327
|
-
if (collapsed.length === 0 || collapsed.length > 1000) {
|
|
328
|
-
return {
|
|
329
|
-
error: "advisory text must be 1-1000 characters after trim and horizontal-space collapse",
|
|
330
|
-
code: "advisory_text_invalid",
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
if (!/^docs\/[^/]+\/sdd\/advisories\.md$/.test(advisories_path)) {
|
|
334
|
-
return {
|
|
335
|
-
error: `advisories_path must be docs/<slug>/sdd/advisories.md: ${advisories_path}`,
|
|
336
|
-
code: "advisory_path_invalid",
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
const contained = resolveDocsPath({ workspace_root, path: advisories_path });
|
|
340
|
-
if (!contained.ok) return { error: contained.error, code: "advisory_path_invalid" };
|
|
341
|
-
const abs = contained.path;
|
|
342
|
-
if (existsSync(abs) && statSync(abs).isDirectory()) {
|
|
343
|
-
return {
|
|
344
|
-
error: `advisory target is a directory: ${advisories_path}`,
|
|
345
|
-
code: "advisory_target_invalid",
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
mkdirSync(path.dirname(abs), { recursive: true });
|
|
349
|
-
const line = `- Task ${task_id}: ${collapsed}\n`;
|
|
350
|
-
appendFileSync(abs, line, "utf8");
|
|
351
|
-
const rel = posix(path.relative(contained.base, abs));
|
|
352
|
-
return { ok: true, advisory: collapsed, advisories_path: rel };
|
|
353
|
-
}
|
package/src/state.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type WorkflowState = { spec: string; plan: string; sdd: string };
|
|
2
|
-
|
|
3
|
-
export class WorkflowStateStore {
|
|
4
|
-
#sessions = new Map<string, WorkflowState>();
|
|
5
|
-
|
|
6
|
-
constructor() {}
|
|
7
|
-
|
|
8
|
-
set(sessionID: string, state: WorkflowState) {
|
|
9
|
-
this.#sessions.set(sessionID, { spec: state.spec, plan: state.plan, sdd: state.sdd });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
get(sessionID: string) {
|
|
13
|
-
return this.#sessions.get(sessionID);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
compactionContext(sessionID: string) {
|
|
17
|
-
const value = this.get(sessionID);
|
|
18
|
-
return value
|
|
19
|
-
? `Active workflow:\nSpec: ${value.spec}\nPlan: ${value.plan}\nSDD: ${value.sdd}`
|
|
20
|
-
: null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Superpowers document contract
|
|
2
|
-
|
|
3
|
-
Use OpenCode's native `question` for every bounded user choice. Give concise choices and allow a custom answer; if the tool is unavailable, ask one concise plain-text question. Use `skill` to load workflow and Superpowers skills, `todowrite` for task state, and `task` for delegated work (OpenCode) or the host-native equivalent — on Cursor, Subagent-driven dispatches Cursor-native subagents with a task `delegation_token`, Inline runs single-agent in the current session.
|
|
4
|
-
|
|
5
|
-
## Tracked document layout
|
|
6
|
-
|
|
7
|
-
| Document | Path |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| Spec | `docs/<slug>/spec.md` |
|
|
10
|
-
| Plan | `docs/<slug>/plan.md` |
|
|
11
|
-
| SDD state | `docs/<slug>/sdd/` |
|
|
12
|
-
|
|
13
|
-
An optional human mirror may live at `docs/specs/<same-basename>.md`; when present, keep its branch identical.
|
|
14
|
-
|
|
15
|
-
Specs require:
|
|
16
|
-
|
|
17
|
-
```markdown
|
|
18
|
-
**Branch:** `feature/<slug>`
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Plans require:
|
|
22
|
-
|
|
23
|
-
```markdown
|
|
24
|
-
**Spec:** `docs/<slug>/spec.md`
|
|
25
|
-
**Branch:** `feature/<slug>`
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
`bugfix/<slug>` is also valid. Never use `main`, `develop`, `master`, or `prod`. Use plain backtick paths. Top-level headings are exactly `### Task N: Title`; steps use `- [ ] **Step N:** ...`; task headings never appear inside fences.
|
|
29
|
-
|
|
30
|
-
Before writing **Branch:** into a new spec or plan, call `workit_docs_branch` and write the returned `branch` verbatim. When `action` is `keep`, use the current feature/bugfix branch. When `action` is `create_from_develop` or `create_from_base`, create the branch only through `workit_branch_setup`; it uses the configured workspace/global target branch.
|
|
31
|
-
|
|
32
|
-
## Execution and handoff
|
|
33
|
-
|
|
34
|
-
- Implementation uses `wk-implement` and subagent-driven development, with native `todowrite` and `task`.
|
|
35
|
-
- Commits use `wk-commit` after its native `question` confirmation.
|
|
36
|
-
- Continuation uses `wk-handoff`, whose `workit_handoff_session` creates and seeds the OpenCode session automatically.
|
|
37
|
-
- Never use worktrees. Resolve the declared branch with `workit_resolve_branch`, preview dirty-tree stash choices with `question`, and apply an approved in-place checkout through `workit_branch_setup` with `confirmed: true` (grounded in the recorded NativeChoiceEvidence).
|
|
38
|
-
- Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence objects: on OpenCode the plugin records the user's native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by `workit_spec_approve` / `workit_plan_approve` / `workit_plan_menu` — no evidence argument exists, and delegated worker status comes from host session parentage (`parentID`), never a caller `role` field. On Cursor, confirmations are policy-only (`attested: false`), Subagent-driven execution is supported through the one-time `coordinator_lease` and per-task `delegation_token` minted by `workit_delegate` (fail-closed validation; no `parentID` identity exists on Cursor), and Inline runs single-agent in the current session.
|
|
39
|
-
- Keep all SDD state under the gitignored `docs/<slug>/sdd/`; use `workit_sdd_context` and the registered `workit_sdd_*` tools.
|
|
40
|
-
- After implementation, use `question` before an approved stash reapply through `workit_branch_setup` with `confirmed: true`.
|
|
41
|
-
|
|
42
|
-
## YouTrack content
|
|
43
|
-
|
|
44
|
-
Chat follows the user's language. YouTrack task comments are Spanish (`es-CL`) and use `workit_youtrack_draft` followed by reviewed `workit_youtrack_post` with `confirmed: true`. Preserve the user's paragraph voice; do not inject commits, file paths, or robotic bullet reports.
|
|
45
|
-
|
|
46
|
-
## Final self-check
|
|
47
|
-
|
|
48
|
-
Before handoff, call `workit_docs_validate` on the linked spec/plan pair. Hard-fail on any error; never offer execution when validation fails.
|
|
49
|
-
|
|
50
|
-
Before handoff, verify the saved spec path, plan path, declared branch, top-level task numbering, and workflow-managed SDD directory through the registered read-only workflow tools. Report structured failures; never infer success.
|
|
51
|
-
|
|
52
|
-
## Post-plan execution choice
|
|
53
|
-
|
|
54
|
-
After saving a plan, call `workit_docs_validate` on the spec/plan pair. On failure, stop and fix docs — do not offer execution.
|
|
55
|
-
|
|
56
|
-
On success, use native `question` / Cursor `AskQuestion` with exactly these options (no stay, no A/B/C prose duplicate):
|
|
57
|
-
|
|
58
|
-
1. Subagent-driven → load `wk-implement`
|
|
59
|
-
2. Inline → execute in this session
|
|
60
|
-
3. Handoff → load `wk-handoff` (new session only)
|
|
61
|
-
4. Review spec first
|
|
62
|
-
5. Review plan first
|
|
63
|
-
6. Change model first
|
|
64
|
-
|
|
65
|
-
`Change model first` is display-only deferral: it ends the turn without calling `workit_plan_menu` and re-presents the menu on the next turn. Every other choice must call `workit_plan_menu` immediately after the answer and before any skill, branch question, mutation, or handoff.
|
|
66
|
-
|
|
67
|
-
Never emit Superpowers text beginning “Two execution options”.
|
|
68
|
-
|
|
69
|
-
A handoff destination session (the seeded contract carries `<workflow-handoff-destination>true</workflow-handoff-destination>`) presents exactly five choices — Subagent-driven, Inline, Review spec first, Review plan first, Change model first — and never re-offers the originating handoff option.
|
|
70
|
-
|
|
71
|
-
- Specs/plans must follow `templates/spec-template.md` / `templates/plan-template.md` (mandated diagrams, tables, CA-XX).
|
|
72
|
-
|
|
73
|
-
## Doc delivery
|
|
74
|
-
|
|
75
|
-
When delivering a spec or plan, use a clickable markdown link (\`[spec.md](docs/<slug>/spec.md)\`) and a 3-5 bullet summary of the content (Context, Goals, key decisions, status). Never reference docs with backtick-only paths.
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: brainstorming
|
|
3
|
-
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Brainstorming Ideas Into Designs
|
|
7
|
-
|
|
8
|
-
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
9
|
-
|
|
10
|
-
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
11
|
-
|
|
12
|
-
<HARD-GATE>
|
|
13
|
-
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
14
|
-
</HARD-GATE>
|
|
15
|
-
|
|
16
|
-
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
17
|
-
|
|
18
|
-
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
19
|
-
|
|
20
|
-
## Checklist
|
|
21
|
-
|
|
22
|
-
You MUST create a task for each of these items and complete them in order:
|
|
23
|
-
|
|
24
|
-
1. **Explore project context** — check files, docs, recent commits
|
|
25
|
-
2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
|
|
26
|
-
3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
27
|
-
4. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
28
|
-
5. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
29
|
-
6. **Write design doc** — save to `docs/<slug>/spec.md` and commit
|
|
30
|
-
7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
|
|
31
|
-
8. **User reviews written spec** — ask user to review the spec file before proceeding
|
|
32
|
-
9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
|
|
33
|
-
|
|
34
|
-
## Process Flow
|
|
35
|
-
|
|
36
|
-
```dot
|
|
37
|
-
digraph brainstorming {
|
|
38
|
-
"Explore project context" [shape=box];
|
|
39
|
-
"Ask clarifying questions" [shape=box];
|
|
40
|
-
"Propose 2-3 approaches" [shape=box];
|
|
41
|
-
"Present design sections" [shape=box];
|
|
42
|
-
"User approves design?" [shape=diamond];
|
|
43
|
-
"Write design doc" [shape=box];
|
|
44
|
-
"Spec self-review\n(fix inline)" [shape=box];
|
|
45
|
-
"User reviews spec?" [shape=diamond];
|
|
46
|
-
"Invoke writing-plans skill" [shape=doublecircle];
|
|
47
|
-
|
|
48
|
-
"Explore project context" -> "Ask clarifying questions";
|
|
49
|
-
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
50
|
-
"Propose 2-3 approaches" -> "Present design sections";
|
|
51
|
-
"Present design sections" -> "User approves design?";
|
|
52
|
-
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
53
|
-
"User approves design?" -> "Write design doc" [label="yes"];
|
|
54
|
-
"Write design doc" -> "Spec self-review\n(fix inline)";
|
|
55
|
-
"Spec self-review\n(fix inline)" -> "User reviews spec?";
|
|
56
|
-
"User reviews spec?" -> "Write design doc" [label="changes requested"];
|
|
57
|
-
"User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
|
|
62
|
-
|
|
63
|
-
## The Process
|
|
64
|
-
|
|
65
|
-
**Understanding the idea:**
|
|
66
|
-
|
|
67
|
-
- Check out the current project state first (files, docs, recent commits)
|
|
68
|
-
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
|
|
69
|
-
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
|
|
70
|
-
- For appropriately-scoped projects, ask questions one at a time to refine the idea
|
|
71
|
-
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
72
|
-
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
73
|
-
- Focus on understanding: purpose, constraints, success criteria
|
|
74
|
-
|
|
75
|
-
**Exploring approaches:**
|
|
76
|
-
|
|
77
|
-
- Propose 2-3 different approaches with trade-offs
|
|
78
|
-
- Present options conversationally with your recommendation and reasoning
|
|
79
|
-
- Lead with your recommended option and explain why
|
|
80
|
-
|
|
81
|
-
**Presenting the design:**
|
|
82
|
-
|
|
83
|
-
- Once you believe you understand what you're building, present the design
|
|
84
|
-
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
85
|
-
- Ask after each section whether it looks right so far
|
|
86
|
-
- Cover: architecture, components, data flow, error handling, testing
|
|
87
|
-
- Be ready to go back and clarify if something doesn't make sense
|
|
88
|
-
|
|
89
|
-
**Design for isolation and clarity:**
|
|
90
|
-
|
|
91
|
-
- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
|
|
92
|
-
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
|
|
93
|
-
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
|
|
94
|
-
- Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
|
|
95
|
-
|
|
96
|
-
**Working in existing codebases:**
|
|
97
|
-
|
|
98
|
-
- Explore the current structure before proposing changes. Follow existing patterns.
|
|
99
|
-
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
|
|
100
|
-
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.
|
|
101
|
-
|
|
102
|
-
## After the Design
|
|
103
|
-
|
|
104
|
-
**Documentation:**
|
|
105
|
-
|
|
106
|
-
- Write the validated design (spec) to `docs/<slug>/spec.md`
|
|
107
|
-
- (User preferences for spec location override this default)
|
|
108
|
-
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
109
|
-
- Commit the design document to git
|
|
110
|
-
|
|
111
|
-
**Spec Self-Review:**
|
|
112
|
-
After writing the spec document, look at it with fresh eyes:
|
|
113
|
-
|
|
114
|
-
1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
|
|
115
|
-
2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
|
|
116
|
-
3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
|
|
117
|
-
4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
|
|
118
|
-
|
|
119
|
-
Fix any issues inline. No need to re-review — just fix and move on.
|
|
120
|
-
|
|
121
|
-
**User Review Gate:**
|
|
122
|
-
After the spec review loop passes, ask the user to review the written spec before proceeding:
|
|
123
|
-
|
|
124
|
-
> "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
|
|
125
|
-
|
|
126
|
-
Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
|
|
127
|
-
|
|
128
|
-
**Implementation:**
|
|
129
|
-
|
|
130
|
-
- Invoke the writing-plans skill to create a detailed implementation plan
|
|
131
|
-
- Do NOT invoke any other skill. writing-plans is the next step.
|
|
132
|
-
|
|
133
|
-
## Key Principles
|
|
134
|
-
|
|
135
|
-
- **One question at a time** - Don't overwhelm with multiple questions
|
|
136
|
-
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
137
|
-
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
138
|
-
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
139
|
-
- **Incremental validation** - Present design, get approval before moving on
|
|
140
|
-
- **Be flexible** - Go back and clarify when something doesn't make sense
|
|
141
|
-
|
|
142
|
-
## Visual Companion
|
|
143
|
-
|
|
144
|
-
A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
|
|
145
|
-
|
|
146
|
-
**Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
|
|
147
|
-
> "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
|
|
148
|
-
|
|
149
|
-
**This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
|
|
150
|
-
|
|
151
|
-
**Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
|
|
152
|
-
|
|
153
|
-
- **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
|
|
154
|
-
- **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
|
|
155
|
-
|
|
156
|
-
A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
|
|
157
|
-
|
|
158
|
-
If they agree to the companion, read the detailed guide before proceeding:
|
|
159
|
-
`skills/brainstorming/visual-companion.md`
|