opencode-onboard 0.1.4 → 0.1.5

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.
@@ -72,3 +72,10 @@ Rules:
72
72
  **Files changed:** <list>
73
73
  **Blockers:** none | <description>
74
74
  ```
75
+
76
+ ## Session Log
77
+
78
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
79
+ - On start: `| {ISO timestamp} | back-engineer | started | {task summary} |`
80
+ - On skill load: `| {ISO timestamp} | back-engineer | skill-loaded | {skill-name} |`
81
+ - On done: `| {ISO timestamp} | back-engineer | completed | {files changed count} files |`
@@ -56,10 +56,11 @@ Rules:
56
56
  1. Verify all changes are on a feature branch, never `main`
57
57
  2. Load the matching pullrequest skill
58
58
  3. Capture screenshots of local running app if UI changes exist
59
- 4. Commit and push the feature branch
60
- 5. Create the PR following the skill instructions
61
- 6. Post PR comment with screenshots and change summary
62
- 7. Report PR URL to the lead
59
+ 4. Read `.agents/session-log.md` if it exists — include a "Session Activity" section in the PR description with agent names, task counts, and total duration
60
+ 5. Commit and push the feature branch
61
+ 6. Create the PR following the skill instructions
62
+ 7. Post PR comment with screenshots and change summary
63
+ 8. Report PR URL to the lead
63
64
 
64
65
  ### Feedback Mode (PR review loop)
65
66
  1. Load the matching pullrequest observer skill
@@ -106,3 +107,10 @@ Rules:
106
107
  **Questions for human:** <count>, <list>
107
108
  **Acknowledged only:** <count>
108
109
  ```
110
+
111
+ ## Session Log
112
+
113
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
114
+ - On start: `| {ISO timestamp} | devops-manager | started | {mode} mode |`
115
+ - On skill load: `| {ISO timestamp} | devops-manager | skill-loaded | {skill-name} |`
116
+ - On done: `| {ISO timestamp} | devops-manager | completed | {summary} |`
@@ -71,3 +71,10 @@ Rules:
71
71
  **Files changed:** <list>
72
72
  **Blockers:** none | <description>
73
73
  ```
74
+
75
+ ## Session Log
76
+
77
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
78
+ - On start: `| {ISO timestamp} | front-engineer | started | {task summary} |`
79
+ - On skill load: `| {ISO timestamp} | front-engineer | skill-loaded | {skill-name} |`
80
+ - On done: `| {ISO timestamp} | front-engineer | completed | {files changed count} files |`
@@ -72,3 +72,10 @@ Rules:
72
72
  **Resources affected:** <list>
73
73
  **Blockers:** none | <description>
74
74
  ```
75
+
76
+ ## Session Log
77
+
78
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
79
+ - On start: `| {ISO timestamp} | infra-engineer | started | {task summary} |`
80
+ - On skill load: `| {ISO timestamp} | infra-engineer | skill-loaded | {skill-name} |`
81
+ - On done: `| {ISO timestamp} | infra-engineer | completed | {files changed count} files |`
@@ -72,3 +72,10 @@ Rules:
72
72
  **Acceptance criteria:** met | <unmet items>
73
73
  **Blockers:** none | <description>
74
74
  ```
75
+
76
+ ## Session Log
77
+
78
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
79
+ - On start: `| {ISO timestamp} | quality-engineer | started | {task summary} |`
80
+ - On skill load: `| {ISO timestamp} | quality-engineer | skill-loaded | {skill-name} |`
81
+ - On done: `| {ISO timestamp} | quality-engineer | completed | {tests added count} tests |`
@@ -82,3 +82,10 @@ Rules:
82
82
 
83
83
  **Blockers:** none | <critical findings that must be resolved before PR>
84
84
  ```
85
+
86
+ ## Session Log
87
+
88
+ Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
89
+ - On start: `| {ISO timestamp} | security-auditor | started | {task summary} |`
90
+ - On skill load: `| {ISO timestamp} | security-auditor | skill-loaded | {skill-name} |`
91
+ - On done: `| {ISO timestamp} | security-auditor | completed | {findings count} findings |`
package/content/AGENTS.md CHANGED
@@ -65,6 +65,72 @@ Replace the entire contents of this file (`AGENTS.md`) with everything below the
65
65
 
