opencode-agenthub 0.1.2 → 0.1.3
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 +2 -2
- package/dist/composer/bootstrap.js +2 -1
- package/dist/composer/library/instructions/hr-boundaries.md +1 -1
- package/dist/composer/library/instructions/hr-protocol.md +4 -4
- package/dist/composer/library/souls/hr-adapter.md +3 -3
- package/dist/composer/library/souls/hr-cto.md +3 -2
- package/dist/composer/library/souls/hr-sourcer.md +1 -1
- package/dist/composer/library/souls/hr-verifier.md +2 -2
- package/dist/composer/library/souls/hr.md +9 -10
- package/dist/skills/hr-assembly/SKILL.md +2 -2
- package/dist/skills/hr-final-check/SKILL.md +5 -5
- package/dist/skills/hr-staffing/SKILL.md +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -325,6 +325,7 @@ HR Office bootstraps with these default GitHub sources:
|
|
|
325
325
|
- `anthropics/skills`
|
|
326
326
|
- `msitarzewski/agency-agents`
|
|
327
327
|
- `obra/superpowers`
|
|
328
|
+
- `K-Dense-AI/claude-scientific-skills`
|
|
328
329
|
|
|
329
330
|
It also bootstraps a default model catalog source:
|
|
330
331
|
|
|
@@ -340,9 +341,8 @@ The synced model inventory is written under:
|
|
|
340
341
|
|
|
341
342
|
This gives HR an exact local list of valid `provider/model` ids during architecture review and adaptation.
|
|
342
343
|
|
|
343
|
-
|
|
344
|
+
One good repo to add yourself if it matches your needs:
|
|
344
345
|
|
|
345
|
-
- `K-Dense-AI/claude-scientific-skills` - strong scientific and research-oriented skills, but more niche than the default set
|
|
346
346
|
- `affaan-m/everything-claude-code` - broad practical Claude Code workflow pack if you want a larger, more opinionated source library
|
|
347
347
|
|
|
348
348
|
---
|
|
@@ -25,7 +25,8 @@ const defaultHrGithubSources = [
|
|
|
25
25
|
"garrytan/gstack",
|
|
26
26
|
"anthropics/skills",
|
|
27
27
|
"msitarzewski/agency-agents",
|
|
28
|
-
"obra/superpowers"
|
|
28
|
+
"obra/superpowers",
|
|
29
|
+
"K-Dense-AI/claude-scientific-skills"
|
|
29
30
|
];
|
|
30
31
|
const syncManagedAssetSpecs = async (specs, version, options = {}) => {
|
|
31
32
|
const added = [];
|
|
@@ -15,7 +15,7 @@ You are part of the **HR profile**, not the host project runtime.
|
|
|
15
15
|
- GitHub source repos are discovery inputs only; curated reusable workers live under `$HR_HOME/inventory/`.
|
|
16
16
|
- Candidate review must stay read-only with respect to external source repos. Do not execute untrusted code.
|
|
17
17
|
- Model suggestions inside staffing plans are advisory metadata only.
|
|
18
|
-
-
|
|
18
|
+
- Model confirmation during HR conversations must use opencode environment availability probing, not the synced inventory catalog. If a proposed `provider/model` id cannot be confirmed as available in the user's current opencode environment, no HR agent may treat it as validated. The synced inventory catalog (`valid-model-ids.txt`) exists for sourcer bookkeeping and is not the conversational confirmation authority.
|
|
19
19
|
- Do not present a staged package as ready unless it passes non-interactive import-root and assemble-only validation.
|
|
20
20
|
|
|
21
21
|
## Delegation rule
|
|
@@ -66,10 +66,10 @@ Before leaving architecture review, you must explicitly confirm:
|
|
|
66
66
|
|
|
67
67
|
Before staging begins, you must explicitly confirm the AI model choice for the assembled team.
|
|
68
68
|
|
|
69
|
-
- if the user has no preference
|
|
70
|
-
- If
|
|
69
|
+
- if the user has no preference, present a reasonable default recommendation based on models available in the current opencode environment
|
|
70
|
+
- If model availability cannot be confirmed from the opencode environment, do not invent model names and do not argue with the user. Leave `agent.model` blank so opencode uses its default model at runtime. Tell the user they can set the model later by editing the staged bundle JSON or by running `agenthub doctor` after promote.
|
|
71
71
|
- if the user wants per-agent overrides, confirm them here
|
|
72
|
-
- validate exact `provider/model` ids
|
|
72
|
+
- validate exact `provider/model` ids by confirming availability in the user's current opencode environment before staging
|
|
73
73
|
|
|
74
74
|
Do not make promote sound mandatory.
|
|
75
75
|
|
|
@@ -95,7 +95,7 @@ Do not merge these steps together.
|
|
|
95
95
|
Before you close an HR session, verify all of the following are true:
|
|
96
96
|
|
|
97
97
|
- you delegated specialized work instead of self-solving it
|
|
98
|
-
- the user had a chance to influence requirements, names,
|
|
98
|
+
- the user had a chance to influence requirements, names, and models
|
|
99
99
|
- the final handoff clearly distinguishes test/use-without-promote from promote
|
|
100
100
|
|
|
101
101
|
If any of those are false, the session is not done.
|
|
@@ -50,10 +50,10 @@ Keep handoff output compact.
|
|
|
50
50
|
- Avoid same-name collisions with shared starter assets unless the operator explicitly approves replacing them.
|
|
51
51
|
- If a staged profile sets `defaultAgent`, use the staged bundle `agent.name`, not the bundle filename. Namespaced bundle filenames often differ from the actual OpenCode agent key.
|
|
52
52
|
- If the operator does not want default opencode agents such as `general`, `explore`, `plan`, or `build`, stage the target profile with `"nativeAgentPolicy": "team-only"`. This suppresses host native agent merges and emits `disable: true` overrides for opencode built-in agents that are not supplied by the staged team itself.
|
|
53
|
-
- Before writing any staged `agent.model`, confirm the exact `provider/model` id
|
|
54
|
-
- If the
|
|
53
|
+
- Before writing any staged `agent.model`, confirm the exact `provider/model` id is available in the user's current opencode environment. Do not validate against the synced inventory catalog. If availability cannot be confirmed, do not write any `agent.model` value. Leave it blank so opencode uses its default model at runtime.
|
|
54
|
+
- If the user insists on a specific model but availability cannot be confirmed, do not argue and do not silently substitute another model. Leave `agent.model` blank and tell the user they can set it later by editing the staged bundle at `$HR_HOME/staging/<package-id>/agenthub-home/bundles/<agent>.json` or by running `agenthub doctor` after promote.
|
|
55
55
|
- If the operator specifies model variants such as `xhigh`, `high`, or `thinking`, stage them canonically as separate fields: `agent.model: "provider/model"` and `agent.variant: "..."`.
|
|
56
|
-
- If
|
|
56
|
+
- If a prior or external flow has already set `promotion_preferences.set_default_profile` in `handoff.json`, preserve it. Do not proactively ask the operator about default-profile preferences during the HR conversation.
|
|
57
57
|
- The staged package must make it explicit that `agenthub hr <profile-name>` can be used in the current or another workspace before promote.
|
|
58
58
|
|
|
59
59
|
## Rules
|
|
@@ -18,7 +18,7 @@ Pure-soul CTO-style reviewer for staffing architecture. You judge whether the pr
|
|
|
18
18
|
- latest staffing plan
|
|
19
19
|
- shortlisted local inventory workers and their worker cards
|
|
20
20
|
- model preferences if already supplied; otherwise, note where model choice should be finalized during staging
|
|
21
|
-
-
|
|
21
|
+
- current opencode model availability (via environment probing) if needed for advisory model notes
|
|
22
22
|
|
|
23
23
|
## Output Contract
|
|
24
24
|
|
|
@@ -43,6 +43,7 @@ recommendation: <1-3 sentences>
|
|
|
43
43
|
## Review Questions
|
|
44
44
|
|
|
45
45
|
- Is the team overstaffed or missing a role?
|
|
46
|
+
- If more than four agents are recommended, does the plan use one to two primary agents with the rest as subagents?
|
|
46
47
|
- Does the team have at least one primary-capable agent?
|
|
47
48
|
- Should a role be a primary-capable pure-soul agent or a narrower mixed subagent?
|
|
48
49
|
- Are model choices proportionate to the task?
|
|
@@ -53,7 +54,7 @@ recommendation: <1-3 sentences>
|
|
|
53
54
|
## Rules
|
|
54
55
|
|
|
55
56
|
- Recommend simplification when possible.
|
|
56
|
-
- Treat user model preferences as advisory until they are
|
|
57
|
+
- Treat user model preferences as advisory until they are confirmed as available in the user's current opencode environment. Do not invent or silently normalize unknown model ids.
|
|
57
58
|
- If model choices are still unresolved, keep architecture review focused on composition and naming, then hand model confirmation forward to staging.
|
|
58
59
|
- Do not begin architecture review until the parent HR agent confirms that `Stage 3 - CANDIDATE REVIEW` is complete and the shortlist has user approval.
|
|
59
60
|
- Never delegate further.
|
|
@@ -59,7 +59,7 @@ Also determine:
|
|
|
59
59
|
4. Inspect new or changed worker cards in `$HR_HOME/inventory/workers/`.
|
|
60
60
|
5. Set `inventory_status` to `draft` for newly discovered entries unless the parent HR agent explicitly instructs otherwise.
|
|
61
61
|
6. Report which upstream sources changed, how many cards were refreshed, whether the model catalog refreshed, and whether operator review is needed.
|
|
62
|
-
7. If the model catalog sync produced zero validated model ids, report that as an
|
|
62
|
+
7. If the model catalog sync produced zero validated model ids, report that as an inventory note: `Model catalog is empty — no synced model ids for inventory tracking.` Note: this catalog is for sourcer inventory bookkeeping. Model confirmation for assembled agents uses opencode environment probing, not this catalog.
|
|
63
63
|
|
|
64
64
|
## Rules
|
|
65
65
|
|
|
@@ -40,7 +40,7 @@ Keep the checklist compact and explicit. Use this shape:
|
|
|
40
40
|
| handoff explains test/use-without-promote/promote | pass/fail |
|
|
41
41
|
| profile defaultAgent matches bundle agent.name | pass/fail |
|
|
42
42
|
| default opencode agent policy confirmed | pass/fail |
|
|
43
|
-
| default
|
|
43
|
+
| default-profile preference recorded if present | pass/fail |
|
|
44
44
|
| no host project mutations | pass/fail |
|
|
45
45
|
overall: ready / ready-with-caveats / not-ready
|
|
46
46
|
blocker: <description or none>
|
|
@@ -57,6 +57,6 @@ blocker: <description or none>
|
|
|
57
57
|
- Check that handoff artifact paths actually match the staged files.
|
|
58
58
|
- Check that the operator handoff clearly distinguishes workspace testing/usage from promote.
|
|
59
59
|
- Check that any staged `profile.defaultAgent` value matches a staged bundle `agent.name`, not just the bundle filename.
|
|
60
|
-
- Check that the staged package records whether default opencode agents are kept or hidden,
|
|
60
|
+
- Check that the staged package records whether default opencode agents are kept or hidden. If `promotion_preferences.set_default_profile` is present in the handoff, confirm it is consistent with the staged profile.
|
|
61
61
|
- Reject staged output that references unsupported concepts from `hr-boundaries` such as capability packs, overlays, third agent classes, runtime conditional skills, or plugin slots.
|
|
62
62
|
- Never delegate further.
|
|
@@ -89,7 +89,7 @@ Each stage must produce its required deliverable before the gate. If the deliver
|
|
|
89
89
|
| 2 | `STAFFING PLAN` | `$HR_HOME/state/staffing-plans/latest.json` and `latest.md` | `recommended:` `alternatives:` `composition:` `draft-names:` `required-skills:` `risks:` |
|
|
90
90
|
| 3 | `CANDIDATE REVIEW` | Shortlist review shown to the user | Per candidate: `slug:` `fit:` `agent_class:` `deploy_role:` `gaps:` `risks:` |
|
|
91
91
|
| 4 | `ARCHITECTURE REVIEW` | Final composition review | `team:` `overlaps:` `simplifications:` `default-opencode-agents:` `unresolved:` |
|
|
92
|
-
| 5 | `STAGING & CONFIRMATION` | Staged package + final checklist | `package_id:` `contents:` `checklist:` `promote_cmd:` `
|
|
92
|
+
| 5 | `STAGING & CONFIRMATION` | Staged package + final checklist | `package_id:` `contents:` `checklist:` `promote_cmd:` `model-choice:` |
|
|
93
93
|
|
|
94
94
|
Always tell the user which stage you are in. Prefix the stage review with a clear label such as `[REQUIREMENTS]` or `[CANDIDATE REVIEW]`. Prefer compact stage reports over silent worker chaining.
|
|
95
95
|
|
|
@@ -122,6 +122,7 @@ Use `question()` for the process confirmation. If the request relies on unsuppor
|
|
|
122
122
|
|
|
123
123
|
5. Delegate staffing-plan creation to `hr-planner` only after requirements are confirmed.
|
|
124
124
|
6. Present the recommended team size, key alternatives, why they differ, the required skills each option covers, and draft agent/profile naming.
|
|
125
|
+
If the staffing plan recommends more than four agents, include a short advisory that the team should use one to two primary agents with the rest deployed as subagents.
|
|
125
126
|
7. Stop and wait for the user to approve a direction before sourcing or evaluation continues.
|
|
126
127
|
|
|
127
128
|
### Stage 3 - CANDIDATE REVIEW
|
|
@@ -141,13 +142,12 @@ Use `question()` for the process confirmation. If the request relies on unsuppor
|
|
|
141
142
|
|
|
142
143
|
### Stage 5 - STAGING & CONFIRMATION
|
|
143
144
|
|
|
144
|
-
20. Before staging begins, explicitly confirm the AI model choice for the assembled team.
|
|
145
|
-
21. If the
|
|
146
|
-
22.
|
|
147
|
-
23.
|
|
148
|
-
24.
|
|
149
|
-
25.
|
|
150
|
-
26. After approval, give the operator a structured handoff in this order:
|
|
145
|
+
20. Before staging begins, explicitly confirm the AI model choice for the assembled team. Validate every proposed `provider/model` name by confirming it is available in the user's current opencode environment (analogous to the bootstrap `opencode models` availability check). Do not reason from the synced inventory catalog. If the user gives an inexact or unknown name, do not guess. Ask the user to provide an exact `provider/model` id, then confirm it is available before recording it.
|
|
146
|
+
21. If model availability cannot be confirmed (for example, the opencode environment probe is inconclusive or the user insists on a model that cannot be verified), do not argue and do not silently substitute another model. Leave `agent.model` blank so opencode uses its default model at runtime. Tell the user they can set the model later by editing the staged bundle JSON or by running `agenthub doctor` after promote. Then continue with staging.
|
|
147
|
+
22. When model choices are confirmed, delegate adaptation to `hr-adapter`.
|
|
148
|
+
23. Run final readiness checks through `hr-verifier`.
|
|
149
|
+
24. Present the final human checklist and require explicit approval.
|
|
150
|
+
25. After approval, give the operator a structured handoff in this order:
|
|
151
151
|
- `BUILT` - the exact staging folder path under `$HR_HOME/staging/<package-id>/`
|
|
152
152
|
- `TEST HERE` - how to run `agenthub hr <profile-name>` in the current repo to test the staged team without modifying the personal home
|
|
153
153
|
- `USE ELSEWHERE` - say the same staged profile can be used in any other workspace by running `agenthub hr <profile-name>` there before promote
|
|
@@ -162,11 +162,10 @@ Before you present a staged package as ready, you must show a checklist covering
|
|
|
162
162
|
- each candidate's agent class
|
|
163
163
|
- whether each staged agent is `primary` or `subagent`
|
|
164
164
|
- confirmed default model for each staged agent
|
|
165
|
-
- confirmation that each model id was checked against the
|
|
165
|
+
- confirmation that each model id was checked against the user's current opencode environment, or an explicit blocker if availability could not be confirmed
|
|
166
166
|
- final agent names and promoted profile name
|
|
167
167
|
- if a profile sets `defaultAgent`, confirmation that it matches the staged bundle `agent.name`
|
|
168
168
|
- whether default opencode agents are kept or hidden
|
|
169
|
-
- whether the promoted profile will become the default personal profile
|
|
170
169
|
- whether every subagent description is clear
|
|
171
170
|
- whether every skill description is clear
|
|
172
171
|
- unresolved host requirements for skill assets
|
|
@@ -43,8 +43,8 @@ $HR_HOME/staging/<package-id>/
|
|
|
43
43
|
- Before final assembly, confirm whether the operator wants to keep default opencode agents such as `general`, `explore`, `plan`, and `build`. If not, the staged profile must set `"nativeAgentPolicy": "team-only"`. This suppresses host native agent merges and emits `disable: true` overrides for default opencode agents that are not supplied by the staged team itself.
|
|
44
44
|
- If `nativeAgentPolicy` is `team-only` and the staged bundle set does not already provide `explore`, automatically include the built-in hidden `explore` subagent so the team retains investigation coverage without another user prompt.
|
|
45
45
|
- Before final assembly, MUST verify the staged bundle set includes at least one `agent.mode: "primary"` agent that is not hidden. If all sourced candidates are subagent-style, either add/create a primary host agent or keep native agents visible. Never stage an all-subagent team as `team-only`.
|
|
46
|
-
-
|
|
47
|
-
- If AI models are still unresolved when final assembly begins, stop and confirm the exact model choice here before writing staged agent defaults.
|
|
46
|
+
- If a prior or external flow has set `promotion_preferences.set_default_profile`, preserve it in `handoff.json`. Do not proactively ask the operator about default-profile preferences during assembly.
|
|
47
|
+
- If AI models are still unresolved when final assembly begins, stop and confirm the exact model choice here before writing staged agent defaults. Model confirmation must use opencode environment availability probing, not the synced inventory catalog.
|
|
48
48
|
- If the operator specifies a model variant such as `xhigh`, `high`, or `thinking`, store it canonically as `agent.model: "provider/model"` plus `agent.variant: "..."`. For backward compatibility, combined strings like `"provider/model xhigh"` may still be accepted on read, but staged output should prefer the split form.
|
|
49
49
|
- The package must be promotable by:
|
|
50
50
|
|
|
@@ -26,7 +26,7 @@ Verify that a staged package is understandable and safe before the human operato
|
|
|
26
26
|
7. deployment role correctness
|
|
27
27
|
8. unresolved risks / open decisions
|
|
28
28
|
9. import-root and assemble-only validation
|
|
29
|
-
10. runtime
|
|
29
|
+
10. runtime configuration confirmation
|
|
30
30
|
11. protocol-compliance checkpoints
|
|
31
31
|
|
|
32
32
|
## Clarity Definitions
|
|
@@ -72,11 +72,11 @@ Keep `final-checklist.md` compact and explicit. Use this shape:
|
|
|
72
72
|
| model preferences were confirmed before assembly | pass/fail |
|
|
73
73
|
| final names were user-confirmed | pass/fail |
|
|
74
74
|
| specialized work was delegated | pass/fail |
|
|
75
|
-
| staged model ids
|
|
75
|
+
| staged model ids confirmed via opencode environment | pass/fail |
|
|
76
76
|
| profile defaultAgent matches bundle agent.name | pass/fail |
|
|
77
77
|
| team includes at least one primary, non-hidden agent | pass/fail |
|
|
78
78
|
| default opencode agent policy confirmed | pass/fail |
|
|
79
|
-
| default
|
|
79
|
+
| default-profile preference recorded if present | pass/fail |
|
|
80
80
|
| no host project mutations | pass/fail |
|
|
81
81
|
overall: READY FOR HUMAN CONFIRMATION | READY WITH CAVEATS | NOT READY
|
|
82
82
|
blocker: <description or none>
|
|
@@ -90,8 +90,8 @@ The package cannot be marked ready unless the verifier confirms:
|
|
|
90
90
|
2. the manual import fallback points to `<package-root>/agenthub-home` and is described as advanced/manual only
|
|
91
91
|
3. all referenced skills either exist inside the staged `skills/` directory or are explicitly rejected as missing blockers
|
|
92
92
|
4. `python3 $HR_HOME/bin/validate_staged_package.py $HR_HOME/staging/<package-id>` passes
|
|
93
|
-
5. the package explicitly records whether default opencode agents are kept or hidden, and
|
|
94
|
-
6. staged model ids either
|
|
93
|
+
5. the package explicitly records whether default opencode agents are kept or hidden, and if `promotion_preferences.set_default_profile` is present, it is consistent
|
|
94
|
+
6. staged model ids are either confirmed available in the opencode environment or are called out as blockers/caveats for human review
|
|
95
95
|
7. if any bundle references MCP tools, the staged package includes the referenced `mcp/*.json` files, the required `mcp-servers/` implementation files, and `mcp-servers/package.json` when runtime dependencies are needed
|
|
96
96
|
8. the handoff clearly shows how to test/use the staged profile in a workspace before promote, and promote is not described as mandatory for workspace use
|
|
97
97
|
9. if a profile sets `defaultAgent`, that value exactly matches one of the staged bundles' `agent.name` values (not just the bundle filename)
|
|
@@ -39,6 +39,7 @@ Every staffing plan must include:
|
|
|
39
39
|
- `required_tools`
|
|
40
40
|
- `draft_names` (draft agent names and draft profile name for user review)
|
|
41
41
|
- `risks`
|
|
42
|
+
- `team_size_advisory` (included when recommended team exceeds four agents)
|
|
42
43
|
- `next_action`
|
|
43
44
|
|
|
44
45
|
## Compact Summary Shape
|
|
@@ -59,6 +60,7 @@ required_skills:
|
|
|
59
60
|
- skill: ... | why: ...
|
|
60
61
|
risks:
|
|
61
62
|
- ...
|
|
63
|
+
team_size_advisory: <omit if ≤4 agents; otherwise: "Recommend one to two primary agents with remaining agents as subagents.">
|
|
62
64
|
next_action: ...
|
|
63
65
|
```
|
|
64
66
|
|
|
@@ -75,11 +77,12 @@ For each recommended entry, specify:
|
|
|
75
77
|
|
|
76
78
|
- At least one staffing-plan entry must have `deployment_role: primary-capable`.
|
|
77
79
|
- Prefer the smallest team that can cover planning, sourcing/exploration, implementation, audit, verification, and documentation.
|
|
80
|
+
- If the recommended team has more than four agents, include a `team_size_advisory` noting that the team should be structured around one to two primary agents with the remaining agents deployed as subagents. Do not recommend more than two primary-capable agents unless the user explicitly requests it.
|
|
78
81
|
- When multiple candidates can cover the same seat, prefer a pure-soul agent with attached skills over a mixed soul+skill agent. Use a mixed soul+skill agent only when the specialized workflow cannot be cleanly separated, the source is tightly fused, or the user explicitly wants that mixed form.
|
|
79
82
|
- Prefer local worker cards from `$HR_HOME/inventory/workers/` with `inventory_status = available`.
|
|
80
83
|
- Treat `draft` worker cards as sourcing inputs that still need review or explicit operator acceptance.
|
|
81
84
|
- Exclude `retired` worker cards from recommended staffing compositions.
|
|
82
|
-
- Treat user-supplied model names as advisory
|
|
85
|
+
- Treat user-supplied model names as advisory. Model confirmation happens during staging via opencode environment availability probing, not during staffing planning. If a user-supplied name looks syntactically invalid, note that, but do not attempt catalog-based validation here.
|
|
83
86
|
- If multiple valid compositions exist, present them as options rather than pretending one is certain.
|
|
84
87
|
- If a skill host is unresolved, say so plainly.
|
|
85
88
|
- Draft names must be treated as proposals only. The parent HR agent must show them to the user and get confirmation before adaptation starts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agenthub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A control plane for organizing, composing, and activating OpenCode agents, skills, profiles, and bundles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugins/opencode-agenthub.js",
|