portable-agent-layer 0.75.1 → 0.76.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/assets/agents/gemini-researcher.md +1 -1
- package/assets/agents/grok-researcher.md +3 -3
- package/assets/agents/perplexity-researcher.md +1 -1
- package/assets/skills/analyze-pdf/SKILL.md +2 -2
- package/assets/skills/analyze-youtube/SKILL.md +1 -1
- package/assets/skills/consulting-report/SKILL.md +5 -5
- package/assets/skills/consulting-report/tools/dev.ts +1 -1
- package/assets/skills/consulting-report/tools/generate-pdf.ts +1 -1
- package/assets/skills/consulting-report/tools/scaffold.ts +2 -2
- package/assets/skills/create-pdf/SKILL.md +3 -3
- package/assets/skills/create-pdf/tools/md-to-html-pdf.ts +1 -1
- package/assets/skills/fyzz-chat-api/SKILL.md +3 -3
- package/assets/skills/onboarding/SKILL.md +1 -1
- package/assets/skills/pal-analyze/SKILL.md +1 -1
- package/assets/skills/pal-reflect/SKILL.md +2 -2
- package/assets/skills/playwright/SKILL.md +1 -1
- package/assets/skills/playwright/tools/shot.ts +1 -1
- package/assets/skills/presentation/README.md +3 -3
- package/assets/skills/presentation/SKILL.md +8 -8
- package/assets/skills/presentation/template/README.md +1 -1
- package/assets/skills/presentation/tools/new-deck.ts +1 -1
- package/assets/skills/presentation/tools/setup-template.ts +1 -1
- package/assets/skills/projects/SKILL.md +17 -8
- package/assets/skills/telos/SKILL.md +1 -1
- package/assets/templates/AGENTS.md.template +1 -1
- package/assets/templates/PAL/ALGORITHM.md +18 -18
- package/assets/templates/PAL/PROJECT_LIFECYCLE.md +1 -1
- package/assets/templates/PAL/WORK_TRACKING.md +1 -1
- package/assets/templates/rules.codex.rules +65 -0
- package/assets/templates/settings.claude.json +11 -1
- package/package.json +1 -1
- package/src/cli/builtin-tools.ts +30 -0
- package/src/cli/index.ts +17 -9
- package/src/cli/knowledge.ts +2 -1
- package/src/cli/skill.ts +56 -4
- package/src/cli/subagent.ts +1 -1
- package/src/hooks/lib/bindings.ts +2 -2
- package/src/hooks/lib/context.ts +2 -4
- package/src/hooks/lib/paths.ts +48 -8
- package/src/hooks/lib/projects.ts +1 -1
- package/src/tools/agent/algorithm-reflect.ts +3 -2
- package/src/tools/agent/algorithm-synthesize.ts +5 -2
- package/src/tools/agent/analyze.ts +2 -1
- package/src/tools/agent/handoff-note.ts +7 -6
- package/src/tools/agent/project.ts +21 -20
- package/src/tools/agent/relationship-note.ts +11 -8
- package/src/tools/agent/synthesize.ts +4 -3
- package/src/tools/agent/thread.ts +6 -5
- package/src/tools/agent/wisdom-frame.ts +3 -2
- package/src/tools/lib/script-args.ts +4 -0
- package/src/tools/lib/skill-doctor.ts +2 -2
- package/src/tools/self-model.ts +1 -1
- package/src/tools/skill-doctor.ts +1 -1
- package/src/tools/subagent-doctor.ts +4 -4
|
@@ -25,7 +25,7 @@ You are a research specialist focused on **depth and academic rigor**.
|
|
|
25
25
|
|
|
26
26
|
**Always start with Gemini Search.** Use the grounded search tool for your first sub-question:
|
|
27
27
|
```bash
|
|
28
|
-
|
|
28
|
+
pal cli skill run deep-research gemini-search -- "<query>"
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
- If it returns results → **continue using Gemini Search** for remaining queries
|
|
@@ -28,19 +28,19 @@ Use the `grok-search` tool to query the Grok API with real-time search grounding
|
|
|
28
28
|
### Current events / breaking news (web + X sources)
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
pal cli skill run deep-research grok-search -- "<your research query>" --sources web,x
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Social sentiment / trending topics (X only)
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
|
|
37
|
+
pal cli skill run deep-research grok-search -- "Search X for recent posts about: <topic>. Summarize key themes, notable accounts, and overall sentiment." --sources x
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
### Web-only search
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
43
|
+
pal cli skill run deep-research grok-search -- "<query>" --sources web
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
The tool outputs findings as markdown with a `## Sources` section listing URLs and X posts.
|
|
@@ -25,7 +25,7 @@ You are a research specialist focused on **investigative rigor and source verifi
|
|
|
25
25
|
|
|
26
26
|
**Always start with Perplexity Search.** Use the grounded search tool for your first sub-question:
|
|
27
27
|
```bash
|
|
28
|
-
|
|
28
|
+
pal cli skill run deep-research perplexity-search -- "<query>"
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
- If it returns results → **continue using Perplexity Search** for remaining queries
|
|
@@ -21,7 +21,7 @@ When the user asks to analyze, read, or extract information from a PDF:
|
|
|
21
21
|
|
|
22
22
|
- **URL**: Use the `pdf-download` CLI tool to download and archive the PDF:
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
pal cli skill run analyze-pdf pdf-download -- <url> [--filename <name.pdf>]
|
|
25
25
|
```
|
|
26
26
|
The tool downloads the file, saves it to `memory/downloads/{YYYY}/{MM}/{DD}/{filename}.pdf`, and returns JSON with the saved `path`.
|
|
27
27
|
|
|
@@ -38,7 +38,7 @@ Do NOT install PDF processing tools (poppler, pdftotext, etc.) unless the user e
|
|
|
38
38
|
If the Read tool fails to open the PDF (e.g. error mentioning `pdftoppm`, missing renderer, or unsupported format), fall back to the text-extraction CLI:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
|
|
41
|
+
pal cli skill run analyze-pdf pdf-read -- <path>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Use the stdout output as the document content and proceed with the user's request as normal.
|
|
@@ -23,7 +23,7 @@ When the user asks to analyze, summarize, or extract information from a YouTube
|
|
|
23
23
|
Use the `youtube-analyze` CLI tool. It sends the video to Gemini, which processes both visual and audio content natively.
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
|
|
26
|
+
pal cli skill run analyze-youtube youtube-analyze -- <youtube-url> [--prompt "your question"]
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
- Without `--prompt`, it returns a structured summary with key insights, topics, people, and quotes.
|
|
@@ -61,7 +61,7 @@ The component renders whatever `tunableLabel` you provide; the template never ha
|
|
|
61
61
|
### 1. Scaffold a new report
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
|
|
64
|
+
pal cli skill run consulting-report scaffold <target-dir> \
|
|
65
65
|
[--client "Client Name"] [--title "Report Title"] [--no-install]
|
|
66
66
|
```
|
|
67
67
|
|
|
@@ -79,7 +79,7 @@ Static images go in `public/`; reference them from JSX as `<img src="/your-image
|
|
|
79
79
|
### 3. Live preview while authoring
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
pal cli skill run consulting-report dev <report-dir>
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Wraps `bun run dev` in the report directory. Open the URL printed by Next, edit `app/page.tsx` or `lib/report-data.ts`, browser hot-reloads.
|
|
@@ -87,7 +87,7 @@ Wraps `bun run dev` in the report directory. Open the URL printed by Next, edit
|
|
|
87
87
|
### 4. Render the PDF
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
|
|
90
|
+
pal cli skill run consulting-report generate-pdf.mjs <report-dir>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Runs `next build` (which produces a static export at `out/`), then Playwright loads it via a tiny in-process HTTP server and prints the PDF with page-numbered header/footer. Output:
|
|
@@ -149,14 +149,14 @@ Run with **Node**, not Bun — Playwright's `chromium.launch()` hangs under Bun
|
|
|
149
149
|
## Demo
|
|
150
150
|
|
|
151
151
|
```bash
|
|
152
|
-
|
|
152
|
+
pal cli skill run consulting-report generate-pdf.mjs ~/.pal/skills/consulting-report/demo
|
|
153
153
|
```
|
|
154
154
|
|
|
155
155
|
Renders the bundled Acme Industries example end-to-end. Inspect the resulting PDF to see the full layout before authoring your own.
|
|
156
156
|
|
|
157
157
|
## Important
|
|
158
158
|
|
|
159
|
-
-
|
|
159
|
+
- Runs on Node (Playwright); the tool ships as a compiled `.mjs`, and `pal cli skill run` picks Node for that extension so no `--experimental-strip-types` is needed
|
|
160
160
|
- Bundled fonts come from Google Fonts via `next/font/google` — no licensing surface, no CDN at runtime, glyphs embedded at build time
|
|
161
161
|
- Reports are disposable artifacts of `lib/report-data.ts` + `app/page.tsx`; commit the source, not the PDF
|
|
162
162
|
- The scaffolder runs `bun install` inside the target by default — pass `--no-install` to skip
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// consulting-report skill tool: launch the Next.js dev server for live preview.
|
|
4
4
|
//
|
|
5
5
|
// Usage:
|
|
6
|
-
//
|
|
6
|
+
// pal cli skill run consulting-report dev <report-dir>
|
|
7
7
|
|
|
8
8
|
import { spawnSync } from "node:child_process";
|
|
9
9
|
import { constants as fsConstants } from "node:fs";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// and is invoked as that .mjs: a .ts under node_modules can't be type-stripped by Node.
|
|
13
13
|
//
|
|
14
14
|
// Usage:
|
|
15
|
-
//
|
|
15
|
+
// pal cli skill run consulting-report generate-pdf.mjs <report-dir> [--pdf <out>] [--html <out>] [--skip-build]
|
|
16
16
|
|
|
17
17
|
import { spawnSync } from "node:child_process";
|
|
18
18
|
import { createReadStream, constants as fsConstants, realpathSync } from "node:fs";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// and install Next.js dependencies.
|
|
5
5
|
//
|
|
6
6
|
// Usage:
|
|
7
|
-
//
|
|
7
|
+
// pal cli skill run consulting-report scaffold <target-dir> \
|
|
8
8
|
// [--client "Client Name"] [--title "Report Title"] [--no-install]
|
|
9
9
|
|
|
10
10
|
import { spawnSync } from "node:child_process";
|
|
@@ -100,7 +100,7 @@ async function run(argv: string[] = process.argv.slice(2)): Promise<void> {
|
|
|
100
100
|
console.log(` 2. Edit lib/report-data.ts (metadata) and app/page.tsx (layout)`);
|
|
101
101
|
console.log(` 3. Live preview: bun run dev`);
|
|
102
102
|
console.log(
|
|
103
|
-
` 4. Generate PDF:
|
|
103
|
+
` 4. Generate PDF: pal cli skill run consulting-report generate-pdf.mjs ${opts.targetDir}`
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -68,13 +68,13 @@ Invoke the skill tool. Flags:
|
|
|
68
68
|
Single-file example:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
|
|
71
|
+
pal cli skill run create-pdf md-to-html-pdf.mjs /path/to/report.md --pdf /path/to/report.pdf
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Multi-file example (after Step 2):
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
|
|
77
|
+
pal cli skill run create-pdf md-to-html-pdf.mjs /tmp/combined.md --pdf /path/to/report.pdf --html /path/to/report.html
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
The tool writes the self-contained HTML (inline CSS, UTF-8) and the PDF, and prints both paths + sizes on stdout.
|
|
@@ -95,7 +95,7 @@ Default styling (A4, 25mm margins, GitHub-ish look, table-friendly, page-break-a
|
|
|
95
95
|
- `--header <html|file>` / `--footer <html|file>` — running header/footer on every page. The value is either an inline HTML string or a path to an HTML file. Templates may use Playwright's injected classes: `pageNumber`, `totalPages`, `date`, `title`, `url`.
|
|
96
96
|
|
|
97
97
|
```bash
|
|
98
|
-
|
|
98
|
+
pal cli skill run create-pdf md-to-html-pdf.mjs report.md --pdf report.pdf \
|
|
99
99
|
--margin 18mm \
|
|
100
100
|
--header '<div style="font-size:9px;width:100%;text-align:center;color:#888">CONFIDENTIAL</div>' \
|
|
101
101
|
--footer '<div style="font-size:9px;width:100%;text-align:right;padding-right:12mm;color:#888"><span class="pageNumber"></span>/<span class="totalPages"></span></div>'
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// and is invoked as that .mjs: a .ts under node_modules can't be type-stripped by Node.
|
|
11
11
|
//
|
|
12
12
|
// Usage:
|
|
13
|
-
//
|
|
13
|
+
// pal cli skill run create-pdf md-to-html-pdf.mjs <input.md> \
|
|
14
14
|
// [--html <out.html>] [--pdf <out.pdf>] [--margin <css>] [--header <html|file>] [--footer <html|file>]
|
|
15
15
|
// --margin defaults to 25mm (all sides). --header/--footer accept inline HTML or a file path.
|
|
16
16
|
|
|
@@ -21,19 +21,19 @@ When you need to access the user's Fyzz Chat conversations or projects, use the
|
|
|
21
21
|
### List conversations
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
pal cli skill run fyzz-chat-api fyzz-api -- conversations [--limit 20] [--search "query"] [--project-id <id>] [--cursor <cursor>]
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
### Get a single conversation with messages
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
pal cli skill run fyzz-chat-api fyzz-api -- conversations <conversation-id>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### List projects
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
36
|
+
pal cli skill run fyzz-chat-api fyzz-api -- projects
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Setup
|
|
@@ -57,7 +57,7 @@ Read a file only when you need the format of an existing entry, or when the user
|
|
|
57
57
|
6. Write it with the telos tool, never by editing the file:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
60
|
+
pal cli skill run telos update-telos <FILE> "<content>" "<description>"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
`<FILE>` is the bare filename, `<description>` is a short line naming what the entry covers and the date it was given.
|
|
@@ -55,8 +55,8 @@ After showing results, say:
|
|
|
55
55
|
If the user confirms or corrects something, use the opinion tool:
|
|
56
56
|
```bash
|
|
57
57
|
# Confirmed
|
|
58
|
-
|
|
58
|
+
pal cli skill run opinion opinion evidence "keywords" --confirmation "what they confirmed"
|
|
59
59
|
|
|
60
60
|
# Corrected
|
|
61
|
-
|
|
61
|
+
pal cli skill run opinion opinion evidence "keywords" --contradiction "what they corrected"
|
|
62
62
|
```
|
|
@@ -36,7 +36,7 @@ If neither engine is usable, the tool prints `NO_PLAYWRIGHT_CLI` and exits non-z
|
|
|
36
36
|
2. Run the tool (it prints the absolute PNG path as its last stdout line):
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
pal cli skill run playwright shot <url> \
|
|
40
40
|
[--viewport 1440x900] [--full-page] [--selector "<css>"] [-o <out.png>]
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// caller (SKILL.md) can fall back to the Playwright MCP.
|
|
10
10
|
//
|
|
11
11
|
// Runs under Bun on every OS:
|
|
12
|
-
//
|
|
12
|
+
// pal cli skill run playwright shot <url> [opts]
|
|
13
13
|
// It used to ship a Node-compiled .mjs sibling because chromium.launch hung under Bun on
|
|
14
14
|
// Windows; bun 1.4.0 fixes that, so the Node hop and the build step are gone.
|
|
15
15
|
|
|
@@ -6,12 +6,12 @@ See `SKILL.md` for the full workflow. TL;DR:
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# one-time per brand
|
|
9
|
-
|
|
9
|
+
pal cli skill run presentation setup-template
|
|
10
10
|
|
|
11
11
|
# per deck
|
|
12
|
-
|
|
12
|
+
pal cli skill run presentation new-deck ~/decks/my-talk --template my-brand
|
|
13
13
|
$EDITOR ~/decks/my-talk/slides/
|
|
14
|
-
|
|
14
|
+
pal cli skill run presentation build ~/decks/my-talk
|
|
15
15
|
# → ./my-talk/my-talk.html (and ./my-talk/my-talk.md — concatenated source)
|
|
16
16
|
# open the .html in your browser; refresh after each rebuild
|
|
17
17
|
```
|
|
@@ -32,14 +32,14 @@ Renders a deck folder (markdown + config) to a single self-contained HTML presen
|
|
|
32
32
|
|
|
33
33
|
Interactive:
|
|
34
34
|
```bash
|
|
35
|
-
|
|
35
|
+
pal cli skill run presentation setup-template
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Walks through 9 fields: name, storage path, logo file, primary color, accent color, footer text, logo placement, fonts, aspect ratio. Optional: generate a showcase deck demonstrating every layout.
|
|
39
39
|
|
|
40
40
|
Non-interactive (Claude can drive it):
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
pal cli skill run presentation setup-template \
|
|
43
43
|
--name <slug> \
|
|
44
44
|
--logo <abs-path-to-logo.svg> \
|
|
45
45
|
--primary "#0E1335" \
|
|
@@ -57,7 +57,7 @@ Defaults if omitted: accent = derived complementary of primary; logo-placement =
|
|
|
57
57
|
### Step 1: Scaffold a deck
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
60
|
+
pal cli skill run presentation new-deck <deck-dir> --template <name> [--title "Deck title"]
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
If `--template` is omitted and only one template is registered, that one is used. If multiple are registered, the command lists them and exits. Adds `--showcase` to scaffold a demo deck with every layout exercised.
|
|
@@ -79,7 +79,7 @@ Backwards compatible: if `slides/` doesn't exist, the build falls back to a sing
|
|
|
79
79
|
### Step 3: Build
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
pal cli skill run presentation build <deck-dir> [--out <dir>] [--force]
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Output files (where `<deck-name>` = basename of `<deck-dir>`):
|
|
@@ -96,7 +96,7 @@ Override: pass `--out <dir>` to redirect elsewhere. When `--out` is *not* the de
|
|
|
96
96
|
### Step 3.5 (optional but recommended): Lint with the doctor
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
|
|
99
|
+
pal cli skill run presentation doctor <deck-dir> [--strict]
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Catches authoring failures before you ever open the browser:
|
|
@@ -346,13 +346,13 @@ Print this block as the closing of any turn that touches slides:
|
|
|
346
346
|
```bash
|
|
347
347
|
# lint — catches overflow, missing assets, layout-content mismatches
|
|
348
348
|
# bash / PowerShell / Git Bash:
|
|
349
|
-
|
|
349
|
+
pal cli skill run presentation doctor <deck-dir>
|
|
350
350
|
# Windows cmd.exe:
|
|
351
351
|
bun %USERPROFILE%\.pal\skills\presentation\tools\doctor.ts <deck-dir>
|
|
352
352
|
|
|
353
353
|
# build — writes <cwd>/<deck-name>/<deck-name>.{html,md}
|
|
354
354
|
# bash / PowerShell / Git Bash:
|
|
355
|
-
|
|
355
|
+
pal cli skill run presentation build <deck-dir>
|
|
356
356
|
# Windows cmd.exe (no ~ expansion):
|
|
357
357
|
bun %USERPROFILE%\.pal\skills\presentation\tools\build.ts <deck-dir>
|
|
358
358
|
|
|
@@ -365,7 +365,7 @@ Substitute `<deck-dir>` with the actual deck path. Do this even when you also ra
|
|
|
365
365
|
## Other commands
|
|
366
366
|
|
|
367
367
|
```bash
|
|
368
|
-
|
|
368
|
+
pal cli skill run presentation list-templates
|
|
369
369
|
```
|
|
370
370
|
|
|
371
371
|
Prints all registered templates with their primary color and storage path.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
One markdown file per slide under `slides/`. Files are concatenated at build time in filename order (use leading zeros: `001.md`, `002.md`, …). **Don't put `---` separators inside slide files** — the separator is added between files at build time.
|
|
4
4
|
|
|
5
|
-
Build: `
|
|
5
|
+
Build: `pal cli skill run presentation build .`
|
|
6
6
|
|
|
7
7
|
Output lands at `<cwd>/<deck-name>/<deck-name>.html` — open it in your browser and refresh after each rebuild.
|
|
8
8
|
|
|
@@ -103,7 +103,7 @@ lang: en
|
|
|
103
103
|
console.log(` slides: ${sourceFiles.length} file(s) in slides/`);
|
|
104
104
|
console.log(`\nNext:`);
|
|
105
105
|
console.log(` $EDITOR ${slidesDir}/`);
|
|
106
|
-
console.log(`
|
|
106
|
+
console.log(` pal cli skill run presentation build ${target}`);
|
|
107
107
|
console.log(` # output → ${target}/${slug}.html (override with --out <dir>)`);
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -30,7 +30,7 @@ Manage the user's project registry. Each project lives at `~/.pal/memory/project
|
|
|
30
30
|
All operations go through the canonical CLI:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
33
|
+
pal cli project <command> [args]
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Output is JSON.
|
|
@@ -40,7 +40,7 @@ Output is JSON.
|
|
|
40
40
|
| `list` | All registered projects with status, path, updated, stale flag, and counts |
|
|
41
41
|
| `create [name] [--path PATH] [--objectives "a;b;c"] [--serves KIND] [--serves-note "..."]` | Register a project. Defaults: name=basename(cwd), path=cwd. Slug must be `[a-z0-9_-]+`. KIND is `goal`, `revenue` or `fun` |
|
|
42
42
|
| `serves <name> <goal\|revenue\|fun> [note]` | Set what the project is for, after the fact |
|
|
43
|
-
| `resume <name>` | Print the
|
|
43
|
+
| `resume <name>` | Print the lean project view — frontmatter, body sections, and open-ISC titles (full ISC text via `show-isc`) |
|
|
44
44
|
| `add-next <name> "text"` | Append a next step (array, instantly appendable) |
|
|
45
45
|
| `add-blocker <name> "text"` | Append a blocker (array, instantly appendable) |
|
|
46
46
|
| `add-decision <name> "decision" "rationale"` | Log a timestamped decision entry to the Decisions section |
|
|
@@ -48,6 +48,15 @@ Output is JSON.
|
|
|
48
48
|
| `rm-next \| rm-blocker <name> <index>` | Remove a next/blocker entry by zero-based index |
|
|
49
49
|
| `update-section <name> <section> "content"` | Set an ISA body section (problem, goal, criteria, vision, constraints, out_of_scope, context, decisions, changelog) |
|
|
50
50
|
| `criteria <name>` | Print the Criteria section (verifiable success conditions) |
|
|
51
|
+
| `set-path <name> <new-path>` | Update the registered path |
|
|
52
|
+
| `add-isc <name> "title"` | Append a new open ISC to Criteria |
|
|
53
|
+
| `list-isc <name> [--all \| --closed \| --retired]` | List open ISCs (default), or the archived/retired sets |
|
|
54
|
+
| `show-isc <name> <id>` | Print one ISC's full text |
|
|
55
|
+
| `edit-isc <name> <id> "new text"` | Rewrite an ISC's wording, keeping its id and state |
|
|
56
|
+
| `complete-isc \| reopen-isc <name> <id>` | Archive a finished ISC, or pull one back into the open set |
|
|
57
|
+
| `retire-isc <name> <id> [--by <id>]` | Close an ISC that stopped being valid, not as done |
|
|
58
|
+
| `prune-isc <name>` | Sweep legacy done ISCs from Criteria into the Changelog archive |
|
|
59
|
+
| `scaffold-task-isa <title>` / `complete-task-isa <slug>` | Create and close a one-shot task ISA in `memory/work/` |
|
|
51
60
|
| `isa-init <name>` | Mark a project as ISA-initialized |
|
|
52
61
|
| `complete <name>` / `archive <name>` / `pause <name>` / `unpause <name>` | Status transitions |
|
|
53
62
|
| `rm <name>` | Delete the project directory entirely |
|
|
@@ -115,7 +124,7 @@ When the user describes next steps, blockers, or decisions during normal work, i
|
|
|
115
124
|
User: "store under <project> that a reference implementation exists in this repo"
|
|
116
125
|
→ Identify the project from `list` (or by name)
|
|
117
126
|
→ Durable reference, not a task → update-section
|
|
118
|
-
→
|
|
127
|
+
→ pal cli project update-section <slug> context "Reference implementation lives in this repo"
|
|
119
128
|
```
|
|
120
129
|
|
|
121
130
|
**Registering the current repo**
|
|
@@ -123,32 +132,32 @@ User: "store under <project> that a reference implementation exists in this repo
|
|
|
123
132
|
User: "track this project"
|
|
124
133
|
→ Default name from cwd basename, confirm with user
|
|
125
134
|
→ Ask what it serves: a goal, a way it could pay, or fun
|
|
126
|
-
→
|
|
135
|
+
→ pal cli project create --path "$(pwd)" --objectives "first objective; second objective" --serves revenue --serves-note "could be sold as a service"
|
|
127
136
|
```
|
|
128
137
|
|
|
129
138
|
**Correcting what a project is for**
|
|
130
139
|
```
|
|
131
140
|
User: "<project> isn't a toy, it's the thing I'd actually sell"
|
|
132
|
-
→
|
|
141
|
+
→ pal cli project serves <slug> revenue "the one I would sell"
|
|
133
142
|
```
|
|
134
143
|
|
|
135
144
|
**Logging a decision**
|
|
136
145
|
```
|
|
137
146
|
User: "we decided <decision> because <reason>"
|
|
138
|
-
→
|
|
147
|
+
→ pal cli project add-decision <slug> "<decision>" "<reason>"
|
|
139
148
|
```
|
|
140
149
|
|
|
141
150
|
**Setting the goal and criteria**
|
|
142
151
|
```
|
|
143
152
|
User: "set the goal for pal to 'ship ISA support with full test coverage'"
|
|
144
|
-
→
|
|
153
|
+
→ pal cli project update-section pal goal "ship ISA support with full test coverage"
|
|
145
154
|
```
|
|
146
155
|
|
|
147
156
|
**Completing a project**
|
|
148
157
|
```
|
|
149
158
|
User: "mark <project> as complete"
|
|
150
159
|
→ Confirm
|
|
151
|
-
→
|
|
160
|
+
→ pal cli project complete <slug>
|
|
152
161
|
```
|
|
153
162
|
|
|
154
163
|
## Anti-patterns
|
|
@@ -43,7 +43,7 @@ Read the file directly from `~/.pal/telos/` when the user asks about any area. S
|
|
|
43
43
|
Appends content, creates backup, logs the change:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
pal cli skill run telos update-telos <FILE> "<content>" "<description>"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
## Routing
|
|
@@ -55,7 +55,7 @@ Start your response with the following header in this mode:
|
|
|
55
55
|
|
|
56
56
|
- **Mandatory output format** — Every response MUST use exactly one of the output formats above (ALGORITHM, NATIVE, or MINIMAL). No freeform output.
|
|
57
57
|
- **Response format before questions** — Always complete the current response format output FIRST, then invoke AskUserQuestion at the end.
|
|
58
|
-
- **Named project → resume first** — Whenever the user references a project by name in ANY mode, run `
|
|
58
|
+
- **Named project → resume first** — Whenever the user references a project by name in ANY mode, run `pal cli project resume <slug>` before any file search or task execution. The project record has paths, context, and handoff notes that make manual searching unnecessary.
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
@@ -41,10 +41,10 @@ Thinking-only. No tool calls except context recovery (Grep/Glob/Read).
|
|
|
41
41
|
```bash
|
|
42
42
|
# If cwd matches a registered project — read its open ISCs (Ideal State Criteria):
|
|
43
43
|
# list-isc returns OPEN criteria by default; pass --all or --closed to see finished ones.
|
|
44
|
-
|
|
44
|
+
pal cli project list-isc <project-name>
|
|
45
45
|
|
|
46
46
|
# If this is ad-hoc work with no registered project — scaffold a task ISA:
|
|
47
|
-
|
|
47
|
+
pal cli project scaffold-task-isa "<task title>"
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Surface any open ISCs as live context: they are unfinished criteria from prior sessions. New criteria defined in this session extend them (use `add-isc`), not replace them.
|
|
@@ -243,7 +243,7 @@ Focus: reasoning approach, problem decomposition, anticipation, blind spots.
|
|
|
243
243
|
**2. Reflection Log** — record algorithm performance:
|
|
244
244
|
|
|
245
245
|
```bash
|
|
246
|
-
|
|
246
|
+
pal cli algorithm-reflect --task "description" --criteria N --passed N --failed N --sentiment 1-10 \
|
|
247
247
|
--q1 "self reflection" --q2 "algorithm reflection" --q3 "AI reflection" --scope general
|
|
248
248
|
```
|
|
249
249
|
|
|
@@ -255,16 +255,16 @@ The goal is behavioral intelligence about the user, not a session log. Session l
|
|
|
255
255
|
|
|
256
256
|
```bash
|
|
257
257
|
# Opinion — behavioral observation about the user (what you noticed about how they work):
|
|
258
|
-
|
|
258
|
+
pal cli relationship-note --o "User prefers reviewing existing code before adding anything new" --confidence 0.80
|
|
259
259
|
|
|
260
260
|
# World fact — objective fact about the user's situation (tech stack, project state, context):
|
|
261
|
-
|
|
261
|
+
pal cli relationship-note --w "User is building a backend service in TypeScript with Bun"
|
|
262
262
|
|
|
263
263
|
# Session diary — what the agent did this session (first-person, specific):
|
|
264
|
-
|
|
264
|
+
pal cli relationship-note --b "Refactored the auth middleware to support refresh token rotation"
|
|
265
265
|
|
|
266
266
|
# Multiple notes in one call:
|
|
267
|
-
|
|
267
|
+
pal cli relationship-note --o "User prefers one verified change at a time, not batches" --confidence 0.80 --b "Fixed the path-normalization bug in the hook merge logic"
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
**O (Opinion) — what to write:**
|
|
@@ -291,10 +291,10 @@ Skip only if the session was a trivial lookup or typo fix (same rule as step 2).
|
|
|
291
291
|
|
|
292
292
|
```bash
|
|
293
293
|
# Work still in progress:
|
|
294
|
-
|
|
294
|
+
pal cli handoff-note --title "what we were doing" --text "what remains, decisions made, next steps"
|
|
295
295
|
|
|
296
296
|
# Work finished — clear any previous in-progress handoff:
|
|
297
|
-
|
|
297
|
+
pal cli handoff-note --done --title "what we completed"
|
|
298
298
|
```
|
|
299
299
|
|
|
300
300
|
- Write if anything is left mid-flight: unfinished implementation, open decision, partially debugged issue
|
|
@@ -306,21 +306,21 @@ bun ~/.pal/tools/handoff-note.ts --done --title "what we completed"
|
|
|
306
306
|
**Project work** — use ISCs, not threads:
|
|
307
307
|
```bash
|
|
308
308
|
# Close completed ISCs:
|
|
309
|
-
|
|
309
|
+
pal cli project complete-isc <project-name> <id>
|
|
310
310
|
|
|
311
311
|
# Open new ISCs for unfinished work:
|
|
312
|
-
|
|
312
|
+
pal cli project add-isc <project-name> "what remains"
|
|
313
313
|
```
|
|
314
314
|
|
|
315
315
|
**Task ISA (one-shot work)** — mark complete when done:
|
|
316
316
|
```bash
|
|
317
|
-
|
|
317
|
+
pal cli project complete-task-isa <slug>
|
|
318
318
|
```
|
|
319
319
|
|
|
320
320
|
**Cross-project or non-project follow-ups** — use threads:
|
|
321
321
|
```bash
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
pal cli thread --add --title "brief title" --context "why it matters, what needs to happen"
|
|
323
|
+
pal cli thread --resolve --id <id>
|
|
324
324
|
```
|
|
325
325
|
|
|
326
326
|
**6. Opinion capture** — scan the conversation for moments where the user:
|
|
@@ -331,13 +331,13 @@ bun ~/.pal/tools/thread.ts --resolve --id <id>
|
|
|
331
331
|
For each, invoke the opinion tool:
|
|
332
332
|
```bash
|
|
333
333
|
# User confirmed a preference
|
|
334
|
-
|
|
334
|
+
pal cli skill run opinion opinion evidence "matching keywords" --confirmation "what they confirmed"
|
|
335
335
|
|
|
336
336
|
# User corrected a preference
|
|
337
|
-
|
|
337
|
+
pal cli skill run opinion opinion evidence "matching keywords" --contradiction "what they corrected"
|
|
338
338
|
|
|
339
339
|
# New pattern observed (no existing opinion matches)
|
|
340
|
-
|
|
340
|
+
pal cli skill run opinion opinion add "the preference" --category communication|technical|workflow|general
|
|
341
341
|
```
|
|
342
342
|
|
|
343
343
|
Skip if nothing in the conversation touched preferences or working style.
|
|
@@ -345,7 +345,7 @@ Skip if nothing in the conversation touched preferences or working style.
|
|
|
345
345
|
**7. Wisdom Frame** (Extended+ only) — if the session produced a genuine, reusable insight:
|
|
346
346
|
|
|
347
347
|
```bash
|
|
348
|
-
|
|
348
|
+
pal cli wisdom-frame --domain <domain> --observation "insight" [--type principle|contextual-rule|anti-pattern|evolution]
|
|
349
349
|
```
|
|
350
350
|
|
|
351
351
|
Domains: `development`, `workflow`, `communication`, `infrastructure`, `integration`, or any fitting domain.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project Lifecycle
|
|
2
2
|
|
|
3
|
-
You (the AI) own the project lifecycle. Project state lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project, managed via `
|
|
3
|
+
You (the AI) own the project lifecycle. Project state lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project, managed via `pal cli project`. Active projects are auto-injected into every SessionStart context regardless of cwd.
|
|
4
4
|
|
|
5
5
|
## When to invoke the CLI
|
|
6
6
|
|
|
@@ -4,4 +4,4 @@ PAL tracks your work across sessions in `memory/state/sessions.json` (auto-captu
|
|
|
4
4
|
|
|
5
5
|
## Projects
|
|
6
6
|
|
|
7
|
-
Projects are managed via the `/projects` skill. State lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project. Inspect with `
|
|
7
|
+
Projects are managed via the `/projects` skill. State lives in `~/.pal/memory/state/progress/{slug}.json`, one file per project. Inspect with `pal cli project list`; manage via `~/.pal/docs/PROJECT_LIFECYCLE.md`.
|