Skip to content

Use project-prefixed keys in the README, usage guide, and project-init docs - #29

Merged
dsghi merged 2 commits into
mainfrom
docs/readme-prefixed-keys
Oct 5, 2026
Merged

dsghi merged 2 commits into
mainfrom
docs/readme-prefixed-keys

Conversation

@dsghi

@dsghi dsghi commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A key identifies one document across the whole store. UpsertDocument stores the item with id = key and partition key key; project is a field that reads filter on, not part of the document's identity. The docs still showed the legacy unprefixed key format from before keys carried the project:

GetDocument(key="state:current", project="acme-platform")
GetDocument(key="state:current", project="devbrain")
GetDocument(key="state:current", project="client-abc")

Following that pattern, all three projects address the same stored document, so each project's write replaces the others'. To the agent, the other projects' documents seem to disappear after a successful write. This happened in practice when two agents initialized two projects in parallel using the documented startup pattern.

Changes (docs only)

  • README: every project example key is prefixed with its project name (the opening example, the AGENTS.md template, and preview/apply). Key Conventions states the rule and shows {project}: forms in its table.
  • docs/seed/ref-devbrain-usage.md (the guide agents load from the default project): it now leads with the rule, replacing "Documents Are Scoped by Project". Every key starts with its project name, every call passes the project, and unprefixed keys belong to default, which holds this guide. The startup, query, metadata, and compare examples are prefixed, the key table shows the prefix, and troubleshooting checks for it first.
  • docs/project-init.md: replaces "namespaced by the project parameter" with the prefix rule, and prefixes every key and heading.

The only unprefixed key left in the docs is ref:devbrain-usage in default. Instances that already seeded the guide should re-seed it from the updated file.

🤖 Generated with Claude Code

dsghi and others added 2 commits October 4, 2026 17:25
A key identifies one document across the whole store; project only
filters reads. The README still showed the legacy unprefixed form, where
the same key (state:current) is used in several projects. Those calls
all address one document, so each project's write replaces the others'.

- Prefix every project example key with its project name, including the
  multi-project opening example, the AGENTS.md template, and the
  preview/apply examples.
- State the rule in Key Conventions and show the prefix in its table;
  unprefixed keys belong to the default project (ref:devbrain-usage).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The seed usage guide (ref:devbrain-usage) is what agents read first, and
it still taught the legacy unprefixed keys and described documents as
"scoped by project". project-init.md said documents are "namespaced by
the project parameter". Neither matches the store: a key identifies one
document across all projects, and project only filters reads.

- Lead the usage guide with the rule: every key starts with its project
  name and every call passes the project; unprefixed keys belong to the
  default project, which holds this guide.
- Prefix the startup, query, metadata, and compare examples, show the
  prefix in the key table, and add a prefix check to troubleshooting.
- Prefix every key and heading in project-init.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dsghi dsghi changed the title Use project-prefixed keys in the README examples Use project-prefixed keys in the README, usage guide, and project-init docs Oct 5, 2026
@dsghi
dsghi merged commit 59606dc into main Oct 5, 2026
4 checks passed
@dsghi
dsghi deleted the docs/readme-prefixed-keys branch October 5, 2026 03:29
@dsghi dsghi mentioned this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant