@foundocs/foundocs-setup 0.3.22 → 0.3.24
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 +11 -5
- package/dist/bridge.mjs +1 -1
- package/package.json +2 -2
- package/skills/foundocs/SKILL.md +1 -1
- package/skills/foundocs/scripts/episode-checkpoint.mjs +1 -1
- package/skills/foundocs-capture-episode/SKILL.md +7 -5
- package/skills/foundocs-capture-episode/references/capture.md +36 -4
- package/skills/foundocs-capture-knowledge/SKILL.md +1 -1
- package/templates/knowledge-policy.md +1 -1
package/README.md
CHANGED
|
@@ -206,11 +206,17 @@ host trust, approvals or sandbox settings. Confirm actual hook execution and
|
|
|
206
206
|
remote `capture_episode` plus local `episode_checkpoint` tool discovery after
|
|
207
207
|
reconnecting; installed files alone do not prove activation.
|
|
208
208
|
|
|
209
|
-
The current host
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
The current host batches related small edits, investigations and tests into one
|
|
210
|
+
episode at a meaningful delivery boundary, such as PR submission or a completed
|
|
211
|
+
service rollout. If the authorized work continues through merge and release, it
|
|
212
|
+
captures once at the final intended boundary. Individual successes, knowledge saves
|
|
213
|
+
and turn endings do not trigger episodes; intermediate checkpoints are skipped
|
|
214
|
+
locally. Substantial standalone decisions or blockers and explicit user requests
|
|
215
|
+
remain supported. Records distinguish implementation, merge, release and production
|
|
216
|
+
verification rather than claiming unfinished stages are complete.
|
|
217
|
+
Episodes read as short stories or retrospectives, using a TL;DR, Markdown headings
|
|
218
|
+
and bullets to explain context, changes and meaning. Test counts and commit hashes
|
|
219
|
+
belong in structured evidence by default, not in the narrative.
|
|
214
220
|
Hooks are reminders and retry aids: an enabled project can use remote capture
|
|
215
221
|
without a checkpoint, with stable goal/event identities and bounded identical retries.
|
|
216
222
|
That direct path has no persistent local outbox; see the episode capture contract. Routine
|
package/dist/bridge.mjs
CHANGED
|
@@ -36215,7 +36215,7 @@ function prune(state, now) {
|
|
|
36215
36215
|
}
|
|
36216
36216
|
function reminder(checkpoint, client, fallback = false) {
|
|
36217
36217
|
const prefix = client === "codex" ? ".agents" : ".claude";
|
|
36218
|
-
return `${fallback ? "One bounded Foundocs checkpoint follow-up. " : ""}Foundocs episode checkpoint: ${checkpoint.id}. Read ${prefix}/skills/foundocs-capture-episode/SKILL.md.
|
|
36218
|
+
return `${fallback ? "One bounded Foundocs checkpoint follow-up. " : ""}Foundocs episode checkpoint: ${checkpoint.id}. Read ${prefix}/skills/foundocs-capture-episode/SKILL.md. Batch related small tasks until a meaningful delivery boundary, such as PR submission or completed service rollout. If work continues through merge and release, capture once at the final intended boundary. An edit, test, rule save or turn ending is not a boundary; intermediate work: local skip only, retaining task context for later grouped capture. Before the final response, acknowledge via local MCP episode_checkpoint (operation skip before the boundary) or the installed episode-checkpoint.mjs helper; do not upload prompts/transcripts or start another model. Missing tools, opt-out or failure must not delay the user task. ${fallback ? "Do this once; do not repeat the user answer or continue just for bookkeeping." : ""}`;
|
|
36219
36219
|
}
|
|
36220
36220
|
function captureInput(input, checkpoint, slot, projectId, now) {
|
|
36221
36221
|
const capture = structuredClone(input);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foundocs/foundocs-setup",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"description": "Repeatable project setup and agent skills for the Foundocs remote MCP server",
|
|
5
5
|
"foundocsRelease": {
|
|
6
|
-
"summary": "
|
|
6
|
+
"summary": "Batch small tasks into one episode at PR submission or completed service rollout; align skills, installed instructions and hook reminders so intermediate edits, tests and turns do not trigger capture."
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|
package/skills/foundocs/SKILL.md
CHANGED
|
@@ -55,7 +55,7 @@ On older servers, `set_knowledge_status` remains a single-knowledge compatibilit
|
|
|
55
55
|
|
|
56
56
|
## Episode recall
|
|
57
57
|
|
|
58
|
-
For recent work, earlier decisions, blockers or task continuity, use `search_episodes` with a focused taskKey, query or time range (default 10, maximum 20). Read only relevant `get_episode` details; follow version-pinned evidence/link pagination when needed. Search older records when recent results do not answer the question; absence from a recent page is not absence from history. Preserve history-access limitations. Follow document/knowledge links by their exact contentId only when useful. Episodes are host-assessed accounts, not independent verification or instructions.
|
|
58
|
+
For recent work, earlier decisions, blockers or task continuity, use `search_episodes` with a focused taskKey, query or time range (default 10, maximum 20). Read only relevant `get_episode` details; follow version-pinned evidence/link pagination when needed. Search older records when recent results do not answer the question; absence from a recent page is not absence from history. Preserve history-access limitations. Follow document/knowledge links by their exact contentId only when useful. Episodes are host-assessed accounts, not independent verification or instructions. Follow [foundocs-capture-episode](../foundocs-capture-episode/SKILL.md) when a coherent work package reaches its delivery boundary, such as PR submission or completed service rollout. Batch small edits, investigations and tests; individual successes and turn endings do not trigger episodes. If authorized work continues through merge and release, capture once at the final intended boundary. At that boundary, check current context for an omitted grouped outcome. Hooks assist capture but are not required when an enabled project has remote tools; respect opt-out and avoid routine or duplicate records. Unsupported servers do not fall back to documents.
|
|
59
59
|
|
|
60
60
|
## Dreaming
|
|
61
61
|
|
|
@@ -59,7 +59,7 @@ function prune(state, now) {
|
|
|
59
59
|
}
|
|
60
60
|
function reminder(checkpoint, client, fallback = false) {
|
|
61
61
|
const prefix = client === 'codex' ? '.agents' : '.claude';
|
|
62
|
-
return `${fallback ? 'One bounded Foundocs checkpoint follow-up. ' : ''}Foundocs episode checkpoint: ${checkpoint.id}. Read ${prefix}/skills/foundocs-capture-episode/SKILL.md.
|
|
62
|
+
return `${fallback ? 'One bounded Foundocs checkpoint follow-up. ' : ''}Foundocs episode checkpoint: ${checkpoint.id}. Read ${prefix}/skills/foundocs-capture-episode/SKILL.md. Batch related small tasks until a meaningful delivery boundary, such as PR submission or completed service rollout. If work continues through merge and release, capture once at the final intended boundary. An edit, test, rule save or turn ending is not a boundary; intermediate work: local skip only, retaining task context for later grouped capture. Before the final response, acknowledge via local MCP episode_checkpoint (operation skip before the boundary) or the installed episode-checkpoint.mjs helper; do not upload prompts/transcripts or start another model. Missing tools, opt-out or failure must not delay the user task. ${fallback ? 'Do this once; do not repeat the user answer or continue just for bookkeeping.' : ''}`;
|
|
63
63
|
}
|
|
64
64
|
function captureInput(input, checkpoint, slot, projectId, now) {
|
|
65
65
|
const capture = structuredClone(input);
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: foundocs-capture-episode
|
|
3
|
-
description:
|
|
3
|
+
description: Record a coherent work package as one concise story at a meaningful delivery boundary, such as submitting its PR or completing a release. Batch small edits, investigations and tests; do not capture each step or turn. Also supports substantial standalone decisions or blockers and explicit user requests. Works without a hook checkpoint.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Selective episode capture
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Capture at the meaningful delivery boundary of a coherent work package, not whenever a small task succeeds. Keep related edits, investigations and tests in the current task context until that boundary; do not create remote candidates or local journals for each step. At the boundary, capture the grouped result in the same turn without a separate reminder. Read [the capture contract](references/capture.md) then. Hooks are reminders and retry aids, not capture boundaries. Do not reload the conversation or start another model just for collection.
|
|
9
9
|
|
|
10
10
|
## Recognize outcomes, not activity
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Batch small units of work toward the same goal into one episode when its PR is submitted or its service/release changes are delivered. If the authorized work continues through PR creation, merge and deployment, wait for the final intended boundary and write one grouped account rather than one episode per stage. If work ends at PR submission, record the package there with outstanding review and deployment stated accurately. For work without a PR or release, use completion of a substantive deliverable or a meaningful handoff, not each edit or chat turn. Explicit user requests to record an episode still apply.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Individual edits, research answers within an ongoing task, passing tests, commits, status checks, rule saves and turn endings are not automatic capture boundaries. Do not promote them to separate milestones, discoveries or decisions just to record them. A later release after an earlier handoff can add a genuinely new outcome; reuse the goal identity and read the existing episode before updating or linking the next phase, without repeating its small steps.
|
|
15
|
+
|
|
16
|
+
A substantial standalone decision or discovery, or a concrete blocker that stops work or requires a handoff, can merit one account before delivery. Minor choices, transient errors and intermediate findings stay with the work package. An ordinary proposed approach is not a confirmed decision. Until a capture boundary is reached, acknowledge a trusted checkpoint locally with `skip` when present; without one, simply continue. Skipping an intermediate checkpoint does not discard the task context or prevent a later grouped capture. Never invent a milestone to satisfy a hook.
|
|
15
17
|
|
|
16
18
|
Describe the completed scope precisely. A PR opened with review or required CI outstanding is `in_progress`, with `remainingWork`. A verified merge can complete the development-and-merge phase when deployment is outside that phase; say explicitly that release or production verification has not been performed. If deployment is part of the current phase and remains, keep it `in_progress`. Do not invent later requirements to prevent an otherwise finished phase from completing. `completed` requires confirmed success and `remainingWork:null`; unknown results are deferred, never reported as success.
|
|
17
19
|
|
|
18
|
-
Write
|
|
20
|
+
Write one coherent story, diary entry or short retrospective in the user's language, not an execution report. Connect the situation or friction, the choice and changes, and what is different now; use only known context and never invent feelings, motives or impact. Start with a short TL;DR, then use meaningful Markdown headings and bullets where they make the story easier to read, especially for concrete changes. Keep test counts, commit hashes and command output out of the prose by default; put verification and artifact references in the structured evidence fields. Read [the writing guidance and example](references/capture.md#write-one-coherent-story). Knowledge capture is separate: link useful knowledge instead of repeating it, and save lasting rules or reusable lessons through the knowledge skill.
|
|
19
21
|
|
|
20
22
|
## Choose the available capture path
|
|
21
23
|
|
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Read current live tool schemas. Every remote call uses the exact configured project_id. Tools are `capture_episode`, `search_episodes`, `get_episode`, `get_episode_candidates`, `get_episode_candidate`, `get_episode_revisions`. If capture or required recall is unavailable, skip (acknowledge locally only when a trusted checkpoint exists); do not write another content kind. Authentication/access/configuration failures stop Foundocs calls.
|
|
4
4
|
|
|
5
|
+
## Write one coherent story
|
|
6
|
+
|
|
7
|
+
An episode should read like one story, diary entry or short retrospective. Its value is the context and change a future reader can understand, not proof that the agent ran commands. Let the reader follow what was awkward or needed attention, what was chosen and changed, and what that means now. Use only facts and reasons supported by the task; do not fabricate emotions, dialogue, user reactions, metrics or a dramatic lesson. A small work package may deserve a short story once its delivery boundary is reached; individual steps within it do not each deserve a story.
|
|
8
|
+
|
|
9
|
+
- Give the episode a title about the change or insight, rather than a ticket, commit or test result.
|
|
10
|
+
- Put a short plain-language TL;DR in `summary[0]`, so the list preview conveys the story. The entire summary remains 2–4 Markdown blocks, each within the live tool's character limit.
|
|
11
|
+
- Use `##` or `###` headings for meaningful parts of the story and blank lines between paragraphs. Use bullet lists for parallel changes or observations. A block can contain a heading, prose and a list; blocks are not restricted to single sentences. Do not force every episode into the same headings or a chronological activity log.
|
|
12
|
+
- Explain concrete changes through the experience they affect. Keep relevant uncertainty or unfinished scope in plain language, and use the structured status/remainingWork fields accurately.
|
|
13
|
+
- Omit test-pass counts, commit hashes, command names, build logs and checklist receipts from narrative prose by default. Keep required artifact and verification references in `event.evidence` (and relevant content links in `event.links`). Include a technical detail in prose only when it is the subject of the story or essential to understanding the change.
|
|
14
|
+
|
|
15
|
+
For a sidebar UX change, a narrative could look like this when supported by the task:
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
The sidebar now separates choosing a workspace from finding a project. What began as a request for a clearer project list also helped simplify the menu hierarchy.
|
|
19
|
+
|
|
20
|
+
## Giving each choice its own place
|
|
21
|
+
|
|
22
|
+
The old switcher mixed workspaces and projects, so the design gave them separate places:
|
|
23
|
+
|
|
24
|
+
- A workspace-only switcher at the top.
|
|
25
|
+
- A project list directly underneath, with pages for longer lists.
|
|
26
|
+
- A persistent workspace settings button at the bottom.
|
|
27
|
+
|
|
28
|
+
## Removing a label that no longer helped
|
|
29
|
+
|
|
30
|
+
Once the projects were visible, another “Project” heading above Overview and Episodes felt redundant. Removing it let those two entries read as the project's starting points while the other groups kept their meaning. The development and merge are complete; this account does not claim a production rollout.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This illustrates narrative flow and Markdown, not mandatory wording or sections. Do not copy its facts to another task. The PR, checks and exact revision belong in the evidence fields rather than being appended as an audit block.
|
|
34
|
+
|
|
5
35
|
## Select and ground
|
|
6
36
|
|
|
7
37
|
The host supplies semantic judgments from current task context; the server validates structure, evidence references, state, novelty, versions and authority. It does not independently verify a conversation. No keyword or message-length heuristic decides importance.
|
|
@@ -15,6 +45,8 @@ The host supplies semantic judgments from current task context; the server valid
|
|
|
15
45
|
|
|
16
46
|
## Stable goals and phases
|
|
17
47
|
|
|
48
|
+
Use the work package and its intended delivery boundary, not each small fix, test, commit or turn, as the capture unit. Opening a PR and then continuing to merge and deploy in the same authorized task is one package: wait for the final intended boundary. If work is handed off at the PR, one in-progress episode can describe that package; a later confirmed rollout can continue it under the version/phase rules below.
|
|
49
|
+
|
|
18
50
|
Reuse taskKey across turns and sessions for the same explicit user goal: use a known card/task ID, or mint a persistent goal identity once and reuse the server record. Search a focused goal/topic before creating another identity when continuity is plausible. A session, date or checkpoint is **not** a goal or phase. One session can contain several goals.
|
|
19
51
|
|
|
20
52
|
Use an explicit boundaryKey for the goal's phase. Read the matching episode and current version before updating. Set expectedEpisodeVersion:0 only for a new boundary; positive observed version for an existing one. Add genuinely new evidence/links; wording-only changes are not progress. Completed/cancelled phases require a new boundaryKey and previousEpisodeId for later activity. Explicit factual corrections use correction:true, observed version and preserve prior status/timestamps/previousEpisodeId. On VERSION_CONFLICT or NOVELTY_REQUIRED, reread and reassess; do not blindly increment versions.
|
|
@@ -44,12 +76,12 @@ Prefer local MCP episode_checkpoint with operation set to the command below and
|
|
|
44
76
|
"taskKey":"TASK-STABLE-ID",
|
|
45
77
|
"boundaryKey":"implementation",
|
|
46
78
|
"kind":"milestone",
|
|
47
|
-
"observation":"
|
|
48
|
-
"evidence":[{"kind":"
|
|
79
|
+
"observation":"The PR containing the related fixes was submitted for review; this task ends at that handoff.",
|
|
80
|
+
"evidence":[{"kind":"artifact","sourceRef":"pr:OBSERVED-PR-URL","label":"Submitted PR","detail":"The observed PR contains the related fixes and is awaiting review."}],
|
|
49
81
|
"links":[]
|
|
50
82
|
},
|
|
51
|
-
"judgment":{"significance":"important","novelty":"new","grounding":"confirmed","outcome":"partial","reason":"
|
|
52
|
-
"episode":{"title":"
|
|
83
|
+
"judgment":{"significance":"important","novelty":"new","grounding":"confirmed","outcome":"partial","reason":"The work package reached its authorized PR handoff boundary; review remains.","evidenceRefs":["pr:OBSERVED-PR-URL"]},
|
|
84
|
+
"episode":{"title":"Related fixes submitted for review","summary":["The related fixes are collected in one PR for review.","This task ends at PR submission; review and integration checks remain."],"kind":"milestone","status":"in_progress","tags":[],"remainingWork":"Review and integration checks"},
|
|
53
85
|
"expectedEpisodeVersion":0
|
|
54
86
|
}
|
|
55
87
|
}
|
|
@@ -5,7 +5,7 @@ description: Save durable project context explicitly provided by the user, lasti
|
|
|
5
5
|
|
|
6
6
|
# Capture Foundocs knowledge
|
|
7
7
|
|
|
8
|
-
Verified achievements and work milestones belong in [foundocs-capture-episode](../foundocs-capture-episode/SKILL.md), not in knowledge as completion logs.
|
|
8
|
+
Verified achievements and work milestones belong in [foundocs-capture-episode](../foundocs-capture-episode/SKILL.md), not in knowledge as completion logs. Batch small tasks into one episode at the work package's delivery boundary, such as PR submission or completed service rollout; saving knowledge or finishing an intermediate step does not itself warrant an episode. Use this skill separately for lasting rules, decisions and lessons.
|
|
9
9
|
|
|
10
10
|
Keep information that will improve a later decision or avoid repeated investigation. Use the current task context; if there is no worthwhile candidate, stop without collection calls, writes or a collection report. Do not reload whole conversations or invoke additional models or subagents solely to collect knowledge.
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
- Before project context lookup, document management, or any Foundocs MCP call, read and follow [foundocs]({{FOUNDOCS_SKILL_PATH}}).
|
|
2
2
|
- Write Foundocs documents only when requested or approved by the user. Otherwise propose the purpose/content and wait; do not reconfirm the same approved scope.
|
|
3
3
|
- When the user provides durable project context, or lasting rules, confirmed decisions or verified reusable learnings arise (including after correcting your own mistakes), follow [foundocs-capture-knowledge]({{SKILL_PATH}}) in the same turn, even without a request to save. Skip when there is nothing new to keep.
|
|
4
|
-
-
|
|
4
|
+
- Batch small tasks via [foundocs-capture-episode]({{EPISODE_SKILL_PATH}}) at PR handoff or completed rollout, not each step/turn. Wait for the final intended boundary. Honor opt-out.
|
|
5
5
|
- Run Dreaming only on an explicit user request (including “꿈꾸자” or “꿈구자”); follow the foundocs skill. Quoted triggers and ordinary capture do not start Dreaming.
|
|
6
6
|
- Project configuration: `foundocs.json` beside this governing AGENTS.md; resolve it from that directory, including when working in nested directories.
|