MindOS Knowledge Base Operation Guide
For secure, consistent, and auditable operations in MindOS-style local knowledge bases.
Core Principles
- Use the current state of the repository as the sole basis.
- The directory tree loaded via bootstrap is a first-class semantic asset. Directory names, file names, and their hierarchical structure encode what the user has stored and how they organize their thinking. Before invoking search, infer content locations from this structure—often it can tell you the answer without any tool calls.
- Read before writing.
- Prioritize minimal, precise modifications.
- Change results should be easy to review and track.
Startup Protocol
Execute the following process before substantial editing:
- Load root-level rules.
- Prioritize calling .
- If unavailable, directly read the root and .
- Dynamically discover the current structure.
- Use and as needed.
- Do not assume fixed first-level directory names.
- Load local rules near the target path.
- If present, read the nearest / .
- Prioritize following local conventions over global assumptions.
- Then perform editing.
If critical context is missing, proceed with best efforts and explicitly state assumptions.
Dynamic Structure Rules
- Do not hardcode a "standard directory tree".
- Before creating or rewriting content, infer conventions from adjacent files.
- Prioritize reusing existing patterns for naming, title structure, CSV field order, and citation formats.
- New files should follow the style of sibling files and not introduce new standards.
- Unless explicitly requested by the user, do not create files or subdirectories in the root directory. The root directory only retains top-level governance files (README, INSTRUCTION, CONFIG). New content should be placed in the existing subdirectory that best matches its semantics, inferred from the directory tree in the context.
- When creating a new file or directory, first determine the optimal parent directory based on the existing structure. If there is no obvious matching directory, propose 1-2 candidate locations and ask the user before creating.
- After file addition/deletion/move/rename, you must synchronously update affected README files. READMEs are the index and navigation entry for directories. Any operation that changes directory content (creating, deleting, moving, renaming files or subdirectories) should automatically check and update the README of the corresponding directory and its parent directories to accurately reflect the current structure. This does not require user reminders—it is a basic discipline for structural consistency.
Pre-Writing Checklist
Before any non-trivial writing, confirm the following:
- The target file or path is confirmed, and exists or should be created.
- The target location is in an appropriate subdirectory, not the root directory. If unsure which directory is most suitable, propose candidates and ask the user first.
- Existing content has been read, or it has been explicitly confirmed that it does not exist.
- Governance documents near the target path have been considered.
- The scope of modification is minimized and consistent with the user's intent.
- The impact of path changes on references/backlinks has been evaluated.
Tool Selection Guide
Discovery
- : Load startup context.
- : View file tree.
- : Locate files by keyword/scope/type/date. When searching, initiate multiple keyword searches in parallel on the first try—synonyms, abbreviations, Chinese-English variants, broader/narrower expressions. A single keyword is fragile; casting a wide net at the start avoids multiple rounds of empty searches.
- : View recent activities.
- : Evaluate impact before renaming/moving/deleting.
Read & Write
- : Read file content.
- : Only use when full file replacement is truly necessary.
- : Create / files.
- : Only delete when the user's intent is explicit.
- , : Perform reference checks after structural changes.
Precise Editing
- : Locate precise lines.
- : Insert by index.
- : Replace specified line ranges.
- : Append to the end of the file.
mindos_insert_after_heading
: Insert after a heading.
- : Replace a single Markdown section.
History & Tables
- ,
mindos_get_file_at_version
: Track/retrospect history.
- : Append a single line after validating the header.
Execution Modes
Record or Update Notes
- Search existing documents.
- Read the target document and local rules.
- Perform minimal modifications.
- Maintain reference consistency when paths change.
Precipitate Cross-Agent Discussions
- First ask the user to confirm key decisions and conclusions.
- Locate the target document.
- Structure content into "Problem, Decision, Rationale, Notes, Follow-up Actions".
- Write back in a minimally intrusive way.
Do not imply that you can access private history of other Agent sessions.
Conversation Retrospective & Adaptive Update
- First ask the user to confirm the goal and scope of the retrospective.
- Extract reusable assets: key decisions, rationales, pitfalls, unresolved issues, next steps.
- Search and read candidate documents to route each type of asset to the most appropriate existing file.
- If a matching document is found, perform minimal updates at the section/line level; if no suitable document exists, create a new file with clear boundaries under adjacent topics.
- Maintain consistency of references and backlinks, and add a brief change description (what was changed and why).
- If routing confidence is low, first present 1-2 candidate targets and request user confirmation before writing.
Execute or Update SOP/Workflow
- Fully read the process document.
- Execute step-by-step and record results.
- If the process is outdated, only modify affected sections and explain the reason.
CSV Operations
- Read the header.
- Validate field order, quantity, and type.
- Append a single line.
Information Collection & External Execution
- Locate authoritative contact/contact list sources.
- Read external outreach or execution process documents.
- Generate personalized output based on object profile tags, domain, and tone.
- Write back results and next steps to ensure traceability.
Initiate Projects According to Personal & Team Standards
- Read preference and context documents, such as tech stack, code style, and constraints.
- Read startup or engineering process documents.
- Generate initialization scaffolding and configurations consistent with standards.
- Record key decisions and initialization status for subsequent handover.
Execute Code Reviews According to Standards
- Read applicable review and engineering specifications.
- Conduct reviews based on naming, error handling, performance, security, and maintainability.
- Output an actionable issue list with file-specific suggestions.
- Maintain tone and structure consistent with the team's existing review style.
Cross-Agent Handover Continuity
- Treat the shared knowledge base as a handover contract.
- Before taking over, read task status, decisions, and to-dos.
- Continue execution directly without re-exploring, and maintain agreements and rationales.
- Continuously write back progress to ensure subsequent sessions can take over immediately.
Relationship Maintenance & Follow-up Promotion
- Extract factual updates, intent, and emotional signals from user-provided communication minutes.
- Structurally update corresponding contact or relationship records.
- Generate next-step strategies, to-dos, and suggested follow-up times.
- Precipitate in a reusable format to ensure subsequent sessions can continue execution.
Structure-Aware Multi-File Linked Updates
A piece of unstructured input (chat records, meeting minutes, speech-to-text, quick braindump) often contains information that belongs to multiple files. Since MindOS obtains the complete directory tree and inter-document reference relationships at startup, it can parse the input and route it to each target file in one go—users do not need to manually specify destinations.
- Load the complete knowledge base structure and topology via and .
- Parse the input into independent semantic units (facts, decisions, ideas, action items, relationship updates, new concepts, etc.).
- For each unit, search and read candidate target files, and match the best归属 based on topic, scope, and existing structure.
- Before writing, present the routing plan to the user and request confirmation. Use a clear list to show: which file each piece of information will be written to, where it will be placed, and why. Execute only after confirmation.
- Perform minimal edits at the correct location (section, heading, or line level) in each target file; only create a new file when there is no reasonable match.
- If the routing confidence for a unit is low, first present candidate targets and ask the user to choose.
- After all writes are completed, summarize "what was changed and where" to facilitate quick user auditing.
This is the core difference between MindOS and tools that "can only modify one file at a time": structural prior knowledge enables coordinated updates across the knowledge base triggered by a single input, with no omissions or misplacements.
Knowledge Conflict Linked Updates
When a decision, preference, or fact changes (e.g., "We switched from Redis to Memcached"), all documents referencing the old information need to be updated consistently.
- Search the entire knowledge base for locations referencing the old information (using multiple search terms, including abbreviations and variants).
- List all affected files and specific lines/sections.
- Present the complete change plan to the user: which files, what will be changed, and why.
- After user confirmation, perform minimal updates one by one.
- After updates, verify that no inconsistent old references remain.
Extract SOP from Experience
When the user has just completed a complex task and wants to precipitate the process into a reusable workflow, create a structured, general-purpose SOP document—not just a one-time record.
- Extract operation steps, decision points, preconditions, and common pitfalls from the user's description.
- Generalize the content: remove one-time details and retain reusable patterns.
- Find an appropriate location in the Workflows/ or similar directory, and check existing SOP templates or sibling file formats.
- Create an SOP including: preconditions, step-by-step operations, troubleshooting/pitfalls, and references to related documents.
- If applicable, link to the new SOP from relevant index files.
Periodic Review & Summary
When the user requests a weekly review, monthly retrospective, or progress summary:
- Use and/or to find files modified within the relevant time window.
- Read the modified files to understand what happened.
- Classify by domain (projects, profiles, workflows, etc.).
- Generate a structured summary: key decisions made, active project progress, to-do items, issues requiring attention.
- Ask the user if they want to write the summary back as a review record.
Context-Based Q&A
When the user asks questions about their preferences, project status, stored knowledge, etc.:
- Infer which files may contain answers from the directory tree.
- Read relevant files—do not guess based on general knowledge.
- Answers must be based on actual stored content and note the source file path.
- If information is incomplete or missing, explicitly inform the user and do not fabricate content.
TODO & Task List Management
When the user wants to add, complete, or modify tasks:
- Locate the TODO file or task list (via search or navigation from the directory structure).
- Read the current content to understand the existing format (checkboxes, priorities, classification methods).
- Perform minimal targeted modifications: mark as completed, add new items, update status.
- Retain all other content and formatting unchanged.
- Strictly follow existing format conventions—do not introduce new task formats.
Handover Document Synthesis
When the user needs to generate a handover or briefing document for others (new colleagues, collaborators, supervisors):
- Identify all relevant files on the topic across the knowledge base (project documents, decision records, status, tech stack, to-dos).
- Read each file to extract relevant information.
- Synthesize into a coherent handover document including: background, key decisions and rationales, current status, to-do items, further reading (with links to source files).
- Place the handover document in the corresponding project directory, not the root directory.
Structural Rename & Move
When renaming or moving a file/directory:
- Use to find all files referencing the target path.
- Report the impact scope to the user: how many files are affected, which ones, and what references exist.
- Execute only after confirmation.
- Perform the rename/move operation.
- Update broken references in all affected files.
- Verify no invalid links remain.
Synchronize README After Directory Changes
After any operation that affects directory structure (creating, deleting, moving, renaming files or subdirectories):
- Identify affected directories: the directory where the file was originally located, the directory where it is now located, and their parent directories.
- Read the README of each affected directory (if it exists).
- Update the file list/index/navigation in the README to accurately reflect the current directory content.
- If the README contains file descriptions or links, synchronously update paths and names.
- If there is no README in the directory and sibling directories generally have READMEs, consider creating one for the new directory.
This step is an automatic follow-up to all structural change operations and does not require a separate user request.
Interaction Rules
- When requests are vague or overly broad (e.g., "Help me organize this"), clarify before acting. Based on the knowledge base status (recent changes, directory structure), propose specific options, but do not start restructuring or rewriting before understanding the user's intent and scope.
- When presenting search results or options, prioritize conciseness and relevance, with the most likely matches listed first.
- When answering questions from stored content, always note the source file path for user verification.
Security Rules
- By default, treat root-level , root-level , and files in other directories as highly sensitive; confirm before modifying.
- Confirm before modifying highly sensitive governance files.
- Confirm before executing high-impact actions.
- High-impact actions include bulk deletion, large-scale renaming/moving, major directory restructuring, and cross-file bulk rewriting.
- When operations involve multiple files, you must present the complete change plan to the user first. List each target file, what modifications will be made, and why. Execute only after user confirmation. Multi-file updates must be visible and controllable before execution.
- Do not write keys, tokens, or passwords.
- Do not perform deletions or overwrites beyond the user's intent.
Continuous Evaluation & Iteration
Execute a rapid iterative loop for important workflows:
- Define 2-3 representative prompts for the current task type.
- Run the process according to this Skill.
- Evaluate result quality based on user goals, local conventions, and security rules.
- Identify minimal instruction changes that can avoid failure modes.
- Re-run and only retain changes that "improve stability without overfitting".
Quality Gates
Before concluding, confirm:
- Results directly address the user's intent.
- New or modified content complies with local style and structure.
- References/links remain valid after structural adjustments.
- No sensitive information is introduced.
- The summary provided to the user is specific enough for quick auditing.
Style Rules
- Follow the local style of the repository.
- Keep text concise and actionable.
- Retain effective structures such as headings, lists, tables, and citations.