own-planner
AGENTS.md2 starsChanged 2 months agoMITView on GitHub
This file provides guidance to Codex (Codex.ai/code) when working with code in this repository. OwnPlanner is an AI-powered personal planning assistant: a layered .NET 10 solution with a React + TypeScript (Vite, MUI) frontend. Users chat with a Google Gemini LLM that invokes in-process MCP-style tools to manage tasks, notes, goals, and contexts stored in per-user SQLite databases. Run from the repo root unless noted. Frontend (from OwnPlanner.Web/ownplanner.web.client/): CI (.github/workflows/ci.yml) uses the same scripts: scripts/setup.sh, then frontend and backend verification.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- OwnPlanner.Infrastructure/AGENTS.mdAGENTS.md
- OwnPlanner.Mcp.Tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- develop-ownplanner-featureSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 1 is common, 11 are distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Run from the repo root unless noted.
- Distinctive: line 48
Never commit directly to master.
- Very specific: line 49
Before the first task commit, create or switch to a dedicated branch.
- Distinctive: line 52
Keep unrelated staged or working-tree changes out of task commits.
- Distinctive: line 60
Check GitHub for the latest published release and the current master commit.
- Very specific: line 67
Use the tag v<major>.<minor>.<patch> and release title Version <major>.<minor>.<patch>.
- Distinctive: line 68
Check whether the tag or release already exists before creating it.
- Distinctive: line 81
If CI fails, report that the GitHub release exists but image publication is incomplete.
- Very specific: line 96
Start with docs/README.md for the documentation index.
- Distinctive: line 116
Read the closest applicable AGENTS.md before changing a component:
- Distinctive: line 127
Follow existing style, naming, and folder conventions.
- Distinctive: line 129
When adding or changing an interface, add/update XML doc comments describing intent and contracts.
- Distinctive: line 130
Keep logging structured. Don't break public contracts unless the task requires it.
- Distinctive: line 141
Prefer additive changes and reuse the shared MCP tool implementation from both in-process and stdio paths.
- Common: line 143
Keep secrets and personal data contained: Never log or return password hashes, reset tokens, personal-access-token material, API keys, or …
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
Overview
OwnPlanner is an AI-powered personal planning assistant: a layered .NET 10 solution with a React + TypeScript (Vite, MUI) frontend. Users chat with a Google Gemini LLM that invokes in-process MCP-style tools to manage tasks, notes, goals, and contexts stored in per-user SQLite databases.
Common commands
Run from the repo root unless noted.
# Install/restore dependencies, then run the full local CI-equivalent verification
./scripts/setup.sh
./scripts/verify.sh
# Verify only one stack
./scripts/verify.sh --backend
./scripts/verify.sh --frontend
# Single test project, class, or method
dotnet test --project OwnPlanner.Application.Tests/OwnPlanner.Application.Tests.csproj
dotnet test --project OwnPlanner.Domain.Tests --filter-class "OwnPlanner.Domain.Tests.Tasks.TaskItemTests"
dotnet test --project OwnPlanner.Domain.Tests --filter-method "*Ctor_Valid_SetsProperties"
# Run the web server (auto-launches the Vite dev server via SpaProxy)
dotnet run --project OwnPlanner.Web/OwnPlanner.Web.Server # http://localhost:5079
# Run the console chat loop (type `exit` to quit)
dotnet run --project OwnPlanner.ConsoleFrontend (from OwnPlanner.Web/ownplanner.web.client/):
npm ci
npm run dev # Vite dev server
npm run build # tsc -b && vite build
npm run lint # eslintCI (.github/workflows/ci.yml) uses the same scripts: scripts/setup.sh, then frontend and backend
verification. Run ./scripts/verify.sh before pushing to match both verification paths locally.
Git workflow
- Never commit directly to
master. - Before the first task commit, create or switch to a dedicated branch. Unless the user specifies
another name, use
feature/<short-description>for enhancements andfix/<short-description>for bug fixes. - Keep unrelated staged or working-tree changes out of task commits.
- Open a pull request targeting
masterwhen the work is ready for review.
Version publishing
- Publish a release when the user requests it, using their requested version. Otherwise propose a semantic version: patch for compatible fixes, minor for compatible features, major for breaking changes. A dependency major upgrade alone does not require an application major release.
- Check GitHub for the latest published release and the current
mastercommit. Compare that release tag with the intended release commit to identify all included changes; do not rely only on local tags or assume that a published release includes later commits onmaster. - Release merged changes from an explicit commit SHA on
master. Confirm successful CI for that exact commit before publishing. For local verification, run./scripts/setup.shbefore./scripts/verify.shso stale dependencies do not invalidate the results. Report any local verification limitations separately from GitHub CI results. - Use the tag
v<major>.<minor>.<patch>and release titleVersion <major>.<minor>.<patch>. Check whether the tag or release already exists before creating it. Never move or overwrite an existing release tag; when resuming an interrupted release, verify its target and continue only the missing steps. - Prepare release notes before publishing: summarize changes since the previous release, link included pull requests and the full comparison, and describe actual compatibility, configuration, or database migration requirements. Do not claim new features or breaking changes solely because the version number changed. Pass multiline notes through a file or structured API argument.
- Version values come from the tag through
APP_VERSIONandAPP_FILE_VERSION; do not bump source files merely to publish. Create the GitHub release against the verified commit, mark a normal stable release as latest, and let the tag-triggered CI workflow publish the Docker image. - Monitor release CI through frontend, backend, browser E2E checks, and Docker publication. Report
completion only after it succeeds, including the release URL and
ghcr.io/am-space/own-planner:v<version>image reference. Confirm thatlatestwas updated. If CI fails, report that the GitHub release exists but image publication is incomplete; investigate the failure without silently retagging the release. - Publishing and deployment are separate actions. Do not change a running deployment unless the user also requests it.
Architecture
Strict clean-architecture layering; dependencies only flow inward toward the Domain. Test projects mirror each layer (*.Tests).
- OwnPlanner.Domain — entities (inherit
EntityBase: Tasks, Notes, Goals, Contexts), value objects, domain rules. No external dependencies, not even EF Core. - OwnPlanner.Application — use cases, services, DTOs. Feature-driven folders (
Chat/,Tasks/,Notes/,Goals/). Depends only on Domain via interfaces. - OwnPlanner.Infrastructure — the only layer that references EF Core and external SDKs (Gemini via
Mscc.GenerativeAI). Holds the twoDbContexts and all migrations. - Presentation (three entry points that wire Application + Infrastructure via DI):
OwnPlanner.Web.Server(ASP.NET Core API + React SPA, cookie auth),OwnPlanner.Console(CLI chat),OwnPlanner.Mcp.StdioApp(MCP stdio host). - OwnPlanner.Mcp.Tools — tool definitions/handlers shared by the web server and the stdio host.
Start with docs/README.md for the documentation index. Deeper docs include
architecture-layers.md, ai-integration.md, and database-schema.md, plus backlog proposals in
docs/backlog/, ADRs in docs/adr/, and superseded planning docs in docs/archive/. See
Documentation process for how plans and ADRs are managed.
Per-user database model
Data is split across two SQLite databases (see docs/database-schema.md):
ownplanner-auth.db(AuthDbContext) — single central DB for accounts, credentials, sessions, and the user→database mapping.ownplanner-user-{userId}.db(AppDbContext) — one isolated file per user holding all planning entities, mounted on login via a tenant-aware context.
In the web server, per-user context resolution and DB wiring live in Services/ (PlannerSessionContextAccessor, PlannerAppDbContextFactory, PerUserAppInitializationService). Local debug .db files and the OwnPlanner.Web.Server/data/ directory are gitignored.
Chat + tool-calling flow
The web server orchestrates the conversation, attaches available tool definitions to each Gemini request, and executes returned FunctionCalls in-process via DirectToolMcpAdapter (resolving tool implementations from DI against the authenticated user's database), then feeds results back to Gemini for the final reply. The console/stdio path uses the same tools over the MCP stdio host instead. See docs/ai-integration.md.
Scoped guidance
Read the closest applicable AGENTS.md before changing a component:
OwnPlanner.Infrastructure/AGENTS.md— persistence, external adapters, and EF migrations.OwnPlanner.Mcp.Tools/AGENTS.md— shared tool schemas and handlers.OwnPlanner.Web/OwnPlanner.Web.Server/AGENTS.md— HTTP/authentication and per-user orchestration.OwnPlanner.Web/ownplanner.web.client/AGENTS.md— React client conventions and validation.docs/AGENTS.md— documentation lifecycle and ADR mechanics.
Conventions
- Testing stack: xUnit.net v3 (package 4.x) with Microsoft Testing Platform + FluentAssertions + NSubstitute. Keep tests in the test project matching the layer under change.
- Follow existing style, naming, and folder conventions; prefer existing abstractions over new patterns. Keep changes small and scoped.
- Preserve nullability annotations and existing async APIs; keep parameter ordering consistent across similar APIs.
- When adding or changing an interface, add/update XML doc comments describing intent and contracts.
- Keep logging structured. Don't break public contracts unless the task requires it.
Code Review Rules
- Preserve tenant isolation. Planning data must be resolved through the authenticated user's
session and user-bound
AppDbContext; never select a user database from a client-supplied user ID, database path, or tool argument. Keep account identity and credentials in the centralAuthDbContext, and add cross-user isolation tests when changing context resolution or data access. - Treat HTTP and MCP shapes as external contracts. Routes, DTO fields, status semantics, tool names, argument schemas, and result shapes must remain backward compatible unless an intentional breaking change includes migration/versioning guidance and coverage for every affected transport. Prefer additive changes and reuse the shared MCP tool implementation from both in-process and stdio paths.
- Keep secrets and personal data contained. Never log or return password hashes, reset tokens, personal-access-token material, API keys, or another user's data. Use explicit response/export allowlists, ownership-scoped queries, redacted structured logs, and guaranteed cleanup for temporary export files.
Documentation process
Docs in docs/ include backlog proposals (docs/backlog/*-plan.md, potential work with no
implementation commitment), active plans (docs/*-plan.md, approved or actively pursued work),
ADRs (docs/adr/NNNN-*.md, durable records of a decision as shipped — start from
docs/adr/template.md), and reference docs (living "how it works now" pages). Promote backlog
work with git mv once it becomes active. In the implementation pull request for a planned feature,
write/update its ADR so it lands with Status: Accepted when merged; mark a replaced ADR as
Superseded by ADR-NNNN. Also git mv the completed plan into docs/archive/ with a banner linking
to the ADR — never delete plans, and don't let a shipped plan remain active on master. Full
mechanics (promotion, numbering, banner format, and superseding) are in
docs/AGENTS.md.
Directory.Build.props derives assembly/file versions from the APP_VERSION / APP_FILE_VERSION env vars (default 0.0.0-local). Releases are cut from git tags v<major>.<minor>.<patch>; tagged CI builds push a Docker image to ghcr.io.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

