portable-agent-layer 0.54.0 → 0.54.2
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.
|
@@ -296,7 +296,7 @@ bun ~/.pal/tools/handoff-note.ts --done --title "what we completed"
|
|
|
296
296
|
**Project work** — use ISCs, not threads:
|
|
297
297
|
```bash
|
|
298
298
|
# Close completed ISCs:
|
|
299
|
-
bun ~/.pal/tools/project.ts
|
|
299
|
+
bun ~/.pal/tools/project.ts complete-isc <project-name> <id>
|
|
300
300
|
|
|
301
301
|
# Open new ISCs for unfinished work:
|
|
302
302
|
bun ~/.pal/tools/project.ts add-isc <project-name> "what remains"
|
|
@@ -49,3 +49,8 @@ Correct: Memory says user dislikes verbose summaries → you keep the summary to
|
|
|
49
49
|
**Don't trust, verify.** When adding a test or asserting a change works, prove it by making it fail first. A test that passes without ever being broken demonstrates nothing — it may be testing the wrong thing or nothing at all. Break it intentionally, confirm it fails for the right reason, then restore it.
|
|
50
50
|
Bad: Add a test, see it green, move on. The test may pass vacuously.
|
|
51
51
|
Correct: Add the test → run it green → break the code it covers → confirm it goes red → restore → now it's a real test.
|
|
52
|
+
|
|
53
|
+
**Functions, not comments.** Encode intent in small, well-named, self-contained functions instead of explanatory comments. Comments cost tokens, drift from the code they describe, and can lie; a name is enforced by the call site. When tempted to write a comment explaining *why* a block does what it does, extract that block into a function whose name carries the why. The ONLY acceptable comment is a fact about an external system that code genuinely cannot encode — an SDK/protocol/service quirk (EventBridge, S3, a required HTTP header) — and even those should be rare and live at a single file location, not scattered.
|
|
54
|
+
Bad: `// Mark scheduled BEFORE creating the schedule so a failed write can't orphan it` above an inline update + create + rollback block.
|
|
55
|
+
Correct: `getOwnedPostState()` → `setPostState("scheduled")` → `registerSchedule()` → on failure `setPostState(previous)`. The ordering and rollback ARE the explanation.
|
|
56
|
+
Exception: `// X-Restli-Protocol-Version: 2.0.0 — without it LinkedIn replies in Rest.li 1.0 shape` — an external contract the code can't express.
|
|
@@ -43,7 +43,10 @@
|
|
|
43
43
|
"Need something reusable? Use the /create-skill command.",
|
|
44
44
|
"PAL learns from your feedback and improves over time. Don't be shy to give feedback!",
|
|
45
45
|
"For simple PDFs use the /create-pdf skill. Need a styled one? Use /consulting-report instead.",
|
|
46
|
-
"Use the /research skill to run comprehensive web research with multiple parallel agents."
|
|
46
|
+
"Use the /research skill to run comprehensive web research with multiple parallel agents.",
|
|
47
|
+
"Create presentations in HTML using the /presentation skill.",
|
|
48
|
+
"PAL can \"see\" what you are doing in the browser with the /playwright skill.",
|
|
49
|
+
"Want PAL to watch a youtube video? There's /analyze-youtube for that."
|
|
47
50
|
]
|
|
48
51
|
},
|
|
49
52
|
"hooks": {
|
package/package.json
CHANGED
|
@@ -378,9 +378,9 @@ function cmdAddIsc(args: string[]): void {
|
|
|
378
378
|
ok({ added: true, id, title });
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
function
|
|
382
|
-
const name = args[0] ?? fail("Usage:
|
|
383
|
-
const id = Number(args[1] ?? fail("Usage:
|
|
381
|
+
function cmdCompleteIsc(args: string[]): void {
|
|
382
|
+
const name = args[0] ?? fail("Usage: complete-isc <name> <id>");
|
|
383
|
+
const id = Number(args[1] ?? fail("Usage: complete-isc <name> <id>"));
|
|
384
384
|
if (!Number.isInteger(id) || id < 1) fail("ISC id must be a positive integer");
|
|
385
385
|
const p = requireProject(name);
|
|
386
386
|
const current = p.criteria ?? "";
|
|
@@ -396,6 +396,24 @@ function cmdCheckIsc(args: string[]): void {
|
|
|
396
396
|
ok({ checked: true, id });
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
+
function cmdReopenIsc(args: string[]): void {
|
|
400
|
+
const name = args[0] ?? fail("Usage: reopen-isc <name> <id>");
|
|
401
|
+
const id = Number(args[1] ?? fail("Usage: reopen-isc <name> <id>"));
|
|
402
|
+
if (!Number.isInteger(id) || id < 1) fail("ISC id must be a positive integer");
|
|
403
|
+
const p = requireProject(name);
|
|
404
|
+
const current = p.criteria ?? "";
|
|
405
|
+
const existing = parseIscs(current).find((i) => i.id === id);
|
|
406
|
+
if (!existing) fail(`ISC-${id} not found in project "${name}"`);
|
|
407
|
+
if (!existing.checked) {
|
|
408
|
+
ok({ checked: false, id, alreadyOpen: true });
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
p.criteria = patchIsc(current, id, false);
|
|
412
|
+
p.updated = now();
|
|
413
|
+
writeProject(p);
|
|
414
|
+
ok({ checked: false, id });
|
|
415
|
+
}
|
|
416
|
+
|
|
399
417
|
function cmdListIsc(args: string[]): void {
|
|
400
418
|
const name = args[0] ?? fail("Usage: list-isc <name>");
|
|
401
419
|
const p = requireProject(name);
|
|
@@ -482,7 +500,8 @@ Commands:
|
|
|
482
500
|
update-section <name> <section> "content" set an ISA body section
|
|
483
501
|
criteria <name> print the Criteria section
|
|
484
502
|
add-isc <name> "title" append a new open ISC to Criteria
|
|
485
|
-
|
|
503
|
+
complete-isc <name> <id> mark ISC-N as done
|
|
504
|
+
reopen-isc <name> <id> reopen ISC-N (mark not done)
|
|
486
505
|
list-isc <name> list all ISCs with open/done status
|
|
487
506
|
isa-init <name> mark project as ISA-initialized
|
|
488
507
|
scaffold-task-isa <title> create a one-shot task ISA in memory/work/
|
|
@@ -566,8 +585,11 @@ function run(): void {
|
|
|
566
585
|
case "add-isc":
|
|
567
586
|
cmdAddIsc(rest);
|
|
568
587
|
return;
|
|
569
|
-
case "
|
|
570
|
-
|
|
588
|
+
case "complete-isc":
|
|
589
|
+
cmdCompleteIsc(rest);
|
|
590
|
+
return;
|
|
591
|
+
case "reopen-isc":
|
|
592
|
+
cmdReopenIsc(rest);
|
|
571
593
|
return;
|
|
572
594
|
case "list-isc":
|
|
573
595
|
cmdListIsc(rest);
|