How an AI works with Tramalia¶
Tramalia doesn't type for the agent or reason for it: it governs how it works. The central rule that init writes into your AGENTS.md is analyze and plan before touching code — agentic work must be deliberate and auditable, not reactive.
The 4 pillars of governance¶
Evidence (close/log) is only the close of the cycle. The full rational part — how you get there — is 4 pillars, each with a concrete home in Tramalia:
| Pillar | What it means | Where it lives |
|---|---|---|
| Plan | No code without analysis + a plan first | AGENTS.md central rule, specs/plan.md, the planificador subagent, skill 01-spec-governance |
| Divide | The plan splits into sub-points and gets sequenced over time | plan with sub-points (skill 01), Horizonte (now · next · later) and Estado in specs/tasks.md |
| Verify | Nothing is declared done without objective validation | gates + tramalia close (blocks on failure), evidence pack, specs/checklist.md, the revisor subagent |
| Rules | All of the above runs on a shared convention, not loose judgment | AGENTS.md, docs/ai/00–13 (stack-aware), specs/constitution.md, the 16 skills |
And the cycle re-opens, it doesn't end at close: specs/tasks.md is re-planned by editing the file (by hand or via the planificador) — future tasks change freely, closed ones stay immutable through evidence. "Adjusting along the way" is exactly that: a living plan, fixed history.
The principle: analyze → plan → consider → execute → close¶
flowchart LR
classDef s fill:#5b4bdb,stroke:#8c68d9,color:#ffffff;
A["1 · Analyze<br/><small>what it asks, what it touches</small>"]:::s --> P["2 · Plan with sub-points<br/><small>in specs/tasks.md</small>"]:::s
P --> R["3 · Risks considered<br/><small>what could break, what's discarded</small>"]:::s
R --> C["4 · (human confirmation<br/>on non-trivial tasks)"]:::s
C --> E["5 · Execute"]:::s
E --> Z["6 · tramalia close<br/><small>gates → evidence → handoff</small>"]:::s Before writing code, the agent always produces, in its reply:
- Analysis — what the task asks and which files/modules/data it touches.
- Plan with sub-points — the concrete steps, written in
specs/tasks.md(the01-spec-governanceskill anchors it there). - Risks considered — what could break, which alternatives are discarded and why.
On non-trivial tasks, it waits for human confirmation before touching code. This isn't a technical enforcement (Tramalia doesn't lock your keyboard) — it's a convention every agent reads in AGENTS.md, and the value of it being a convention is that it works with any host (Claude Code, Codex, Cursor…).
New project¶
pip install tramalia-cli
tramalia init # creates the convention (AGENTS.md, docs/ai 00–13, specs, 16 skills…)
tramalia doctor # what's missing; generates .tramalia/context/tools.json for the agent
When it opens the repo, the agent reads AGENTS.md and follows the mandatory order: it reads docs/ai/00 and 01, consults tools.json before invoking tools, and for the first feature produces analysis + plan in specs/tasks.md before writing anything.
Existing project¶
tramalia init --adopt # integrates governance without overwriting your AGENTS.md/.mcp.json
tramalia doctor
On top of the above, in a repo with history the agent:
- Reads
docs/ai/01-arquitectura.md(boundaries not to cross) and06-intentos-fallidos.md(what was already discarded — so as not to repeat it). - Applies the
11-legacy-modernizationskill: small changes, with a test safety net, not touching code outside the task's scope. - The explicit plan matters more here: the analysis must identify what could break in what already works.
What's left as evidence¶
Each task closes with tramalia close, which leaves in .tramalia/evidence/: the executed plan (summary.md), the raw gate outputs, the risks (risks.md) and the handoff. So the analysis and plan aren't lost: they stay auditable in tramalia log. See Full workflow.
Why 'analyze first' is part of the product
An agent's default mode is reactive: gets a request, writes code. Tramalia inverts that — the request first produces a verifiable plan. It's the difference between "it did something" and "it did the right thing, and there's proof it thought it through".