- Read
AGENTS-README-FIRST.yamlin the repo root for the current API key and endpoints. - For specific operational steps (session bootstrap, session log turn workflow, and helper command sequence), follow
AGENTS-README-FIRST.yaml.
On every subsequent user message:
- Follow
AGENTS-README-FIRST.yamlfor specific operational instructions. - Complete the user's request.
templates/prompt-templates.yaml(default-marker-prompt) is the source of truth for specific agent instructions.AGENTS-README-FIRST.yamlis the rendered runtime instruction set.- Keep this file focused on durable workspace policy and conventions; avoid duplicating marker-file operational procedures.
- Use helper modules for session log and TODO operations. Do not make raw API calls.
- Persist session log updates immediately after each meaningful change (turn creation, action append, decision, requirement, blocker, file/context update). Do not defer saves.
- Capture rich turn detail: interpretation, response, status, actions (type/status/filePath), contextList, filesModified, designDecisions, requirementsDiscovered, blockers, and relevant processing dialog.
- Follow workspace conventions in
.github/copilot-instructions.mdfor build, test, and architecture guidance. - Use only
pwsh.exefor shell commands and script execution; do not usepowershell.exe. - When you need API schemas, module examples, or compliance rules, load them from
docs/context/or usecontext_search. - Do not fabricate information. If you made a mistake, acknowledge it. Distinguish facts from speculation.
- Prioritize correctness over speed. Do not ship code you have not verified compiles and is logically sound.
- When writing session logs or other audit records, agents must identify themselves accurately using their real agent identity in Pascal-Case. Do not use placeholder, legacy, or misleading sourceType values.
AGENTS-README-FIRST.yaml— connection details, API key, workspace config (regenerated on server start).github/copilot-instructions.md— build/test commands, architecture overview, coding conventionsdocs/context/— on-demand reference docs (schemas, module docs, compliance rules, action types)docs/Project/— requirements docs, TODO.yaml, mapping matricestemplates/— prompt templates (loaded on demand)tools/powershell/McpContext.psm1— PowerShell module for context ingestion/query workflowstools/powershell/McpContext.USER.md— user-level guide for the McpContext moduletools/powershell/McpContext.AGENT.md— agent workflow instructions for the McpContext module
Agents running inside McpAgent must use the 27 built-in tools instead of raw HTTP calls. See docs/REPL-MIGRATION-GUIDE.md for the full tool inventory and migration patterns.
Key rules:
- Use
mcp_session_*tools for session log lifecycle (bootstrap, turns, history). - Use
mcp_todo_*tools for TODO CRUD (query, get, create, update, delete, plan, status, implementation). - Use
mcp_requirements_*tools for FR/TR/TEST queries. - Use
mcp_client_invokefor any sub-client method not covered by a dedicated tool (context search, GitHub, workspace, etc.). - Do not make raw HTTP calls to
/mcpserver/*endpoints when a tool is available.
- Session logging →
docs/context/session-log-schema.md+docs/context/module-bootstrap.md - TODO management →
docs/context/todo-schema.md+docs/context/module-bootstrap.md - API integration →
docs/context/api-capabilities.md(orGET /swagger/v1/swagger.json) - Adding dependencies →
docs/context/compliance-rules.md - Logging actions →
docs/context/action-types.md - New to workspace → this file +
docs/context/api-capabilities.md - Migrating from raw API →
docs/REPL-MIGRATION-GUIDE.md
You represent the workspace owner. Your work directly reflects the owner's professional reputation.
- Do not fabricate information, capabilities, or results.
- Distinguish between facts, informed opinions, and speculation.
- Acknowledge mistakes immediately and correct them.
- Prioritize correctness over speed.
- When uncertain, state your uncertainty and suggest verification steps.
- Prefer proven patterns over clever approaches unless directed otherwise.
- All code must have XMLDocs. All public APIs must be documented.
- Follow DRY, SOLID, and existing project conventions.
- Log every decision to the session log, including trivial ones.
- For each decision, document: what was decided, why, what alternatives were considered, what was rejected.
- Log design decisions as dialog entries with category "decision" and as session log actions with type "design_decision".
- Every interaction is audited via the session log.
- Every commit must be correct, clean, well-described, and complete.
- Log all commits as actions with type "commit" (SHA, branch, message, files).
- Log all PR/issue comments as actions with type "pr_comment" or "issue_comment".
- Document all web sources in the session log as actions with type "web_reference" (URL, title, usage).
- Add source URLs to the turn's contextList array.
- Attribute external code in both the session log and code comments.
When you discover or agree on new requirements during a session:
- Update the files in
docs/Project/:Functional-Requirements.md— append FR-MCP-* entriesTechnical-Requirements.md— append TR-MCP-* entriesTR-per-FR-Mapping.md— append mapping rowsRequirements-Matrix.md— append status rowsTesting-Requirements.md— append TEST-MCP-* entries
- Include the requirement ID in your session log turn's tags.
- Capture requirements as they emerge. Do not defer to later.
When a design decision is made:
- Log it as a session log dialog item with category "decision".
- Include: the decision, alternatives considered, rationale, and affected requirements.
- Add a session log action with type "design_decision".
- If the decision affects existing code or requirements, note what needs updating.
At the start of every session:
- Follow the session-start checklist in
AGENTS-README-FIRST.yaml. - Read
docs/Project/Requirements-Matrix.mdto understand project state. - If resuming interrupted work, review the last session's pending decisions.
At regular intervals during long sessions (~10 interactions):
- Follow marker-file update cadence and session logging requirements from
AGENTS-README-FIRST.yaml. - Ensure all design decisions are captured.
- Verify requirements docs are up to date.
- MCP — Model Context Protocol, an open standard for tool-calling between AI agents and context servers.
- Workspace — a project directory registered with the MCP server. All workspaces share a single port; use the
X-Workspace-Pathheader to target a specific one. - Marker File — the
AGENTS-README-FIRST.yamlfile at each workspace root. Contains connection details, auth token, and agent prompt. - API Key — a per-workspace cryptographic token that rotates on each server restart. Required for all
/mcpserver/*REST endpoints. - Streamable HTTP — the MCP wire protocol transport at
/mcp-transport. Carries JSON-RPC tool calls over HTTP POST with streaming responses. - Session Log — an audit record of every agent interaction, stored per-session with full request/response history.
- Context Pack — an ordered set of document chunks retrieved by semantic + full-text hybrid search, scoped to the workspace.
- Tool Bucket — a GitHub repository containing tool manifest files, similar to a Scoop package bucket.
- Do not use table-style output in responses.
- Use concise bullets or short paragraphs instead.