diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 13:50:23 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 13:50:23 -0500 |
| commit | 67dd152e40a3f08e5a7aaaaf4cc9b1122e6b6909 (patch) | |
| tree | b33f5faa4bb3520d49443008e30b996713493115 /Omni/Ide | |
| parent | 6f4b2c97a24967508f3970b46999052fd1f44e67 (diff) | |
feat: implement t-1o2bkufixnc
I have successfully refactored `AGENTS.md` to be more concise by
moving detailed documentation to separate README files in their
respective namespaces.
**Changes made:** 1. **Created `Omni/Task/README.md`**: Contains
the detailed "Task Manager for AI Agents" documentation. 2.
**Created `Omni/Bild/README.md`**: Contains the "Bild" build tool
documentation and instructions for adding new dependencies. 3.
**Created `Omni/Ide/README.md`**: Contains the "Development Tools"
(run.sh, lint, etc.) and "Git Workflow" documentation. 4. **Updated
`AGENTS.md`**:
* Retained critical rules ("Important Rules for AI Agents"),
"About Omnirepo", and "Coding Conventions". * Replaced the
moved sections with a "Documentation" section containing links
to the new README files. * Used relative paths for links to
ensure portability.
**Verification:** * Ran `bild --test Omni/Task.hs` and `bild --test
Omni/Bild.hs` to ensure no regressions were introduced in the touched
namespaces.
The codebase is now cleaner with documentation distributed near
the code it describes, and `AGENTS.md` is now a focused entry point
for agents.
Diffstat (limited to 'Omni/Ide')
| -rw-r--r-- | Omni/Ide/README.md | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/Omni/Ide/README.md b/Omni/Ide/README.md new file mode 100644 index 0000000..7511090 --- /dev/null +++ b/Omni/Ide/README.md @@ -0,0 +1,143 @@ +# Development Tools and Workflow + +## Tools + +### run.sh + +`run.sh` is a convenience wrapper that builds (if needed) and runs a namespace. + +Examples: +```bash +Omni/Ide/run.sh Omni/Task.hs # Build and run task manager +Omni/Ide/run.sh Biz/PodcastItLater/Web.py # Build and run web server +``` + +This script will: +1. Check if the binary exists in `_/bin/` +2. Build it if it doesn't exist (exits on build failure) +3. Execute the binary with any additional arguments + +### lint + +Universal lint and formatting tool. Errors if lints fail or code is not formatted properly. + +Examples: +```bash +lint Omni/Cli.hs # Lint a namespace +lint --fix **/*.py # Lint and fix all Python files +``` + +### repl.sh + +Like `nix-shell` but specific to this repo. Analyzes the namespace, pulls dependencies, and starts a shell or repl. + +Examples: +```bash +repl.sh Omni/Bild.hs # Start Haskell repl with namespace loaded +repl.sh --bash Omni/Log.py # Start bash shell for namespace +``` + +### typecheck.sh + +Like `lint` but only runs type checkers. Currently just supports Python with `mypy`, but eventually will support everything that `bild` supports. + +Examples: +```bash +typecheck.sh Omni/Bild/Example.py # Run the typechecker and report any errors +``` + +### Test Commands + +Run tests: +```bash +bild --test Omni/Task.hs # Build and test a namespace +``` + +The convention for all programs in the omnirepo is to run their tests if the first argument is `test`. So for example: + +```bash +# this will build a the latest executable and then run tests +bild --test Omni/Task.hs + +# this will just run the tests from the existing executable +_/bin/task test +``` + +## Git Workflow + +### Use git-branchless + +This repository uses **git-branchless** for a patch-based workflow instead of traditional branch-based git. + +Key concepts: +- Work with **patches** (commits) directly rather than branches +- Use **stacking** to organize related changes +- Leverage **smartlog** to visualize commit history + +### Common git-branchless Commands + +**View commit graph:** +```bash +git smartlog +``` + +**Create a new commit:** +```bash +# Make your changes +git add . +git commit -m "Your commit message" +``` + +**Amend the current commit:** +```bash +# Make additional changes +git add . +git amend +``` + +**Move/restack commits:** +```bash +git move -s <source> -d <destination> +git restack +``` + +### When to Record Changes in Git + +**DO record in git:** +- Completed features or bug fixes +- Working code that passes tests and linting +- Significant milestones in task completion + +**DO NOT record in git:** +- Work in progress (unless specifically requested) +- Broken or untested code +- Temporary debugging changes + +**NEVER do these git operations without explicit user request:** +- ❌ `git push` - NEVER push to remote unless explicitly asked +- ❌ `git pull` - NEVER pull from remote unless explicitly asked +- ❌ Force pushes or destructive operations +- ❌ Branch deletion or remote branch operations + +**Why:** The user maintains control over when code is shared with collaborators. Always ask before syncing with remote repositories. + +### Workflow Best Practices + +1. **Make small, focused commits** - Each commit should represent one logical change +2. **Write descriptive commit messages** - Explain what and why, not just what +3. **Rebase and clean up history** - Use `git commit --amend` and `git restack` to keep history clean +4. **Test before committing** - Run `bild --test` and `lint` on affected namespaces + +### Required Checks Before Completing Tasks + +After completing a task, **always** run these commands for the namespace(s) you modified: + +```bash +# Run tests +bild --test Omni/YourNamespace.hs + +# Run linter +lint Omni/YourNamespace.hs +``` + +**Fix all reported errors** related to your changes before marking the task as complete. This ensures code quality and prevents breaking the build for other contributors. |
