@foundocs/foundocs-setup 0.3.23 → 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 +8 -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 +6 -4
- package/skills/foundocs-capture-episode/references/capture.md +7 -5
- package/skills/foundocs-capture-knowledge/SKILL.md +1 -1
- package/templates/knowledge-policy.md +1 -1
package/README.md
CHANGED
|
@@ -206,11 +206,14 @@ 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.
|
|
214
217
|
Episodes read as short stories or retrospectives, using a TL;DR, Markdown headings
|
|
215
218
|
and bullets to explain context, changes and meaning. Test counts and commit hashes
|
|
216
219
|
belong in structured evidence by default, not in the narrative.
|
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,17 +1,19 @@
|
|
|
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
|
|
|
@@ -4,7 +4,7 @@ Read current live tool schemas. Every remote call uses the exact configured proj
|
|
|
4
4
|
|
|
5
5
|
## Write one coherent story
|
|
6
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
|
|
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
8
|
|
|
9
9
|
- Give the episode a title about the change or insight, rather than a ticket, commit or test result.
|
|
10
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.
|
|
@@ -45,6 +45,8 @@ The host supplies semantic judgments from current task context; the server valid
|
|
|
45
45
|
|
|
46
46
|
## Stable goals and phases
|
|
47
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
|
+
|
|
48
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.
|
|
49
51
|
|
|
50
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.
|
|
@@ -74,12 +76,12 @@ Prefer local MCP episode_checkpoint with operation set to the command below and
|
|
|
74
76
|
"taskKey":"TASK-STABLE-ID",
|
|
75
77
|
"boundaryKey":"implementation",
|
|
76
78
|
"kind":"milestone",
|
|
77
|
-
"observation":"
|
|
78
|
-
"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."}],
|
|
79
81
|
"links":[]
|
|
80
82
|
},
|
|
81
|
-
"judgment":{"significance":"important","novelty":"new","grounding":"confirmed","outcome":"partial","reason":"
|
|
82
|
-
"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"},
|
|
83
85
|
"expectedEpisodeVersion":0
|
|
84
86
|
}
|
|
85
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.
|