Repository navigation
feat(config)!: .sctx/ resources folder and .sctx/config.json - #231
Merged
Merged
Conversation
A config root is the folder holding .sctx.json or .sctx/. Relative paths resolve from it, so .sctx/config.json behaves like .sctx.json beside it. Local plugins, schemas and map views go in .sctx/; the global config keeps them beside config.json. plugins/ beside a local config still works with a deprecation warning until 1.0. A folder holding both config files is refused with E_CONFIG_AMBIGUOUS. resolveConfigPath() returns the root, and resourceDir(root, name) is exported so other tools find their resources the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpeYqF5Au42ALp2Cw5m
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpeYqF5Au42ALp2Cw5m
mindsocket
commented
Nov 13, 2026
BREAKING CHANGE: local plugins and map views are found only in the config root's .sctx/ folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpeYqF5Au42ALp2Cw5m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rog · project thread
What
Local resources now live in a hidden
.sctx/folder, and the config can live there too..sctx.jsonor.sctx/. Discovery walks up to find either.sctx.jsonor.sctx/config.json. Every relative path (space paths,./schemas,includeSpacesFrom, pluginformat: pathvalues) resolves from the root. A.sctx/config.jsontherefore resolves from the vault, not from.sctx/.E_CONFIG_AMBIGUOUS..sctx/plugins/,.sctx/schemas/and.sctx/map-views/. The global config keeps these subfolders in its own folder,~/.config/structured-context/."schema": "mine.json") is looked up in.sctx/schemas/first, then in the root.schemas listshows that folder's schemas asconfigured.plugins/folder beside a local config is no longer found. Move it to.sctx/plugins/.Public API (agreed in principle)
ResolvedConfigPathgainsroot, andSpaceConfig.sourceDirnow holds the root.resourceDir(root, name), for map-views, the eval harness (.sctx/evals/) and the Obsidian plugin.SctxErrorCodegainsE_CONFIG_AMBIGUOUS.Notes
src/config/layout.ts, owns the layout. Test fixtures moved totests/fixtures/.sctx/plugins/.docs/config.md(new Resources folder section),docs/concepts.md(Config root),docs/api.md, README, AGENTS.md and the plugin troubleshooting reference.Checks
bun run test(904 pass),bun run test:hook,bun run typecheckandbun run lintall pass.🤖 Generated with Claude Code
https://claude.ai/code/session_019XphpeYqF5Au42ALp2Cw5m