@foundocs/foundocs-setup 0.3.7 → 0.3.8

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
@@ -103,7 +103,7 @@ Existing recorded installations can update the skill and managed instructions wi
103
103
  node /absolute/path/to/foundocs-setup/src/cli.mjs update-skills --root /absolute/project
104
104
  ```
105
105
 
106
- The equivalent command for this release is `npx --yes @foundocs/foundocs-setup@0.3.5 update-skills --root /absolute/project`. The local commands above run this checkout; a pinned npm command requires that registry release to exist.
106
+ The equivalent command for this release is `npx --yes @foundocs/foundocs-setup@0.3.8 update-skills --root /absolute/project`. The local commands above run this checkout; a pinned npm command requires that registry release to exist.
107
107
 
108
108
  Updates preserve MCP settings, project configuration, authentication helpers and private keys, including installations that still use the historical configuration filename. The private `skills.json` records installed/pending asset hashes for interruption recovery. Foreign same-name files and local skill edits stop installation/update before project writes; move or reconcile the reported file explicitly, then retry. Unrelated skills and instructions are retained. `rollback` includes skill assets and preserves concurrent edits.
109
109
 
@@ -113,6 +113,14 @@ The package's `skills/` and `templates/` directories must be included in every t
113
113
 
114
114
  Dreaming adversarial fixtures and trace checks live in `eval/`; see `eval/README.md`. These checks do not claim real-model quality evaluation.
115
115
 
116
+ ## Knowledge folders (0.3.8)
117
+
118
+ The bundled capture skill reuses existing topic folders beneath the fixed `knowledge/rules/`, `knowledge/learnings/` and `knowledge/decisions/` roots. Nested topic folders and files directly under a root are both valid. Related facts stay together rather than becoming fragments or duplicate shallow folders. Verified, reusable lessons from correcting the agent’s own mistakes are captured in the same turn; typo-only and unverified fixes are excluded.
119
+
120
+ Dreaming inspects dispersed knowledge and similar folders within its existing six stages. Only a server-verified path-only update within the same category may be applied automatically: body, title, TL;DR, ordered tags, creation date and other metadata must stay unchanged. Semantic, category and mixed changes retain owner review. Older servers without explicit automatic-move support receive review candidates. Prior moves and proposal history guide deduplication so repeated runs avoid cosmetic renames.
121
+
122
+ The skills explain stable IDs, previous-path aliases, relative-link bases, move receipts and versioned requests. Ordinary move undo uses the discovered `get_content_moves` / `undo_content_move` tools on explicit request; a Dreaming move returns to the exact saved proposal’s owner review for `revert`. New server tools are discovered dynamically. This release updates guidance, not an older server’s capabilities, and existing installed skills still require the consent-based update flow.
123
+
116
124
  ## Session discovery
117
125
 
118
126
  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 on the first use of each project in a session. 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.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@foundocs/foundocs-setup",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Repeatable project setup and agent skills for the Foundocs remote MCP server",
5
5
  "foundocsRelease": {
6
- "summary": "Keep AGENTS.md compact with trigger-only guidance and on-demand skill references; add session discovery indexes with focused search and older-server fallback."
6
+ "summary": "Organize knowledge in reusable topic folders; allow only server-verified same-category path-only Dreaming moves, preserve move history and owner-reviewed undo, and capture verified lessons from corrected mistakes."
7
7
  },
8
8
  "type": "module",
9
9
  "bin": {
@@ -35,6 +35,6 @@ If the tool is unavailable, explain the missing server capability; do not substi
35
35
 
36
36
  On an explicit Dreaming request, read [the Dreaming protocol](references/dreaming.md) before beginning. Confirm dream_memory and get_dream are available in the connected tool inventory. If unavailable, explain that Dreaming is unavailable and stop this workflow. Do not substitute generic create_doc, update_doc, delete_doc, set_knowledge_status, local writes, or fabricated reports. Ordinary capture continues to follow the user's existing project instructions and does not implicitly begin Dreaming.
37
37
 
38
- Dreaming analyzes this project's knowledge. Documents and change events are read-only evidence. Only server-permitted exact duplicate representative links and non-authoritative related_to links can be applied automatically; every meaningful change needs an owner review. Never approve proposals yourself, permanently delete memories, or rewrite project instructions and tools.
38
+ Dreaming analyzes this project's knowledge, including dispersed or similar topical folders under the fixed `rules`, `learnings` and `decisions` roots. Documents and change events are read-only evidence. Only server-permitted exact duplicate representative links, non-authoritative related_to links and same-category path-only knowledge moves can be applied automatically. The server must verify that all non-path content and metadata remain unchanged; semantic, category or mixed changes require owner review. Inspect current capabilities rather than assuming an older server supports automatic moves. Never approve proposals yourself, permanently delete memories, or rewrite project instructions and tools.
39
39
 
40
40
  Persist progress and report server-confirmed results in the user's language. Analysis can finish with review still pending. A blocked, interrupted, or partly inspected run must not be presented as a successful full review.
@@ -1,6 +1,7 @@
1
1
  # Documents and knowledge
2
2
 
3
3
  - Save user-requested 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.
4
+ - Knowledge stays under the fixed `knowledge/rules/`, `knowledge/learnings/` and `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. Folder organization never changes an item's meaning or category implicitly.
4
5
  - Explicit user destinations and formats take precedence. Keep specifications under the repository's existing spec conventions.
