aissist
CLAUDE.md16 starsChanged 12 months agoMITView on GitHub
These instructions are for AI assistants working in this project. Always open @/openspec/AGENTS.md when the request: - Mentions planning or proposals (words like proposal, spec, change, plan) - Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work - Sounds ambiguous and you need the authoritative spec before coding Use @/openspec/AGENTS.md to learn: - How to create and apply change proposals - Spec format and conventions - Project structure and guidelines Keep this managed block so 'openspec update' can…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- openspec/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
27 rules. About 0 are common, 11 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Always open @/openspec/AGENTS.md when the request:
- Very specific: line 15
Use @/openspec/AGENTS.md to learn:
- Distinctive: line 20
Keep this managed block so 'openspec update' can refresh the instructions.
- Very specific: line 115
All file operations go through storage.ts functions
- Distinctive: line 118
All entries use YAML front matter for metadata (schema version, timestamps, codenames, etc.)
- Very specific: line 134
All entries stored in YYYY-MM-DD.md files
- Distinctive: line 181
Test utilities, helpers, and pure functions
- Distinctive: line 186
Test full CLI commands via subprocess execution
- Very specific: line 187
Use temporary .aissist/ directories
- Distinctive: line 204
Default: "Tomorrow" when adding goals
- Distinctive: line 225
When making changes that affect the CLI:
- Very specific: line 227
Update plugin: Keep aissist-plugin/README.md in sync with CLI changes
- Distinctive: line 228
Teach the skill: Update plugin skill definitions for new commands/options
- Very specific: line 233
Create src/commands/[name].ts with command builder
- Very specific: line 234
Import and register in src/index.ts
- Very specific: line 235
Add storage helpers to src/utils/storage.ts if needed
- Very specific: line 236
Write tests in src/commands/[name].test.ts or src/__tests__/e2e/
- Distinctive: line 237
Update README.md with command documentation
- Very specific: line 240
Update type definitions in relevant *-helpers.ts file
- Very specific: line 242
Update serializeYamlFrontMatter() calls to include new fields
- Distinctive: line 243
Ensure backward compatibility (optional fields, defaults)
- Very specific: line 246
Check openspec/AGENTS.md - may require proposal for breaking changes
- Distinctive: line 248
Consider migration path for existing data
- Very specific: line 249
Add migration logic in utils/migration.ts if needed
- Distinctive: line 261
No other external dependencies
- Very specific: line 266
Before major changes: Create proposal in openspec/changes/
- Very specific: line 267
During implementation: Follow tasks.md checklist
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
<!-- OPENSPEC:START -->OpenSpec Instructions
These instructions are for AI assistants working in this project.
Always open @/openspec/AGENTS.md when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding
Use @/openspec/AGENTS.md to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines
Keep this managed block so 'openspec update' can refresh the instructions.
<!-- OPENSPEC:END -->Project Overview
Aissist is a local-first, AI-powered CLI personal assistant that helps users track goals, todos, history, and context—all stored as human-readable Markdown files. The project integrates with Claude Code for AI-powered semantic search and action planning.
Key characteristics:
- Local-first: All data stored in
.aissist/directories (global~/.aissist/or project-specific) - Markdown-first: Everything is human-readable and Git-compatible
- Hierarchical storage: Supports reading from parent directories while writing locally (for monorepos)
- Claude integration: Uses Claude Code CLI for semantic recall and AI-powered proposals
Development Commands
Build and Run
npm run build # Compile TypeScript to dist/
npm run dev # Watch mode for development
node dist/index.js [cmd] # Run locally after buildTesting
npm test # Run all tests in watch mode
npm run test:unit # Unit tests only (excludes e2e)
npm run test:e2e # E2E tests only
npm run test:e2e:ci # E2E tests in CI mode (builds first)
npm run test:all # All tests (unit + e2e)
npm run test:ui # Vitest UI modeQuality
npm run lint # ESLint check
npm run format # Prettier formatRelease
npm run release # Version bump and publish workflowArchitecture
Directory Structure
src/
├── index.ts # CLI entry point, command registration
├── commands/ # Command handlers (goal, history, todo, etc.)
│ ├── goal.ts # Goal tracking with codenames
│ ├── history.ts # Activity logging
│ ├── todo.ts # Task management with goal linking
│ ├── context.ts # Context-specific notes
│ ├── reflect.ts # Guided reflection
│ ├── propose.ts # AI-powered planning via Claude
│ ├── recall.ts # Semantic search via Claude
│ └── config.ts # Configuration management
├── utils/ # Shared utilities
│ ├── storage.ts # Core storage abstraction layer
│ ├── yaml-helpers.ts # YAML front matter parsing/serialization
│ ├── goal-helpers.ts # Goal-specific logic (codenames, deadlines)
│ ├── todo-helpers.ts # Todo-specific logic (checkboxes, linking)
│ ├── data-aggregator.ts # Multi-file data aggregation
│ ├── timeframe-parser.ts # Natural language date parsing
│ ├── search.ts # Keyword search utilities
│ └── markdown.ts # Markdown rendering for terminal
├── llm/
│ └── claude.ts # Claude Code CLI integration
└── __tests__/
├── e2e/ # End-to-end subprocess tests
└── *.test.ts # Unit tests co-located with source
openspec/ # OpenSpec workflow for change proposals
├── AGENTS.md # Instructions for AI assistants
├── project.md # Project conventions
├── specs/ # Current specifications (what IS built)
└── changes/ # Active proposals (what SHOULD change)Layered Architecture
- CLI Layer (
src/commands/*): Command handlers usingcommander - Service Layer (
src/utils/*-helpers.ts): Business logic and domain operations - Storage Layer (
src/utils/storage.ts): File I/O, path resolution, YAML handling - LLM Layer (
src/llm/claude.ts): Claude Code CLI integration for AI features
Key Architectural Patterns
Storage Abstraction
getStoragePath(): Resolves global vs local storage automaticallyfindStoragePath(): Walks up directory tree to find.aissist/discoverHierarchy(): Finds all parent.aissist/directories for hierarchical reads- All file operations go through
storage.tsfunctions
YAML Front Matter Format
- All entries use YAML front matter for metadata (schema version, timestamps, codenames, etc.)
yaml-helpers.tsprovides parsing and serialization- Schema version:
1.0(current) - Example:
--- schema_version: "1.0" timestamp: "14:30" codename: complete-mvp deadline: "2025-12-01" --- Entry content here
Date-Based File Organization
- All entries stored in
YYYY-MM-DD.mdfiles - Multiple entries per file separated by
--- - Completed goals moved to
goals/finished/with completion date
Hierarchical Configuration
- Opt-in via
config.json:readPaths: [...] - Reads from parents, writes locally only
- Useful for monorepos and nested projects
Claude Integration
- Uses
claudeCLI (spawned subprocess) for AI features - Security: Restricted to read-only tools (
--allowedTools ''for prompts, file analysis tools for recall) - Recall: Uses Claude's Grep/Read/Glob tools for semantic file analysis
- Propose: Generates action plans based on goals/history/todos
Data Formats
Goals
- Stored in
goals/YYYY-MM-DD.md - Each goal has a unique codename (kebab-case)
- Optional deadline field
- Completed goals moved to
goals/finished/
Todos
- Stored in
todos/YYYY-MM-DD.md - Checkbox format:
- [ ] Task text - Optional
goalfield links to goal codename - Completed todos logged to history
History
- Stored in
history/YYYY-MM-DD.md - Simple timestamped entries
- Supports retroactive logging via
--date
Context
- Stored in
context/[name]/YYYY-MM-DD.md - Arbitrary context names (work, diet, fitness, etc.)
- Supports file ingestion
Reflections
- Stored in
reflections/YYYY-MM-DD.md - Guided prompts for self-reflection
Testing Strategy
Unit Tests
- Co-located with source files (
*.test.ts) - Test utilities, helpers, and pure functions
- Mock file I/O when needed
E2E Tests
- Located in
src/__tests__/e2e/ - Test full CLI commands via subprocess execution
- Use temporary
.aissist/directories - Longer timeouts (60s) for subprocess operations
Running a Single Test
npx vitest run path/to/test.test.ts # Specific file
npx vitest run -t "test name pattern" # By name patternImportant Implementation Details
Goal Codenames
- Auto-generated from goal text (kebab-case)
- Used for cross-references (todos → goals)
- Ensures stable references even if goal text changes
Interactive Deadline Prompts
- Default: "Tomorrow" when adding goals
- Natural language: "next week", "this month", "2026 Q1"
- Can skip or use
--deadlineflag to bypass prompt
Natural Language Date Parsing
timeframe-parser.tshandles relative dates- Supports: "yesterday", "last week", "next month", "this quarter"
- Falls back to ISO date parsing
Completion Animations
- Optional terminal animations for todo/goal completion
- Configurable in
config.json:animations.enabled - Uses
orafor spinners and visual feedback
Migration Strategy
needsMigration()checks for legacy format (no YAML front matter)writeFileAtomic()ensures atomic writes for data integrity- Backward compatible with goals without codenames
Synchronization Requirements
When making changes that affect the CLI:
- Update documentation: Modify
README.mdto reflect CLI changes - Update plugin: Keep
aissist-plugin/README.mdin sync with CLI changes - Teach the skill: Update plugin skill definitions for new commands/options
Common Patterns
Adding a New Command
- Create
src/commands/[name].tswith command builder - Import and register in
src/index.ts - Add storage helpers to
src/utils/storage.tsif needed - Write tests in
src/commands/[name].test.tsorsrc/__tests__/e2e/ - Update README.md with command documentation
Adding YAML Metadata Fields
- Update type definitions in relevant
*-helpers.tsfile - Modify
parseYamlFrontMatter()usage to extract new fields - Update
serializeYamlFrontMatter()calls to include new fields - Ensure backward compatibility (optional fields, defaults)
Modifying Storage Structure
- Check
openspec/AGENTS.md- may require proposal for breaking changes - Update
storage.tsfunctions - Consider migration path for existing data
- Add migration logic in
utils/migration.tsif needed
Dependencies and Integrations
Claude Code CLI
- Required for
recallandproposecommands - Check availability:
which claude - Authentication:
claude login - Spawned as subprocess, no SDK/API key needed
External APIs
- GitHub: Optional via
src/utils/github.tsfor work log imports - No other external dependencies
OpenSpec Workflow
This project uses OpenSpec for spec-driven development:
- Before major changes: Create proposal in
openspec/changes/ - During implementation: Follow
tasks.mdchecklist - After deployment: Archive to
openspec/changes/archive/ - Always validate:
openspec validate --strict
See openspec/AGENTS.md for detailed workflow.
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.

