If you are an AI agent contributing to this project, follow these rules:
-
Read before writing. Read REVIEW.md, docs/VERSIONING.md, and the backlog before making changes.
-
One task at a time. Pick one task from the backlog (
backlog/tasks/). Finish it completely before starting another. -
Never break the tests. Run
npm testbefore every commit. If a test fails, fix it. Do not delete tests to make them pass. -
Keep the README in sync. If you add a command, add it to README.md. If you add an env var, document it.
-
No feature without acceptance criteria. Every feature starts as a backlog task with clear AC. Ask before implementing anything not in the backlog.
-
Single responsibility per file.
src/commands/has one command per file.src/has one module per concern. Do not add logic toindex.ts. -
Error messages must be actionable. Every error must suggest a fix. "API error (401)" is not enough. "API key rejected. Run 'aiscribe setup --reconfigure' to fix." is.
-
No external dependencies without discussion. Current deps: simple-git, fastify, @fastify/static. Adding new deps requires justification.
-
Use ANSI colors, not chalk. We have our own
src/terminal.ts. Use it. Don't add chalk, kleur, or similar. -
Commit messages describe the "what" not the "how". "Add doctor command" not "Created src/commands/doctor.ts with check functions".
<area>: <short description>
<optional body with details>
Examples:
cli: add doctor command for setup validation
server: add pagination to session list endpoint
fix: detect DeepSeek keys properly
docs: update README with provider configuration
-
npm testpasses (13+ tests) -
npm run buildpasses with no errors - No
anytypes added without good reason - Error messages are helpful and actionable
- README updated if user-facing behavior changed
- Backlog task updated with status
git clone https://github.com/aiagentflow/aiscribe.git
cd aiscribe
npm install
npm test # 13 tests should pass
npm run build # Should produce dist/aiscribe/
├── src/
│ ├── index.ts # CLI entry point
│ ├── commands/ # One file per command
│ │ ├── log.ts # aiscribe log
│ │ ├── search.ts # aiscribe search
│ │ ├── patterns.ts # aiscribe hotspots, history
│ │ └── doctor.ts # aiscribe doctor
│ ├── git.ts # Git operations
│ ├── llm.ts # LLM provider abstraction
│ ├── storage.ts # .aiscribe/ file storage
│ ├── embeddings.ts # Vector embeddings
│ ├── patterns.ts # Pattern detection
│ ├── onboarding.ts # First-run setup
│ ├── terminal.ts # ANSI terminal styling
│ └── json-output.ts # JSON output helper
├── web/
│ └── index.html # Web UI
├── assets/ # Logo, screenshots
├── backlog/ # Task tracking
├── docs/ # Documentation
├── REVIEW.md # Review checklist
└── CONTRIBUTING.md # This file
- Check the backlog (
backlog/tasks/) for available tasks - Comment on the task you want to work on
- Create a branch:
git checkout -b task-<number>-description - Implement with tests
- Run
npm testandnpm run build - Submit a PR against
main - Update the backlog task status
- TypeScript strict mode
- Single responsibility per module
- Functions under 50 lines when possible
- No
anywithout comment explaining why - Prefer pure functions over side effects
- Use
src/terminal.tsfor all CLI output styling
- Backlog is the source of truth for what's being worked on
- GitHub Issues for bug reports and feature requests
- PRs should reference a backlog task or issue
MIT. By contributing, you agree that your contributions will be licensed under the MIT License.