5
6
  - After resolving the configured project, on its first Foundocs use in each session 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.
6
7
  - 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.
@@ -7,9 +7,9 @@ Prompt version: dreaming-v1. Read this only for an explicit Dreaming run.
7
7
  1. Resolve project_id using the governing Foundocs instructions and inspect the live MCP schemas. Use dream_memory for every run mutation and get_dream for saved status. Server tool schema and responses take precedence over examples here. Do not fall back to generic content writes if a schema or capability is missing. Never call set_knowledge_status during Dreaming; manual archival/restoration is a separate explicit-user-request workflow and must not bypass owner review.
8
8
  2. Begin with `{project_id, action: "begin", requestId, agentName, promptVersion: "dreaming-v1"}`. Generate a UUID requestId for each distinct command; keep the exact payload and requestId for retries. Preserve the returned run.id, policyVersion, promptVersion, targets with versionToken, leaseGeneration, and leaseExpiresAt. The server selects eligible operations; do not broaden its policy. A duplicate-run response identifies the existing run; inspect it instead of claiming ownership or silently resuming it.
9
9
  3. Page through the frozen targets. Use get_doc with each target ID and bounded body reads; preserve versionToken and readId for continuation. Use explore_docs help for discovery grammar and get_changes for relevant history. Sources must belong to this project. Never store credentials, environment variables, or unrelated conversation transcripts as evidence. Track inspected IDs separately from targets not yet inspected. A metadata-only listing does not prove body inspection.
10
- 4. Apply the six stages below in bounded batches. Deduplicate findings across stages and prior runs. Use get_dream history/detail to inspect previous dispositions and changes. Do not resubmit a rejected proposal with identical evidence; a new proposal must show what materially changed. Insufficient evidence is a limited observation, not an approval task asking the owner to perform the research.
10
+ 4. Apply the six stages below in bounded batches. Inspect related topical paths for dispersed knowledge and similar folders; prefer existing suitable folders and keep the three category roots fixed. Deduplicate findings across stages and prior runs. Use get_dream history/detail and available get_content_moves receipts to inspect previous dispositions and moves. Avoid repeated cosmetic renames or moving an item back and forth without new retrieval evidence. Do not resubmit a rejected proposal with identical evidence; a new proposal must show what materially changed. Insufficient evidence is a limited observation, not an approval task asking the owner to perform the research.
11
11
  5. After each stage or bounded batch call `{project_id, action: "checkpoint", requestId, runId, leaseGeneration, stages, inspectedIds}`. Each stage result is `{stage: 3|4|5|6|7|8, status: "completed"|"not_applicable"|"deferred"|"failed", reason}`. Supply cumulative inspectedIds and stage results, including truthful zero findings, failures, and unprocessed scope. Never mark an unread target inspected. The lease lasts 10 minutes and renews on accepted commands; checkpoint often enough to keep it current.
