@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 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 records meaningful verified achievements in the same turn,
210
- including completed features/fixes, merged PRs and published releases, without
211
- waiting for a reminder. It also judges important confirmed decisions, discoveries
212
- and concrete blockers. Before finishing, it checks current context for missed
213
- outcomes, distinguishing implementation, merge, release and production verification.
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. During this task, retain only confirmed important decisions, verified results/discoveries, concrete blockers or milestones. Routine lookup/no new fact: local skip only. Before the final response, acknowledge via local MCP episode_checkpoint (operation skip for routine) 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." : ""}`;
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.23",
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": "Write episodes as coherent stories or retrospectives with Markdown headings and bullets, keeping test counts and commit hashes in structured evidence rather than narrative prose."
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": {
@@ -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. When a meaningful achievement is verified during ordinary work—such as a feature or fix completed, a PR merged or a release published—follow [foundocs-capture-episode](../foundocs-capture-episode/SKILL.md) in the same turn without waiting for a reminder. Before finishing, check current context for omitted outcomes. 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.
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. During this task, retain only confirmed important decisions, verified results/discoveries, concrete blockers or milestones. Routine lookup/no new fact: local skip only. Before the final response, acknowledge via local MCP episode_checkpoint (operation skip for routine) 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.' : ''}`;
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: Automatically record meaningful verified achievements as concise stories or retrospectives during ordinary work, including completed features or fixes, merged PRs and published releases, plus confirmed decisions, discoveries and concrete blockers. Capture in the same turn without a reminder, even without a hook checkpoint. Skip routine steps, duplicate reports and bookkeeping.
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
- When the current task reaches a meaningful verified outcome, capture it in the same turn without waiting for the user to ask to remember. Before the final response, briefly check the current context for an uncaptured achievement. A hook is a reminder and retry aid, not a prerequisite for recognizing an achievement. Read [the capture contract](references/capture.md) when an event is worth keeping. Do not reload the conversation or start another model just for collection.
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
- Completing and verifying a requested feature or fix, merging its PR, or publishing and verifying a release are useful capture boundaries. Record what changed, why it matters, the evidence and the actual scope reached. One coherent result can combine implementation, tests and its PR; do not create an episode for every command, test or commit. A later merge or release may add a genuinely new milestone. Reuse the goal identity and check continuity before creating duplicates.
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
- A confirmed decision, verified discovery or concrete blocker can also be worth keeping before the whole task completes. An ordinary proposed approach is not a confirmed decision. Routine lookups, greetings, unchanged status, repeated results, plans and episode bookkeeping do not warrant remote candidates. Acknowledge a trusted checkpoint locally with `skip` when present; without one, simply continue. Never invent a milestone to satisfy a hook.
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 result may deserve a small story.
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":"Focused tests passed; the PR is awaiting review.",
78
- "evidence":[{"kind":"verification","sourceRef":"test:OBSERVED-RUN-ID","label":"Focused tests","detail":"The observed test command passed."}],
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":"Verified implementation milestone with review remaining.","evidenceRefs":["test:OBSERVED-RUN-ID"]},
82
- "episode":{"title":"Implementation ready for review","summary":["The requested change passes its focused tests.","Review and integration checks remain."],"kind":"milestone","status":"in_progress","tags":[],"remainingWork":"Review and integration checks"},
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. Capture meaningful outcomes in the same turn even when no new reusable knowledge arose; use this skill separately for lasting rules, decisions and lessons.
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
- - Record verified achievements via [foundocs-capture-episode]({{EPISODE_SKILL_PATH}}) in the same turn, even without a hook. Honor opt-out; skip routine/duplicate activity.
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.