geneseed 5.3.0 → 5.4.0
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/CHANGELOG.md +95 -0
- package/README.md +23 -20
- package/SHIPPED.md +7 -7
- package/adapters/bob/README.md +31 -18
- package/adapters/claude-code/README.md +27 -22
- package/adapters/openclaude/README.md +18 -8
- package/adapters/opencode/HOW-OPENCODE-LOADS.md +8 -3
- package/adapters/opencode/README.md +3 -2
- package/adapters/opencode/plugins/geneseed-activity.js +20 -21
- package/adapters/opencode/plugins/geneseed-context.js +175 -62
- package/adapters/opencode/plugins/geneseed-guard.js +419 -205
- package/adapters/opencode/plugins/geneseed-workflow.js +3 -2
- package/adapters/opencode/workflows/_runtime.js +3 -2
- package/bin/geneseed-cli.mjs +7 -0
- package/bin/geneseed-hook.mjs +59 -11
- package/docs/PRD.md +1 -1
- package/docs/README.md +1 -0
- package/docs/concepts/agents.md +1 -1
- package/docs/concepts/collaboration.md +2 -2
- package/docs/concepts/enforcement-table.md +5 -2
- package/docs/concepts/exclusions.md +18 -4
- package/docs/concepts/footprint.md +11 -1
- package/docs/concepts/foreman-mode.md +1 -1
- package/docs/concepts/hook-gates.md +5 -5
- package/docs/concepts/hooks.md +4 -3
- package/docs/concepts/host-matrix.md +24 -6
- package/docs/concepts/kits.md +12 -2
- package/docs/concepts/loop-bricks.md +3 -3
- package/docs/concepts/loops.md +6 -4
- package/docs/concepts/ownership.md +1 -1
- package/docs/concepts/rules.md +2 -2
- package/docs/concepts/skills.md +1 -1
- package/docs/design-history.md +8 -0
- package/docs/extending.md +112 -35
- package/docs/guides/auto-merge.md +100 -0
- package/docs/guides/choose-your-setup.md +1 -1
- package/docs/guides/headless.md +1 -1
- package/docs/guides/install-bob.md +2 -2
- package/docs/guides/install-clone.md +1 -1
- package/docs/guides/install-openclaude.md +1 -1
- package/docs/guides/install.md +1 -1
- package/docs/guides/loop-finish.md +3 -3
- package/docs/guides/loop-running.md +4 -4
- package/docs/guides/project-context.md +1 -1
- package/docs/guides/run-a-factory.md +2 -2
- package/docs/guides/setup-doctrines.md +2 -2
- package/docs/guides/setup-footprint.md +1 -1
- package/docs/guides/uninstall.md +3 -3
- package/docs/guides/upgrade.md +1 -1
- package/docs/guides/verify.md +12 -0
- package/docs/guides/worktree.md +1 -1
- package/docs/reference/environment.md +5 -2
- package/docs/reference/plugin-activity.md +1 -1
- package/docs/reference/plugin-guard.md +1 -1
- package/docs/reference/plugin-learn.md +1 -1
- package/docs/reference/plugin-workflow.md +1 -1
- package/docs/reference/troubleshoot-doctor.md +2 -2
- package/docs/reference/troubleshoot-hooks.md +2 -2
- package/docs/reference/troubleshoot-install.md +3 -3
- package/docs/reference/troubleshoot-tools.md +1 -1
- package/docs/token-footprint.md +68 -4
- package/docs/understand/design-choices-hosts.md +1 -1
- package/docs/understand/design-choices-shape.md +1 -0
- package/docs/understand/enforced-vs-asked.md +2 -2
- package/docs/understand/machine-bob.md +1 -1
- package/docs/understand/machine-claude.md +2 -2
- package/docs/understand/on-your-machine.md +1 -1
- package/docs/web-ui.md +10 -5
- package/harness.config.json +1 -1
- package/js/README.md +5 -3
- package/js/build/args.mjs +13 -2
- package/js/build/driver.mjs +34 -7
- package/js/build/emit-claude.mjs +9 -5
- package/js/build/emit-opencode.mjs +13 -9
- package/js/build/generate.mjs +10 -165
- package/js/build/profile.mjs +318 -0
- package/js/build/render.mjs +81 -3
- package/js/build/retired-skills.mjs +60 -13
- package/js/build/source.mjs +15 -1
- package/js/build/stubs.mjs +4 -1
- package/js/cli-table.json +48 -3
- package/js/hosts/done-checks.mjs +6 -0
- package/js/hosts/geneseed-dir.mjs +3 -2
- package/js/hosts/gitref.mjs +5 -3
- package/js/hosts/hook-tap.mjs +104 -0
- package/js/hosts/hooks-context.mjs +4 -2
- package/js/hosts/hooks-done.mjs +345 -55
- package/js/hosts/hooks-learn.mjs +51 -19
- package/js/hosts/hooks-prims.mjs +5 -3
- package/js/hosts/hooks.mjs +172 -19
- package/js/hosts/hosts.mjs +80 -12
- package/js/hosts/installs.mjs +26 -1
- package/js/hosts/native.mjs +33 -7
- package/js/hosts/owned.mjs +7 -6
- package/js/hosts/ownership-gate.mjs +14 -1
- package/js/hosts/settings.mjs +273 -105
- package/js/hosts/shim.mjs +4 -4
- package/js/hosts/usage.mjs +9 -3
- package/js/inspect/checks-constitution.mjs +32 -0
- package/js/inspect/checks-probe.mjs +66 -5
- package/js/inspect/checks-repo.mjs +196 -2
- package/js/inspect/cost.mjs +34 -2
- package/js/inspect/diff.mjs +21 -3
- package/js/inspect/doctor.mjs +6 -1
- package/js/inspect/inventory.mjs +1 -1
- package/js/lib/machine-dir.mjs +1 -1
- package/js/lib/node-floor.mjs +46 -6
- package/js/maintain/setup.mjs +5 -1
- package/js/maintain/uninstall.mjs +42 -16
- package/js/maintain/update.mjs +4 -2
- package/js/web/actions.mjs +17 -12
- package/js/web/api.mjs +7 -2
- package/package.json +1 -1
- package/registry.json +14 -0
- package/src/AGENT.md.tmpl +15 -17
- package/src/bricks/pr-open.md +3 -2
- package/src/doctrines/ops.md +2 -2
- package/src/doctrines/process.md +40 -36
- package/src/factories/analysis-to-build.json +1 -1
- package/src/factories/bug-report-to-fix.json +1 -1
- package/src/factories/issue-to-pr.json +1 -1
- package/src/kits/terminal-tools/rules.md +10 -0
- package/src/kits/terminal-tools.json +13 -0
- package/src/licenses/herdr.txt +201 -0
- package/src/modes/foreman.md +6 -3
- package/src/skills/_self-improvement.md +9 -7
- package/src/skills/commit.md +17 -17
- package/src/skills/debug/ci.md +1 -1
- package/src/skills/dependencies.md +3 -3
- package/src/skills/document-project.md +3 -2
- package/src/skills/factory.md +13 -4
- package/src/skills/geneseed.md +4 -2
- package/src/skills/git-history.md +5 -7
- package/src/skills/herdr.md +135 -0
- package/src/skills/loop.md +3 -2
- package/src/skills/opencode-cli.md +84 -0
- package/src/skills/pipeline.md +1 -1
- package/src/skills/release.md +5 -8
- package/src/skills/review-response.md +4 -2
- package/src/skills/rule.md +27 -1
- package/src/skills/ship.md +54 -7
- package/src/skills/worktree.md +2 -2
- package/src/upstreams.json +7 -0
- package/themes/_TEMPLATE.json +2 -0
- package/themes/biker.json +2 -0
- package/themes/commentator.json +2 -0
- package/themes/cyberpunk.json +2 -0
- package/themes/gamer.json +2 -0
- package/themes/imperial.json +2 -0
- package/themes/joker.json +2 -0
- package/themes/marvin.json +2 -0
- package/themes/mean.json +2 -0
- package/themes/military.json +2 -0
- package/themes/neutral.json +2 -0
- package/themes/pirate.json +2 -0
- package/themes/sports.json +2 -0
- package/themes/verstappen.json +2 -0
- package/themes/wizard.json +2 -0
- package/web/dist/assets/Activity-D2kOc3yi.js +1 -0
- package/web/dist/assets/ActivityDetail-By3xOr21.js +1 -0
- package/web/dist/assets/{Bonsai-Bfpb6W-1.js → Bonsai-CBWDTBA4.js} +1 -1
- package/web/dist/assets/{CopyButton-ByIntFtB.js → CopyButton-BVbpriMB.js} +1 -1
- package/web/dist/assets/Dashboard-CIJLPHM9.js +2 -0
- package/web/dist/assets/{Docs-DvlMJhpu.js → Docs-CiRRIELs.js} +3 -3
- package/web/dist/assets/Factories-DhyK0O8d.js +1 -0
- package/web/dist/assets/GreenhouseView-DW3PgTPy.js +1 -0
- package/web/dist/assets/Installs-B6nlo-Ly.js +3 -0
- package/web/dist/assets/JournalView-O65qEWfp.js +1 -0
- package/web/dist/assets/Kits-C5U-yT6Z.js +1 -0
- package/web/dist/assets/Laws-CuTw_XNf.js +4 -0
- package/web/dist/assets/{LibRows-DEHjIoD-.js → LibRows-D6-CVa3K.js} +1 -1
- package/web/dist/assets/Library-CzPlerd6.js +3 -0
- package/web/dist/assets/Loops-CqNF_-nS.js +2 -0
- package/web/dist/assets/Markdown-CxkA7940.js +71 -0
- package/web/dist/assets/OperatorHudView-BNr8K5qj.js +1 -0
- package/web/dist/assets/Personal-DeDb9e8O.js +2 -0
- package/web/dist/assets/Settings-B8MPN_AD.js +1 -0
- package/web/dist/assets/{Tabs-CWeQTADL.js → Tabs-DJzAez4h.js} +1 -1
- package/web/dist/assets/index-BL3P-9Rg.js +6 -0
- package/web/dist/assets/{index-CsAZq0BQ.css → index-CRWqKxfY.css} +1 -1
- package/web/dist/index.html +2 -2
- package/adapters/claude-code/settings.json +0 -52
- package/web/dist/assets/Activity-CqJiquEq.js +0 -1
- package/web/dist/assets/ActivityDetail-BSzevynX.js +0 -1
- package/web/dist/assets/Dashboard-DBOEi9lQ.js +0 -2
- package/web/dist/assets/Factories-Bpvv7L2H.js +0 -1
- package/web/dist/assets/GreenhouseView-GpBsYn50.js +0 -1
- package/web/dist/assets/Installs-BlGmVrFK.js +0 -3
- package/web/dist/assets/JournalView-iLuLrOxE.js +0 -1
- package/web/dist/assets/Kits-DRwpxC-J.js +0 -1
- package/web/dist/assets/Laws-CZkiNOWQ.js +0 -4
- package/web/dist/assets/Library-B4K-1iNF.js +0 -3
- package/web/dist/assets/Loops-BWSzaW8E.js +0 -2
- package/web/dist/assets/Markdown-0ORz7tAc.js +0 -69
- package/web/dist/assets/OperatorHudView-BAXwCEvY.js +0 -1
- package/web/dist/assets/Personal-Bp9nV4GR.js +0 -2
- package/web/dist/assets/Settings-CWWuaIp-.js +0 -1
- package/web/dist/assets/index-How7SzDZ.js +0 -6
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/src/modes/foreman.md
CHANGED
|
@@ -16,7 +16,10 @@ task that would block it to one background task worker, and keeps answering the
|
|
|
16
16
|
- **One worker per task.** Dispatch one developer {{AGENT}} in the background, in its own
|
|
17
17
|
worktree (without worktrees: one tree, one worker at a time). The brief carries the task as the user stated it, BASE, the write set, the
|
|
18
18
|
proof commands, and the rule that it commits only in its own worktree, never pushes, and
|
|
19
|
-
never merges outside its own branch; without a worktree, it never commits.
|
|
19
|
+
never merges outside its own branch; without a worktree, it never commits. It also says
|
|
20
|
+
to run each command from the worktree as working directory or with absolute paths
|
|
21
|
+
(`git -C`, `npm --prefix`), never opening with `cd <worktree> &&`: the host asks the user
|
|
22
|
+
to approve that form. The worker explores, implements and tests in its own context, loading {{SKILLS}}
|
|
20
23
|
as it needs them; after two repair rounds on its own red tests it returns red with its
|
|
21
24
|
findings ({{DOCTRINE:bound-the-loop}}). Check its write set against every task in flight
|
|
22
25
|
({{DOCTRINE:one-writer-per-file}}).
|
|
@@ -47,8 +50,8 @@ task that would block it to one background task worker, and keeps answering the
|
|
|
47
50
|
worker serves one task and retires when that task is merged or dropped.
|
|
48
51
|
- **Merge on proof you re-ran.** A worker hands back its branch, its local commits and any
|
|
49
52
|
uncommitted work, with raw test + lint output. The parent re-runs those commands itself —
|
|
50
|
-
a worker's log is the worker's account, not the state —
|
|
51
|
-
and the
|
|
53
|
+
a worker's log is the worker's account, not the state — merges the branch into its own,
|
|
54
|
+
and lands it on the main branch only through a pull request with green checks
|
|
52
55
|
({{DOCTRINE:consent-before-push}}). Surface completions, failures and merges as they
|
|
53
56
|
happen; watch workers as the pipeline {{SKILL}}'s step 2 watches a crew.
|
|
54
57
|
- **Crews are opt-in.** Run the `pipeline` {{SKILL}} only when the user asks for a
|
|
@@ -13,8 +13,9 @@ Close each run with one beat of reflection on the {{SKILL}} itself:
|
|
|
13
13
|
`- [skill|general] <correction> [— situation: <when it applies>] — seen: <what happened, against what you expected> (<date>)`.
|
|
14
14
|
`situation:` bounds where the correction holds; `seen:` is the evidence it is
|
|
15
15
|
later judged by; `general` marks one that would fix other {{SKILLS}} too. Never
|
|
16
|
-
edit this file: it is a rendered copy, a rebuild overwrites it
|
|
17
|
-
|
|
16
|
+
edit this file: it is a rendered copy, a rebuild overwrites it. A bundled script
|
|
17
|
+
that is broken is the one exception: fix it in place, and tell the user which
|
|
18
|
+
file you changed. `geneseed diff` carries the notes back to the source;
|
|
18
19
|
folding a note into the source is the user's call, through the skill-forge
|
|
19
20
|
{{SKILL}} ({{LAW:one-intent-one-act}}).
|
|
20
21
|
- Keep the notes sharp: amend or delete a line before adding one — a line with no
|
|
@@ -31,9 +32,10 @@ One beat of reflection on this {{SKILL}}: a step that misled, a missing step, or
|
|
|
31
32
|
wrong trigger is a flaw in this file — write the exact correction on your own, with no
|
|
32
33
|
prompt, into `{{PATH_NOTES}}/skill-notes/<name>.md` (`<name>` is this {{SKILL}}'s
|
|
33
34
|
name) as `- [skill|general] <correction> [— situation: <when it applies>] — seen: <what happened vs expected> (<date>)`,
|
|
34
|
-
never into this rendered file, which a rebuild overwrites.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{{
|
|
35
|
+
never into this rendered file, which a rebuild overwrites. A bundled script that is
|
|
36
|
+
broken is the one exception: fix it in place, and tell the user which file you
|
|
37
|
+
changed. Folding a note into the source is the user's call ({{LAW:one-intent-one-act}}).
|
|
38
|
+
Read that notes file before the first step when it exists; it wins where it disagrees.
|
|
39
|
+
Keep it short. A lesson that is not about this file goes to {{MEMORY}} only if it
|
|
40
|
+
clears {{DOCTRINE:persist-insight}}'s bar. Nothing learned — move on.
|
|
39
41
|
<!-- LEAN:end -->
|
package/src/skills/commit.md
CHANGED
|
@@ -19,25 +19,25 @@
|
|
|
19
19
|
repo has no discernible convention, default to **Conventional Commits**:
|
|
20
20
|
`type(scope): subject` (`feat`, `fix`, `docs`, `refactor`, `test`, `chore`…),
|
|
21
21
|
with a `!` before the colon or a `BREAKING CHANGE:` footer for a breaking change.
|
|
22
|
-
5. **
|
|
23
|
-
|
|
24
|
-
the
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
5. **Commit on your own branch; never on the main branch ({{DOCTRINE:consent-before-push}}).**
|
|
23
|
+
On your own branch, commit without asking once steps 1–4 hold. The main branch
|
|
24
|
+
(`main`, `master`, the remote's default, and from a linked worktree the main checkout's branch) takes no direct
|
|
25
|
+
commit: move the work to a branch first and land it through a pull request. Where the
|
|
26
|
+
repository has no remote or no CI, a commit on the main branch needs explicit
|
|
27
|
+
acceptance: show a plain-language summary and the exact message, then wait. For a
|
|
28
|
+
non-trivial change, offer the `explain-changes` skill's visual walkthrough — an
|
|
29
|
+
offer, never a condition. A dispatched worker, crew or slice commits only in its own
|
|
30
|
+
worktree.
|
|
31
|
+
6. Push your own branch with a plain push when the work is ready for review; a forced
|
|
32
|
+
push asks, and a push onto the main branch asks ({{DOCTRINE:consent-before-push}} /
|
|
33
|
+
{{LAW:deletion-is-deliberate}}). A dispatched worker, crew or slice never pushes. If the
|
|
34
|
+
branch's PR has auto-merge armed, disarm it before the push (`gh pr merge <pr> --disable-auto`;
|
|
35
|
+
GitLab: `glab api --method POST projects/:id/merge_requests/<iid>/cancel_merge_when_pipeline_succeeds`):
|
|
36
|
+
an armed PR would merge the new head unreviewed. Re-arm only through the [ship {{SKILL}}](ship.md).
|
|
37
37
|
|
|
38
38
|
## Done when
|
|
39
39
|
- The commit contains only the intended change and the working tree is clean of it,
|
|
40
|
-
and
|
|
41
|
-
or
|
|
40
|
+
and nothing was committed or pushed onto the main branch without a green pull
|
|
41
|
+
request or the user's explicit acceptance.
|
|
42
42
|
|
|
43
43
|
<!-- INCLUDE: skills/_self-improvement.md -->
|
package/src/skills/debug/ci.md
CHANGED
|
@@ -5,7 +5,7 @@ Needs the CI log: the host's CI tool, `gh run view --log-failed` or equivalent,
|
|
|
5
5
|
2. **Classify before touching anything.** First diff against the last green run: commit range, lockfile, runner image, toolchain. Then name the class: a *real failure* (code or test wrong), an *environment difference* (a version, path, line endings, missing binary, a test skipped locally but not in CI), an *infra flake* (network, runner, cache, timeout), or a *gate on the report itself* (a coverage or count threshold, a lint the local hook skips).
|
|
6
6
|
3. **Reproduce under CI's own conditions** — the workflow's script, flags and a matching toolchain. Green locally and red in CI has not reproduced yet: close the gap (the env var, `--frozen-lockfile`, the reporter, the binary not on PATH) until it fails the same way. Never retry a run blindly. CI logs are shared: probe a secret's presence, never its value (`[ -n "$TOKEN" ] && echo set || echo unset`).
|
|
7
7
|
4. **Fix at the cause** through steps 2–6 of the debug procedure. For an environment difference, make the *repo* deterministic (pin, normalise, declare) rather than CI more permissive. A flake is fixed at its source — the race, the timeout, the unpinned resource — or quarantined *with an issue and an owner*, never silently skipped ({{LAW:cure-the-cause}}). A sleep that guesses at timing becomes a wait on the actual condition with a bounded timeout; a fixed delay that remains says why ({{DOCTRINE:honest-tests}}). A fix to CI config itself is its own commit ({{LAW:one-intent-one-act}}), noted in the PR.
|
|
8
|
-
5. **Prove it the way CI will:** run CI's command locally once more and read the output, push
|
|
8
|
+
5. **Prove it the way CI will:** run CI's command locally once more and read the output, push the fix to its own branch ({{DOCTRINE:consent-before-push}}), and watch the re-run to green; the gate that reported it verifies the fix. Report what failed, its class, what changed, and the green run.
|
|
9
9
|
|
|
10
10
|
## Done when
|
|
11
11
|
- The debug {{SKILL}}'s own Done-when holds, and the run was reproduced under CI's conditions and the same CI run was re-run and read green — no retry-until-green, no test quietly skipped.
|
|
@@ -37,9 +37,9 @@ code needs to move onto a new API, framework, or language version.
|
|
|
37
37
|
Nothing is upgraded by the audit itself.
|
|
38
38
|
7. **Before executing any bump, read the upstream migration guide and changelog first**
|
|
39
39
|
({{DOCTRINE:read-the-docs-first}}); list the breaking changes that actually touch this
|
|
40
|
-
codebase. Work on a dedicated branch, never directly on
|
|
41
|
-
rolls back cleanly
|
|
42
|
-
|
|
40
|
+
codebase. Work on a dedicated branch, never directly on the main branch, so a failed
|
|
41
|
+
migration rolls back cleanly; it reaches main only through a green pull request
|
|
42
|
+
({{DOCTRINE:consent-before-push}}).
|
|
43
43
|
8. **Execute one change at a time** — one dependency, or one breaking change — never batching
|
|
44
44
|
unrelated bumps into a single step ({{LAW:one-intent-one-act}}). Run the project's checks
|
|
45
45
|
after *each* step: a green suite between steps is what lets you bisect a later failure to
|
|
@@ -112,8 +112,9 @@ write; with none, step 5 proposes them.
|
|
|
112
112
|
sizes and weights; spacing, radius and shadow on sample squares; components as cards
|
|
113
113
|
(variants, states, path) — no live rendering, which would need the project's framework; and
|
|
114
114
|
the hard-coded-value drift in a separate callout.
|
|
115
|
-
10. **Do not auto-publish.**
|
|
116
|
-
|
|
115
|
+
10. **Do not auto-publish.** Commit on your own branch via the [commit {{SKILL}}](commit.md)
|
|
116
|
+
and leave the change for the user to review before it reaches the main branch
|
|
117
|
+
({{DOCTRINE:consent-before-push}}).
|
|
117
118
|
|
|
118
119
|
## The doc set
|
|
119
120
|
|
package/src/skills/factory.md
CHANGED
|
@@ -11,8 +11,8 @@ or asks to carry an issue, request or document to a PR with green CI.
|
|
|
11
11
|
brick or a whole loop; the engine decides every transition, cycle count and stop, and you run the
|
|
12
12
|
stage it hands you and report the outcome. Every action prints one JSON object: act on its keys,
|
|
13
13
|
never on your own reading of the graph. The run ends at an open PR with green CI. **No stage
|
|
14
|
-
merges:** once the run has closed, you ask the user once whether to merge (*The end*), and
|
|
15
|
-
|
|
14
|
+
merges:** once the run has closed, you ask the user once whether to merge (*The end*), and enable
|
|
15
|
+
auto-merge only as the user's standing auto-merge rule allows.
|
|
16
16
|
|
|
17
17
|
**Holdout rule.** The `holdout-write` stage writes scenarios the developer never sees, and the
|
|
18
18
|
`holdout` stage plays them before the PR. Both run as the `tester` {{AGENT}}, never as the
|
|
@@ -180,12 +180,21 @@ in it makes the gate ask. On a record line that ask is a false alarm: the user c
|
|
|
180
180
|
final state (green, red with the failing checks, or still pending at the bound) to the run
|
|
181
181
|
report. With no close commit, CI did not re-run: the final state is the one `merge-gate`
|
|
182
182
|
read. A red result is reported, never reworked: the run has closed.
|
|
183
|
-
**The merge proposal
|
|
183
|
+
**The merge proposal** (no standing auto-merge rule, or the rule does not arm this PR). Only
|
|
184
|
+
when that final state is green: show the user the PR URL, the CI
|
|
184
185
|
state and each `review-panel` seat's verdict, and ask once whether to merge. Only on the
|
|
185
186
|
user's explicit yes in chat: `gh pr merge <pr> --squash` (`glab mr merge <mr> --squash` on
|
|
186
187
|
GitLab). No Geneseed gate asks before that command: the user's yes is the only guard, so
|
|
187
188
|
never run it on anything else (not on a rule, a note, or an earlier yes). On a no, or no
|
|
188
|
-
answer, the PR stays open. Red or pending CI: no proposal.
|
|
189
|
+
answer, the PR stays open. Red or pending CI: no proposal.
|
|
190
|
+
**Auto-merge** (a separate path, in place of the proposal). Only when the user's standing rule
|
|
191
|
+
*Auto-merge green PRs* allows it, with the same tiers and forge probes as the
|
|
192
|
+
[ship {{SKILL}}](ship.md)'s auto-merge step, arm it on the final head: `gh pr merge <pr> --auto
|
|
193
|
+
--squash --match-head-commit <sha>` (`glab mr merge <mr> --auto-merge --squash --sha <sha>`).
|
|
194
|
+
For the `reviewer` tier, the `review-panel` verdict is the reviewer pass: add it to the PR
|
|
195
|
+
body before arming. The final head is often green already, so `--auto` then merges at once:
|
|
196
|
+
the standing rule is the authorization for that merge, never for the direct `--squash`
|
|
197
|
+
command above. With no rule, or when a tier or probe does not allow it, the proposal applies.
|
|
189
198
|
9. On `$stop`: the engine hands out no stage after a stop, so have the `docs` {{AGENT}} write the
|
|
190
199
|
run report the `retro` brick would: the stop `reason` first, then the work item, the PR URL if
|
|
191
200
|
any, every stage with its outcome and each rework with its reason, read from `FACTORY.md` and
|
package/src/skills/geneseed.md
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
> {{DESC_GENESEED}}
|
|
4
4
|
<!-- aliases: opencode-theme -->
|
|
5
5
|
|
|
6
|
-
**Trigger:** the user mentions Geneseed, the harness, or `AGENT.md
|
|
6
|
+
**Trigger:** the user mentions Geneseed, the harness, or `AGENT.md`, or asks to reinstall, update, upgrade, repair or re-run its install; asks how the install is set up; asks to change its theme, footprint, posture, mode, doctrine packs or excluded rules; asks for their own OpenCode colour theme or to tweak the shipped colours ("make me a theme", "a theme that matches my brand", "a darker/transparent version of this theme") — or you need to know what {{LAWS}}, {{AGENTS}}, or {{SKILLS}} this install carries.
|
|
7
|
+
|
|
8
|
+
**Reinstall = rebuild the same install.** Start from that install's `rebuild` command in `geneseed status --json` and change only the flag the user named. Never run a bare `geneseed build`: each omitted flag returns its setting to the default. A build that would do that refuses (`refused: this build would change settings…`) and prints the command that keeps them: run that command. Add `--reset` only when the user asked to return the settings to their defaults. Updating Geneseed itself is `geneseed upgrade`, which keeps every install's settings.
|
|
7
9
|
|
|
8
10
|
## Procedure
|
|
9
11
|
1. **Locate.** Run `geneseed status --json` first: `installs` lists every install on this machine — host, scope, root, state, theme, footprint, posture, mode, packs, excluded rules — and `rebuild`, the command that reproduces each one exactly. `geneseed` not on PATH → ask the user before using `npx geneseed` (it downloads the package), and prefix every command below the same way. Still nothing → look for a host root file: `~/.config/opencode/AGENT.md` or `.opencode/AGENT.md` (OpenCode), `~/.claude/CLAUDE.md` or `.claude/` (Claude Code), `.openclaude/` (OpenClaude), `AGENTS.md` beside `.bob/` (Bob). None → say so; never install to "fix" it.
|
|
10
12
|
2. **Read state** with the read-only verbs, cheapest first ({{DOCTRINE:context-economy}}): `geneseed status --json`, `geneseed version`, `geneseed catalog` (optionally `agents|skills|laws|ontology|doctrines`), `geneseed doctor`, `geneseed diff`, `geneseed mcp`, `geneseed memory list`, `geneseed memory consolidate` (rebuilds only the generated index, from the fact files), `geneseed exclude list`.
|
|
11
13
|
3. **Read a piece** from disk, not from recall ({{LAW:verify-before-asserting}}): `<root>/agents/<name>.md`, `<root>/skills/<name>/SKILL.md`, `<root>/memory/`, `<root>/notebook/`. The {{ONTOLOGY}}, the {{LAWS}} and the active {{DOCTRINES}} are numbered `## N. …` sections of the install's root file.
|
|
12
|
-
4. **Change an install only when the user asked for that change** ({{LAW:one-intent-one-act}}). Take that install's `rebuild` command from step 1, edit only the flag the user named (add it if the command omits it — `--posture`, `--mode` and `--trust` are left out at their defaults) — `--theme`, `--footprint lean|full`, `--posture`, `--mode direct|foreman`, `--trust prudent|balanced|aggressive`, `--doctrines craft,rigor|none`, `--exclude-rules "process 7"|none` — dry-run it first by running the same flags through `geneseed validate`, show the command, and run it once the user agrees.
|
|
14
|
+
4. **Change an install only when the user asked for that change** ({{LAW:one-intent-one-act}}). Take that install's `rebuild` command from step 1, edit only the flag the user named (add it if the command omits it — `--posture`, `--mode` and `--trust` are left out at their defaults) — `--theme`, `--footprint lean|full`, `--posture`, `--mode direct|foreman`, `--trust prudent|balanced|aggressive`, `--doctrines craft,rigor|none`, `--exclude-rules "process 7"|none` — dry-run it first by running the same flags through `geneseed validate`, show the command, and run it once the user agrees. Confirm with `geneseed status`.
|
|
13
15
|
5. **Other writes also need the user's word:** `geneseed memory rm <name>` (archives; `--purge` deletes for good), `geneseed exclude add|remove <path>`, `geneseed web start|stop`, `geneseed uninstall --target <root> --yes`. Personal rules and the profile belong to their own {{SKILLS}}; do not edit `user-rules.md` or `PROFILE.md` from here.
|
|
14
16
|
6. **Never on your own initiative:** `geneseed setup` (interactive only), `geneseed upgrade`, `geneseed update`, `geneseed upgrade --setup`, `geneseed rebuild-all`, `geneseed migrate`, `geneseed link`, `geneseed unlink`. `learn`, `context` and the `*-gate` verbs are `geneseed-hook` verbs the host's hooks run — never run them by hand.
|
|
15
17
|
7. Directory and section names are plain English in every theme; only prose changes. Do not search by flavour words.
|
|
@@ -60,15 +60,13 @@ never changes history; Part B does. To write a new commit, use the
|
|
|
60
60
|
you were asked to resolve. Before concluding, run the project's checks (typecheck,
|
|
61
61
|
tests, format) and fix what the merge broke.
|
|
62
62
|
5. **Deliberate rewrite** (interactive rebase, squash, fixup, amend): on a dedicated
|
|
63
|
-
branch, never
|
|
64
|
-
|
|
65
|
-
acceptance first, as for any commit ({{DOCTRINE:consent-before-push}}).
|
|
63
|
+
branch, never the main branch, as the only change in flight ({{LAW:one-intent-one-act}}).
|
|
64
|
+
Present what will change first ({{DOCTRINE:consent-before-push}}).
|
|
66
65
|
6. Verify against `git log --oneline`, `git status` and the diff to the intended state
|
|
67
66
|
— read the output, do not assume the rewrite landed ({{LAW:verify-before-asserting}}).
|
|
68
|
-
7.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
branch without confirming it is safe.
|
|
67
|
+
7. A rewrite needs a `--force-with-lease` push, and a forced push asks: present what
|
|
68
|
+
changed and wait for acceptance ({{DOCTRINE:consent-before-push}} / {{LAW:deletion-is-deliberate}}).
|
|
69
|
+
Never force-push the main branch.
|
|
72
70
|
|
|
73
71
|
## Done when
|
|
74
72
|
- **Part A:** the question is answered with specific commit(s) and the output that
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# {{SKILL}}: herdr
|
|
2
|
+
|
|
3
|
+
> {{DESC_HERDR}}
|
|
4
|
+
|
|
5
|
+
{{CREDIT:herdr:skills/herdr/SKILL.md}}
|
|
6
|
+
|
|
7
|
+
**Trigger:** the user explicitly mentions Herdr, or asks to use Herdr to inspect or control panes, tabs, workspaces, commands or another agent. Do not use it only because a task could benefit from a background terminal, delegation or parallel work. Requires `HERDR_ENV=1`.
|
|
8
|
+
|
|
9
|
+
Herdr organizes terminals into workspaces, tabs and panes, recognizes coding agents running inside panes, and exposes the current session through the `herdr` CLI.
|
|
10
|
+
|
|
11
|
+
## Gate: are you inside Herdr?
|
|
12
|
+
|
|
13
|
+
Before any control command, verify that this agent runs inside a Herdr-managed pane:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
test "${HERDR_ENV:-}" = 1
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
On native Windows (PowerShell): `$env:HERDR_ENV -eq '1'`. Herdr's v0.9.5 "Windows support" docs page says native Windows support is generally available, with some capabilities that differ from Linux and macOS. The same page lists "Signed binary / SmartScreen avoidance" as unsupported, so SmartScreen may warn. The v0.9.5 release ships `herdr-windows-x86_64.zip` as its only Windows asset.
|
|
20
|
+
|
|
21
|
+
If the check fails, say that you are not running inside Herdr and stop. Do not inspect or control the focused Herdr session from outside Herdr. When the check passes, the `herdr` binary on `PATH` talks to the current session.
|
|
22
|
+
|
|
23
|
+
## Learn the current CLI
|
|
24
|
+
|
|
25
|
+
The installed binary is the authority for command syntax. Start with `herdr --help`, then print a command group by running it without a subcommand: `herdr agent`, `herdr pane`, `herdr workspace`, `herdr tab`, `herdr worktree`, `herdr terminal`, `herdr notification`, `herdr integration`, `herdr session`, `herdr machine`.
|
|
26
|
+
|
|
27
|
+
- Do not run bare `herdr` for discovery: it launches or attaches the TUI.
|
|
28
|
+
- Do not probe a mutating nested command by omitting arguments. Commands such as `herdr workspace create` are valid with defaults and will execute.
|
|
29
|
+
- Most control commands return JSON. Read identifiers and state from those responses instead of predicting them.
|
|
30
|
+
|
|
31
|
+
## Layout, panes and agents
|
|
32
|
+
|
|
33
|
+
- Workspace, tab and pane topology organize terminal locations.
|
|
34
|
+
- Pane commands control raw terminals, shells, tests, servers, input and output.
|
|
35
|
+
- Agent commands control the recognized coding agent that occupies a pane.
|
|
36
|
+
|
|
37
|
+
A pane exists whether or not it holds an agent. `agent start` requires an existing available shell pane and never creates, splits or moves layout. Use pane commands for ordinary processes; use agent commands when Herdr must validate agent identity or interpret the `idle`, `working`, `blocked`, `done` and `unknown` states.
|
|
38
|
+
|
|
39
|
+
Agent commands accept a unique live agent name or the pane ID that hosts that agent, never a terminal ID or a bare agent-kind label. Names match `[a-z][a-z0-9_-]{0,31}` and are unique among live agents. A name follows the current pane occupant and is cleared when that agent exits, is released or is replaced. A retained identity (Ctrl+Z, then a non-agent command) does not mean the agent is in the foreground: inspect the pane before you send input.
|
|
40
|
+
|
|
41
|
+
- `idle` and `done` normally mean ready for input, but neither proves an unfamiliar approval dialog was recognized. Antigravity and Grok can be idle while background tasks keep running.
|
|
42
|
+
- `blocked` means Herdr recognized an approval or question UI.
|
|
43
|
+
- `unknown` means an agent is present but Herdr cannot classify it; it does not prove completion.
|
|
44
|
+
- The CLI and each TUI client track seen state apart, so a Done badge can differ between them.
|
|
45
|
+
|
|
46
|
+
## IDs and caller context
|
|
47
|
+
|
|
48
|
+
Public IDs are opaque stable handles: workspace `w1`, tab `w1:t1`, pane `w1:p1`. Closed tab and pane IDs are not reused. A pane moved into another workspace gets a new ID: after `pane move`, continue with `.result.move_result.pane.pane_id` or the live agent name.
|
|
49
|
+
|
|
50
|
+
Herdr injects the caller's context into each managed pane: `$HERDR_WORKSPACE_ID`, `$HERDR_TAB_ID`, `$HERDR_PANE_ID`. Prefer `--current` when a pane command should target the calling pane. Other commands may use the UI-focused pane, which can belong to the user or another client.
|
|
51
|
+
|
|
52
|
+
Discover live state:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
herdr workspace list
|
|
56
|
+
herdr tab list --workspace "$HERDR_WORKSPACE_ID"
|
|
57
|
+
herdr pane current --current
|
|
58
|
+
herdr pane list --workspace "$HERDR_WORKSPACE_ID"
|
|
59
|
+
herdr agent list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Creation responses expose the next IDs: `workspace create` returns `.result.workspace`, `.result.tab` and `.result.root_pane`; `tab create` returns `.result.tab` and `.result.root_pane`; `pane split` returns `.result.pane`.
|
|
63
|
+
|
|
64
|
+
### Saved SSH machines
|
|
65
|
+
|
|
66
|
+
IDs and agent names are scoped to one server. Selecting a machine in the TUI does not retarget your pane's commands. To control a saved machine, put the same prefix on discovery and every later command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
herdr --machine <label-or-id> agent list
|
|
70
|
+
herdr --machine <label-or-id> agent prompt <remote-agent-name> "Reply with your current status." --wait --timeout 120000
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- The selector is an enabled saved profile ID or a unique, case-sensitive label, never an arbitrary hostname. Do not combine `--machine` with `--session` or `--remote`. Local IDs and `--current` do not identify remote panes.
|
|
74
|
+
- Forwarding never installs, starts or restarts a server. A connection failure does not prove a mutation was not applied: inspect remote state before you retry.
|
|
75
|
+
- `herdr machine list` lists saved profiles (`--json` for scripts); `herdr machine status [<label-or-id>] --json` diagnoses one. Add, remove, enable or disable profiles only when the user asks.
|
|
76
|
+
- `herdr machine reconnect` needs the user to complete SSH authentication; do not run it for them. Never approve replacing an incompatible server without the user's consent.
|
|
77
|
+
|
|
78
|
+
## Start and coordinate an agent
|
|
79
|
+
|
|
80
|
+
Default to a sibling pane in the current tab and working directory. Do not create a workspace, tab, worktree or other cwd unless the user asks for it. Honor a direction the user names; otherwise read `herdr pane layout --pane "$HERDR_PANE_ID"` and split a wide pane right, a narrow or tall one down:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
herdr pane split --current --direction right --cwd "$PWD" --no-focus
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Read the new pane ID from `.result.pane.pane_id`. The pane must sit at its interactive shell prompt, with nothing in the foreground. Start the agent kind the user asked for (`herdr agent` lists the installed kinds), with a unique name; native agent arguments go after `--`:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
herdr agent start reviewer --kind codex --pane <returned-pane-id> [-- <agent-args...>]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`agent start` returns once Herdr detects the agent ready for input (30 s default timeout). If the agent is blocked during startup it returns `agent_not_ready` but keeps the name for `agent read` and `agent send-keys`; wait until it is idle before you prompt it.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
herdr agent prompt reviewer "Review the current diff and report only actionable findings." --wait --timeout 120000
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- `agent prompt` rejects an agent already at an approval or question dialog with `agent_blocked` before it sends any input. Inspect the blocked UI and ask the user before you answer it.
|
|
99
|
+
- `--wait` waits for the first settled `idle`, `done` or `blocked` state; do not repeat those defaults with `--until`. From a non-working state it must see `working` or `blocked` within five seconds, or it returns `agent_prompt_stalled`. The timeout includes submission time; without one the wait is indefinite.
|
|
100
|
+
- Use `--until` only for a state-specific wait: `herdr agent wait reviewer --until blocked --timeout 120000`.
|
|
101
|
+
- Logical keys for agent UI controls: `herdr agent send-keys reviewer esc`, `... ctrl+c`. Herdr validates all keys before it writes any byte.
|
|
102
|
+
- Read results: `herdr agent get reviewer`, `herdr agent read reviewer --source recent-unwrapped --lines 120`.
|
|
103
|
+
|
|
104
|
+
If a wait fails or returns `blocked`, inspect `agent get` and `agent read` before you send anything. A timeout or stall does not prove the prompt was not delivered: never resubmit it blindly.
|
|
105
|
+
|
|
106
|
+
## Run an ordinary command in another pane
|
|
107
|
+
|
|
108
|
+
Split a sibling pane as above, then:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
herdr pane run <returned-pane-id> "just test"
|
|
112
|
+
herdr pane wait-output <returned-pane-id> --match "test result" --timeout 120000
|
|
113
|
+
herdr pane read <returned-pane-id> --source recent-unwrapped --lines 120
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- `pane run` queues the text and Enter together; success acknowledges admission, not execution. On macOS it rejects a line longer than the terminal's input limit: wait for the prompt before you retry.
|
|
117
|
+
- `pane wait-output` also matches output that already exists. `--match <text>` is a literal substring, `--regex <pattern>` a Rust regex. No `--timeout` means an indefinite wait.
|
|
118
|
+
- Read sources: `visible` (viewport), `recent` (with soft wraps), `recent-unwrapped` (wraps joined; prefer it for logs), `detection` (the agent-detection buffer). `--format ansi` only when colour is evidence.
|
|
119
|
+
- If a larger read still misses a finished response, ask the agent to write it as Markdown in a temporary directory and reply with the path, then read that file. Fallback only.
|
|
120
|
+
|
|
121
|
+
## Safety and coordination
|
|
122
|
+
|
|
123
|
+
- `--no-focus` for background work unless the user asked to switch context.
|
|
124
|
+
- Target with `--current`, an explicit pane ID or a unique agent name, never another client's focused pane. Parse IDs from JSON, never from sidebar order or examples.
|
|
125
|
+
- Do not close workspaces, tabs, panes or sessions you did not create unless the user asked. CLI closes skip the TUI's last-pane confirmation. Never add `workspace close --group` only to get past `workspace_group_close_required`.
|
|
126
|
+
- `--trust-repository` only after the user has verified the repository; it is not a retry for a failed worktree command.
|
|
127
|
+
- Client and server versions can differ after an update: check `herdr status` before you rely on a new server feature. A missing method is not permission to stop or upgrade a server.
|
|
128
|
+
- Never run `herdr server stop` from an active session unless the user means to stop the server and its pane processes. Never kill the main Herdr process; use a named test session for experiments.
|
|
129
|
+
- Server errors are JSON on stderr with exit status 1; CLI syntax errors exit 2.
|
|
130
|
+
|
|
131
|
+
## Done when
|
|
132
|
+
|
|
133
|
+
- Every pane, tab or agent you created for the task is closed or handed to the user by name, and the user's own layout is as you found it.
|
|
134
|
+
|
|
135
|
+
<!-- INCLUDE: skills/_self-improvement.md -->
|
package/src/skills/loop.md
CHANGED
|
@@ -24,8 +24,9 @@ action prints one JSON object — act on its keys, never on your own reading of
|
|
|
24
24
|
1. `git worktree add ../<repo>-loop-<slug> -b loop/<slug>`, then make that worktree the session's
|
|
25
25
|
working directory with its own command. Every later command runs there **as written below**:
|
|
26
26
|
no `cd` prefix, no `git -C`, no quoted refspec — any of those makes the git gate ask.
|
|
27
|
-
2.
|
|
28
|
-
|
|
27
|
+
2. A `loop/*` branch is your own: the git gate lets its commits and plain pushes through
|
|
28
|
+
without asking (under strict consent, exactly the commit form below, on a launched loop).
|
|
29
|
+
Merging into the main branch is never yours.
|
|
29
30
|
|
|
30
31
|
## Compose
|
|
31
32
|
|