Project Context Adapter
Purpose
Refresh factual host-project context in project/** so reusable skills can
implement screenshot-derived specs without scanning the whole repository.
When To Use
- Project structure, routes, entrypoints, styling systems, assets, or
verification commands changed.
- A new frontend stack fact was discovered during implementation.
- Current skill capability declarations, available providers, or official
documentation choices changed.
- Design-reference boundaries, approved patterns, or anti-patterns changed.
- Path indexes no longer match actual source files.
When Not To Use
- First-time full onboarding in Plan Mode. Use
project-onboarding-adapter.
- Reusable skill authoring. Use
agent-rules-skill-author.
- Screenshot spec writing or implementation unless project facts changed.
Required Context
- Read
AGENTS.md.
- Confirm the classified task is
project-context-refresh or a project
context cache update required by another task.
- Read
common/documentation-maintenance.md.
- Read existing
project/** overlays.
- Inspect relevant manifests, configs, entrypoints, routes, components,
styles, assets,
tool-capabilities-manifest.json, and verification scripts.
- Read
references/extraction-checklist.md.
- Read
references/sync-procedure.md.
Read targeted README sections only when the refresh concerns project intent, setup guidance, or documentation drift. Use common/readme-policy.md and confirm cached technical facts through higher evidence.
Tool Contract
- Use Project Context MCP when available.
- Use filesystem reads and targeted search when Project Context MCP is
unavailable.
- Use
context7 and MDN only when refreshing official documentation choices or
stack-specific pattern notes that depend on current external docs.
- Activate
openai_platform_docs only when refreshed project facts depend on current OpenAI or Codex behavior.
- Do not use Figma MCP.
- Edit only
project/** unless the user also requests bundle skill or policy
changes.
Workflow
- Determine which project facts changed.
- Update only affected overlays or path indexes.
- Refresh
project/mcp-profile.md when skill capabilities, validated providers
servers, official docs choices, or verification capabilities changed.
- Refresh
project/design-reference-profile.md when screenshot, exported
asset, copied inspect, or design-source boundaries changed.
- Refresh
project/approved-patterns.md and project/anti-patterns.md only
from real project code or official documentation for the detected stack.
- Keep graph frontmatter current with
publishable: false and
local_only: true.
- Keep host-project facts out of
AGENTS.md, README.md, common/**,
manifests, and reusable skills/**.
- Verify updated facts against actual files or official documentation sources.
Output Contract
Final response: return only facts that affect the user's understanding, confidence, or next action. Omit empty fields and workflow narration.
Report:
- overlays updated;
- source facts used;
- official documentation or MCP facts refreshed;
- project paths indexed or changed;
- verification performed;
- any project facts that remain unknown.
Validation Gates
project/** files must remain local-only.
- Path indexes must point to existing files or explicitly mark missing owners.
project/mcp-profile.md must match active declarations in
tool-capabilities-manifest.json when it is touched; provider config alone
must not be recorded as availability.
project/design-reference-profile.md must not imply live design-tool access.
- Patterns and anti-patterns must cite real local code facts or official
documentation choices, not generic preferences.
- Reusable skills must not receive host-specific facts.
- README claims must not become project facts without confirmation from source, config, CI, package scripts, lockfiles, official documentation, or real results.
- Context refresh must not edit README unless the current user explicitly requests that README change.
- No Figma MCP or Figma whiteboard workflow may be introduced.
Trigger Evals
Should trigger:
- "Refresh project context after this layout change."
- "Update .agents/project path indexes."
- "The styling profile is stale; sync it with the repo."
Should not trigger:
- "Create a design implementation spec from screenshots."
- "Implement this screen."
- "Plan first-time onboarding for a new project."
Reference Map
references/extraction-checklist.md
references/sync-procedure.md
common/readme-policy.md
1---2name: project-context-adapter3description: Refresh local-only project/** facts and frontend path indexes after stack, routing, styling, asset, verification, docs/tool, design-reference, pattern, or ownership changes. Do not put project facts in reusable skills.4---56# Project Context Adapter78## Purpose910Refresh factual host-project context in `project/**` so reusable skills can11implement screenshot-derived specs without scanning the whole repository.1213## When To Use1415- Project structure, routes, entrypoints, styling systems, assets, or16 verification commands changed.17- A new frontend stack fact was discovered during implementation.18- Current skill capability declarations, available providers, or official19 documentation choices changed.20- Design-reference boundaries, approved patterns, or anti-patterns changed.21- Path indexes no longer match actual source files.2223## When Not To Use2425- First-time full onboarding in Plan Mode. Use `project-onboarding-adapter`.26- Reusable skill authoring. Use `agent-rules-skill-author`.27- Screenshot spec writing or implementation unless project facts changed.2829## Required Context30311. Read `AGENTS.md`.322. Confirm the classified task is `project-context-refresh` or a project33 context cache update required by another task.343. Read `common/documentation-maintenance.md`.354. Read existing `project/**` overlays.365. Inspect relevant manifests, configs, entrypoints, routes, components,37 styles, assets, `tool-capabilities-manifest.json`, and verification scripts.386. Read `references/extraction-checklist.md`.397. Read `references/sync-procedure.md`.4041Read targeted README sections only when the refresh concerns project intent, setup guidance, or documentation drift. Use `common/readme-policy.md` and confirm cached technical facts through higher evidence.4243## Tool Contract4445- Use Project Context MCP when available.46- Use filesystem reads and targeted search when Project Context MCP is47 unavailable.48- Use `context7` and MDN only when refreshing official documentation choices or49 stack-specific pattern notes that depend on current external docs.50- Activate `openai_platform_docs` only when refreshed project facts depend on current OpenAI or Codex behavior.51- Do not use Figma MCP.52- Edit only `project/**` unless the user also requests bundle skill or policy53 changes.5455## Workflow56571. Determine which project facts changed.582. Update only affected overlays or path indexes.593. Refresh `project/mcp-profile.md` when skill capabilities, validated providers60 servers, official docs choices, or verification capabilities changed.614. Refresh `project/design-reference-profile.md` when screenshot, exported62 asset, copied inspect, or design-source boundaries changed.635. Refresh `project/approved-patterns.md` and `project/anti-patterns.md` only64 from real project code or official documentation for the detected stack.656. Keep graph frontmatter current with `publishable: false` and66 `local_only: true`.677. Keep host-project facts out of `AGENTS.md`, `README.md`, `common/**`,68 manifests, and reusable `skills/**`.698. Verify updated facts against actual files or official documentation sources.7071## Output Contract7273Final response: return only facts that affect the user's understanding, confidence, or next action. Omit empty fields and workflow narration.7475Report:7677- overlays updated;78- source facts used;79- official documentation or MCP facts refreshed;80- project paths indexed or changed;81- verification performed;82- any project facts that remain unknown.8384## Validation Gates8586- `project/**` files must remain local-only.87- Path indexes must point to existing files or explicitly mark missing owners.88- `project/mcp-profile.md` must match active declarations in89 `tool-capabilities-manifest.json` when it is touched; provider config alone90 must not be recorded as availability.91- `project/design-reference-profile.md` must not imply live design-tool access.92- Patterns and anti-patterns must cite real local code facts or official93 documentation choices, not generic preferences.94- Reusable skills must not receive host-specific facts.95- README claims must not become project facts without confirmation from source, config, CI, package scripts, lockfiles, official documentation, or real results.96- Context refresh must not edit README unless the current user explicitly requests that README change.97- No Figma MCP or Figma whiteboard workflow may be introduced.9899## Trigger Evals100101Should trigger:102103- "Refresh project context after this layout change."104- "Update .agents/project path indexes."105- "The styling profile is stale; sync it with the repo."106107Should not trigger:108109- "Create a design implementation spec from screenshots."110- "Implement this screen."111- "Plan first-time onboarding for a new project."112113## Reference Map114115- `references/extraction-checklist.md`116- `references/sync-procedure.md`117- `common/readme-policy.md`