spell 0.8.5 → 0.8.6
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/app/package.json +1 -1
- package/app/spaces/@spell/examples/Solitaire/__project.json5 +22 -4
- package/dist/epic/cli/epicGroups.js +1 -0
- package/dist/epic/command/epicArgs.js +3 -1
- package/dist/epic/comments/ThreadFacts.js +10 -2
- package/dist/epic/components/__pack/epics.entry.js +41 -41
- package/dist/epic/components/__pack/epics.pack.js +1517 -1481
- package/dist/epic/components/epic-answer/EpicAnswer.css +21 -11
- package/dist/epic/components/epic-answer/EpicAnswer.css.inline.js +1 -1
- package/dist/epic/components/epic-item/CollapseAll.css +3 -3
- package/dist/epic/components/epic-item/Fold.js +105 -81
- package/dist/epic/components/epic-overview/EpicOverview.js +0 -2
- package/dist/epic/components/epic-phase/EpicPhase.css +16 -7
- package/dist/epic/components/epic-phase/EpicPhase.css.inline.js +1 -1
- package/dist/epic/components/epic-phase/EpicPhase.js +1 -3
- package/dist/epic/components/epic-section/EpicFold.css +15 -0
- package/dist/epic/components/epic-section/EpicFold.css.inline.js +1 -1
- package/dist/epic/components/epic-section/EpicFold.js +80 -52
- package/dist/epic/components/epic-section/EpicSection.js +1 -3
- package/dist/epic/components/epic-section/EpicSection.types.js +1 -15
- package/dist/epic/components/epic-section/PhaseDrag.js +7 -4
- package/dist/epic/docs/__data/components.json5 +0 -42
- package/dist/epic/docs/epic-overview.html +6 -6
- package/dist/epic/docs/epic-phase.html +12 -5
- package/dist/epic/docs/epic-section.html +6 -4
- package/dist/epic/review/ReviewClient.js +9 -0
- package/dist/epic/tool/InboxCommands.js +12 -1
- package/dist/epic/tool/PLAN-DOC.md +9 -0
- package/dist/epic/tool/PlanDoc.js +17 -5
- package/dist/epic/tool/PlanDocCommands.js +6 -3
- package/dist/epic/tool/ReviewInbox.js +20 -4
- package/dist/epic/tools/_assets/commands.js +452 -451
- package/dist/epic/tools/_assets/core-reference.js +656 -655
- package/dist/epic/tools/_assets/spell-comments.js +575 -569
- package/dist/epic/tools/_assets/spell-doc-runtime.js +16 -3
- package/dist/epic/tools/_assets/spell-syntax.js +415 -414
- package/dist/epic/tools/_assets/spell-ui.entry.js +3 -2
- package/dist/epic/tools/_assets/spell-ui.js +7898 -7835
- package/dist/server/WebServer.js +2 -1
- package/dist/server/liveClient.d.ts +37 -1
- package/dist/server/liveClient.js +119 -6
- package/dist/server/site/PagePatch.d.ts +35 -1
- package/dist/server/site/PagePatch.js +94 -12
- package/dist/ui/components/ui-components/PackHotSwap.d.ts +6 -0
- package/dist/ui/components/ui-components/PackHotSwap.js +12 -2
- package/dist/ui/components/ui-section/UISection.d.ts +8 -0
- package/dist/ui/components/ui-section/UISection.js +22 -11
- package/dist/ui/docs-components/ui-docs-theme-bench/UIDocsThemeBench.d.ts +1 -1
- package/dist/util/spell/constants.js +1 -1
- package/epic/package.json +1 -1
- package/epic/skills/epic/SKILL.md +16 -0
- package/epic/src/AGENTS.md +29 -4
- package/epic/src/tool/PLAN-DOC.md +9 -0
- package/package.json +1 -1
- package/parser/package.json +1 -1
- package/ui/package.json +1 -1
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
isPhaseStatus
|
|
29
29
|
} from "./planDoc.types.js";
|
|
30
30
|
import { ChangeOriginals } from "./ChangeOriginals.js";
|
|
31
|
+
import { CommentList } from "./CommentList.js";
|
|
31
32
|
import { IncomingHtml } from "./IncomingHtml.js";
|
|
32
33
|
import { PhaseTakes } from "./PhaseTakes.js";
|
|
33
34
|
import { PhaseNumbers } from "./PhaseNumbers.js";
|
|
@@ -433,8 +434,10 @@ var PlanDoc = class _PlanDoc extends PlanReader {
|
|
|
433
434
|
/**
|
|
434
435
|
* Set phase `n`'s fields: `{ symptom, changes, goal, files, verify }`, as HTML; each one given replaces that
|
|
435
436
|
* field, or is made in its place; `""` removes it. Returns the fields set, by label (`Symptom` ...).
|
|
437
|
+
* - `plan`: Claude's build plan, waiting for Owen's Accept; `accepted` (`--accepted`, epic `epic-engine` I163):
|
|
438
|
+
* written accepted, for a plan Owen accepted with comments that it now folds in (no second Accept)
|
|
436
439
|
*/
|
|
437
|
-
setPhaseFields(n, values) {
|
|
440
|
+
setPhaseFields(n, values, { accepted = false } = {}) {
|
|
438
441
|
const phase = this.phase(n);
|
|
439
442
|
const set = [];
|
|
440
443
|
for (const name of PHASE_FIELDS) {
|
|
@@ -445,9 +448,9 @@ var PlanDoc = class _PlanDoc extends PlanReader {
|
|
|
445
448
|
}
|
|
446
449
|
if (values.plan !== void 0) {
|
|
447
450
|
const docReview = DOC_REVIEW.test(PhaseIds.titleOf(phase));
|
|
448
|
-
if (values.plan && docReview) this.acceptPlan(phase);
|
|
451
|
+
if (values.plan && (docReview || accepted)) this.acceptPlan(phase);
|
|
449
452
|
else Markup.set(phase, { plan: values.plan ? "waiting" : void 0 });
|
|
450
|
-
const said = docReview ? "accepted, the doc pass" : "waiting for Owen's Accept";
|
|
453
|
+
const said = docReview ? "accepted, the doc pass" : accepted ? "accepted, Owen's comments folded in" : "waiting for Owen's Accept";
|
|
451
454
|
const label = PhaseIds.labelOf(phase);
|
|
452
455
|
this.log(values.plan ? `${label} plan written: ${said}` : `${label} plan removed`);
|
|
453
456
|
}
|
|
@@ -980,6 +983,9 @@ var PlanDoc = class _PlanDoc extends PlanReader {
|
|
|
980
983
|
* - `accept` / `reopen` on a change mark (`ch3`, epic `epic-engine` P30; `applyChange()`): the change stands
|
|
981
984
|
* (`accepted`), or its question opens again
|
|
982
985
|
* - an applied mark adds ONE log line (`J9 approved: closed (accepted)`); the methods it calls stamp the item
|
|
986
|
+
* - an approve carrying Owen's comments in its text (`comments`, epic `epic-engine` I163): applied as any approve
|
|
987
|
+
* (a waiting plan accepted), its line saying `, with comments to fold in: C4, C5`; the comments stay waiting,
|
|
988
|
+
* for the session to fold in and answer
|
|
983
989
|
*/
|
|
984
990
|
applyMark(mark) {
|
|
985
991
|
if (mark.action === "new") return this.addFromPage(mark);
|
|
@@ -987,7 +993,7 @@ var PlanDoc = class _PlanDoc extends PlanReader {
|
|
|
987
993
|
if (CHANGE_ID.test(String(mark.id).toLowerCase())) return this.applyChange(mark);
|
|
988
994
|
const part = this.reviewPart(mark.id);
|
|
989
995
|
if (part) {
|
|
990
|
-
const result2 = this.applyToPart(part, mark);
|
|
996
|
+
const result2 = withCommentsToFold(this.applyToPart(part, mark), mark);
|
|
991
997
|
if (result2.applied) this.log(`${String(mark.id).toUpperCase()} ${result2.did}`);
|
|
992
998
|
return result2;
|
|
993
999
|
}
|
|
@@ -995,7 +1001,7 @@ var PlanDoc = class _PlanDoc extends PlanReader {
|
|
|
995
1001
|
if (!item) return { applied: false, gone: true, left: "no such item: mark dropped" };
|
|
996
1002
|
const todoSkip = mark.action === "skip" && PlanItem.kindOfItem(item) === "todo";
|
|
997
1003
|
const applied = todoSkip ? { ...mark, action: "drop" } : mark;
|
|
998
|
-
const result = this.applyAction(item, applied);
|
|
1004
|
+
const result = withCommentsToFold(this.applyAction(item, applied), mark);
|
|
999
1005
|
if (result.applied) {
|
|
1000
1006
|
this.log(`${item.id.toUpperCase()} ${result.did}`);
|
|
1001
1007
|
this.reviewedAs(item, applied.action === "pick" ? "approve" : applied.action);
|
|
@@ -2335,6 +2341,12 @@ function filedTodo(todo) {
|
|
|
2335
2341
|
return `Made todo <a href="#${todo}">${todo.toUpperCase()}</a> to follow this up.`;
|
|
2336
2342
|
}
|
|
2337
2343
|
__name(filedTodo, "filedTodo");
|
|
2344
|
+
function withCommentsToFold(result, mark) {
|
|
2345
|
+
if (!result.applied || mark.action !== "approve" || !mark.comments?.length) return result;
|
|
2346
|
+
const ids = mark.comments.map(CommentList.label).join(", ");
|
|
2347
|
+
return { ...result, did: `${result.did}, with comments to fold in: ${ids}` };
|
|
2348
|
+
}
|
|
2349
|
+
__name(withCommentsToFold, "withCommentsToFold");
|
|
2338
2350
|
function pickedWords(option, what) {
|
|
2339
2351
|
return PlanMarkup.text(`Chose ${option.letter} · ${option.title}: ${what}`);
|
|
2340
2352
|
}
|
|
@@ -155,7 +155,7 @@ var PlanDocCommands = class _PlanDocCommands {
|
|
|
155
155
|
case "phase-body": {
|
|
156
156
|
const planning = await this.edit(file, (plan) => {
|
|
157
157
|
const n = plan.phasePlace(need(rest[0], "a phase"));
|
|
158
|
-
const set = plan.setPhaseFields(n, flags);
|
|
158
|
+
const set = plan.setPhaseFields(n, flags, { accepted: flags.accepted === true });
|
|
159
159
|
if (!set.length)
|
|
160
160
|
throw new PlanDocError(`phase-body what? --symptom / --changes / --goal / --files / --verify`);
|
|
161
161
|
plan.log(`${plan.phaseLabel(n)} ${set.join(", ")} set`);
|
|
@@ -1109,8 +1109,11 @@ var USAGE = `usage: yarn plan-doc <command> <name> ... (doc: epics/<name>/<
|
|
|
1109
1109
|
items, links and "P5 · Name" text following, then
|
|
1110
1110
|
links-agree (stderr says); neither, with a Doc Review last:
|
|
1111
1111
|
before it, the Doc Review moving down one, back to do
|
|
1112
|
-
phase-body <name> <N> [--symptom html] [--changes html] [--goal html] [--
|
|
1113
|
-
|
|
1112
|
+
phase-body <name> <N> [--symptom html] [--changes html] [--goal html] [--plan html [--accepted]]
|
|
1113
|
+
[--files html] [--verify html]
|
|
1114
|
+
set (or "" removes) a phase's body fields; --plan waits
|
|
1115
|
+
for Owen's Accept, unless --accepted: he accepted it with
|
|
1116
|
+
comments, folded in now
|
|
1114
1117
|
updated <name> <N> "html" | --file path [--summary "..."] [--for <item ids>]
|
|
1115
1118
|
a change to phase N's plan: an <epic-update> block at the
|
|
1116
1119
|
end of its description, "Update: <summary>" and the date
|
|
@@ -523,7 +523,9 @@ var ReviewInbox = class _ReviewInbox {
|
|
|
523
523
|
* `{ action: "revisit", when: "soon", note: "see my comments in its text: C4", comments: ["c4"] }`
|
|
524
524
|
* - a revisit waiting or being talked over: the comment joins its `comments`, and its note names it
|
|
525
525
|
* - a pick: that revisit, carrying the pick ("pick B, but ...")
|
|
526
|
-
* -
|
|
526
|
+
* - an Approve / Accept plan (epic `epic-engine` I163): still approved, the comment joining its `comments`, to fold
|
|
527
|
+
* in as the plan is written (`{ action: "approve", note, comments }`)
|
|
528
|
+
* - any other mark (Make Todo, a revisit asked now ...): left as it is
|
|
527
529
|
* - only while the comment waits for Claude (`CommentList.waiting`)
|
|
528
530
|
* - SIDE EFFECT: the mark is stamped `at`, so it waits for the next Send
|
|
529
531
|
*/
|
|
@@ -532,10 +534,12 @@ var ReviewInbox = class _ReviewInbox {
|
|
|
532
534
|
const part = comment && partOf(comment.anchor);
|
|
533
535
|
if (!part || !parts.has(part) || !isMarkKey(part)) return null;
|
|
534
536
|
const mark = this.marks[part];
|
|
535
|
-
|
|
537
|
+
const takes = !mark || mark.action === "pick" || mark.action === "approve" || mark.action === "revisit";
|
|
538
|
+
if (!takes || mark && _ReviewInbox.isImmediate(mark)) return null;
|
|
536
539
|
const comments = [.../* @__PURE__ */ new Set([...mark?.comments ?? [], commentId])];
|
|
537
540
|
const note = withInlineComments(mark?.note ?? "", comments);
|
|
538
|
-
this.setMark(part, { action: "
|
|
541
|
+
if (mark?.action === "approve") this.setMark(part, { action: "approve", note, comments }, at);
|
|
542
|
+
else this.setMark(part, { action: "revisit", when: "soon", note, comments, ..._ReviewInbox.pickOf(mark) }, at);
|
|
539
543
|
return part;
|
|
540
544
|
}
|
|
541
545
|
/**
|
|
@@ -543,14 +547,21 @@ var ReviewInbox = class _ReviewInbox {
|
|
|
543
547
|
* returns the ids of the marks changed.
|
|
544
548
|
* - its note names the rest, else only Owen's own words
|
|
545
549
|
* - nothing left in it (no comment, no words): a pick goes back to the plain pick, else the mark goes
|
|
550
|
+
* - an Approve carrying it (epic `epic-engine` I163): still approved, with the rest, or plain
|
|
546
551
|
* - SIDE EFFECT: a mark kept is stamped `at`
|
|
547
552
|
*/
|
|
548
553
|
dropComment(commentId, at = isoTime()) {
|
|
549
554
|
const changed = [];
|
|
550
555
|
for (const [id, mark] of Object.entries(this.marks)) {
|
|
551
|
-
if (
|
|
556
|
+
if (!mark.comments?.includes(commentId)) continue;
|
|
552
557
|
const comments = mark.comments.filter((each) => each !== commentId);
|
|
553
558
|
const note = withInlineComments(mark.note ?? "", comments);
|
|
559
|
+
if (mark.action === "approve") {
|
|
560
|
+
this.setMark(id, comments.length ? { action: "approve", note, comments } : { action: "approve" }, at);
|
|
561
|
+
changed.push(id);
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
if (mark.action !== "revisit") continue;
|
|
554
565
|
const pick = _ReviewInbox.pickOf(mark);
|
|
555
566
|
if (comments.length || note) {
|
|
556
567
|
const left = { action: "revisit", when: mark.when, note, ...comments.length && { comments }, ...pick };
|
|
@@ -772,6 +783,11 @@ var ReviewInbox = class _ReviewInbox {
|
|
|
772
783
|
};
|
|
773
784
|
}
|
|
774
785
|
if (action === "pick") return { action, pick: toLetter(pick), ...toChoices(choices) };
|
|
786
|
+
if (action === "approve") {
|
|
787
|
+
const inline = toCommentIds(mark.comments);
|
|
788
|
+
if (!inline.comments || typeof note !== "string" || !note.trim()) return { action, ...inline };
|
|
789
|
+
return { action, note: note.trim(), ...inline };
|
|
790
|
+
}
|
|
775
791
|
if (action === "accept") {
|
|
776
792
|
const { stage } = mark;
|
|
777
793
|
if (stage === void 0 || stage === null) return { action };
|