agentleFS
ssdeanxssdeanx/ssd-ai/AGENTS.md

ssd-ai

AGENTS.md3 starsChanged 12 months agoMITView on GitHub

AGENTS.md — Guidance for automated coding agents Build / Run / Test commands Code style & conventions (follow existing code style) If you need me to run tests, lint, or adjust these rules, tell me which command to run. src/ — Source layout & conventions Directory breakdown

  • 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 repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  1. Very specific:

    Start HTTP server: npm run start:http (script passes CLI flags --transport=http --port=3000 --hostname=localhost)

    line 7
  2. Very specific:

    Run all tests: npm run test (uses Vitest)

    line 8
  3. Very specific:

    Run single test file: npx vitest run <path/to/testfile> or npm run test -- <path/to/testfile> (example: npx vitest run …

    line 9
  4. Distinctive:

    If you need me to run tests, lint, or adjust these rules, tell me which command to run.

    line 29
  5. Distinctive:

    Follow AGENTS.md rules for style: camelCase filenames for .ts, PascalCase for types, explicit return types for exported functions.

    line 58
  6. Very specific:

    Prefer named exports; avoid any (use unknown).

    line 59
  7. Distinctive:

    Add file in the appropriate folder (lib|tools|transports|types).

    line 67
  8. Distinctive:

    Add unit tests in src/__tests__ with clear behavior-driven names.

    line 68
  9. Very specific:

    Run tsc --noEmit, npm run test, npx biome format --apply, npx biome check.

    line 70
  10. Very specific:

    Ensure no console.log and correct error handling.

    line 71

≈ “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 — Guidance for automated coding agents

Build / Run / Test commands

  • Build: npm run build (runs tsc)
  • Dev (stdio): npm run dev:stdio or npm run dev (use CLI flags: --transport=stdio)
  • Start HTTP server: npm run start:http (script passes CLI flags --transport=http --port=3000 --hostname=localhost)
  • Run all tests: npm run test (uses Vitest)
  • Run single test file: npx vitest run <path/to/testfile> or npm run test -- <path/to/testfile> (example: npx vitest run src/__tests__/taskManager.test.ts)
  • Watch tests: npm run test:watch; UI: npm run test:ui; Coverage: npm run test:coverage
  • Type-check only: tsc --noEmit
  • Lint/format: npx biome check and npx biome format (use npx biome format --apply to rewrite files)

Code style & conventions (follow existing code style)

  • Formatting: use Biome as source of truth (single quotes, semicolons, consistent spacing).
  • Imports: external packages first, blank line, internal modules, then relative imports; keep grouped and minimal deep relative paths.
  • Filenames: use camelCase for .ts files (match existing code like MemoryManager.ts).
  • Naming: camelCase for variables/functions, PascalCase for types/classes/interfaces (no I prefix).
  • Types: prefer explicit return types on exported functions, avoid any — use unknown for untrusted input and narrow/cast.
  • Error handling: catch errors, prefer domain errors (e.g. McpError) and rethrow typed errors; use instanceof Error when reading message.
  • Logging: avoid console.log in library code; use console.error only for entrypoints and failures.

Repo rules

  • Copilot: see .github/copilot-instructions.md (present, currently empty) — respect project privacy and review suggestions.
  • Cursor rules: no .cursor or .cursorrules found in repository.

If you need me to run tests, lint, or adjust these rules, tell me which command to run.

src/ — Source layout & conventions

Overview

  • src/ is the main TypeScript source tree; entry point is src/index.ts. It contains core libraries, helpers, transports, shared types, and unit tests.

Directory breakdown

  • src/index.ts — public exports/entrypoint
  • src/lib/ — core domain libraries & services (ContextCompressor.ts, MemoryManager.ts, ProjectCache.ts, PythonParser.ts, taskManager.ts)
  • src/tools/browser/ — Browser automation and inspection tools (browserUtils.ts: general browser utilities, inspectNetworkRequests.ts: monitors HTTP requests, monitorConsoleLogs.ts: captures console output for debugging)
  • src/tools/convention/ — Code quality and convention enforcement (analyzeComplexity.ts: measures code complexity, applyQualityRules.ts: applies coding standards, checkCouplingCohesion.ts: analyzes module dependencies, getCodingGuide.ts: retrieves coding guidelines, suggestImprovements.ts: proposes code enhancements, validateCodeQuality.ts: checks code against quality metrics)
  • src/tools/memory/ — Session and context memory management (autoSaveContext.ts: automatically saves session state, deleteMemory.ts: removes stored memories, listMemories.ts: displays saved memories, prioritizeMemory.ts: ranks memories by importance, recallMemory.ts: retrieves specific memories, restoreSessionContext.ts: restores previous sessions, saveMemory.ts: stores new memories, searchMemories.ts: queries stored memories, startSession.ts: initializes memory sessions, updateMemory.ts: modifies existing memories)
  • src/tools/planning/ — Project planning and requirements analysis (analyzeRequirements.ts: breaks down project needs, createUserStories.ts: generates user stories, featureRoadmap.ts: creates development roadmaps, generatePrd.ts: produces product requirement documents)
  • src/tools/prompt/ — AI prompt analysis and enhancement tools (analyzePrompt.ts: evaluates prompt effectiveness, browserDevelopment.ts: aids in browser-related prompts, codeConventions.ts: enforces prompt coding standards, codeReview.ts: assists with code review prompts, debugAssistant.ts: helps with debugging prompts, documentation.ts: improves documentation prompts, enhancePrompt.ts: refines prompts for better AI responses, enhancePromptGemini.ts: Gemini-specific prompt enhancements, memoryManagement.ts: manages prompt memory, projectPlanning.ts: supports planning prompts, promptEnhancement.ts: general prompt improvement, reasoningFramework.ts: applies reasoning to prompts, semanticAnalysis.ts: analyzes prompt semantics, sequentialThinking.ts: enables step-by-step prompt processing, specGeneration.ts: generates specifications from prompts, testing.ts: aids in testing prompts, timeUtilities.ts: handles time-related prompts, uiPreview.ts: previews UI from prompts)
  • src/tools/reasoning/ — Reasoning framework application (applyReasoningFramework.ts: implements structured reasoning processes)
  • src/tools/resources/ — Resource and capability management (capabilities.ts: defines system capabilities, readme.ts: handles README generation)
  • src/tools/semantic/ — Code semantic analysis (findReferences.ts: locates code references, findSymbol.ts: searches for symbols, README.md: documentation for semantic tools)
  • src/tools/thinking/ — Problem-solving and thinking aids (analyzeProblem.ts: breaks down problems, breakDownProblem.ts: decomposes complex issues, createThinkingChain.ts: builds reasoning chains, formatAsPlan.ts: structures thoughts as plans, stepByStepAnalysis.ts: provides incremental analysis, thinkAloudProcess.ts: simulates thinking aloud)
  • src/tools/time/ — Time-related utilities (getCurrentTime.ts: retrieves current time)
  • src/tools/ui/ — User interface preview tools (previewUiAscii.ts: renders UI in ASCII format)
  • src/transports/ — transport implementations (http.ts)
  • src/types/ — shared DTOs and type definitions (pagination.ts, prompt.ts, resource.ts, task.ts, tool.ts)
  • src/tests/ — unit tests (taskManager.test.ts, pagination.test.ts)

Conventions & best practices

  • Follow AGENTS.md rules for style: camelCase filenames for .ts, PascalCase for types, explicit return types for exported functions.
  • Prefer named exports; avoid any (use unknown). Keep functions small and testable; prefer dependency injection.
  • Error handling: prefer domain errors (e.g., McpError) and rethrow typed errors; check instanceof Error.
  • Logging: avoid console.log in library code; use console.error only for entrypoints/failures.
  • Testing: add unit tests to src/tests; run npm run test or npx vitest run <file>.
  • Formatting & checks: run npx biome format --apply, npx biome check, tsc --noEmit.

Add-a-file checklist

  1. Add file in the appropriate folder (lib|tools|transports|types).
  2. Add unit tests in src/tests with clear behavior-driven names.
  3. Export from src/index.ts if intended as public API.
  4. Run tsc --noEmit, npm run test, npx biome format --apply, npx biome check.
  5. Ensure no console.log and correct error handling.

References (examples)

  • src/index.ts
  • src/lib/MemoryManager.ts
  • src/lib/taskManager.ts
  • src/tools/prompt/analyzePrompt.ts
  • src/transports/http.ts
  • src/tests/taskManager.test.ts

Visualization

  • Overall architecture: see docs/images/architecture.svg
src/
├── __tests__/
│   ├── pagination.test.ts
│   └── taskManager.test.ts
├── lib/
│   ├── ContextCompressor.ts
│   ├── MemoryManager.ts
│   ├── ProjectCache.ts
│   ├── PythonParser.ts
│   └── taskManager.ts
├── tools/
│   ├── browser/
│   │   ├── browserUtils.ts
│   │   ├── inspectNetworkRequests.ts
│   │   └── monitorConsoleLogs.ts
│   ├── convention/
│   │   ├── analyzeComplexity.ts
│   │   ├── applyQualityRules.ts
│   │   ├── checkCouplingCohesion.ts
│   │   ├── getCodingGuide.ts
│   │   ├── suggestImprovements.ts
│   │   └── validateCodeQuality.ts
│   ├── memory/
│   │   ├── autoSaveContext.ts
│   │   ├── deleteMemory.ts
│   │   ├── listMemories.ts
│   │   ├── prioritizeMemory.ts
│   │   ├── recallMemory.ts
│   │   ├── restoreSessionContext.ts
│   │   ├── saveMemory.ts
│   │   ├── searchMemories.ts
│   │   ├── startSession.ts
│   │   └── updateMemory.ts
│   ├── planning/
│   │   ├── analyzeRequirements.ts
│   │   ├── createUserStories.ts
│   │   ├── featureRoadmap.ts
│   │   └── generatePrd.ts
│   ├── prompt/
│   │   ├── analyzePrompt.ts
│   │   ├── browserDevelopment.ts
│   │   ├── codeConventions.ts
│   │   ├── codeReview.ts
│   │   ├── debugAssistant.ts
│   │   ├── documentation.ts
│   │   ├── enhancePrompt.ts
│   │   ├── enhancePromptGemini.ts
│   │   ├── memoryManagement.ts
│   │   ├── projectPlanning.ts
│   │   ├── promptEnhancement.ts
│   │   ├── reasoningFramework.ts
│   │   ├── semanticAnalysis.ts
│   │   ├── sequentialThinking.ts
│   │   ├── specGeneration.ts
│   │   ├── specGeneration.ts.backup
│   │   ├── testing.ts
│   │   ├── timeUtilities.ts
│   │   └── uiPreview.ts
│   ├── reasoning/
│   │   └── applyReasoningFramework.ts
│   ├── resources/
│   │   ├── capabilities.ts
│   │   └── readme.ts
│   ├── semantic/
│   │   ├── README.md
│   │   ├── findReferences.ts
│   │   └── findSymbol.ts
│   ├── thinking/
│   │   ├── analyzeProblem.ts
│   │   ├── breakDownProblem.ts
│   │   ├── createThinkingChain.ts
│   │   ├── formatAsPlan.ts
│   │   ├── stepByStepAnalysis.ts
│   │   └── thinkAloudProcess.ts
│   ├── time/
│   │   └── getCurrentTime.ts
│   └── ui/
│       └── previewUiAscii.ts
├── transports/
│   └── http.ts
└── types/
    ├── pagination.ts
    ├── prompt.ts
    ├── resource.ts
    ├── task.ts
    └── tool.ts

src/ Structure Diagram

flowchart TD
    src[src/]
    src --> tests[__tests__/]
    tests --> pag[pagination.test.ts]
    tests --> tm[taskManager.test.ts]
    src --> lib[lib/]
    lib --> cc[ContextCompressor.ts]
    lib --> mm[MemoryManager.ts]
    lib --> pc[ProjectCache.ts]
    lib --> pp[PythonParser.ts]
    lib --> tskm[taskManager.ts]
    src --> tools[tools/]
    tools --> browser[browser/]
    browser --> bu[browserUtils.ts]
    browser --> inr[inspectNetworkRequests.ts]
    browser --> mcl[monitorConsoleLogs.ts]
    tools --> convention[convention/]
    convention --> ac[analyzeComplexity.ts]
    convention --> aqr[applyQualityRules.ts]
    convention --> ccc[checkCouplingCohesion.ts]
    convention --> gcg[getCodingGuide.ts]
    convention --> si[suggestImprovements.ts]
    convention --> vcq[validateCodeQuality.ts]
    tools --> memory[memory/]
    memory --> asc[autoSaveContext.ts]
    memory --> del[deleteMemory.ts]
    memory --> lm[listMemories.ts]
    memory --> pm[prioritizeMemory.ts]
    memory --> rec[recallMemory.ts]
    memory --> rsc[restoreSessionContext.ts]
    memory --> sav[saveMemory.ts]
    memory --> sm[searchMemories.ts]
    memory --> ss[startSession.ts]
    memory --> upd[updateMemory.ts]
    tools --> planning[planning/]
    planning --> ar[analyzeRequirements.ts]
    planning --> cus[createUserStories.ts]
    planning --> fr[featureRoadmap.ts]
    planning --> gp[generatePrd.ts]
    tools --> prompt[prompt/]
    prompt --> ap[analyzePrompt.ts]
    prompt --> bd[browserDevelopment.ts]
    prompt --> cconv[codeConventions.ts]
    prompt --> cr[codeReview.ts]
    prompt --> da[debugAssistant.ts]
    prompt --> doc[documentation.ts]
    prompt --> ep[enhancePrompt.ts]
    prompt --> epg[enhancePromptGemini.ts]
    prompt --> mmg[memoryManagement.ts]
    prompt --> ppj[projectPlanning.ts]
    prompt --> pe[promptEnhancement.ts]
    prompt --> rf[reasoningFramework.ts]
    prompt --> sa[semanticAnalysis.ts]
    prompt --> st[sequentialThinking.ts]
    prompt --> sg[specGeneration.ts]
    prompt --> sgb[specGeneration.ts.backup]
    prompt --> test[testing.ts]
    prompt --> tu[timeUtilities.ts]
    prompt --> uip[uiPreview.ts]
    tools --> reasoning[reasoning/]
    reasoning --> arf[applyReasoningFramework.ts]
    tools --> resources[resources/]
    resources --> cap[capabilities.ts]
    resources --> rmd[readme.ts]
    tools --> semantic[semantic/]
    semantic --> srmd[README.md]
    semantic --> fr[findReferences.ts]
    semantic --> fs[findSymbol.ts]
    tools --> thinking[thinking/]
    thinking --> apa[analyzeProblem.ts]
    thinking --> bdp[breakDownProblem.ts]
    thinking --> ctc[createThinkingChain.ts]
    thinking --> fap[formatAsPlan.ts]
    thinking --> sba[stepByStepAnalysis.ts]
    thinking --> tap[thinkAloudProcess.ts]
    tools --> time[time/]
    time --> gct[getCurrentTime.ts]
    tools --> ui[ui/]
    ui --> pua[previewUiAscii.ts]
    src --> transports[transports/]
    transports --> ht[http.ts]
    src --> types[types/]
    types --> pagt[pagination.ts]
    types --> prm[prompt.ts]
    types --> res[resource.ts]
    types --> tsk[task.ts]
    types --> tol[tool.ts]

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.