interlinked-cli
AGENTS.md178 starsChanged 59 days agoMITView on GitHub
- 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 repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- enforceSkill
- interlinked-coordinationSkill
- interlinked-coworkSkill
- interlinked-harnessSkill
- interlinked-observabilitySkill
- interlinked-quality-gatesSkill
- interlinked-semantic-indexSkill
- interlinked-setupSkill
- interlinked-simplificationSkill
- interlinkedSkill
- interlinked-spec-auditSkill
- interlinked-supply-chainSkill
- interlinked-verifySkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- could be automatic: a setting could enforce it
- Distinctive: line 31
Keep the exact product terms distinct: Interlinked CLI is this package.
- Very specific: line 51
Test file pattern: src//*.test.ts.
- Very specific: line 52
Prefer colocated regression tests for command behavior under src/commands/__tests__/.
- Distinctive: line 53
Add tests for bug fixes, especially around config merging, auth flows, and CLI output modes.
- Very specific: line 56
Follow conventional commit style seen in history: feat: ..., fix: ..., refactor: ...
- Distinctive: line 57
Keep commit subjects short and imperative.
- Very specific: line 65
Never commit secrets from .interlinked/config.local.json (tokens are local-only).
- Very specific: line 66
Prefer environment variables for automation (for example, INTERLINKED_ACCESS_TOKEN).
- Very specific: line 67
Treat clean/reset operations as destructive.
≈ “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
Repository Guidelines
Project Structure & Module Organization
This package is the TypeScript source for Interlinked CLI.
- Interlinked MCP Server refers to the remote Cloudflare Worker system that the CLI optionally talks to.
- Interlinked CLI refers to this package.
src/index.ts: CLI entry point and command registration.src/commands/*.ts: command handlers (enable,status,doctor,workspace, etc.).src/lib/*.ts: shared logic (auth, config, hooks, API client, formatting).src/templates/: generated/template assets used by setup flows.src/**/*.test.tsandsrc/commands/__tests__/: Vitest unit/regression tests.docs/architecture.md: architecture notes.dist/: build output (generated).
Build, Test, and Development Commands
npm run dev: run the CLI directly withtsxfor local development.npm run build: bundlesrc/index.tstodist/with type declarations (tsup).npm run typecheck: run TypeScript checks withtsgo(tsgo --noEmit).npm run typecheck:stable: run the stable TypeScript compiler (tsc --noEmit).npm run test: run tests once (vitest run).npm run test:watch: run tests in watch mode.npm run docs: regenerate generated CLI/harness reference docs.
Example:
npm run dev -- status --shortAgent Notes
QuentinCody/interlinked-cliis the source of truth for the CLI.- Keep the exact product terms distinct: Interlinked CLI is this package; Interlinked MCP Server is the remote Worker/Durable Objects system used by server-backed commands.
- Harness phase split: PreToolUse handles deterministic pre-execution blocks and warnings (destructive commands, file reservations, secrets-in-content, grep acceleration). PostToolUse handles checks that need files on disk or project context (type/lint/security/structure), and should report only new findings through diff-aware filtering.
- Zero-FP contract:
pre_blockerror checks must be fully deterministic. Heuristic smell/taste/coverage checks belong as warnings or inverify --all-checks. When changing advisory policy, updateDEFAULT_ADVISORY_SKIPSand its regression tests together. - Adding an agent-quality check usually touches
src/harness/generic-checks.ts, the check registry entries,src/harness/check-metadata.ts,src/harness/check-registry/entry files,src/commands/verify*, and parity/advisory tests. Land those coupled changes together. - Hook scripts generated by the CLI must stay self-contained. PostToolUse is intentionally scoped to mutating tools, and
PostToolUseFailureis intentionally not registered to avoid duplicate hook-count/output issues; seedocs/investigation-posttooluse-hook-count.mdbefore changing hook matchers. - Rule/check metadata changes require
npm run docs; do not hand-edit stale generated counts. - Major changes in this repository MUST include a skill-impact review. This includes user-visible CLI commands/options/output, harness behavior or policy, configuration schemas/defaults, supported-client behavior, baseline semantics, and architecture or operator workflows. Update every affected
skills/*/SKILL.mdin the same change; code or design-doc updates alone are not complete when agent guidance changed. If no skill is affected, state why in the final handoff. - Keep the skill router and focused skills aligned: update
skills/interlinked/SKILL.mdwhen a capability's routing changes, and update the relevant focused skill with the current command/config contract and operational gotchas. Treat.agents/skills/as an installed/generated copy, not the source of truth. Validate every touched skill folder with the skill validator before handoff. - Supported coding clients (
interlinked enable --clients <list>):claude,copilot,gemini,codex,cursor,opencode,pi. Native hook contracts live insrc/harness/adapters/; legacy/per-client migration helpers live insrc/lib/hook-installers*.ts;src/lib/hooks.tsis the orchestrator that wires them throughCLIENT_INSTALL_REGISTRY. The generated.mjsscript disambiguates Codex (Claude-shaped payloads) from Claude via theINTERLINKED_CLIENTenv var set by the installed hook command. OpenCode and Pi use managed bridge files rather than the generated.mjsruntime. - Codex CLI hook gating:
installCodexHookswrites.codex/hooks.jsonAND ensures[features] hooks = truein.codex/config.toml. Without that flag Codex silently ignores the hooks.json file. Uninstall leaves config.toml untouched to avoid clobbering user-managed Codex configuration.
Coding Style & Naming Conventions
- Language: TypeScript (ESM, strict mode).
- Style in this repo: 4-space indentation, double quotes, semicolons.
- File names: use descriptive kebab-case where practical (for example,
activity-utils.ts). - Exports: use
camelCasefor functions andPascalCasefor types/interfaces. - Command handlers should stay in
src/commands/; reusable logic belongs insrc/lib/.
Testing Guidelines
- Framework: Vitest (
environment: node, configured invitest.config.ts). - Test file pattern:
src/**/*.test.ts. - Prefer colocated regression tests for command behavior under
src/commands/__tests__/. - Add tests for bug fixes, especially around config merging, auth flows, and CLI output modes.
Commit & Pull Request Guidelines
- Follow conventional commit style seen in history:
feat: ...,fix: ...,refactor: ...(optional scope is fine). - Keep commit subjects short and imperative.
- PRs should include:
- What changed and why.
- Commands run (
npm run typecheck,npm run test). - Linked issue/task, if applicable.
- Terminal output snippets when user-facing CLI behavior changes.
Security & Configuration Tips
- Never commit secrets from
.interlinked/config.local.json(tokens are local-only). - Prefer environment variables for automation (for example,
INTERLINKED_ACCESS_TOKEN). - Treat
clean/resetoperations as destructive; validate target workspace/project context first.
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.

