📝 docs(restructure): split AGENTS.md (1296 → 130 lines) + 9 focused guides #17
Reference in New Issue
Block a user
Delete Branch "feature/restructure-agents-md"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Refactor
AGENTS.mdfrom a 1296-line monolith into a 130-line directive file + 9 focused guides. Done as Tâche 6 of the ARCODANGE Phase 1 migration (Claude Code → Mistral Vibe), driven by the lazy-loading constraint of the 128k context Mistral.Why — Mistral Vibe auto-loads
AGENTS.mdat every session start. A 1296-line file consumes ~30-40k tokens before the user's first prompt, leaving a small window for actual reasoning on a 128k-context model. Splitting into focused guides loaded on demand reclaims most of that context.Changes
1. Created 9 new files (commit
41ee8c5)Seven focused guides under
documentation/:documentation/HISTORY.md— historical phases 1-9 of developmentdocumentation/CLI.md— CLI commands, server lifecycle,DLC_*configdocumentation/API.md— REST endpoints, OpenAPI, Greet v1/v2documentation/OBSERVABILITY.md— OpenTelemetry + Jaeger, sampler typesdocumentation/TROUBLESHOOTING.md— known issues + pointers to specialized guidesdocumentation/CODE_EXAMPLES.md— endpoint/logging/context snippets, ADR pointersdocumentation/ROADMAP.md— potential features, architectural improvementsTwo root-level files:
CHANGELOG.md— user-facing changelog (Keep a Changelog format)AGENT_CHANGELOG.md— trace of structural decisions by AI agents (was referenced inAGENTS.mdbut didn't exist)2. Rewrote
AGENTS.md(commit88a934d)AGENT_USAGE_GUIDE.md,BDD_GUIDE.md,version-management-guide.md,local-ci-cd-testing.md,GITMOJI_CHEATSHEET.md)documentation/version-management-guide.md)[ADR-0019](adr/0019-bdd-feature-structure.md)(file doesn't exist) replaced with references to[ADR-0008](adr/0008-bdd-testing.md)(BDD testing) and[ADR-0025](adr/0025-bdd-scenario-isolation-strategies.md)(scenario isolation), which are the actual authoritative sources3. Fixed ADR header dates (commit
732eee7)adr/0018-user-management-auth-system.md:**Date:** 2024-04-06→2026-04-06adr/0019-postgresql-integration.md:**Date:** 2024-04-07→2026-04-07Confirmed typos: implementation dates in both files are
2026-04-08, the project itself started2026-04-01(CHANGELOG.md). The2024was a clear off-by-2-years.Test plan
go mod tidy,go fmt,swag fmt)AGENTS.mdresolve to existing files (verified via shell loop)vibelazy-load behavior verified (with caveats — see below)gitea-client,bdd-testing,commit-message) — not tested in this PR; tracked separatelyHonest results from the vibe lazy-load tests
The lazy-load promise is half-confirmed. Two distinct modes diverge:
Interactive mode (
vibethen prompt) — works as expected. AGENTS.md auto-loads at session start;documentation/X.mdfiles load on demand when the agent reads them. The 130-lineAGENTS.mdkeeps the upfront context budget low.Programmatic mode (
vibe -p "...") — diverges from interactive in two ways now documented in~/.vibe/memory/reference/mistral-quirks.md:[knowledge].sourcesare NOT auto-loaded in-pmode (only in interactive).tasktool returns "Tool execution not permitted" in-pmode for sub-agent delegation.Test prompts run against
-pmode showed:curl http://localhost:8080/api/v1/health(HALLUCINATION — the real endpoint is/api/health, documented indocumentation/API.md). The agent did not consult the doc file even though it was listed in[knowledge].sources(Q-024 explains why).-p(i.e. potentially hallucinate; reliable in interactive).Mitigations now in place (post-PR)
~/.vibe/memory/reference/mistral-quirks.md(Q-024, Q-026, Q-029).~/.vibe/agents/*.tomlpatched with anti-hallucination directive: "AVANT de répondre à toute question factuelle, TOUJOURS read_file/grep le fichier de doc pertinent. Ne pas répondre depuis tes connaissances générales."-pmode: pass--workdirto the directory containing the docs and callread_file/grepdirectly from the prompt instead of relying on auto-load.The PR's lazy-load goal IS met for the primary use case (interactive vibe inside the project). The
-pmode is a separate gap, tracked and being worked on.Migration context
This PR is part of Phase 1 of a larger migration from Claude Code to Mistral Vibe (ARCODANGE strategic move toward European tech sovereignty). 6 of 11 curriculum tasks now complete.
🤖 Generated with Claude Code (Opus 4.7, 1M context) collaborating with Mistral Vibe (intent-router agent for the analysis phase).
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Co-Authored-By: Mistral Vibe (devstral-2 / mistral-medium-3.5)
Création de 9 fichiers neufs pour décharger AGENTS.md (1296 lignes → ~130) en documents lazy-loadables, compatibles avec la limite de contexte 128k de Mistral Vibe (cf. ARCODANGE migration Phase 1, Tâche 6 du curriculum). Sept guides ciblés sous documentation/ : - HISTORY.md : phases historiques 1-9 du développement - CLI.md : commandes CLI, server lifecycle, config DLC_* - API.md : endpoints REST, OpenAPI, Greet v1/v2 - OBSERVABILITY.md : OpenTelemetry + Jaeger, sampler types, test - TROUBLESHOOTING.md : issues connues + pointeurs vers guides spé - CODE_EXAMPLES.md : snippets endpoint/logging/context, pointeurs ADR - ROADMAP.md : potential features, architectural improvements Deux fichiers racine : - CHANGELOG.md : user-facing, format Keep a Changelog - AGENT_CHANGELOG.md : décisions structurantes des agents AI (référencé par AGENTS.md, n'existait pas) Le contenu est extrait fidèlement d'AGENTS.md sans réinterprétation. Phase C (réécriture AGENTS.md court) suit dans le commit suivant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.