diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 14:04:50 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 14:04:50 -0500 |
| commit | 72a924ebd7abdfa2c51f8c00b3cbd130b059ca3e (patch) | |
| tree | 500a07aa2f3634fa2153a8dd0a1e27fa40d5c1af /AGENTS.md | |
| parent | 67dd152e40a3f08e5a7aaaaf4cc9b1122e6b6909 (diff) | |
feat: implement t-1o2bkufixnc
Refactored `AGENTS.md` to be a concise cheat sheet by:
1. Moving detailed examples of "Forbidden Patterns" and "Bug
Discovery" to `Omni/Task/README.md`. 2. Moving "Coding Conventions"
(Always include tests, No TODOs, Fast typechecking) to `README.md`. 3.
Removing "About Omnirepo" and "Source Layout" sections from `AGENTS.md`
as they are duplicative of `README.md`. 4. Condensing `AGENTS.md`
to contain only Critical Rules, a short Session Checklist/Cheat
Sheet, and pointers to the detailed READMEs (`Omni/Task/README.md`,
`Omni/Bild/README.md`, `Omni/Ide/README.md`, `README.md`).
Verified that detailed documentation exists in the respective
namespaces and passed linting.
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 130 |
1 files changed, 11 insertions, 119 deletions
@@ -1,35 +1,22 @@ # Omni -The Omni project is to leverage automation and asymmetries to create wealth. The -target of the wealth is Bitcoin. The means: write everything down, first -in English, then in code. +The Omni project is to leverage automation and asymmetries to create wealth. -This document describes how AI agents should interact with this repo, the "omnirepo". - -## Important Rules for AI Agents +## Critical Rules for AI Agents **CRITICAL**: This project uses `task` for ALL issue tracking. You MUST follow these rules: -- ✅ Use `task` for ALL task/TODO tracking -- ✅ Always use `--json` flag for programmatic operations +- ✅ Use `task` for ALL task/TODO tracking (`task create ... --json`) - ✅ Link discovered work with `--discovered-from=<parent-id>` - ✅ File bugs IMMEDIATELY when you discover unexpected behavior -- ✅ Run `task ready` before asking "what should I work on?" +- ✅ Run `task ready --json` before asking "what should I work on?" - ✅ Store AI planning docs in `_/llm` directory (NEVER in repo root) - ✅ Run `task sync` at end of session to commit changes locally - ❌ Do NOT use `todo_write` tool - ❌ Do NOT create markdown TODO lists or task checklists - ❌ Do NOT put TODO/FIXME comments in code -- ❌ Do NOT use external issue trackers -- ❌ Do NOT duplicate tracking systems -- ❌ Do NOT clutter repo root with planning documents - -### Session Checklist -**First time in this repo?** -```bash -task init --quiet # Non-interactive initialization -``` +## Cheat Sheet **Standard workflow:** ```bash @@ -49,110 +36,15 @@ task update <id> done --json task sync ``` -### Bug Discovery Pattern - -**When you discover a bug or unexpected behavior:** +**Bug Discovery:** ```bash -# CORRECT: Immediately file a task +# Create a task immediately task create "Command X fails when Y" --discovered-from=<current-task-id> --json - -# WRONG: Ignoring it and moving on -# WRONG: Leaving a TODO comment -# WRONG: Mentioning it but not filing a task -``` - -**Examples of bugs you MUST file:** -- "Expected `--flag value` to work but only `--flag=value` works" -- "Documentation says X but actual behavior is Y" -- "Combining two flags causes parsing error" -- "Feature is missing that would be useful" - -### Forbidden Patterns - -**Markdown checklist (NEVER do this):** -```markdown -❌ Wrong: -- [ ] Refactor auth module -- [ ] Add tests -- [ ] Update docs - -✅ Correct: -task create "Refactor auth module" -p 2 --json -task create "Add tests for auth" -p 2 --json -task create "Update auth docs" -p 3 --json -``` - -**todo_write tool (NEVER do this):** -``` -❌ Wrong: todo_write({todos: [{content: "Fix bug", ...}]}) -✅ Correct: task create "Fix bug in parser" -p 1 --json -``` - -**Inline code comments (NEVER do this):** -```python -❌ Wrong: -# TODO: write tests for this function -# FIXME: handle edge case - -✅ Correct: -# Create task instead: -task create "Write tests for parse_config" -p 2 --namespace="Omni/Config" --json -task create "Handle edge case in parser" -p 1 --discovered-from=<current-id> --json ``` -## About Omnirepo - -Resources defined in the repo can be used to quickly create and release -products. New technology shall be prototyped and developed as needed. - -### Source Layout - -The source tree maps to the module namespace, and roughly follows the Haskell -namespace hierarchy. This is true of all languages: Python, Scheme, Rust, C, -etc. - -Namespaces are formatted either as file paths, like `Omni/Dev`, or -dot-separated, like `Omni.Dev`. Parts of the namespace should always be -capitalized. - -The namespace for all products that we own is `Biz`, this includes proprietary -applications, products, and related infrastructure. - -The `Omni` namespace is used for internal development tooling and infrastructure -that are shared between all other projects. - -Stuff that can be open sourced or otherwise externalized should be outside of -`Biz` or `Omni`. - -Related code should be kept close together. This means that you should start -with small namespaces: use `Omni/Thing.hs` before `Omni/Thing/Service.hs`. Try -to keep all related code in one spot for as long as possible. - -Re-use code from the `Omni/` namespace as much as possible. For example, use -`Omni/Cli.hs` or `Omni/Test.py` instead of trying to roll your own code for cli -parsing or running test suites. If the the namespace doesn't have the feature -you need, then add the feature. - -Boundaries and interfaces between namespaces should be singular and -well-defined. Likewise, the functionality and purpose of a particular -namespace should be singular and well-defined. Follow the unix principle -of "do one thing and do it well." - -Namespaces are always capitalized. In Scheme and Python this actually translates -quite well and helps distinguish between types/classes/modules and values. - -## Coding Conventions - -1. **Test interface**: Every program must accept `test` as a first argument to run its test suite -2. **Entrypoint naming**: The entrypoint for every program shall be called `main` -3. **Always include tests**: Every new feature and bug fix must include tests. No code should be committed without corresponding test coverage -4. **No TODO/FIXME comments**: Instead of leaving TODO or FIXME comments in code, create a task with `task create` to track the work properly -5. **Fast typechecking**: Use `Omni/Ide/typecheck.sh <file>` for quick Python typechecking instead of `bild --test` when you only need to check types - ## Documentation -Detailed documentation has been moved to the respective namespaces: - -* **Task Manager**: [`Omni/Task/README.md`](Omni/Task/README.md) - Usage, workflows, and best practices for the task tracker. -* **Build Tool (Bild)**: [`Omni/Bild/README.md`](Omni/Bild/README.md) - How to use `bild` and manage dependencies. -* **Development Tools & Git Workflow**: [`Omni/Ide/README.md`](Omni/Ide/README.md) - `run.sh`, `lint`, `repl.sh`, git-branchless workflow, and commit guidelines. +- **Project Context**: [README.md](README.md) - Goals, source layout, and coding conventions. +- **Task Manager**: [`Omni/Task/README.md`](Omni/Task/README.md) - Detailed usage, dependency management, and agent best practices. +- **Build Tool (Bild)**: [`Omni/Bild/README.md`](Omni/Bild/README.md) - How to use `bild` and manage dependencies. +- **Development Tools**: [`Omni/Ide/README.md`](Omni/Ide/README.md) - `run.sh`, `lint`, `repl.sh`, git workflow. |
