一键导入
context-sync
Scan the codebase and regenerate contexts/*.yaml to keep AI agent knowledge current. Run when starting a session or after making structural changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan the codebase and regenerate contexts/*.yaml to keep AI agent knowledge current. Run when starting a session or after making structural changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | Context Sync |
| description | Scan the codebase and regenerate contexts/*.yaml to keep AI agent knowledge current. Run when starting a session or after making structural changes. |
You (the agent) scan the codebase and regenerate contexts/ directly.
Use your own tools (list files, read package.json, write files). No script needed.
Before working:
Last synced date in contexts/project.yaml headerAfter structural changes:
_bmad-output/Not needed: code edits inside existing files.
pnpm-workspace.yaml to know workspace layoutapps/ and packages/ directories to discover all workspacespackage.json, scan its structurecontexts/# Auto-generated by context sync — {YYYY-MM-DD}contexts/
├── project.yaml ← monorepo overview (always loaded)
├── tech.yaml ← monorepo-level deps only
├── prd.yaml ← product roadmap (from BMAD or manual)
├── ui/ ← apps/ui/ workspace
│ ├── architecture.yaml ← stores, routes, views, components
│ ├── features.yaml ← feature areas, tests
│ └── tech.yaml ← workspace deps + devDeps
├── {new-app}/ ← auto-created per workspace
│ ├── architecture.yaml
│ ├── features.yaml
│ └── tech.yaml
└── README.md
Root level = monorepo-wide context (identity, workspaces, rules, root deps, PRD). Workspace dirs = per-app context (architecture, features, deps).
Scan:
package.json → monorepo name, version, scriptspnpm-workspace.yaml → workspace patternsapps/ and packages/ → discover workspacesWrite: identity, workspaces list, primary_app, stack, lang, rules, commands. Include all scripts from root package.json (dev, build, test, bmad:install, bmad:update, etc.). Footer: comments listing all available context files.
Scan:
package.json → devDependencies (turbo, tsx, etc.)Write: root deps only. Per-workspace deps go in contexts/{app}/tech.yaml.
Source:
_bmad-output/prd.md → if non-empty, extract as YAML block_bmad-output/product-brief.md → if non-empty, extract_bmad-output/planning-artifacts/ → check for additional planning docsFor each app in apps/, create a contexts/{app-name}/ directory with:
Scan:
apps/{app}/package.json → type (Electron, web, etc.)apps/{app}/src/ → directory structureWrite: entry points, stores, routes, views, components, data flow.
Scan:
_bmad/bmm/config.yaml → bmad_version field_bmad/bmm/agents/ → bmad_agents list_bmad-output/ including subdirs
(planning-artifacts/, implementation-artifacts/)Write: file lists per feature area, test files, bmad_version, bmad_agents, bmad_outputs.
Scan:
apps/{app}/package.json → dependencies + devDependenciesWrite: all deps with versions, packaging targets.
When a new app apps/web/ or package packages/shared/ appears:
apps/ and packages/project.yaml lists it under workspacescontexts/web/ directory is createdarchitecture.yaml, features.yaml, tech.yaml generated inside itNo config needed — the structure follows the monorepo.
file: size format (e.g. kanbanStore.js: 41KB)