12
- 6. Submit self-contained candidates with `{project_id, action: "submit", requestId, runId, leaseGeneration, candidates}`. Read server outcomes; an auto_candidate request is not proof of application. Applied relations can advance endpoint versions while preserving their bodies. Re-read affected sources before submitting later candidates that share those endpoints; use the current observed versions in targets and evidence. The frozen inventory defines coverage, not an exemption from version checks. Only exact, same-scope duplicates with no metadata conflicts can receive a duplicate_of representative link; all originals remain active and unchanged. related_to links support navigation only. Reject self-links and cross-project links. Other relation types, rewrites, creations, scope/priority changes, conflict resolution, archive, and importance reduction require review.
12
+ 6. Submit self-contained candidates with `{project_id, action: "submit", requestId, runId, leaseGeneration, candidates}`. Read server outcomes; an auto_candidate request is not proof of application. Applied relations or path moves can advance endpoint versions while preserving their bodies. Re-read affected sources before submitting later candidates that share those endpoints; use the current observed versions in targets and evidence. The frozen inventory defines coverage, not an exemption from version checks. Only exact, same-scope duplicates with no metadata conflicts can receive a duplicate_of representative link; all originals remain active and unchanged. related_to links support navigation only. Same-category path-only moves follow the strict rules below. Reject self-links and cross-project links. Other relation types, rewrites, creations, category/scope/priority changes, conflict resolution, archive, and importance reduction require review; a mixed candidate with any such change requires review in full.
13
13
  7. Finish with `{project_id, action: "finish", requestId, runId, leaseGeneration, status, summary}`; status is completed, partial, failed, or cancelled. Save completed for fully inspected runs, including empty/no-change runs. Use partial for budget limits, missing evidence, or unprocessed scope; explain what remains. Record deferred/failed stages in the last checkpoint. Do not wait for owner decisions to finish analysis.
14
14
  8. Read `{project_id, runId}` with get_dream and report saved counts, run status, inspected/target coverage, reportUrl, and reviewUrl when pendingReviewCount is nonzero. Never infer approval, application, or task success from your intent, confidence, or a positive retrieval evaluation.
15
15
 
