协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
curate-project-memory【开发与工程】Give Codex lasting project context in a local Obsidian-compatible Markdown vault. Use when a user asks PMC to set up or connect the project's Obsidian vault, scan or explain a codebase, create a Project Home, remember a decision, constraint, discovery, procedure, debugging lesson, or current state, recall what Codex already knows, prepare a handoff, …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use conversation as the interface. Do not ask the user to run commands or edit configuration manually. Use Codex's normal file tools and request narrowly scoped filesystem permission when needed.
When the user invokes PMC and no project registration exists for the current repository, lead with a concise guided setup instead of describing the architecture:
Do not overwhelm a first-time user with advanced features. Introduce context packs, health checks, exports, team review, and the companion only when relevant.
Read references/project-profiles.md when choosing registration defaults.
Read references/local-similarity.md before building or querying the optional machine-local similarity index.
Read references/storage-and-portability.md for setup or project registration. Read references/automatic-orientation.md when the user wants the vault added as a project source or wants future chats to load project notes without a prompt. Read references/durable-note-policy.md before promoting, changing, or removing knowledge. Read references/note-structure.md when creating notes. Read references/context-packs.md when orienting or resuming work. Read references/knowledge-health.md before auditing a vault. Read references/code-traceability.md when relating notes to source files. Read references/branch-awareness.md before promoting knowledge discovered on a branch or worktree. Read references/drift-detection.md before creating or running verification checks. Read references/coverage.md before assessing documentation coverage. Read references/team-collaboration.md before configuring shared-vault ownership or reviews. Read references/exports.md before creating a portable brief or audit artifact. Read references/obsidian-companion.md when installing, configuring, or responding to review actions from the optional Obsidian companion.
Determine whether the user clearly requested a new vault or an existing vault. If ambiguous, ask one short question.
.obsidian directory.references/note-structure.md.references/storage-and-portability.md..obsidian as evidence that it is an Obsidian vault..obsidian is absent, explain that it appears to be a Markdown folder and ask before using it.Project Home.md, Project.md, and Current State.md from the bundled templates when missing. Project Home.md is the attractive human-facing front door; Project.md remains the compact compatibility index used by existing workflows. Do not create empty directory forests.Inbox/Promotion Inbox.md, Handoff.md, Coverage.md, and the useful Bases dashboards described in references/note-structure.md unless the user opts out.references/automatic-orientation.md and preserve existing repository instructions.Trigger on requests such as "create an overview of this codebase", "scan this project", or acceptance of the setup offer.
Project Home.md, Project.md, and Current State.md; create focused decision, constraint, discovery, procedure, or debugging-lesson notes only when evidence supports them.Project Home.md and keep it concise enough to scan quickly in Obsidian.For a Codex local project, guide the user through the one-time UI action: open Edit project, select Add folder, add the vault, and keep the code repository as the primary folder. Do not claim to have attached a folder through the UI.
Treat the vault as a secondary source folder. Read and edit only relevant notes. Secondary folders do not automatically contribute their own AGENTS.md, skills, or project configuration, so put automatic-orientation guidance in the primary code repository after explicit opt-in.
assets/agents-project-memory.md into the primary repository's AGENTS.md; create that file only when necessary.AGENTS.md.Project.md and Current State.md first, then follow only relevant links.Interpret natural equivalents, not only exact prefixes:
Remember: -> confirmed durable candidate.Decision: -> decision candidate with rationale and consequences.Constraint: -> requirement or constraint candidate.Reference: -> durable reference candidate.Session only: -> do not promote to durable notes.Forget: -> propose correction, removal, or supersession and require confirmation.Treat these natural requests as first-class equivalents:
@PMC remember this -> summarize the immediately preceding durable point and ask for confirmation when its scope is ambiguous.@PMC remember the decision we just made -> create or update a decision after conflict and evidence checks.@PMC update the project status -> propose a concise Current State.md update.@PMC what do we already know about X? -> build a focused context pack and answer with note links.@PMC wrap up this task -> follow the wrap-up workflow.Markers never bypass secret filtering or conflict checks.
Do not rely on the user to remember a special marker. During ordinary project work, notice information that is likely to matter in a future task, especially:
At a natural checkpoint, ask one concise question: "This will matter in future tasks. Add it to the project's Obsidian vault?" Include a one-line summary of exactly what would be recorded. Do not interrupt for routine edits, speculative ideas, transient debugging output, or facts already captured. Batch multiple related candidates into one review prompt when practical.
If the user says yes, treat that response as an explicit durable marker and follow the normal conflict, branch, evidence, and secret checks before writing. If the user says no, keep it session-only and do not repeatedly ask about the same candidate. When wrapping up, always include a short separate list titled Worth adding to the project's Obsidian vault or state that no durable candidates were found.
Inbox/Promotion Inbox.md using assets/promotion-inbox.md. Record the proposed operation, target, evidence, confidence, and conflict status without treating the candidate as durable truth. For a conflict, quote concise existing and proposed claims with separate evidence so the reviewer can compare both sides.references/obsidian-companion.md when applying an approved candidate, record the outcome, and keep rejected candidates out of durable notes.Before promotion, inspect the repository branch and revision when Git is available. Treat branch-only discoveries according to references/branch-awareness.md; never present unmerged implementation as canonical released state.
references/context-packs.md.scripts/build_context_pack.py <project-folder> --query <task> yourself to produce a deterministic candidate ranking; pass each relevant repository-relative path with --code-path.Project.md and Current State.md when available, then inspect only the highest-value ranked candidates required for safe work.references/local-similarity.md; keep its generated index outside the vault and inspect every returned note.Use the schema in references/code-traceability.md. Store stable repository IDs and repository-relative paths, never drive-specific paths. When code changes implement or invalidate durable knowledge, propose reciprocal links or status updates through the Promotion Inbox. Answer "which decisions affect this file?" by running the context-pack builder with --code-path and verifying the returned notes.
Use the health checker for objective structural signals, then compare potentially affected claims with current code, configuration, tests, and accepted notes. Record suspected contradictions in the Promotion Inbox using Existing claim, Existing evidence, Proposed change, and Evidence. Do not choose a winner or rewrite canonical notes silently. Distinguish stale, conflicting, and unverified; a recent timestamp is not proof of correctness.
Read references/drift-detection.md. Add verification checks only for important claims that have stable, non-sensitive machine-verifiable evidence. Run scripts/check_drift.py <project-folder> <repository-root> yourself. Inspect failed checks, distinguish a changed implementation from a bad check, and place proposed corrections in the Promotion Inbox. Never auto-rewrite canonical knowledge from a failed check.
Read references/coverage.md. Run scripts/knowledge_coverage.py <project-folder> yourself, passing expected workstreams from Project metadata when needed. Update Coverage.md from assets/coverage.md with the results and links. Treat coverage as a navigation and review signal, not a performance score.
Read references/team-collaboration.md. Use one durable decision per file, stable knowledge_id values, explicit owners and reviewers, and contributor-specific inboxes when several people work concurrently. Never infer approval merely from a Git merge. Resolve semantic conflicts through reviewed supersession or correction, not by keeping both claims active.
Read references/exports.md. Run the health checker first and stop if possible-secret findings remain. Run scripts/export_project.py <project-folder> <output-file> --mode <onboarding|decision-log|audit|context> yourself. For context mode, pass only paths already selected and inspected for the current task. Do not overwrite an existing export without the user's approval. Explain that exports are snapshots and do not update automatically.
Read references/obsidian-companion.md. Treat companion review actions as workflow state, not proof that a proposed semantic change has been applied. When asked to apply approved candidates, run scripts/candidate_lifecycle.py to verify the approval fingerprint and perform guarded state transitions, rerun current conflict and evidence checks, update canonical notes, and record applied, conflict, or failed with outcome metadata. Never assume approval resolved a conflict automatically.
Run scripts/check_vault_health.py <project-folder> yourself when the user asks to audit, review, or check the vault. Do not ask the user to use a terminal. Interpret its JSON report using references/knowledge-health.md; inspect reported notes before proposing repairs. When the user wants portable or companion-visible results, run scripts/generate_health_report.py <project-folder> <project-folder>/Health Report.md --project-id <id> and include --repository-root when available. Never make destructive repairs automatically.
For "@PMC check this project's memory" or "check whether these notes are out of date", combine structural health with a focused evidence review:
Project Home.md, Project.md, Current State.md, active decisions, and unresolved Promotion Inbox items.On wrap-up, project restart, or explicit handoff request, update Handoff.md from assets/handoff.md. Keep it one-page in spirit: objective, current position, recent work, accepted decisions, blockers, open questions, next actions, and relevant links. Treat it as a generated navigation aid, not a replacement for canonical notes.
Trigger on requests such as "wrap up", "finish for today", or "summarize this session".
Handoff.md after approved durable changes when it would materially help the next session.Read Project Home.md, Project.md, Current State.md, and only the relevant linked notes. Summarize current status, known constraints, unresolved questions, and likely next steps. Flag stale or contradictory notes instead of guessing which is correct.