10 KiB
Agent Operating Instructions
This repository is the shared long-term memory for agents working with the user.
Its goal is agent self-learning: agents must preserve verified solutions, update project technical specifications, and keep project state current so future agents can continue work without losing context.
Session Startup
At the beginning of work:
- Read this file.
- Read
projects/index.md. - Read
locations/index.md. - Read
mcp-servers/index.md. - If this repository was introduced into an existing dialogue, summarize useful prior context into
dialog-summaries/. - Identify the active project from the user request or
projects/index.md. - Search global knowledge first:
skills/,problems/,locations/,mcp-servers/, anddialog-summaries/. - Read the active project's
status.md,technical-spec.md,decisions.md,notes.md, andagent-log.mdwhen they exist. - Read the active project's
repositories.mdwhen it exists. - Update project status when a meaningful change happens.
Agent Self-Learning Loop
Every agent should follow this loop:
- Load context from this repository.
- Do the requested work.
- Identify what was learned.
- Separate global reusable knowledge from project-specific state.
- Save reusable knowledge in
skills/,problems/, orlocations/. - Update project files:
technical-spec.md,status.md,repositories.md,decisions.md, andagent-log.mdas needed. - Commit and push the memory update when repository access is available.
The agent should not wait for a separate instruction to update memory when a durable lesson, requirement change, project status change, or solved problem appears during work.
Access Requirement
A repository URL is enough to identify this knowledge base, but it is not enough to read or write a private repository.
Any agent using this repository must have:
- GitHub access to
krustophski/agent-knowledge-base; - local GitHub authentication or another approved GitHub connector;
- permission to push commits or create pull requests.
If an agent cannot write to the repository, it should still produce a ready-to-commit Markdown update for the user.
What To Record
Record only durable knowledge:
- working solutions to real problems;
- failed approaches when they are likely to be retried;
- project status, blockers, decisions, and next steps;
- machine-specific setup details;
- paths, commands, ports, dependencies, and integration notes;
- reusable agent procedures.
- user clarifications that affect a project's technical specification or workflow.
- MCP servers, installation notes, configuration snippets, and verification steps.
- short summaries from separate agent dialogues when they contain useful decisions, solved problems, requirements, or project state.
- remote visual access setup: webcams/cameras for external environment analysis and VNC access for remote computer control.
Global Knowledge First
Knowledge that can help more than one project must be stored globally, not only inside a project folder.
Use project folders only for project-specific state:
- current status;
- current technical specification;
- repository map for all local and remote repos that belong to the project;
- next actions;
- project decisions;
- project handoffs;
- project-specific notes.
Use global folders for reusable knowledge:
skills/for repeatable procedures, workflows, and agent habits;problems/for solved issues, root causes, failed approaches, and fixes;locations/for machine, environment, and access facts;mcp-servers/for shared MCP server registry and setup guidance;dialog-summaries/for useful context imported from separate agent dialogues;templates/for reusable document structures.
If a solution is discovered while working on one project but could help another project, record it in problems/ or skills/ and link to it from the project file if needed. Do not leave reusable knowledge only in projects/<project>/.
MCP Server Registry
Agents should keep a shared MCP registry in mcp-servers/index.md.
Rules:
- Prefer free official MCP servers.
- Add unofficial MCP servers only when there is a clear need and the source is documented.
- Do not store secrets, tokens, API keys, or private credentials in MCP configuration examples.
- When a useful MCP server is discovered during work, add it to
mcp-servers/index.mdwith purpose, source, install notes, config snippet, and verification. - When setting up a new machine, read
mcp-servers/index.mdand install/configure the baseline MCP servers that are compatible with that machine. - If automatic installation is not possible, produce exact manual setup steps.
Do not record:
- secrets or credentials;
- temporary chat filler;
- unverified guesses;
- large binary files;
- generated logs unless summarized.
Dialogue Summaries
When the user gives an agent this repository link during an already-running dialogue, the agent should create a short summary of that dialogue.
Use dialog-summaries/YYYY-MM-DD-short-topic.md.
The summary should capture only durable context:
- project name;
- agent or machine, if known;
- user goals;
- important decisions;
- solved problems;
- failed approaches worth remembering;
- commands, files, repositories, MCP servers, or hardware details that matter;
- current state;
- next actions;
- links to updated project/global files.
After writing the dialogue summary:
- Move reusable knowledge into
skills/,problems/,locations/, ormcp-servers/if it belongs there. - Update the affected project's
technical-spec.md,status.md,repositories.md,decisions.md, oragent-log.md. - Commit and push when repository access is available.
- If write access is missing, produce ready-to-commit Markdown.
Do not paste full chat transcripts unless the user explicitly asks. Summarize them.
Remote Visual Access
Agents should help maintain remote visual access on project computers:
- webcam or camera access for analyzing the external physical environment;
- VNC access for remote desktop control when appropriate.
Rules:
- Prefer free official or well-maintained open-source tools.
- TigerVNC is the preferred VNC option unless a machine has a better native/official remote desktop path.
- Store hostnames, ports, roles, setup steps, and verification methods.
- Do not store VNC passwords, camera passwords, tokens, or private keys.
- When a camera or VNC endpoint is configured, update the relevant
locations/<machine>.md. - If the setup produces reusable commands or troubleshooting, update
skills/remote-visual-access.mdorproblems/.
Update Discipline
When a problem is solved:
- Add a file under
problems/. - Include symptoms, environment, root cause, solution, verification, and related files.
- If the solution is reusable, also update or create a skill under
skills/. - If it affects a project, update that project's
status.mdwith a short link or reference to the global knowledge entry.
When a project changes:
- Update
projects/<project>/status.md. - Update
projects/<project>/technical-spec.mdwhen requirements, constraints, functionality, acceptance criteria, or implementation assumptions change. - Update
projects/<project>/repositories.mdwhen a local or remote repository is added, removed, renamed, split, merged, or changes responsibility. - Keep
Current State,Next Actions, andOpen Questionscurrent. - Add decisions to
decisions.mdif they affect future work. - Add a short entry to
agent-log.mdwith the date, machine, agent name if known, summary, and next handoff.
Multi-Repository Projects
A project may be composed from multiple local git repositories.
For every multi-repository project:
- Keep
projects/<project>/repositories.mdas the project-level repository map. - Each participating local repository should have its own root
AGENTS.md. - Use
templates/repository-agents.mdas the standard template for repository-levelAGENTS.md. - Repository-level
AGENTS.mdmust describe that repository's role, paths, commands, dependencies, integration points, and handoff rules. - Shared knowledge discovered inside any repository still belongs in global
skills/,problems/, orlocations/. - Do not merge repositories mechanically until ownership, history preservation, target structure, and conflict handling are documented in
repositories.md.
Technical Specification Requests
Each project should have projects/<project>/technical-spec.md.
When the user asks for a project's technical specification, specification, requirements, or "ТЗ":
- Identify the project.
- Read the latest
projects/<project>/technical-spec.md. - If dialogue since the last update changed requirements, update the file first.
- Return the current specification to the user.
- Commit and push the update when repository access is available.
Multi-Agent Coordination
GitHub is the default cross-computer coordination channel.
Agents should communicate asynchronously through:
projects/<project>/agent-log.mdfor handoffs and status messages;projects/<project>/status.mdfor current state and next actions;projects/<project>/technical-spec.mdfor the current technical specification;projects/<project>/repositories.mdfor local and remote repositories that belong to the project;projects/<project>/decisions.mdfor durable decisions;problems/for solved issues and reusable fixes that may apply across projects;skills/for repeatable procedures that may apply across projects;mcp-servers/for the common MCP server set and setup instructions.
Before starting work, pull or fetch the latest repository state when possible. After meaningful work, commit and push updates promptly. If two agents edit the same file, preserve both useful entries and resolve conflicts by date and topic.
Privacy And Safety
This repository is intended to be private. Even so, write as if a future collaborator may read it.
Never store:
- API keys;
- SSH private keys;
- passwords;
- session cookies;
- OAuth tokens;
- private recovery phrases;
- full personal documents.
Use placeholders such as <REDACTED_TOKEN> when documenting commands that normally include secrets.