@@ -27,13 +27,23 @@ To read a complete proposal, use get_dream `{project_id, runId, changeId, offset
27
27
 
28
28
  Use these 1-based numbers when explaining stages or reporting progress. The server retains stable API IDs for existing runs: display stages 1, 2, 3, 4, 5, 6 map to API IDs 3, 4, 5, 6, 7, 8 respectively. Use the API IDs in checkpoint `stage` and candidate `stages`; preserve IDs from saved runs.
29
29
 
30
- - **1 — Memory Consolidation:** Distinguish byte-identical, same-scope duplicates from similar assertions. Differences in environment, exceptions, provenance, metadata, or applicability disqualify automatic consolidation. A semantic merge is a reviewed rewrite; preserve every unique condition and source.
30
+ - **1 — Memory Consolidation:** Distinguish byte-identical, same-scope duplicates from similar assertions. Find related knowledge dispersed across topical folders and propose placing it in an existing suitable folder within its category. Direct-root files are valid; nesting is useful only when it improves retrieval. A path-only consolidation may qualify below; differences in environment, exceptions, provenance, metadata, or applicability disqualify automatic duplicate linking. A semantic merge is a reviewed rewrite; preserve every unique condition and source.
31
31
  - **2 — Conflict Resolution:** Compare matching subjects, scope, environment, and time period. Distinguish historical evolution from contradiction. Cite both sources and recommend a reviewed replacement, narrower scopes, or retaining the current state. A newer date never outranks an explicit rule by itself.
32
32
  - **3 — Knowledge Abstraction:** Identify recurring causes across independent experiences. Cite supporting cases, shared conditions, counterexamples, and limits. Prefer at least two independent cases; copied retellings count as one. Observations may describe patterns; activating generalized knowledge requires a reviewed create mutation.
33
33
  - **4 — Forgetting & Decay:** Require concrete evidence of obsolescence or lost applicability. Age and low retrieval frequency alone do not justify archival or lower importance, especially for rules and decisions. Explain retrieval impact and reversibility. Propose recoverable archive or importance changes for review; never permanent deletion.
34
34
  - **5 — Memory Linking:** Link supported shared subject matter without claiming causality or authority. Deduplicate existing relations. Only related_to and eligible duplicate_of are auto candidates. supersedes, contradicts, supports, and derived_from need review and source evidence.
35
35
  - **6 — Reflection:** State documented outcome, supported explanation, useful next action, and applicability. Positive retrieval feedback measures retrieval usefulness, not task success. One incident can support a bounded lesson, never an unsupported universal rule.
36
36
 
37
+ ## Folder moves and undo
38
+
39
+ Knowledge has fixed `knowledge/rules/`, `knowledge/learnings/` and `knowledge/decisions/` roots, with arbitrary topical nesting below them. Use the existing six stages for folder findings; do not add another stage or create empty folder records. Inspect live dream_memory policy before requesting an automatic move. If the connected server does not explicitly support server-verified same-category path-only updates, submit a review candidate instead. Tool presence or a client-side claim that a move is harmless is insufficient. Do not retry a missing capability with generic content writes.
40
+
41
+ A path-only move uses `{type: "update", contentId, after: ContentInput}`. Copy the complete inspected content into `after` with only `path` changed, and supply the change `reason`. Keep `kind: "knowledge"`, category, title, TL;DR, the exact body bytes, ordered tags, immutable creation date and all other content metadata unchanged. Do not include server-owned fields such as linkBasePath, memoryStatus or importance in ContentInput. The server compares stored fields independently; any semantic or category change, or a candidate mixed with archive, importance, creation or other reviewed mutations, requires owner review in full. Keep independent decisions separate without splitting an inseparable semantic change to evade review. Automatic eligibility is always server-controlled.
42
+
43
+ Moves preserve the stable content ID, previous-path aliases, history and relative Markdown link base through the server's linkBasePath. Never recreate/delete a memory, rewrite its body to adjust links, or manually set server-owned fields for folder organization. A path collision or stale version is not permission to overwrite. Re-read affected items after application and use saved outcomes to report moved paths; do not infer success from submission.
44
+
45
+ Use get_content_moves when available for move receipts, including dreamRunId and changeId, and get_dream for the exact saved proposal. Reverting a Dreaming move requires the owner review's existing `revert` action on that proposal and its current revision/hash; the agent never approves or reverts proposals itself. Link the exact proposal review when available. Do not use undo_content_move, update_doc or a new compensating proposal to bypass that review. Ordinary non-Dreaming move undo is a separate explicit-user-request workflow in [the writing guide](../../foundocs-capture-knowledge/references/writing-guide.md#authorized-path-moves-outside-dreaming).
46
+
37
47
  ## Candidate payload
38
48
 
39
49
  A candidate contains candidateId (a fresh UUID), stages, title, reason, impact, targets, evidence, mutations, dependsOn, alternatives, uncertainty, and requestedDisposition. The submission envelope supplies runId; do not add operation or before/after fields from obsolete planning examples. targets is an array of `{contentId, versionToken}` for the knowledge involved. evidence is an array of `{contentId, versionToken, location, excerpt}`. Copy each excerpt as a contiguous verbatim passage from the inspected source body at that version. Do not translate, paraphrase, summarize relations, or invent text in excerpt, even when the interpretation is correct; put those interpretations in reason or impact instead. Read-only documents may provide evidence when supported by the tool schema. Use the current live schema for ContentInput.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: foundocs-capture-knowledge
3
- description: Save durable project context explicitly provided by the user, lasting rules and preferences, confirmed decisions and verified reusable learnings in Foundocs knowledge. Trigger in the same turn even without a request to remember or save, including project purpose, identity, audience, technology, terminology, operating environment and constraints. Merge related items; exclude tentative ideas, transient status and secrets.
3
+ description: Save durable project context explicitly provided by the user, lasting rules and preferences, confirmed decisions and verified reusable learnings, including lessons from correcting your own mistakes, in Foundocs knowledge. Trigger in the same turn even without a request to remember or save, including project purpose, identity, audience, technology, terminology, operating environment and constraints. Merge related items; exclude tentative ideas, transient status and secrets.
4
4
  ---
5
5
 
6
6
  # Capture Foundocs knowledge
@@ -9,6 +9,8 @@ Keep information that will improve a later decision or avoid repeated investigat
9
9
 
10
10
  When the user explicitly provides durable information about their project, capture it in the same turn without waiting for a separate request to remember or save. Search narrowly for related knowledge, merge into the same topic or create an item, and confirm the write succeeded before ending the turn. An acknowledgment such as "Understood" or "I'll remember" is not a substitute for persistence. If blocked by configuration, access, an unresolved contradiction or a write failure, explain that the information has not been saved and what is needed.
11
11
 
12
+ After correcting your own mistake, whether noticed independently or pointed out by the user, capture any verified, reusable lesson in the same turn without waiting for a save request. Record the mistaken assumption or action, the verified cause and corrected approach, and when the lesson applies; include only supported details that help avoid recurrence. Use `learnings` for the lesson, or `rules`/`decisions` when the correction establishes a lasting user rule or confirmed decision. Skip typo-only fixes, one-off cleanup and unverified fixes; a correction alone does not make a durable lesson.
13
+
12
14
  ## Select and scope
13
15
 
14
16
  - `rules`: lasting rules and preferences established by the user.
@@ -37,6 +39,8 @@ On the first use of this project in a session, follow the [Foundocs session disc
37
39
 
38
40
  Prefer `explore_docs` for path discovery, body search and focused reads. Use `search_docs` when searching titles, tags or TL;DR, or when its kind/category filters better fit the question. 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.
39
41
 
42
+ Knowledge has three fixed category roots: `knowledge/rules/`, `knowledge/learnings/` and `knowledge/decisions/`. Topical folders may nest arbitrarily below the matching root; a file directly under that root is also valid. Before choosing a new path, inspect related existing folders with `explore_docs` and reuse the closest suitable topic. Group closely related facts in the same item or folder; avoid tiny fragments, duplicate shallow folders and a new folder for every capture. Create a topic folder only when it improves retrieval. Ordinary capture need not reorganize unrelated knowledge; use [the writing guide](references/writing-guide.md) for an authorized path move, and the explicit Dreaming workflow for broader consolidation.
43
+
40
44
  When new information conflicts with existing knowledge, check whether the user explicitly corrected or superseded the earlier statement. If so, update it and record the correction's source without inventing a reason. Otherwise, ask a focused clarification before replacing the disputed claim; recency alone is not proof of correction. Do not silently override user-provided context with code evidence or the reverse; distinguish their sources and scopes. Continue saving unrelated, unambiguous knowledge and preserve unrelated content.
41
45
 
42
46
  ### Explorer command reference
@@ -12,6 +12,8 @@ Use a title and `tldr` that identify what future work should retrieve, with a fe
12
12
 
13
13
  Use `create_doc` with `kind: "knowledge"`, a category of `rules`, `decisions` or `learnings`, and a `.md` path under the matching `knowledge/<category>/` directory. Supply the required title, `tldr`, tags, Markdown body, creation date in `YYYY-MM-DD`, concise change reason and UUID `requestId` according to the discovered schema.
14
14
 
15
+ The three category roots are fixed. Reuse an existing topical folder before creating another; nested paths such as `knowledge/learnings/auth/session-expiry.md` and direct-root files such as `knowledge/rules/testing.md` are both valid. Group related information rather than producing one small file or near-duplicate folder per fact. Do not change category merely to place an item in a convenient folder.
16
+
15
17
  For user-requested documents, use `kind: "document"`, `category: null` and a path under `docs/` ending in `.md`, unless the user specified another destination or format or repository spec conventions apply. These are Foundocs logical paths, not local files.
16
18
 
17
19
  ## Existing items
@@ -20,6 +22,12 @@ Read the current target before changing it. Use `update_doc` with the ID and obs
20
22
 
21
23
  If equivalent knowledge already exists, leave it unchanged. Merge new explicit user-provided context or verified findings into the same topic while preserving unrelated content and distinguishing their evidence. For contradictions, apply an explicit user correction with its source; otherwise clarify whether the new statement corrects the old one before replacing disputed knowledge. Collection alone does not authorize deleting or archiving old items. For an explicit manual archive or restore request, follow [the Foundocs manual archival guidance](../../foundocs/SKILL.md#manual-archival-and-restoration).
22
24
 
25
+ ### Authorized path moves outside Dreaming
26
+
27
+ When the task or existing project policy authorizes organization within one knowledge category, including suitable folder placement during capture, proceed without a separate per-move confirmation. Read the current item, then use `update_doc` with its stable ID, observed `versionToken`, the new `path`, a concise `reason` and a fresh `requestId`. Send only the path change; preserve the body, title, TL;DR, ordered tags, category, creation date and other metadata. Do not recreate or delete the item to move it. Previous paths remain aliases to the same ID, move history is retained, and the server's `linkBasePath` keeps relative Markdown links anchored until the body changes. Do not rewrite links or set this server-owned field yourself. Path conflicts or stale versions require rereading and reconciliation, never blind overwrite.
28
+
29
+ Inspect the live `get_content_moves` schema to list the item's structured move receipts and follow `nextCursor`. For an explicitly requested undo of an ordinary path-only move, read the current item and use `undo_content_move` with `project_id`, `id`, the receipt's `moveId`, current `versionToken`, a reason and a fresh `requestId`. Undo fails when the item changed after that move or the destination conflicts; do not bypass that failure with `update_doc`. This path-only undo cannot revert a move bundled with semantic changes; inspect the original change and use the normal authorized update workflow for ordinary capture corrections. Ordinary semantic capture still follows the existing update rules above. Dreaming moves must be reverted through the exact saved proposal's owner review, never this tool or a generic path write. If these tools are unavailable on an older server, explain the missing history/undo capability instead of claiming it was verified or fabricating a revert.
30
+
23
31
  ## Requests and results
24
32
 
25
33
  Use a fresh UUID `requestId` for each intended mutation. Reuse it only when retrying the exact same payload, including after a lost response, to avoid duplicate changes. On version or edit conflicts, read the latest target, reconcile the change and use a new ID for the revised payload. Do not overwrite concurrent edits blindly or repeat non-retryable requests.
@@ -1,4 +1,4 @@
1
1
  - Before project context lookup, document management, or any Foundocs MCP call, read and follow [foundocs]({{FOUNDOCS_SKILL_PATH}}).
2
- - When the user provides durable project context, or lasting rules, confirmed decisions or verified reusable learnings arise, follow [foundocs-capture-knowledge]({{SKILL_PATH}}) in the same turn, even without a request to save. Skip when there is nothing new to keep.
2
+ - 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.
3
3
  - Run Dreaming only on an explicit user request (including “꿈꾸자” or “꿈구자”); follow the foundocs skill. Quoted triggers and ordinary capture do not start Dreaming.
4
4
  - Project configuration: `foundocs.json` beside this governing AGENTS.md; resolve it from that directory, including when working in nested directories.