agentleFS
heymiheymi/aldus-palace/AGENTS.md

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.

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
  1. Distinctive:

    Every feature must answer: *does this reduce the amount of management the user has to do?* If not, reconsider the design.

    line 43
  2. Distinctive:

    Do not expand scope from the design archive.

    line 59
  3. Very specific:

    Do not collapse it into one giant prompt.

    line 74
  4. Distinctive:

    No module-level mutable state.

    line 90
  5. Very specific:

    Every mutation writes an action_log entry via writeActionLog.

    line 91
  6. Distinctive:

    Never edit a shipped migration.

    line 92
  7. Distinctive:

    Prefer the smallest change that preserves the product model.

    line 93
  8. Very specific:

    Add or extend a deterministic suite under packages/core/test for any logic change (they run offline in CI).

    line 97
  9. Very specific:

    Add an eval/fixtures/*.json entry when you change user-visible understanding behaviour.

    line 99
  10. Distinctive:

    Every important action must be explainable, reversible where possible, and logged.

    line 125
  11. Very specific:

    Do not couple the system to one provider.

    line 131

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.md for 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

PriorityDocument
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
4docs/adr/* — decisions already made; do not silently reverse them
5CONTEXT.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 → learning

Do 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/core is 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_log entry via writeActionLog.
  • 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/test for any logic change (they run offline in CI).
  • Add an eval/fixtures/*.json entry 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

  1. State your understanding of the feature.
  2. Identify the affected domain objects.
  3. Describe the runtime flow and the data changes.
  4. Describe the migration story for databases that already exist.
  5. Then implement — and update docs/ and an ADR if the decision is durable.

7. Autonomy rules

RiskExamplesBehaviour
Loworganise thoughts, create objects, adjust a flexible planthe system may act, and logs it
Mediuma change that is easy to undoruns, and is recorded as a notification
Highexternal communication, payments, permanent memoryone explicit approval
Criticalpermanent deletiontwo 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.