aldus-palace
AGENTS.md102 starsChanged 2 months agoApache-2.0View on GitHub
Aldus Palace is developed agent-natively: a large share of its code is written with AI coding agents. This file is the shared contract for those agents (and for humans who want the same rules). It is not a disclaimer — the normative contract is the schema, the code and the acceptance fixtures in docs/EVAL.md. Also read CONTEXT.md for the ubiquitous language of planning behaviour before changing the planner. You are working on Aldus Palace, a personal cognitive OS. This is…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/aldus.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Every feature must answer: *does this reduce the amount of management the user has to do?* If not, reconsider the design.
- Distinctive: line 59
Do not expand scope from the design archive.
- Very specific: line 74
Do not collapse it into one giant prompt.
- Distinctive: line 90
No module-level mutable state.
- Very specific: line 91
Every mutation writes an action_log entry via writeActionLog.
- Distinctive: line 92
Never edit a shipped migration.
- Distinctive: line 93
Prefer the smallest change that preserves the product model.
- Very specific: line 97
Add or extend a deterministic suite under packages/core/test for any logic change (they run offline in CI).
- Very specific: line 99
Add an eval/fixtures/*.json entry when you change user-visible understanding behaviour.
- Distinctive: line 125
Every important action must be explainable, reversible where possible, and logged.
- Very specific: line 131
Do not couple the system to one provider.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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 — development guidelines
Aldus Palace is developed agent-natively: a large share of its code is
written with AI coding agents. This file is the shared contract for those agents
(and for humans who want the same rules). It is not a disclaimer — the normative
contract is the schema, the code and the acceptance fixtures in
docs/EVAL.md.
Also read
CONTEXT.mdfor the ubiquitous language of planning behaviour before changing the planner.
1. Project identity
You are working on Aldus Palace, a personal cognitive OS.
This is NOT:
- a todo application
- a calendar application
- a note-taking application
- a chatbot wrapper
The goal: a system that understands the user's context, remembers how they work, helps organise thoughts, manages commitments, and turns intent into action.
2. Core philosophy
Context over tasks
The fundamental objects are Thoughts, Commitments, Decisions, Memories, Concepts and Projects. Tasks and calendar entries are only projections.
The user expresses intent; the system owns structure
The user should never have to decide “is this a task, a note, or a reminder?”.
Reduce cognitive load
Every feature must answer: does this reduce the amount of management the user has to do? If not, reconsider the design.
3. Reference documents
| Priority | Document |
| 1 (normative) | packages/core/src/db/schema.ts, spec/schema.sql |
| 2 (normative) | docs/ARCHITECTURE.md, docs/DOMAIN-SCHEMA.md |
| 3 (normative) | eval/fixtures/*.json — behaviour the product promises |
| 4 | docs/adr/* — decisions already made; do not silently reverse them |
| 5 | CONTEXT.md — planning vocabulary |
| 6 (historical) | docs/internal/design-archive/* — original Chinese design docs |
Do not expand scope from the design archive. If a vision doc conflicts with the schema or an ADR, the schema and the ADR win.
4. Architecture rules
Data model first. Object model → schema → services → API → UI.
The agent is a system, not a prompt. The pipeline is:
input → understanding → object extraction → memory → planning → action → learningDo not collapse it into one giant prompt. Each capability keeps a clear
responsibility (lib/, services/, agent/understand.ts).
The storage port is the only I/O boundary. packages/core never imports
Hono, Express, Workers APIs, or reads process.env.
The model proposes; the runtime decides. Model output is validated, then the server enforces invariants (object mode, dedupe, relative dates, memory gating).
5. Coding rules
packages/coreis runtime-agnostic and dependency-light (zod,dayjs,nanoid). New dependencies need a justification.- Everything that touches storage is
async— the port is async by contract. - No module-level mutable state. No globals. Dependencies are passed in.
- Every mutation writes an
action_logentry viawriteActionLog. - Never edit a shipped migration. Add a new one.
- Prefer the smallest change that preserves the product model.
Tests are part of the contract
- Add or extend a deterministic suite under
packages/core/testfor any logic change (they run offline in CI). - Add an
eval/fixtures/*.jsonentry when you change user-visible understanding behaviour. - Behaviour that a fixture pins must not regress; if it must change, change the fixture in the same PR and say why.
6. Before a major change
- State your understanding of the feature.
- Identify the affected domain objects.
- Describe the runtime flow and the data changes.
- Describe the migration story for databases that already exist.
- Then implement — and update
docs/and an ADR if the decision is durable.
7. Autonomy rules
| Risk | Examples | Behaviour |
| Low | organise thoughts, create objects, adjust a flexible plan | the system may act, and logs it |
| Medium | a change that is easy to undo | runs, and is recorded as a notification |
| High | external communication, payments, permanent memory | one explicit approval |
| Critical | permanent deletion | two approvals |
Every important action must be explainable, reversible where possible, and logged.
8. Model rules
Do not couple the system to one provider. LLMProvider is the interface;
configuration is resolved by resolveProviderConfig and passed in explicitly.
Models are replaceable; the intelligence layer belongs to the product.
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.

