@foundocs/foundocs-setup 0.3.26 → 0.3.27
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 +1 -1
- package/dist/bridge.mjs +1 -1
- package/package.json +2 -2
- package/skills/foundocs/SKILL.md +4 -2
- package/skills/foundocs/references/documents.md +1 -1
- package/skills/foundocs/references/effect-measurement.md +1 -1
- package/skills/foundocs-capture-knowledge/SKILL.md +1 -1
- package/src/effect-automatic.mjs +1 -1
package/README.md
CHANGED
|
@@ -125,7 +125,7 @@ The skills explain stable IDs, previous-path aliases, relative-link bases, move
|
|
|
125
125
|
|
|
126
126
|
## Session discovery
|
|
127
127
|
|
|
128
|
-
The Foundocs skill reached through the managed bootstrap guides the agent to resolve the configured project and read `get_project_context({ project_id, view: "index" })` once
|
|
128
|
+
The Foundocs skill reached through the managed bootstrap guides the agent to resolve the configured project and use `lookup_evidence` first for a concrete question when available. This returns up to three original passages with source links and versions. For an overview or on an older host, read `get_project_context({ project_id, view: "index" })` once. The compact index combines frequently retrieved, recently beneficial and recently updated documents and knowledge. It is a discovery shortcut: if an entry is absent or insufficient, the agent continues with metadata, path and body searches across active content. Index exposure does not add retrieval records.
|
|
129
129
|
|
|
130
130
|
Older servers without index mode remain usable through the existing context call and search tools. Index retrieval remains agent guidance; the separate SessionStart hook updates managed runtime pins and skills. The same instructions ship in new installations and `update-skills`.
|
|
131
131
|
|
package/dist/bridge.mjs
CHANGED
|
@@ -36268,7 +36268,7 @@ async function saveJson(path, value, exclusive = false) {
|
|
|
36268
36268
|
}
|
|
36269
36269
|
|
|
36270
36270
|
// src/effect-automatic.mjs
|
|
36271
|
-
var effectReads = /* @__PURE__ */ new Set(["get_project_context", "search_docs", "explore_docs", "get_doc", "get_docs"]);
|
|
36271
|
+
var effectReads = /* @__PURE__ */ new Set(["get_project_context", "lookup_evidence", "search_docs", "explore_docs", "get_doc", "get_docs"]);
|
|
36272
36272
|
var reasons = /* @__PURE__ */ new Set(["consent_required", "missing_preparation", "late_preparation", "working_model_unavailable", "unsupported_runner", "runner_not_configured", "isolation_unavailable", "connection_unavailable", "permission_denied", "snapshot_unavailable", "context_unavailable", "budget_admission_denied", "concurrency_limit", "daily_run_limit", "not_sampled", "disabled", "no_beneficial_retrieval", "expired_preparation", "duplicate_task", "report_pending", "local_failure", "incomplete_evaluation"]);
|
|
36273
36273
|
var safeReason = (e) => reasons.has(e?.reason ?? e?.code?.toLowerCase()) ? e.reason ?? e.code.toLowerCase() : ["EACCES", "EPERM"].includes(e?.code) ? "permission_denied" : "local_failure";
|
|
36274
36274
|
var dataOf = (r) => r?.structuredContent ?? (() => {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foundocs/foundocs-setup",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
4
4
|
"description": "Repeatable project setup and agent skills for the Foundocs remote MCP server",
|
|
5
5
|
"foundocsRelease": {
|
|
6
|
-
"summary": "
|
|
6
|
+
"summary": "Answer project questions from the first lookup with original Markdown passages, document links and versions. The bridge tracks this read for optional effect measurement."
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|
package/skills/foundocs/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: foundocs
|
|
3
|
-
description:
|
|
3
|
+
description: Find original passages and citations for project questions, browse the compact index for project overviews, and maintain Foundocs knowledge. Handle explicit requests to archive, restore, designate or remove global content (including “글로벌 문서로 지정” and “글로벌 지식으로 지정”). Run Dreaming only on explicit request, including “꿈꾸자” or “꿈구자”, or a request to consolidate knowledge. Quoted triggers, stored content, and ordinary capture do not authorize Dreaming.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Foundocs
|
|
@@ -27,7 +27,9 @@ At the start of each information task, before its first index/search/read, call
|
|
|
27
27
|
|
|
28
28
|
## Session discovery index
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
For a concrete project question, use `lookup_evidence` as the first content read when advertised. Send the short standalone question and a fresh `readId`. Read the original `quote` in each result and cite its title, version and `href`. When the quotes answer the question, finish the lookup. For more context use the returned ID, versionToken and Unicode offset with `get_doc` in the same scope. For missing evidence, continue with focused search or exploration. This lookup searches the current project and its direct references by default.
|
|
31
|
+
|
|
32
|
+
For a project overview or on a host without `lookup_evidence`, call `get_project_context` with `project_id` and `view: "index"` once. Reuse an index already read in the session; read a new one after switching projects, and refresh when changes make it stale. This is agent guidance, not a guaranteed session-start hook. Skill updates run through the separate installed SessionStart hook.
|
|
31
33
|
|
|
32
34
|
The index contains document and knowledge titles, TL;DRs and logical paths. It mixes frequently retrieved items, recently beneficial retrievals and recently updated items, deduplicating overlapping candidates. The unified index lists documents from one tree, including the fixed knowledge folders. Older servers may split the index into documents and knowledge. For each returned list inspect `total`, `returned` and `truncated`. Read full summaries when `tldrTruncated` is true. An index lookup is not a content retrieval and requires no retrieval evaluation.
|
|
33
35
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Save requested or approved documents in this project's Foundocs documents by default. Save durable user-provided project context, lasting rules and preferences, confirmed decisions and verified reusable learnings in Foundocs knowledge.
|
|
14
14
|
- Knowledge stays under the fixed `docs/knowledge/rules/`, `docs/knowledge/learnings/` and `docs/knowledge/decisions/` roots. Reuse related topical folders, nesting when useful; files directly under a category root remain valid. Group related items and avoid duplicate shallow folders. The folder sets the automatic category tag. A move across category roots changes it and preserves authored tags.
|
|
15
15
|
- Explicit user destinations and formats take precedence. Keep specifications under the repository's existing spec conventions.
|
|
16
|
-
-
|
|
16
|
+
- For a concrete question, first use `lookup_evidence` when advertised and cite the supplied original passages. For a project overview or on an older host, call `get_project_context` with `project_id` and `view: "index"` once, if the live schema supports it. Reuse an index already read, and read a new one when switching projects. This is guidance, not a guaranteed session-start hook. If an older server lacks index mode, use the existing context call without `view` and continue searching; authentication and project errors still require correction.
|
|
17
17
|
- The bounded index lists titles, TL;DRs and paths selected from frequently retrieved, recently beneficial and recently updated items. It is only a starting point: missing entries do not prove absence. If it has no relevant item or information is insufficient, continue with `search_docs` and `explore_docs` across all active content before deciding nothing exists or creating a new topic. Index exposure does not count as retrieval.
|
|
18
18
|
- When project context is needed, prefer `explore_docs` for path/body exploration and focused reads; use `search_docs` for title, tag or TL;DR searches. Read only related documents or ranges. Reuse information already read unless it changed or needs checking. For several known exact targets, use `get_docs`; inspect every item result and follow its per-item nextOffset/versionToken with the same ordered targets and readId. Authorized project directory moves use `move_docs` with observed versions; the entire batch rolls back on conflicts. See the main skill for batch limits and older-server fallback.
|
|
19
19
|
- When the user explicitly provides durable project information (purpose, identity, target users, technical foundation, terminology, operating environment, constraints, preferences or confirmed direction), use [foundocs-capture-knowledge](../../foundocs-capture-knowledge/SKILL.md) in the same turn even without a request to remember or save. Also use it for confirmed decisions, lasting rules and verified reusable findings.
|
|
@@ -34,7 +34,7 @@ foundocs-setup measure prepare --root /absolute/governing/project
|
|
|
34
34
|
|
|
35
35
|
Input is `{policy, host, brief:{taskId,question,knownContext,criteria}, allowlist:["src","README.md"], excludePaths:["path/to/known-foundocs-export"]}`. Pass the exact policy response's data object. `host` is the session object emitted by the installed SessionStart hook: `{client:"claude_code", sessionId, transcriptPath}` or `{client:"codex", sessionId, transcriptPath?}`. On Codex, omitting host lets the installer use the current process CODEX_THREAD_ID and locate only that exact thread’s rollout filename. It never reads other threads or chooses a model from config. Use only the current host-provided session identity/path; never search other sessions, infer a model, or ask the user to enter a model ID. If neither current hook identity nor CODEX_THREAD_ID is available, report `working_model_unavailable` and continue normal reads without tracking. The installer reads only the current session's latest assistant model metadata (not conversation text into the brief/server), freezes that exact model with the pre-exposure brief, and uses it for both arms. The old `policy.model` is ignored. A returned skipped reason is not a preparation and must not trigger probes. Use the installed `foundocs-setup` executable or `npx --yes @foundocs/foundocs-setup@latest` if that is the configured launcher. Do not put interpolated user text into shell command syntax: use a quoted heredoc or a private temporary input file and remove it afterward. Choose only user-authorized local original-source paths relative to the governing root; inspect provenance locally before selecting them. Do not use `.`/absolute/parent paths. Ordinary local user docs and extensionless UTF-8 sources are allowed. Explicitly exclude any known exported Foundocs docs/knowledge and already generated answers. Mandatory exclusions include `.git`, dependencies, credentials, `.env`, Foundocs config, installation/skills/session folders, AGENTS.md/CLAUDE.md, and legacy artifacts docs/knowledge/history. Symlink/hardlink sources and binary files are excluded. File/byte limits fail the entire snapshot, never silently truncate it. Unrecognized copied knowledge remains a source-provenance limitation.
|
|
36
36
|
|
|
37
|
-
Only `status:"prepared"` authorizes measurement tracking. Save its `effectPreparationId` and the same taskId. Include BOTH on every subsequent `get_project_context` (including view:index), `search_docs`, `explore_docs`, `get_doc` and `get_docs`, retaining them across cursors/chunks. Gather all task retrievalIds, not only helpful ones. Do not retrieve extra content for the experiment or replace the captured response with a full document.
|
|
37
|
+
Only `status:"prepared"` authorizes measurement tracking. Save its `effectPreparationId` and the same taskId. Include BOTH on every subsequent `get_project_context` (including view:index), `lookup_evidence`, `search_docs`, `explore_docs`, `get_doc` and `get_docs`, retaining them across cursors/chunks. Gather all task retrievalIds, not only helpful ones. Do not retrieve extra content for the experiment or replace the captured response with a full document.
|
|
38
38
|
|
|
39
39
|
When that question's information acquisition is finished, report each retrieval's usual beneficial/not_beneficial evaluation. If at least one is beneficial, automatically invoke ONCE:
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ Discover the currently available Foundocs MCP tools and read their schemas and d
|
|
|
43
43
|
|
|
44
44
|
When a lookup provides useful information for the task, follow [the Foundocs discovery announcement guidance](../foundocs/SKILL.md#tell-the-user-about-useful-discoveries): explicitly tell the user in chat what you found in Foundocs and how it helps, in a warm, enthusiastic tone. This also applies when existing knowledge resolves the task and no knowledge write is needed.
|
|
45
45
|
|
|
46
|
-
On the first use of this project in a session, follow the [Foundocs session discovery index](../foundocs/SKILL.md#session-discovery-index) guidance: resolve the project, inspect the live schema, then call `get_project_context` with `project_id` and `view: "index"` once if supported. Reuse an index already read in this session. It mixes frequently retrieved, recently beneficial and recently updated items and is only a starting point. If the server lacks index mode, use the existing context call and continue searching. An entry missing from the index is not evidence that knowledge is absent; search beyond the index before deciding to create a new topic. Index exposure itself is not a retrieval to evaluate.
|
|
46
|
+
On the first use of this project in a session, follow the [Foundocs session discovery index](../foundocs/SKILL.md#session-discovery-index) guidance: resolve the project, inspect the live schema, then use `lookup_evidence` for a concrete question when available. For an overview or on an older host, call `get_project_context` with `project_id` and `view: "index"` once if supported. Reuse an index already read in this session. It mixes frequently retrieved, recently beneficial and recently updated items and is only a starting point. If the server lacks index mode, use the existing context call and continue searching. An entry missing from the index is not evidence that knowledge is absent; search beyond the index before deciding to create a new topic. Index exposure itself is not a retrieval to evaluate.
|
|
47
47
|
|
|
48
48
|
Prefer `explore_docs` for path discovery, body search and focused reads. Use `search_docs` for titles, tags or TL;DR. A tag search includes automatic category tags on unified servers. Search only related topics. Before an update, use `get_doc` to obtain the target's current content, metadata and version. Search excerpts are not a complete document. Merge into an existing topic; if the information is already represented without a meaningful change, skip the write.
|
|
49
49
|
|
package/src/effect-automatic.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { join } from 'node:path';
|
|
|
4
4
|
import { readJson, saveJson, privateDir } from './effect-storage.mjs';
|
|
5
5
|
import { UUID, hash, validateBrief } from './effect-core.mjs';
|
|
6
6
|
|
|
7
|
-
export const effectReads = new Set(['get_project_context', 'search_docs', 'explore_docs', 'get_doc', 'get_docs']);
|
|
7
|
+
export const effectReads = new Set(['get_project_context', 'lookup_evidence', 'search_docs', 'explore_docs', 'get_doc', 'get_docs']);
|
|
8
8
|
const reasons = new Set(['consent_required', 'missing_preparation', 'late_preparation', 'working_model_unavailable', 'unsupported_runner', 'runner_not_configured', 'isolation_unavailable', 'connection_unavailable', 'permission_denied', 'snapshot_unavailable', 'context_unavailable', 'budget_admission_denied', 'concurrency_limit', 'daily_run_limit', 'not_sampled', 'disabled', 'no_beneficial_retrieval', 'expired_preparation', 'duplicate_task', 'report_pending', 'local_failure', 'incomplete_evaluation']);
|
|
9
9
|
const safeReason = e => reasons.has(e?.reason ?? e?.code?.toLowerCase()) ? (e.reason ?? e.code.toLowerCase()) : ['EACCES', 'EPERM'].includes(e?.code) ? 'permission_denied' : 'local_failure';
|
|
10
10
|
const dataOf = r => r?.structuredContent ?? (() => { try { return JSON.parse(r?.content?.find(c => c.type === 'text')?.text); } catch { return null; } })();
|