Suite-level context for AI agents (like Claude Code) when working across the pycemrg library ecosystem.
| File | Purpose | Updated by |
|---|---|---|
PLACEMENT_GUIDE.md |
Where does new functionality belong? | /update-pycemrg-context |
PYCEMRG_SUITE_INDEX.md |
What already exists and how to call it? | /update-pycemrg-context |
commands/pycemrgise.md |
/pycemrgise slash command |
Hand-maintained |
commands/update-pycemrg-context.md |
/update-pycemrg-context slash command |
Hand-maintained |
commands/refresh-source.md |
/refresh-source slash command |
Hand-maintained |
commands/add-library.md |
/add-library slash command |
Hand-maintained |
commands/export-api.md |
/export-api slash command |
Hand-maintained |
source/*.md |
Structured context reference per library (LLM-optimised) | /refresh-source |
Clone this repo alongside your other pycemrg repos, then run the install script:
Recommended layout:
~/dev/
pycemrg/
pycemrg-image-analysis/
pycemrg-model-creation/
pycemrg-context/ <-- this repo
git clone <url> ~/dev/pycemrg-context
cd ~/dev/pycemrg-context
./install.shThe install script:
- Symlinks all
commands/*.mdinto~/.claude/commands/ - Detects sibling library directories and writes
LIBRARY_PATHS.md
LIBRARY_PATHS.md is gitignored and machine-specific. Re-run ./install.sh
if you move any library repo. If a library is not found at the expected path,
the script warns you and leaves a placeholder — edit the file manually.
Start a new Claude Code session after running the script.
In any Claude Code session involving pycemrg work, run /pycemrgise before
describing your task. Claude will:
- Load
PLACEMENT_GUIDE.mdandPYCEMRG_SUITE_INDEX.md - Load the relevant
source/[library].mdcontext references for the task - Confirm its understanding before writing any code
When you add a feature to any library in the suite:
1. Write the implementation
2. Open Claude Code from the pycemrg-context directory
3. Run /refresh-source [library] -- regenerates source/[library].md
4. Review and confirm the diff
5. Run /update-pycemrg-context -- patches PLACEMENT_GUIDE.md and PYCEMRG_SUITE_INDEX.md
6. Review and confirm the diff
7. Commit everything together
/refresh-source runs /export-api on the library and writes a structured
LLM-optimised markdown to source/. /update-pycemrg-context reads from those
source files, diffs against the derived files, and patches only what changed.
Both commands flag ambiguous decisions for human review before writing.
The source/ directory contains one structured context reference per library,
generated by /refresh-source. These files are LLM-optimised: entry points,
contracts, consumer responsibilities, and known constraints — not raw dumps.
| File | Source library |
|---|---|
source/pycemrg-core.md |
pycemrg (core) |
source/pycemrg-image-analysis.md |
pycemrg-image-analysis |
source/pycemrg-model-creation.md |
pycemrg-model-creation |
These files do not exist until you run /refresh-source for the first time.
PLACEMENT_GUIDE.md and PYCEMRG_SUITE_INDEX.md are derived from them and
should never be edited directly — use the update cycle.
To add a new library, run /add-library <name> <path> — it patches all suite
files automatically. For manual edits, the four files that contain library tables are:
commands/pycemrgise.md— source file list in Step 2commands/update-pycemrg-context.md— source table in Step 1commands/refresh-source.md— target table in Step 1install.sh—LIBRARIESmap
LIBRARY_PATHS.md is machine-generated — edit manually only to correct a wrong path,
then note that re-running ./install.sh will overwrite your changes.
Everything else is managed through the update cycle above.
Each library has its own CLAUDE.md covering project-specific commands,
architecture, and gotchas. This repo is not a replacement for those files.
| Scope | Location |
|---|---|
| Personal practices, manifest | ~/.claude/CLAUDE.md |
| Suite-level placement + index | This repo |
| Library-specific commands + gotchas | {library}/CLAUDE.md |
| Full API reference | {library}/docs/API_reference.md |