portable-agent-layer 0.10.0 → 0.12.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/skills/{analyze-pdf.md → analyze-pdf/SKILL.md} +4 -4
- package/{src → assets/skills/analyze-pdf}/tools/pdf-download.ts +3 -3
- package/assets/skills/{analyze-youtube.md → analyze-youtube/SKILL.md} +4 -4
- package/{src → assets/skills/analyze-youtube}/tools/youtube-analyze.ts +2 -2
- package/assets/skills/{council.md → council/SKILL.md} +3 -2
- package/assets/skills/{create-skill.md → create-skill/SKILL.md} +2 -1
- package/assets/skills/{extract-entities.md → extract-entities/SKILL.md} +4 -5
- package/{src → assets/skills/extract-entities}/tools/entity-save.ts +3 -3
- package/assets/skills/{extract-wisdom.md → extract-wisdom/SKILL.md} +3 -2
- package/assets/skills/{first-principles.md → first-principles/SKILL.md} +3 -2
- package/assets/skills/{fyzz-chat-api.md → fyzz-chat-api/SKILL.md} +6 -6
- package/{src → assets/skills/fyzz-chat-api}/tools/fyzz-api.ts +6 -6
- package/assets/skills/{reflect.md → reflect/SKILL.md} +2 -1
- package/assets/skills/{research.md → research/SKILL.md} +2 -1
- package/assets/skills/{review.md → review/SKILL.md} +2 -1
- package/assets/skills/{summarize.md → summarize/SKILL.md} +3 -2
- package/assets/skills/telos/SKILL.md +94 -0
- package/assets/skills/telos/tools/update-telos.ts +100 -0
- package/assets/skills/think/SKILL.md +47 -0
- package/assets/templates/AGENTS.md.template +51 -32
- package/assets/templates/PAL/ALGORITHM.md +120 -0
- package/assets/templates/PAL/CONTEXT_ROUTING.md +28 -0
- package/assets/templates/PAL/MEMORY_SYSTEM.md +26 -0
- package/assets/templates/PAL/OPINION_TRACKING.md +3 -0
- package/assets/templates/PAL/STEERING_RULES.md +43 -0
- package/assets/templates/PAL/WORK_TRACKING.md +14 -0
- package/assets/templates/pal-settings.json +32 -0
- package/assets/templates/settings.claude.json +80 -0
- package/package.json +4 -7
- package/src/cli/index.ts +7 -0
- package/src/cli/setup-identity.ts +119 -0
- package/src/hooks/lib/claude-md.ts +52 -26
- package/src/hooks/lib/context.ts +49 -25
- package/src/hooks/lib/paths.ts +2 -0
- package/src/hooks/lib/security.ts +2 -0
- package/src/hooks/lib/setup.ts +4 -16
- package/src/targets/claude/install.ts +20 -93
- package/src/targets/claude/uninstall.ts +22 -47
- package/src/targets/lib.ts +207 -48
- package/src/targets/opencode/install.ts +13 -2
- package/src/targets/opencode/uninstall.ts +4 -1
- package/assets/templates/STEERING-RULES.md +0 -23
- package/assets/templates/telos/IDENTITY.md +0 -4
- package/src/cli/install.ts +0 -86
- package/src/cli/uninstall.ts +0 -45
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analyze-pdf
|
|
3
|
-
description: Download and analyze PDF files from URLs or local paths — extract text, answer questions, summarize content
|
|
3
|
+
description: Download and analyze PDF files from URLs or local paths — extract text, answer questions, summarize content. Use when analyzing, reading, or extracting information from a PDF.
|
|
4
|
+
argument-hint: <URL or file path>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
When the user asks to analyze, read, or extract information from a PDF:
|
|
7
8
|
|
|
8
9
|
## How to get the PDF
|
|
9
10
|
|
|
10
|
-
- **URL**: Use the `
|
|
11
|
+
- **URL**: Use the `pdf-download` CLI tool to download and archive the PDF:
|
|
11
12
|
```bash
|
|
12
|
-
bun
|
|
13
|
+
bun ~/.agents/skills/analyze-pdf/tools/pdf-download.ts -- <url> [--filename <name.pdf>]
|
|
13
14
|
```
|
|
14
15
|
The tool downloads the file, saves it to `memory/downloads/{YYYY}/{MM}/{DD}/{filename}.pdf`, and returns JSON with the saved `path`.
|
|
15
16
|
|
|
@@ -33,7 +34,6 @@ Follow the user's request. Common tasks:
|
|
|
33
34
|
|
|
34
35
|
## Guidelines
|
|
35
36
|
|
|
36
|
-
- Always run the tool from the PAL directory (the `ai:pdf-download` script is registered there)
|
|
37
37
|
- For large PDFs, read specific page ranges rather than the entire document
|
|
38
38
|
- Preserve the original structure (headings, lists, tables) when relevant
|
|
39
39
|
- Quote verbatim when the user asks about specific content
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Saves to: {PAL_ROOT}/memory/downloads/{YYYY}/{MM}/{DD}/{filename}.pdf
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* bun
|
|
9
|
+
* bun pdf-download.ts -- <url> [--filename <name.pdf>]
|
|
10
10
|
*
|
|
11
11
|
* Returns JSON with the saved file path for downstream reading.
|
|
12
12
|
*/
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { mkdir } from "node:fs/promises";
|
|
15
15
|
import { basename, join } from "node:path";
|
|
16
16
|
import { parseArgs } from "node:util";
|
|
17
|
-
import { palHome } from "
|
|
17
|
+
import { palHome } from "../../../../src/hooks/lib/paths";
|
|
18
18
|
|
|
19
19
|
const DOWNLOADS_DIR = join(palHome(), "memory", "downloads");
|
|
20
20
|
|
|
@@ -45,7 +45,7 @@ async function main() {
|
|
|
45
45
|
|
|
46
46
|
const url = positionals[0];
|
|
47
47
|
if (!url) {
|
|
48
|
-
console.error("Usage: bun
|
|
48
|
+
console.error("Usage: bun pdf-download.ts -- <url> [--filename <name.pdf>]");
|
|
49
49
|
process.exit(1);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analyze-youtube
|
|
3
|
-
description: Analyze YouTube videos using Gemini's native video understanding — summarize, extract insights, answer questions
|
|
3
|
+
description: Analyze YouTube videos using Gemini's native video understanding — summarize, extract insights, answer questions. Use when analyzing, summarizing, or extracting information from a YouTube video.
|
|
4
|
+
argument-hint: <YouTube URL>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
When the user asks to analyze, summarize, or extract information from a YouTube video:
|
|
7
8
|
|
|
8
9
|
## How to analyze
|
|
9
10
|
|
|
10
|
-
Use the `
|
|
11
|
+
Use the `youtube-analyze` CLI tool. It sends the video to Gemini, which processes both visual and audio content natively.
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
|
-
bun
|
|
14
|
+
bun ~/.agents/skills/analyze-youtube/tools/youtube-analyze.ts -- <youtube-url> [--prompt "your question"]
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
- Without `--prompt`, it returns a structured summary with key insights, topics, people, and quotes.
|
|
@@ -28,7 +29,6 @@ Follow the user's request. Common tasks:
|
|
|
28
29
|
|
|
29
30
|
## Guidelines
|
|
30
31
|
|
|
31
|
-
- Always run the tool from the PAL directory (the `ai:youtube-analyze` script is registered there)
|
|
32
32
|
- For long videos, consider asking a focused question via `--prompt` rather than a full analysis
|
|
33
33
|
- Gemini sees both visuals and audio — mention on-screen content (slides, code, diagrams) when relevant
|
|
34
34
|
- Quote speakers verbatim when the user asks about specific statements
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Requires GEMINI_API_KEY environment variable.
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* bun
|
|
10
|
+
* bun youtube-analyze.ts -- <youtube-url> [--prompt "your question"]
|
|
11
11
|
*
|
|
12
12
|
* Default prompt extracts a structured summary with key insights.
|
|
13
13
|
*/
|
|
@@ -45,7 +45,7 @@ async function main() {
|
|
|
45
45
|
const url = positionals[0];
|
|
46
46
|
if (!url) {
|
|
47
47
|
console.error(
|
|
48
|
-
'Usage: bun
|
|
48
|
+
'Usage: bun youtube-analyze.ts -- <youtube-url> [--prompt "your question"]'
|
|
49
49
|
);
|
|
50
50
|
process.exit(1);
|
|
51
51
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: council
|
|
3
|
-
description: Multi-perspective parallel debate on a decision — 3-5 independent perspectives argue in parallel, then synthesize into a verdict
|
|
3
|
+
description: Multi-perspective parallel debate on a decision — 3-5 independent perspectives argue in parallel, then synthesize into a verdict. Use when debating, weighing options, or needing multiple viewpoints on a question.
|
|
4
|
+
argument-hint: <question or decision>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Debate $ARGUMENTS from multiple perspectives:
|
|
7
8
|
|
|
8
9
|
## Step 1: Define Perspectives
|
|
9
10
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-skill
|
|
3
|
-
description: Scaffold a new PAL skill from a description
|
|
3
|
+
description: Scaffold a new PAL skill from a description. Use when creating a new skill, adding a capability, or building a custom command.
|
|
4
|
+
argument-hint: <skill description>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
When the user invokes /create-skill <name> <description>:
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: extract-entities
|
|
3
|
-
description: Extract people and companies from content (articles, videos, URLs, pasted text)
|
|
3
|
+
description: Extract people and companies from content (articles, videos, URLs, pasted text). Use when identifying who and what organizations are mentioned in content.
|
|
4
|
+
argument-hint: <content, URL, or pasted text>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Extract people and companies from $ARGUMENTS:
|
|
7
8
|
|
|
8
9
|
1. Read/fetch the content
|
|
9
10
|
2. Extract ALL people and companies mentioned
|
|
@@ -52,12 +53,10 @@ Return structured JSON:
|
|
|
52
53
|
|
|
53
54
|
## Persistence
|
|
54
55
|
|
|
55
|
-
Always run the tool from the PAL directory (the `ai:entity-save` script is registered there).
|
|
56
|
-
|
|
57
56
|
After displaying results, ask the user if they want to save. When saving, pipe the JSON output through the entity-save tool which handles deduplication automatically:
|
|
58
57
|
|
|
59
58
|
```bash
|
|
60
|
-
echo '<the JSON output>' | bun
|
|
59
|
+
echo '<the JSON output>' | bun ~/.agents/skills/extract-entities/tools/entity-save.ts -- --source "<URL or content origin>"
|
|
61
60
|
```
|
|
62
61
|
|
|
63
62
|
The tool deduplicates against the entity index (`memory/entities/entity-index.json`), assigns stable UUIDs, tracks occurrences, and reports what was new vs existing.
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* deduplicates against the entity index, and saves.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* echo '{"people":[...],"companies":[...]}' | bun
|
|
10
|
-
* bun
|
|
9
|
+
* echo '{"people":[...],"companies":[...]}' | bun entity-save.ts -- --source "https://example.com"
|
|
10
|
+
* bun entity-save.ts -- --file /path/to/extracted.json --source "https://example.com"
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { readFileSync } from "node:fs";
|
|
14
14
|
import { parseArgs } from "node:util";
|
|
15
|
-
import { loadEntityIndex, processEntities } from "
|
|
15
|
+
import { loadEntityIndex, processEntities } from "../../../../src/hooks/lib/entities";
|
|
16
16
|
|
|
17
17
|
const { values } = parseArgs({
|
|
18
18
|
args: Bun.argv.slice(2),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: extract-wisdom
|
|
3
|
-
description: Extract structured insights from content (articles, videos, podcasts)
|
|
3
|
+
description: Extract structured insights from content (articles, videos, podcasts). Use when extracting wisdom, key takeaways, or structured insights from any content.
|
|
4
|
+
argument-hint: <content or URL>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Extract structured insights from $ARGUMENTS:
|
|
7
8
|
|
|
8
9
|
1. Read/fetch the content
|
|
9
10
|
2. Extract:
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: first-principles
|
|
3
|
-
description: Break down a problem to its fundamental constraints and build up a solution
|
|
3
|
+
description: Break down a problem to its fundamental constraints and build up a solution. Use when decomposing complexity, challenging assumptions, or finding root causes.
|
|
4
|
+
argument-hint: <problem>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Break down $ARGUMENTS to fundamentals:
|
|
7
8
|
|
|
8
9
|
1. **State the problem** clearly in one sentence
|
|
9
10
|
2. **Identify assumptions** — what are we taking for granted?
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fyzz-chat-api
|
|
3
|
-
description: Query Fyzz Chat conversations and projects via the REST API
|
|
3
|
+
description: Query Fyzz Chat conversations and projects via the REST API. Use when looking up conversations, searching chat history, or listing projects in Fyzz Chat.
|
|
4
|
+
argument-hint: <conversations|projects> [options]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
When you need to access the user's Fyzz Chat conversations or projects, use the `
|
|
7
|
+
When you need to access the user's Fyzz Chat conversations or projects, use the `fyzz-api` CLI tool. The tool reads the API key from the `FYZZ_API_KEY` environment variable automatically — never attempt to read, print, or reference the API key or the env var directly.
|
|
7
8
|
|
|
8
9
|
## Available commands
|
|
9
10
|
|
|
10
11
|
### List conversations
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
|
-
bun
|
|
14
|
+
bun ~/.agents/skills/fyzz-chat-api/tools/fyzz-api.ts -- conversations [--limit 20] [--search "query"] [--project-id <id>] [--cursor <cursor>]
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
### Get a single conversation with messages
|
|
17
18
|
|
|
18
19
|
```bash
|
|
19
|
-
bun
|
|
20
|
+
bun ~/.agents/skills/fyzz-chat-api/tools/fyzz-api.ts -- conversations <conversation-id>
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
### List projects
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
|
-
bun
|
|
26
|
+
bun ~/.agents/skills/fyzz-chat-api/tools/fyzz-api.ts -- projects
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
## Setup
|
|
@@ -35,7 +36,6 @@ If the tool reports a missing API key:
|
|
|
35
36
|
|
|
36
37
|
## Guidelines
|
|
37
38
|
|
|
38
|
-
- Always run the tool from the PAL directory (the `ai:fyzz-api` script is registered there)
|
|
39
39
|
- The API key is never visible in this conversation — that is by design
|
|
40
40
|
- Use `--search` for keyword-based lookup across titles and message content
|
|
41
41
|
- Use `--project-id` to scope results to a specific project
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Returns JSON responses from the Fyzz Chat REST API.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* bun
|
|
10
|
-
* bun
|
|
11
|
-
* bun
|
|
9
|
+
* bun fyzz-api.ts -- conversations [--limit 20] [--search "query"] [--project-id <id>] [--cursor <cursor>]
|
|
10
|
+
* bun fyzz-api.ts -- conversations <id>
|
|
11
|
+
* bun fyzz-api.ts -- projects
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { parseArgs } from "node:util";
|
|
@@ -53,11 +53,11 @@ const command = args[0];
|
|
|
53
53
|
|
|
54
54
|
if (!command || command === "--help" || command === "-h") {
|
|
55
55
|
console.log("Usage:");
|
|
56
|
-
console.log(" bun
|
|
56
|
+
console.log(" bun fyzz-api.ts -- conversations List conversations");
|
|
57
57
|
console.log(
|
|
58
|
-
" bun
|
|
58
|
+
" bun fyzz-api.ts -- conversations <id> Get conversation with messages"
|
|
59
59
|
);
|
|
60
|
-
console.log(" bun
|
|
60
|
+
console.log(" bun fyzz-api.ts -- projects List projects");
|
|
61
61
|
console.log("");
|
|
62
62
|
console.log("Options for 'conversations' (list mode):");
|
|
63
63
|
console.log(" --limit <n> Max results (default 20)");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reflect
|
|
3
|
-
description: Diagnose why a PAL behavior did not trigger as expected — trace hooks, instructions, and logic to find the gap
|
|
3
|
+
description: Diagnose why a PAL behavior did not trigger as expected — trace hooks, instructions, and logic to find the gap. Use when a hook, skill, or automation didn't fire or behaved unexpectedly.
|
|
4
|
+
argument-hint: <what went wrong>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
When the user invokes `/reflect [optional: description of what didn't happen]`:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: research
|
|
3
|
-
description: Multi-agent parallel research — quick/standard/extensive modes with specialized researcher agents for depth, breadth, and verification
|
|
3
|
+
description: Multi-agent parallel research — quick/standard/extensive modes with specialized researcher agents for depth, breadth, and verification. Use when researching a topic, finding information, or investigating something thoroughly.
|
|
4
|
+
argument-hint: <topic or question>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
## Mode Routing
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
|
-
description: Security-focused code review with severity ratings
|
|
3
|
+
description: Security-focused code review with severity ratings. Use when reviewing code for security issues, vulnerabilities, or OWASP concerns.
|
|
4
|
+
argument-hint: [file or directory]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
When the user invokes /review <file, diff, or PR>:
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: summarize
|
|
3
|
-
description: Structured summarization of documents, URLs, or conversations
|
|
3
|
+
description: Structured summarization of documents, URLs, or conversations. Use when summarizing content, creating overviews, or distilling key points.
|
|
4
|
+
argument-hint: <document, URL, or topic>
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Summarize $ARGUMENTS:
|
|
7
8
|
|
|
8
9
|
1. Fetch or read the target content
|
|
9
10
|
2. Produce:
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: telos
|
|
3
|
+
description: Personal and project context management. Use when discussing goals, projects, beliefs, challenges, identity, updating telos, life context, what am I working on, adding a project, changing a goal, priorities, what do I believe, current obstacles, mission, or strategies.
|
|
4
|
+
argument-hint: [area to view or update]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Manage the user's TELOS files — the persistent personal context that drives PAL.
|
|
8
|
+
|
|
9
|
+
## TELOS Files
|
|
10
|
+
|
|
11
|
+
All files live in `~/.agents/PAL/telos/`:
|
|
12
|
+
|
|
13
|
+
| File | Contains |
|
|
14
|
+
|------|----------|
|
|
15
|
+
| `GOALS.md` | Short/medium/long-term goals |
|
|
16
|
+
| `PROJECTS.md` | Active projects, status, priority |
|
|
17
|
+
| `BELIEFS.md` | Core principles and values |
|
|
18
|
+
| `CHALLENGES.md` | Current obstacles |
|
|
19
|
+
| `MISSION.md` | Purpose and direction |
|
|
20
|
+
| `STRATEGIES.md` | Approaches and plans |
|
|
21
|
+
| `IDEAS.md` | Ideas to explore |
|
|
22
|
+
| `LEARNED.md` | Key lessons |
|
|
23
|
+
| `MODELS.md` | Mental models |
|
|
24
|
+
| `NARRATIVES.md` | Narrative context |
|
|
25
|
+
|
|
26
|
+
## Reading
|
|
27
|
+
|
|
28
|
+
Read the file directly from `~/.agents/PAL/telos/` when the user asks about any area. Summarize what's relevant — don't dump the entire file unless asked.
|
|
29
|
+
|
|
30
|
+
## Updating
|
|
31
|
+
|
|
32
|
+
Use the update tool for all changes. It validates the file, creates a backup, appends content, and logs the change:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bun ~/.agents/skills/telos/tools/update-telos.ts <FILE> "<content>" "<description>"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Routing
|
|
39
|
+
|
|
40
|
+
| Intent | Action |
|
|
41
|
+
|--------|--------|
|
|
42
|
+
| "what am I working on", "my projects", "priorities" | Read `PROJECTS.md`, summarize active work |
|
|
43
|
+
| "my goals", "what are my goals" | Read `GOALS.md`, present current state |
|
|
44
|
+
| "update goals/projects/beliefs/challenges" | Read the target file, discuss changes with user, then run update tool |
|
|
45
|
+
| "add a project", "new project" | Read `PROJECTS.md`, confirm with user, run update tool |
|
|
46
|
+
| "complete/remove a project" | Read `PROJECTS.md`, confirm with user, update status via tool |
|
|
47
|
+
| "what do I believe", "my principles" | Read `BELIEFS.md` |
|
|
48
|
+
| "current obstacles", "challenges" | Read `CHALLENGES.md` |
|
|
49
|
+
| "I learned something", "lesson" | Discuss, then append to `LEARNED.md` via tool |
|
|
50
|
+
| "I have an idea" | Discuss, then append to `IDEAS.md` via tool |
|
|
51
|
+
| General "update telos", "telos" | Ask which area to review/update |
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
**Example 1: Checking projects**
|
|
56
|
+
```
|
|
57
|
+
User: "what am I working on?"
|
|
58
|
+
→ Read PROJECTS.md
|
|
59
|
+
→ Summarize active work by priority — don't list every column
|
|
60
|
+
→ Highlight status changes, blockers, what needs attention
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Example 2: Adding a project**
|
|
64
|
+
```
|
|
65
|
+
User: "add my new side project"
|
|
66
|
+
→ Ask: "What's the project name, status, and priority?"
|
|
67
|
+
→ User provides details
|
|
68
|
+
→ Show the row you'll add, confirm
|
|
69
|
+
→ Run: bun ~/.agents/skills/telos/tools/update-telos.ts PROJECTS.md "| Side Project | In progress | Medium | Description |" "Added Side Project"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Example 3: Updating goals**
|
|
73
|
+
```
|
|
74
|
+
User: "I finished the migration, update my goals"
|
|
75
|
+
→ Read GOALS.md to see current state
|
|
76
|
+
→ Discuss what changed — what's done, what's next
|
|
77
|
+
→ Run tool to append updated goals
|
|
78
|
+
→ Remind: CLAUDE.md regenerates next session
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Anti-patterns
|
|
82
|
+
|
|
83
|
+
- **Don't dump raw file contents.** Summarize what's relevant to the user's question. They can ask for the full file if needed.
|
|
84
|
+
- **Don't update without confirming.** Always show what you'll change and get a "yes" before running the tool.
|
|
85
|
+
- **Don't create new TELOS files.** Only the 10 listed files are valid. If something doesn't fit, suggest the closest match.
|
|
86
|
+
- **Don't mix TELOS with identity.** AI/principal identity lives in `pal-settings.json`, not TELOS. TELOS is personal context — goals, beliefs, projects.
|
|
87
|
+
- **Don't reference stale data.** If TELOS was loaded earlier in the session via context routing, re-read the file before updating — it may have changed.
|
|
88
|
+
|
|
89
|
+
## Rules
|
|
90
|
+
|
|
91
|
+
- **Always read the file first** before making changes — match the existing format exactly
|
|
92
|
+
- **Confirm changes** with the user before running the update tool
|
|
93
|
+
- **Always use the tool** for writes — never edit TELOS files directly
|
|
94
|
+
- CLAUDE.md auto-regenerates from these files on next session start
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* UpdateTelos — Validate, backup, update, and log changes to TELOS files.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* bun update-telos.ts <file> "<content>" "<description>"
|
|
7
|
+
*
|
|
8
|
+
* - Validates the filename against the known TELOS files
|
|
9
|
+
* - Creates a timestamped backup before modifying
|
|
10
|
+
* - Appends content (preserves existing)
|
|
11
|
+
* - Logs the change to updates.md
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
copyFileSync,
|
|
16
|
+
existsSync,
|
|
17
|
+
mkdirSync,
|
|
18
|
+
readFileSync,
|
|
19
|
+
writeFileSync,
|
|
20
|
+
} from "node:fs";
|
|
21
|
+
import { resolve } from "node:path";
|
|
22
|
+
import { palHome } from "../../../../src/hooks/lib/paths";
|
|
23
|
+
|
|
24
|
+
const TELOS_DIR = resolve(palHome(), "telos");
|
|
25
|
+
const BACKUPS_DIR = resolve(TELOS_DIR, "backups");
|
|
26
|
+
const UPDATES_LOG = resolve(TELOS_DIR, "updates.md");
|
|
27
|
+
|
|
28
|
+
const VALID_FILES = [
|
|
29
|
+
"BELIEFS.md",
|
|
30
|
+
"CHALLENGES.md",
|
|
31
|
+
"GOALS.md",
|
|
32
|
+
"IDEAS.md",
|
|
33
|
+
"LEARNED.md",
|
|
34
|
+
"MISSION.md",
|
|
35
|
+
"MODELS.md",
|
|
36
|
+
"NARRATIVES.md",
|
|
37
|
+
"PROJECTS.md",
|
|
38
|
+
"STRATEGIES.md",
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
function timestamp(): string {
|
|
42
|
+
const now = new Date();
|
|
43
|
+
const pad = (n: number) => n.toString().padStart(2, "0");
|
|
44
|
+
return `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function isoDate(): string {
|
|
48
|
+
return new Date().toISOString().replace("T", " ").slice(0, 19);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const args = process.argv.slice(2);
|
|
52
|
+
const file = args[0];
|
|
53
|
+
const content = args[1];
|
|
54
|
+
const description = args[2];
|
|
55
|
+
|
|
56
|
+
if (!file || !content || !description) {
|
|
57
|
+
console.error('Usage: bun update-telos.ts <file> "<content>" "<description>"');
|
|
58
|
+
console.error(`\nValid files: ${VALID_FILES.join(", ")}`);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!VALID_FILES.includes(file)) {
|
|
63
|
+
console.error(`Error: "${file}" is not a valid TELOS file.`);
|
|
64
|
+
console.error(`Valid files: ${VALID_FILES.join(", ")}`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const filePath = resolve(TELOS_DIR, file);
|
|
69
|
+
|
|
70
|
+
// Backup
|
|
71
|
+
mkdirSync(BACKUPS_DIR, { recursive: true });
|
|
72
|
+
if (existsSync(filePath)) {
|
|
73
|
+
const backupName = `${file.replace(".md", "")}-${timestamp()}.md`;
|
|
74
|
+
copyFileSync(filePath, resolve(BACKUPS_DIR, backupName));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Append content
|
|
78
|
+
const existing = existsSync(filePath) ? readFileSync(filePath, "utf-8") : "";
|
|
79
|
+
const separator = existing.trim() ? "\n\n" : "";
|
|
80
|
+
writeFileSync(filePath, `${existing.trimEnd()}${separator}${content.trim()}\n`, "utf-8");
|
|
81
|
+
|
|
82
|
+
// Log change
|
|
83
|
+
const logEntry = `- **${isoDate()}** — \`${file}\`: ${description}`;
|
|
84
|
+
const existingLog = existsSync(UPDATES_LOG)
|
|
85
|
+
? readFileSync(UPDATES_LOG, "utf-8")
|
|
86
|
+
: "# TELOS Updates\n";
|
|
87
|
+
writeFileSync(UPDATES_LOG, `${existingLog.trimEnd()}\n${logEntry}\n`, "utf-8");
|
|
88
|
+
|
|
89
|
+
console.log(
|
|
90
|
+
JSON.stringify(
|
|
91
|
+
{
|
|
92
|
+
file,
|
|
93
|
+
backed_up: true,
|
|
94
|
+
logged: true,
|
|
95
|
+
description,
|
|
96
|
+
},
|
|
97
|
+
null,
|
|
98
|
+
2
|
|
99
|
+
)
|
|
100
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: think
|
|
3
|
+
description: Thinking mode router — selects the right analytical approach for a question. Use when thinking through a problem, analyzing deeply, brainstorming ideas, debating options, decomposing to root cause, challenging assumptions, or exploring from multiple perspectives.
|
|
4
|
+
argument-hint: <question or topic>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Route $ARGUMENTS to the right thinking mode based on intent. Detect the mode from context — do NOT ask.
|
|
8
|
+
|
|
9
|
+
## Routing
|
|
10
|
+
|
|
11
|
+
| Intent signals | Mode | How to invoke |
|
|
12
|
+
|---------------|------|---------------|
|
|
13
|
+
| decompose, root cause, fundamental, challenge assumptions, first principles | **First Principles** | Use the Skill tool to invoke `first-principles` with $ARGUMENTS |
|
|
14
|
+
| debate, weigh options, multiple viewpoints, perspectives, deliberate | **Council** | Use the Skill tool to invoke `council` with $ARGUMENTS |
|
|
15
|
+
| brainstorm, creative, divergent, ideas, what if, possibilities | **Creative** | Follow the Creative steps below with $ARGUMENTS |
|
|
16
|
+
| think through, analyze, explore deeply, examine from angles | **Deep Analysis** | Follow the Deep Analysis steps below with $ARGUMENTS |
|
|
17
|
+
|
|
18
|
+
If intent is ambiguous, default to **Deep Analysis**.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Creative
|
|
23
|
+
|
|
24
|
+
Divergent ideation — quantity and variety over polish.
|
|
25
|
+
|
|
26
|
+
1. **Restate the challenge** in one sentence
|
|
27
|
+
2. **Obvious solutions** — 2-3 conventional approaches (acknowledge, then move past)
|
|
28
|
+
3. **Wild ideas** — 5-7 unconventional approaches. Mix:
|
|
29
|
+
- Inversion (what if we did the opposite?)
|
|
30
|
+
- Analogy (how does a different domain solve this?)
|
|
31
|
+
- Removal (what if we deleted the constraint?)
|
|
32
|
+
- Combination (what if we merged two approaches?)
|
|
33
|
+
4. **Diamond pick** — which 1-2 wild ideas have real potential and why
|
|
34
|
+
5. **Next step** — one concrete action to explore the best idea
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Deep Analysis
|
|
39
|
+
|
|
40
|
+
Multi-angle exploration for complex topics.
|
|
41
|
+
|
|
42
|
+
1. **Frame the question** precisely
|
|
43
|
+
2. **Technical** — mechanics, constraints, and trade-offs
|
|
44
|
+
3. **Practical** — what does this look like in practice? What's the effort?
|
|
45
|
+
4. **Strategic** — how does this fit the bigger picture? What does it enable or block?
|
|
46
|
+
5. **Tensions** — where do the angles disagree?
|
|
47
|
+
6. **Synthesis** — what the analysis reveals that wasn't obvious at the surface
|