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 | |
| 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.
| -rw-r--r-- | .tasks/race-test.jsonl | 22 | ||||
| -rw-r--r-- | AGENTS.md | 130 | ||||
| -rw-r--r-- | Omni/Task/README.md | 59 | ||||
| -rw-r--r-- | README.md | 6 |
4 files changed, 83 insertions, 134 deletions
diff --git a/.tasks/race-test.jsonl b/.tasks/race-test.jsonl index 2b868ab..cf3e4d8 100644 --- a/.tasks/race-test.jsonl +++ b/.tasks/race-test.jsonl @@ -1,11 +1,11 @@ -{"taskCreatedAt":"2025-11-22T18:49:31.896564564Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj","taskNamespace":null,"taskParent":null,"taskPriority":"P2","taskStatus":"Open","taskTitle":"Parent Epic","taskType":"Epic","taskUpdatedAt":"2025-11-22T18:49:31.896564564Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.896907958Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.1","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 1","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.896907958Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.897279951Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.2","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 2","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.897279951Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.897737756Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.3","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 3","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.897737756Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.898223391Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.4","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 4","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.898223391Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.898800407Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.5","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 5","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.898800407Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.899400693Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.6","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 6","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.899400693Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.900147671Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.7","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 7","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.900147671Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.900971979Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.8","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 8","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.900971979Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.902140612Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.9","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 9","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.902140612Z"} -{"taskCreatedAt":"2025-11-22T18:49:31.903093901Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2budxq0oj.10","taskNamespace":null,"taskParent":"t-1o2budxq0oj","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 10","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T18:49:31.903093901Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.591131856Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v","taskNamespace":null,"taskParent":null,"taskPriority":"P2","taskStatus":"Open","taskTitle":"Parent Epic","taskType":"Epic","taskUpdatedAt":"2025-11-22T19:04:37.591131856Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.59146137Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.1","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 1","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.59146137Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.591824684Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.2","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 2","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.591824684Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.592214028Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.3","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 3","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.592214028Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.592704363Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.4","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 4","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.592704363Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.593241559Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.5","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 5","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.593241559Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.594200249Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.6","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 6","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.594200249Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.594965647Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.7","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 7","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.594965647Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.595785715Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.8","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 8","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.595785715Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.596608874Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.9","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 9","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.596608874Z"} +{"taskCreatedAt":"2025-11-22T19:04:37.597566114Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2buswy72v.10","taskNamespace":null,"taskParent":"t-1o2buswy72v","taskPriority":"P2","taskStatus":"Open","taskTitle":"Child 10","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T19:04:37.597566114Z"} @@ -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. diff --git a/Omni/Task/README.md b/Omni/Task/README.md index db42737..8e8670e 100644 --- a/Omni/Task/README.md +++ b/Omni/Task/README.md @@ -231,6 +231,24 @@ task create "Fix type error in auth module" --discovered-from=t-abc123 --json task create "Add missing test coverage" --discovered-from=t-abc123 --json ``` +**Bug Discovery Pattern** + +When you discover a bug or unexpected behavior: +```bash +# CORRECT: Immediately file a task +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" + **CRITICAL: File bugs immediately when you discover them:** - If a command doesn't work as documented → create a task - If a command doesn't work as you expected → create a task @@ -242,24 +260,57 @@ task create "Add missing test coverage" --discovered-from=t-abc123 --json **NEVER ignore bugs or unexpected behavior.** File a task for it immediately. -### 3. Track Dependencies +### 3. 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 +``` + +### 4. Track Dependencies If work depends on other work, use `--deps`: ```bash # Can't write tests until implementation is done task create "Test auth flow" --deps=t-20241108120000 --dep-type=blocks --json ``` -### 4. Use Descriptive Titles +### 5. Use Descriptive Titles Good: `"Add JWT token validation to auth middleware"` Bad: `"Fix auth"` -### 5. Use Epics for Organization +### 6. Use Epics for Organization Organize related work using epics: - Create an epic for larger features: `task create "Feature Name" --type=epic --json` - Add tasks to the epic using `--parent=<epic-id>` - Use `--discovered-from` to track work found during implementation -### 6. ALWAYS Store AI Planning Docs in `_/llm` Directory +### 7. ALWAYS Store AI Planning Docs in `_/llm` Directory AI assistants often create planning and design documents during development: - PLAN.md, DESIGN.md, TESTING_GUIDE.md, tmp, and similar files - **You MUST use a dedicated directory for these ephemeral files** @@ -132,6 +132,12 @@ use. convention `if __name__ == "__main__"` is not necessary because `bild` wraps the program in a call like `python -m main`; the same is true of Guile scheme. +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. ## Setting up remote builds |
