@great-arrow/cli 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/index.js +1321 -63
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -72,6 +72,29 @@ gad todo done <id>
|
|
|
72
72
|
gad todo update <id> --status review
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
### Repo coordination (parallel agents)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Start a task the safe way: a FRESH worktree on a new branch off the origin
|
|
79
|
+
# default branch, with a real dependency install. Refuses in a dirty tree.
|
|
80
|
+
gad worktree new feat/fix-login # creates ../<repo>-fix-login
|
|
81
|
+
gad worktree new feat/fix-login ../my-dir # explicit target dir
|
|
82
|
+
gad worktree new feat/fix-login --no-install
|
|
83
|
+
|
|
84
|
+
# Install the fail-open agent commit guard into this repo's pre-commit hook
|
|
85
|
+
# (.husky/pre-commit when husky is present, else .git/hooks/pre-commit).
|
|
86
|
+
# Idempotent — re-running never duplicates the hook block.
|
|
87
|
+
gad install-hooks
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`gad worktree new` stamps the creating agent session as the worktree owner.
|
|
91
|
+
The guard installed by `gad install-hooks` walks the committer's PID ancestry
|
|
92
|
+
at commit time: if the worktree's owner is a _different, still-live_ agent
|
|
93
|
+
session, the commit is blocked (you were about to commit another agent's
|
|
94
|
+
in-flight work). Every ambiguity — no owner marker, dead owner, human
|
|
95
|
+
committer — fails open, so it can never block a legitimate commit. Deliberate
|
|
96
|
+
override: `ALLOW_FOREIGN_WORKTREE=1`.
|
|
97
|
+
|
|
75
98
|
### Diagnostics
|
|
76
99
|
|
|
77
100
|
```bash
|