Project Context
Mission
Provide a reusable, private-by-default context layer for each project so environment information is collected once, reused across runs, and safely isolated from git history.
Scope boundary:
- manages runtime context and secrets only
- does not store heavy experiment artifacts (checkpoints, dataset caches, large logs)
- stores per-project shared-memory source configuration, but not shared-memory records
Trigger
Use this skill when any of these are needed:
- first-time project environment bootstrap
- preflight checks before experiment/report/eval execution
- missing runtime fields during task execution
- per-run context snapshot for reproducibility
- first use of shared-memory retrieval or export for a project
Private Directory Contract
Store all local runtime state under project root:
<project-root>/.project_local/<project_slug>/context.json<project-root>/.project_local/<project_slug>/secrets.json<project-root>/.project_local/<project_slug>/runs/<run_id>/runtime_snapshot.json
Rules:
.project_local/must be in.gitignore.context.jsonis non-sensitive.secrets.jsonis sensitive and must never be logged verbatim.- If multiple projects share one orchestration repo, isolate by
project_slug. - Initialize
.gitignoreif missing and append.project_local/if absent.
Incremental Collection Policy
Do not ask for all fields at once.
- infer task type (
report|sft|rl|eval|generic) - load existing
context.json+secrets.json - auto-detect non-sensitive environment values where possible
- if execution target is
remote, consume reuse decision fromrun-governorfirst; ask only if decision is missing - ask only for missing required fields for the current task
- during execution, allow blocker-only delta prompts (e.g. missing API URL/key)
- persist immediately for reuse
- when shared-memory retrieval/export is needed, ask the user where the local shared-memory repo should live if
memory.shared_repo.pathis missing
If new missing fields appear later, run preflight again and collect only deltas.
Security Policy
- set
<project-root>/.project_localand subdirectories to0700 - set
secrets.jsonto0600 - redact sensitive keys in all CLI output (
***) - never place secret content in stage reports or commit messages
Run Integration
Recommended order in research execution:
run-governorcollects and confirms mode +local|remotetargetrun-governorinitializesrun_idproject-contextpreflight resolves runtime context and consumes remote reuse decisionexperiment-executionruns with resolved contextproject-contextsnapshot writes run-scoped frozen context- shared-memory retrieval/export reuses
memory.shared_repo.*fromcontext.json
Script
Use helper script:
scripts/project_context.py
Examples:
bashpython3 .agents/skills/project-context/scripts/project_context.py preflight \ --project-root . \ --project-slug my-sft-project \ --task-type sft \ --run-id 20260303_130000-my-sft-project
bashpython3 .agents/skills/project-context/scripts/project_context.py preflight \ --project-root . \ --project-slug my-sft-project \ --task-type generic \ --require memory.shared_repo.path
bashpython3 .agents/skills/project-context/scripts/project_context.py show \ --project-root . \ --project-slug my-sft-project
bashpython3 .agents/skills/project-context/scripts/project_context.py migrate-layout \ --project-root . \ --clean-empty
Required Output for Operations
For each operation, emit:
Project: root and slugAction: preflight/show/snapshotState: loaded + newly collected fieldsPaths: local/context/secrets/snapshot/runtime/shared-memory pathsMissing: unresolved required fields (if any)


