1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
# 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.
This document describes how AI agents should interact with this repo, the "omnirepo".
## Important 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
- ✅ 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?"
- ✅ 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
```
**Standard workflow:**
```bash
# 1. Find ready work
task ready --json
# 2. Claim a task
task update <id> in-progress --json
# 3. During work: create discovered issues
task create "Fix type error found" --discovered-from=<current-id> --json
# 4. Complete the task
task update <id> done --json
# 5. End of session: sync to git (local commit only)
task sync
```
### 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"
### 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.
|