archloom
AGENTS.md0 starsChanged 57 days agoMITView on GitHub
These tool-neutral instructions apply throughout this checkout. Read any more specific instructions before editing a subdirectory. Archloom is one ESM library and CLI for architecture and data-flow diagrams, with an offline, read-only HTML canvas. There is no backend, graph upload, model provider or PR integration in the public API. Do not add those dependencies as incidental features. Public input has no PR fields. The root package is @chtah/archloom, using the maintainer's personal npm scope; 0.4.0 is the current release target.…
- Installs packages
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 35,337 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.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 10 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read README.md, package.json and the relevant source bodies and callers.
- Distinctive: line 22
Check local Git status and preserve changes you did not make.
- Distinctive: line 65
Keep changes surgical. Avoid unrelated refactoring, renaming, upgrades and lockfile churn.
- Very specific: line 70
Use existing TypeScript conventions, discriminated unions and exhaustive handling.
- Distinctive: line 74
Keep rendering deterministic: equal input and options produce equal SVG bytes.
- Distinctive: line 75
No clocks, randomness, network calls or persistent/unscoped process-global style mutation.
- Distinctive: line 78
Keep SVGs self-contained and script-free.
- Very specific: line 85
Keep network connections disabled and popup prose as text.
- Very specific: line 88
Test atlas alignment: boxes are final coordinates, paths/pills need shift, repeated flow headings use nodeInstances, and message line IDs …
- Distinctive: line 91
Treat public exports, graph fields and artifacts as compatibility boundaries.
- Distinctive: line 92
Document intentional changes and test public entry points.
- Very specific: line 96
Use the pnpm version in package.json.
- Distinctive: line 135
Write plain English and describe implemented behavior.
- Distinctive: line 148
Keep this file tool-neutral.
- Very specific: line 150
Follow docs/releasing.md for releases.
- Distinctive: line 161
Do not describe local implementation as a published release or a deployed service.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
Contributor and agent instructions
These tool-neutral instructions apply throughout this checkout. Read any more specific instructions before editing a subdirectory.
Scope and boundaries
Archloom is one ESM library and CLI for architecture and data-flow diagrams, with an offline, read-only HTML canvas. There is no backend, graph upload, model provider or PR integration in the public API. Do not add those dependencies as incidental features. Public input has no PR fields.
The root package is @chtah/archloom, using the maintainer's personal npm scope;
0.4.0 is the current release target. Check the registry version before every approved
publication; neither the version field nor a merge proves publication. Private schema and renderer workspaces retain
@coldtea/pr-lens-* names for compatibility; they are not separate Archloom
releases.
Before editing
- Read
README.md,package.jsonand the relevant source bodies and callers. - Check local Git status and preserve changes you did not make.
- State the intended behavior and a scoped verification plan. Ask about unclear API or compatibility requirements rather than inventing them.
- Work only inside this checkout. Do not inspect private sibling repositories, credential stores, private account data or production systems without explicit permission. Never print secrets or copy them into code, examples or chat.
Local edits and checks do not authorize commits, pushes, merges, package publication, skill installation, repository settings or cloud changes. Obtain explicit approval for each such action. Do not change global or work-related Git configuration. Use the contributor's configured identity; do not add model co-authorship or private session links.
Repository map
| Path | Responsibility |
src/index.ts | Public library exports. |
src/graph.ts, src/errors.ts | Public graph validation, limits, types and errors. |
src/render.ts, src/internal/adapter.ts | Public render API, scoped styling, atlas and private-engine translation. |
src/markdown.ts | Both-theme SVG pairs and the <picture> snippet for Markdown and comments. |
src/cli.ts | Local validation and artifact writing. |
src/browser.ts | Native browser mounting, isolated iframe and update/destroy lifecycle. |
src/icons.ts, src/icons/ | Structured icon validation and lazy optional peer adapters. |
src/viewer.ts, src/viewer/client.ts | Offline HTML and read-only browser interactions. |
scripts/build-viewer.mjs | Generates the embedded viewer client and its CSP hash. |
scripts/emit-schema.mjs, schema/graph.schema.json | Public schema generation and output. |
packages/schema/src/, packages/renderer/src/ | Private compatibility engine contracts, layout and SVG drawing. |
test/, engine test/ directories | Public and private-engine regression tests. |
scripts/test-browser.mjs, scripts/test-embed.mjs | Local Chrome checks of native popup, browser mounting and real viewer. |
.github/workflows/ci.yml | PR/main checks with Node 24, locked dependencies, Chrome and packed consumers; no publication or deploy. |
.github/workflows/release.yml | The only workflow that publishes: on a v* tag, after the owner approves the npm environment, it re-runs the checks, publishes to npm through trusted publishing, waits until the registry serves the version and then creates the GitHub release. |
CONTRIBUTING.md, CODE_OF_CONDUCT.md, .github/ISSUE_TEMPLATE/, .github/pull_request_template.md | What outside contributors may send, and the issue and pull request forms. |
.github/workflows/dependency-review.yml, scorecard.yml, .github/dependabot.yml | Dependency vulnerability review on PRs, weekly OpenSSF Scorecard, and weekly dependency and action update PRs. |
skills/archloom/ | Active installable skill and public graph reference. |
evals/ | Hand-run skill evaluations: fictional fixture codebases, answer keys and a model-free grader (evals/README.md). Not shipped in the package. |
examples/, docs/archloom/ | Fictional graphs and generated visual assets. The SVGs in examples/ are embedded in README.md; regenerate them with archloom markdown examples/web-system.archloom.json --force (a test fails when they are stale). |
The public graph contract is src/graph.ts, documented in
skills/archloom/references/graph.md; it is not the private engine's PR-era schema.
Implementation rules
- Keep changes surgical. Avoid unrelated refactoring, renaming, upgrades and lockfile churn.
- Edit source, not
dist/JavaScript or declarations. Editsrc/viewer/client.ts, notsrc/viewer/client.generated.ts; rebuild to regenerate its bytes and hash. Emit the public schema through the build rather than editing it by hand. - Use existing TypeScript conventions, discriminated unions and exhaustive
handling. Avoid
anyand casts that hide invalid states. - Validate at public boundaries; preserve strict unknown-field rejection, reference checks and resource limits.
- Keep rendering deterministic: equal input and options produce equal SVG bytes. No clocks, randomness, network calls or persistent/unscoped process-global style mutation. Pass per-render styles through supported synchronous scoped engine hooks, restoring the previous scope even when a callback throws.
- Keep SVGs self-contained and script-free; CSS/SMIL animation is allowed. Escape prose and attributes. Do not treat graph summaries as HTML.
- Icons are structured, allowlisted geometry, never raw SVG or fetched URLs. Load optional peers only on request. Preserve notices and brand colors; absent license metadata is not clearance, and explicit non-CC0 brand licenses remain refused by the built-in adapter.
- Preserve the viewer's deny-by-default CSP and exact generated script hash.
Keep network connections disabled and popup prose as text. Browser mounts reuse
the same viewer in a sandboxed iframe without
allow-same-origin; avoid duplicate controllers or styles. Do not weaken these controls to make a test pass. - Test atlas alignment: boxes are final coordinates, paths/pills need
shift, repeated flow headings usenodeInstances, and message line IDs include the flow ID. A node map alone is insufficient for repeated instances. - Treat public exports, graph fields and artifacts as compatibility boundaries. Document intentional changes and test public entry points.
Checks
Use the pnpm version in package.json. Runtime support starts at Node.js 20.11;
recommend Node.js 22+ for development with current Vitest/Vite tooling. Do not
change global runtimes or download tools without permission.
pnpm install --frozen-lockfile
pnpm build
pnpm typecheck
pnpm test
pnpm verifypnpm verify includes build, root/private-engine type checks, root/schema/renderer
tests and actual local Chrome browser checks. CHROME_BIN selects Chrome's
executable (default /usr/bin/google-chrome); the tests do not download a browser.
pnpm test:browser requires a prior build. pnpm demo regenerates the demo assets
and requires local Chrome and ffmpeg.
CI runs pnpm verify and pnpm test:package on pull requests and main using
hosted Ubuntu 24.04, Node 24 and the runner's installed Chrome. Keep actions
pinned to reviewed commit SHAs, repository permissions read-only and checkout
credentials non-persistent. Never execute PR code with pull_request_target,
introduce secrets or add publishing/deployment to this check-only workflow.
release.yml is the only place that publishes. Keep it triggered by v* tags
only, gated by the npm environment, without a stored npm token (it uses OIDC),
and with id-token: write and contents: write scoped to the one job that needs
each. Do not add another trigger, a second publishing path or a step that pushes
commits or tags.
For behavior changes, add regressions and exercise the public API or CLI. For visual changes, inspect architecture and data-flow output in both themes, including labels, routing, repeated headings, selection geometry and reduced-motion behavior. Snapshots alone do not establish visual correctness. Check runnable documentation examples and local links. Report the exact checks run and failures; never claim verification that was not performed.
Documentation, privacy and licensing
Write plain English and describe implemented behavior. Do not advertise an npm installation, hosted service, security email or enabled private-reporting feature that does not exist. Remote skill installation is only appropriate after the implementation is merged and pushed; an external installer requires a user request.
Public examples must be fictional. HTML and atlas embed the entire graph, including unselected entities; HTML also includes both diagram themes. Named views are not redaction. Review generated artifacts before sharing them.
Retain the MIT license and Coldtea AI copyright, and credit PR Lens by name as the
upstream project. Keep third-party notices and review asset rights separately;
public availability and package-level CC0 do not clear brand rights. Do not reuse
upstream hosted-service policies or security contacts as Archloom resources.
Keep this file tool-neutral; CLAUDE.md points here.
Follow docs/releasing.md for releases. A release is published by the release
workflow, not from a workstation: do not run npm publish or npm login
locally, and never put npm credentials in a tracked file, a repository secret or
chat. Pushing a v* tag starts a publication, so it requires the owner's
approval for the exact version, as does approving the npm environment. Before
that, confirm metadata, version, packed contents, licenses and reporting setup.
A publishConfig field is neither evidence of publication nor permission to publish.
Handoff
Summarize changed paths, completed checks, checks not run and remaining limitations. Do not describe local implementation as a published release or a deployed service.
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.