66
66
  ---
67
67
 
68
+ ### Step 4b, Patch opsx-apply for ensemble
69
+
70
+ Read `.opencode/commands/opsx-apply.md`. Find the step that instructs the agent to **implement tasks directly** — it will contain phrases like "make the code changes", "implement tasks", "loop until done or blocked". This step tells the agent to write code itself.
71
+
72
+ **Replace that step and everything after it** (completion output, pause output, guardrails, fluid workflow) with the following:
73
+
74
+ ```markdown
75
+ 6. **Implement via ensemble team**
76
+
77
+ NEVER implement tasks directly. Always delegate to specialists via ensemble.
78
+
79
+ a. Create feature branch if not already on one: `feature/{id}-{slug}`
80
+ b. Create team:
81
+ ```
82
+ team_create "<change-name>"
83
+ ```
84
+ Announce: "Team running. Monitor at http://localhost:4747/"
85
+
86
+ c. Spawn only what the tasks require (in parallel):
87
+ ```
88
+ team_spawn name:front agent:front-engineer → UI/frontend tasks
89
+ team_spawn name:back agent:back-engineer → backend/API tasks
90
+ team_spawn name:infra agent:infra-engineer → infra/pipeline tasks
91
+ ```
92
+ Pass each specialist: their relevant tasks + all context file paths from step above.
93
+ Log each spawn to `.agents/session-log.md` (see Session Log section).
94
+
95
+ d. Wait for all → `team_results` → `team_shutdown` + `team_merge`
96
+
97
+ 7. **Quality check**
98
+
99
+ ```
100
+ team_spawn name:quality agent:quality-engineer
101
+ ```
102
+ Wait → `team_results` → fix blockers → `team_shutdown`
103
+
104
+ 8. **Mark tasks complete in openspec**
105
+
106
+ After specialists finish, update the tasks file: `- [ ]` → `- [x]` for each completed task.
107
+ Run `openspec status --change "<name>" --json` to confirm progress.
108
+
109
+ 9. **On completion or pause, show status**
110
+
111
+ Display:
112
+ - Tasks completed this session
113
+ - Overall progress: "N/M tasks complete"
114
+ - If all done: suggest archive with `/opsx-archive`
115
+ - If paused: explain why and wait for guidance
116
+
117
+ Then run `team_cleanup`.
118
+
119
+ **Guardrails**
120
+ - NEVER implement tasks directly — always use `team_create` + `team_spawn`
121
+ - Always read context files before spawning (from the apply instructions output)
122
+ - Always pass context file paths and task list to spawned specialists
123
+ - Mark tasks complete in openspec AFTER specialists finish, not before
124
+ - If task is ambiguous, pause and ask before spawning
125
+ - If implementation reveals issues, pause and suggest artifact updates
126
+ - Pause on errors, blockers, or unclear requirements — don't guess
127
+ - Use contextFiles from CLI output, don't assume specific file names
128
+ ```
129
+
130
+ Keep all steps before the implementation step unchanged — they are openspec's domain (select change, check status, get instructions, read context, show progress).
131
+
132
+ ---
133
+
68
134
  ### Step 5, Confirm
69
135
 
70
136
  Tell the user:
@@ -108,9 +174,9 @@ This is the agent orchestration layer for your project. It provides:
108
174
  When the user provides a work item URL, says "implement the plan", or "I've added comments to the PR", **I own the full lifecycle**. I load the appropriate skill and use ensemble tools (`team_create`, `team_spawn`, etc.) to coordinate the agent team.
109
175
 
110
176
  Trigger patterns:
111
- - `work on this <azure-devops-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
112
- - `work on this <github-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
113
- - `implement the plan` → load skill `openspec-apply-change` implement → ship
177
+ - `work on this <azure-devops-url>` → spawn `devops-manager` in read mode → propose OpenSpec → **confirm with user** → implement → ship
178
+ - `work on this <github-url>` → spawn `devops-manager` in read mode → propose OpenSpec → **confirm with user** → implement → ship
179
+ - `implement the plan` → run `/opsx-apply` (ensemble orchestration is built into the command) → ship
114
180
  - `I've added comments to the PR` → spawn `devops-manager` in feedback mode → fix → update PR
115
181
 
116
182
  **Never delegate without a plan. Never write implementation code directly, always spawn specialists.**
@@ -166,21 +232,17 @@ devops-manager (ship mode)
166
232
  1. team_spawn devops-manager (read mode) → fetch work item via skill, output summary
167
233
  2. Load skill: openspec-propose → generate proposal.md, specs/, tasks.md
168
234
  - team_create → spawn design + specs in parallel → merge → write tasks.md
169
- 3. Show summary, confirm with user before implementing
235
+ 3. Show the plan: change name, schema, total tasks, task list summary
236
+ 4. STOP. Ask user: "Ready to implement? (yes/no)" — DO NOT proceed until confirmed.
170
237
  ```
171
238
 
172
239
  ### Phase 2, Implement
173
240
 
174
241
  ```
175
- 1. Load skill: openspec-apply-change → get apply instructions
176
- 2. Create feature branch: feature/{id}-{slug}
177
- 3. team_create "<change-name>"
178
- 4. Announce: "Team running. Monitor at http://localhost:4747/"
179
- 5. Spawn only what the task needs (in parallel):
180
- team_spawn name:front agent:front-engineer → UI tasks
181
- team_spawn name:back agent:back-engineer → backend tasks
182
- team_spawn name:infra agent:infra-engineer → infra tasks
183
- 6. Wait for all → team_results → team_shutdown + team_merge
242
+ 1. Run /opsx-apply (or load skill openspec-apply-change)
243
+ The command handles context reading, ensemble orchestration, and task marking automatically.
244
+ DO NOT implement tasks directly — the command spawns specialists via ensemble.
245
+ 2. After /opsx-apply completes, proceed to quality check.
184
246
  ```
185
247
 
186
248
  ### Phase 3, Quality
@@ -277,6 +339,52 @@ Example: `feature/42-add-user-auth`
277
339
 
278
340
  ---
279
341
 
342
+ ## Session Log
343
+
344
+ <!-- session-logging: enabled -->
345
+
346
+ All agents MUST log their activity to `.agents/session-log.md`. This file is gitignored and temporary.
347
+
348
+ **Check before logging:** Read the `session-logging` comment above. If it says `disabled`, skip all logging.
349
+
350
+ **On first write per session**, create the file with the header:
351
+ ```markdown
352
+ # Session Log
353
+
354
+ | Timestamp | Agent | Action | Detail |
355
+ |-----------|-------|--------|--------|
356
+ ```
357
+
358
+ **Log these events** by appending a row:
359
+ - Lead spawns an agent → `| {ISO timestamp} | lead | spawned | {agent-name} for {purpose} |`
360
+ - Agent starts → `| {ISO timestamp} | {agent-name} | started | {task summary} |`
361
+ - Agent loads a skill → `| {ISO timestamp} | {agent-name} | skill-loaded | {skill-name} |`
362
+ - Agent completes → `| {ISO timestamp} | {agent-name} | completed | {files changed count} files |`
363
+ - Agent blocked → `| {ISO timestamp} | {agent-name} | blocked | {reason} |`
364
+
365
+ **Rules:**
366
+ - Append only, never overwrite previous entries
367
+ - One row per event, keep detail column short
368
+ - Use ISO 8601 timestamps
369
+ - The file is gitignored — never commit it
370
+
371
+ ---
372
+
373
+ ## RTK
374
+
375
+ Use `rtk` wrapper for ALL CLI commands. Never run git, az, gh, or openspec commands directly.
376
+
377
+ - `rtk git add` NOT `git add`
378
+ - `rtk git commit` NOT `git commit`
379
+ - `rtk git push` NOT `git push`
380
+ - `rtk az boards work-item show` NOT `az boards work-item show`
381
+ - `rtk az repos pr create` NOT `az repos pr create`
382
+ - `rtk gh issue view` NOT `gh issue view`
383
+ - `rtk gh pr create` NOT `gh pr create`
384
+ - `rtk openspec new change` NOT `openspec new change`
385
+
386
+ ---
387
+
280
388
  ## Guardrails
281
389
 
282
390
  ### Git Operations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-onboard",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Prepare any brownfield codebase for AI agent workflows using OpenCode, OpenSpec, and ensemble orchestration.",
5
5
  "keywords": [
6
6
  "opencode",