@dreb/coding-agent 2.49.0 → 2.50.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.
Files changed (42) hide show
  1. package/README.md +15 -5
  2. package/agents/explore.md +8 -3
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +3 -1
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/core/agent-session.d.ts.map +1 -1
  7. package/dist/core/agent-session.js +1 -0
  8. package/dist/core/agent-session.js.map +1 -1
  9. package/dist/core/sdk.d.ts +3 -3
  10. package/dist/core/sdk.d.ts.map +1 -1
  11. package/dist/core/sdk.js +4 -3
  12. package/dist/core/sdk.js.map +1 -1
  13. package/dist/core/system-prompt.d.ts.map +1 -1
  14. package/dist/core/system-prompt.js +1 -0
  15. package/dist/core/system-prompt.js.map +1 -1
  16. package/dist/core/tools/index.d.ts +7 -0
  17. package/dist/core/tools/index.d.ts.map +1 -1
  18. package/dist/core/tools/index.js +6 -0
  19. package/dist/core/tools/index.js.map +1 -1
  20. package/dist/core/tools/subagent.d.ts.map +1 -1
  21. package/dist/core/tools/subagent.js +15 -9
  22. package/dist/core/tools/subagent.js.map +1 -1
  23. package/dist/core/tools/wait.d.ts.map +1 -1
  24. package/dist/core/tools/wait.js +2 -1
  25. package/dist/core/tools/wait.js.map +1 -1
  26. package/dist/core/tools/watch-github-ci.d.ts +35 -0
  27. package/dist/core/tools/watch-github-ci.d.ts.map +1 -0
  28. package/dist/core/tools/watch-github-ci.js +204 -0
  29. package/dist/core/tools/watch-github-ci.js.map +1 -0
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -2
  33. package/dist/index.js.map +1 -1
  34. package/docs/extensions.md +4 -2
  35. package/docs/mach6.md +3 -3
  36. package/docs/rpc.md +1 -1
  37. package/docs/sdk.md +4 -4
  38. package/package.json +1 -1
  39. package/skills/mach6-implement/SKILL.md +4 -3
  40. package/skills/mach6-issue/SKILL.md +6 -6
  41. package/skills/mach6-plan/SKILL.md +5 -5
  42. package/skills/mach6-publish/SKILL.md +3 -4
package/docs/mach6.md CHANGED
@@ -30,7 +30,7 @@ Assess an existing GitHub issue or create a new one.
30
30
  /skill:mach6-issue add dark mode # Create issue from description
31
31
  ```
32
32
 
33
- **Assess mode:** Launches parallel subagents to explore the codebase, then posts a structured assessment (summary, gaps, ambiguities, scope, risks) as an issue comment.
33
+ **Assess mode:** Launches parallel Explore agents to retrieve bounded code/documentation evidence, then has the primary agent synthesize and post the assessment (summary, gaps, ambiguities, scope, risks) as an issue comment.
34
34
 
35
35
  **Create mode:** Drafts a structured issue with title, summary, acceptance criteria, and technical notes.
36
36
 
@@ -44,7 +44,7 @@ Explore the codebase, create an implementation plan, open a draft PR, and post t
44
44
 
45
45
  - Reads the issue and any existing assessment
46
46
  - Checks project conventions (AGENTS.md, CONTRIBUTING.md, etc.)
47
- - Launches parallel subagents to explore similar features, architecture, and integration points
47
+ - Launches parallel Explore agents to locate related implementations, enumerate explicit flows/call sites, and quote bounded evidence; the primary agent owns architecture and planning
48
48
  - Creates a feature branch (`feature/issue-42-<slug>`) with an empty commit
49
49
  - Opens a draft PR linking to the issue
50
50
  - Posts the plan as a PR comment with `<!-- mach6-plan -->` marker
@@ -112,7 +112,7 @@ Pre-merge checks, version bump, docs update, merge, tag, and release.
112
112
  /skill:mach6-publish 53
113
113
  ```
114
114
 
115
- - Verifies CI passing, no merge conflicts, all findings addressed
115
+ - Verifies CI passing with the blocking `watch_github_ci` tool (never `wait` or a polling loop), no merge conflicts, and all findings addressed
116
116
  - Runs pre-merge checklist (version bump, tests)
117
117
  - Applies version bump on the feature branch
118
118
  - Proactively reviews and updates ALL documentation affected by the PR's changes
package/docs/rpc.md CHANGED
@@ -1112,7 +1112,7 @@ Response:
1112
1112
  },
1113
1113
  {
1114
1114
  "name": "Explore",
1115
- "description": "Codebase and web exploration find files, search code, search the web, answer questions. Read-only."
1115
+ "description": "Concrete evidence retrievallocate files, symbols, documentation, call sites, and exact snippets. No implementation work."
1116
1116
  }
1117
1117
  ]
1118
1118
  }
package/docs/sdk.md CHANGED
@@ -387,10 +387,10 @@ const { session } = await createAgentSession({ resourceLoader: loader });
387
387
 
388
388
  ```typescript
389
389
  import {
390
- codingTools, // read, bash, edit, write (subset — default is all 11)
390
+ codingTools, // read, bash, edit, write (subset — default is all 13 standard tools)
391
391
  readOnlyTools, // read, grep, find, ls
392
392
  readTool, bashTool, editTool, writeTool,
393
- grepTool, findTool, lsTool,
393
+ grepTool, findTool, lsTool, watchGithubCiTool,
394
394
  } from "@dreb/coding-agent";
395
395
 
396
396
  // Use built-in tool set
@@ -953,13 +953,13 @@ SettingsManager
953
953
  codingTools
954
954
  readOnlyTools
955
955
  readTool, bashTool, editTool, writeTool
956
- grepTool, findTool, lsTool
956
+ grepTool, findTool, lsTool, watchGithubCiTool
957
957
 
958
958
  // Tool factories (for custom cwd)
959
959
  createCodingTools
960
960
  createReadOnlyTools
961
961
  createReadTool, createBashTool, createEditTool, createWriteTool
962
- createGrepTool, createFindTool, createLsTool
962
+ createGrepTool, createFindTool, createLsTool, createWatchGithubCiTool
963
963
 
964
964
  // Types
965
965
  type CreateAgentSessionOptions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreb/coding-agent",
3
- "version": "2.49.0",
3
+ "version": "2.50.0",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "drebConfig": {
@@ -133,13 +133,14 @@ tasks_update([
133
133
 
134
134
  #### If `ci` was specified:
135
135
 
136
+ Use `watch_github_ci` with `pr: "<pr-number>"` so the tool blocks until the pull request's checks pass or fail. Do not use `wait`, sleep, or repeated polling commands for CI.
137
+
138
+ If checks fail, use the returned check output to identify the failed run, then inspect it:
139
+
136
140
  ```bash
137
- gh pr checks <pr-number>
138
141
  gh run view <run-id> --log-failed
139
142
  ```
140
143
 
141
- **Note:** `gh pr checks` returns exit code 8 while checks are still pending — this is expected, not a failure. Wait and re-run if needed.
142
-
143
144
  Read the failed CI logs and identify issues. Extract test failures, stack traces, error messages. If all checks pass, report this and stop.
144
145
 
145
146
  #### If finding numbers were specified:
@@ -52,12 +52,12 @@ Update task: read → completed, explore → in_progress.
52
52
 
53
53
  ### Step 3: Explore the codebase
54
54
 
55
- Launch 2-3 Explore subagents in parallel targeting different aspects. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly complex issue warrants a stronger tier).
56
- - **Relevant code**: Find existing code related to the issue, trace implementation patterns
57
- - **Architecture**: Map relevant architecture layers, abstractions, data flow
58
- - **Prior work**: Check for related branches, PRs, or commits
55
+ Launch 2-3 Explore subagents in parallel for concrete evidence retrieval. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a large repository requires inspecting many files).
56
+ - **Relevant code evidence**: Locate named related behavior and quote the exact implementation and test snippets
57
+ - **Flow inventory**: Enumerate files, symbols, imports, calls, and registrations in an explicitly named existing flow without diagnosing it
58
+ - **Prior-work evidence**: Locate related branches, PRs, commits, and documentation and report their exact references
59
59
 
60
- Each agent should return 5-10 key files. After agents complete, read all identified files.
60
+ Do not ask Explore to determine the root cause, interpret ambiguous requirements, recommend an implementation, decide architecture, or assess the issue. Each agent should return 5-10 key files with bounded evidence. After agents complete, read all identified files and have the primary agent synthesize the current state, gaps, scope, and risks.
61
61
 
62
62
  Update task: explore → completed, assess → in_progress.
63
63
 
@@ -109,7 +109,7 @@ ls .github/ISSUE_TEMPLATE/ 2>/dev/null
109
109
  ```
110
110
  If templates exist, read them and select the most appropriate one.
111
111
 
112
- Explore the codebase if needed to understand the relevant area.
112
+ If codebase context is needed, use Explore subagents only for bounded evidence such as locating named behavior, files, tests, call sites, or exact snippets. The primary agent must interpret that evidence and own the issue's requirements, proposed behavior, scope, and technical conclusions.
113
113
 
114
114
  ### Step 2: Draft the issue
115
115
 
@@ -53,12 +53,12 @@ Extract planning-relevant guidance: project layers, testing expectations, coding
53
53
 
54
54
  ## Step 4: Explore the codebase
55
55
 
56
- Launch 2-3 Explore subagents in parallel. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly large or complex codebase warrants a stronger tier).
57
- - **Similar features**: Find existing code that solves related problems, trace implementation patterns
58
- - **Architecture**: Map relevant architecture layers, abstractions, data flow
59
- - **Integration points**: Identify where new code connects to existing systems
56
+ Launch 2-3 Explore subagents in parallel for concrete evidence retrieval. Agent definitions specify their own model with a provider fallback list — defaults work across providers and are fine for most cases. Override only with good reason (e.g. a particularly large codebase requires inspecting many files).
57
+ - **Existing feature evidence**: Locate named related features and quote the exact implementation and test snippets that establish their patterns
58
+ - **Layer inventory**: Enumerate the files, symbols, imports, and calls in an explicitly named existing data flow without deciding the architecture
59
+ - **Integration evidence**: Enumerate concrete call sites, registrations, configuration, and documentation for the relevant symbols
60
60
 
61
- Include project conventions in each agent's context. Each agent returns 5-10 key files. Read all identified files.
61
+ Do not ask Explore to diagnose the problem, interpret ambiguous requirements, recommend an implementation, design the architecture, or produce the plan. Include project conventions in each agent's context. Each agent returns 5-10 key files with bounded evidence. Read all identified files, then have the primary agent synthesize the architecture, risks, and implementation plan.
62
62
 
63
63
  Update task: explore → completed, plan → in_progress.
64
64
 
@@ -34,10 +34,9 @@ tasks_update([
34
34
  gh pr checkout <pr-number>
35
35
  git pull
36
36
  gh pr view <pr-number> --json mergeable,mergeStateStatus,statusCheckRollup,reviewDecision,comments,body
37
- gh pr checks <pr-number>
38
37
  ```
39
38
 
40
- **Note:** `gh pr checks` returns exit code 8 while checks are still pending this is expected, not a failure. Wait and re-run if needed.
39
+ Use `watch_github_ci` with `pr: "<pr-number>"` to block until CI passes or fails. Do not use `wait`, sleep, or repeated polling commands for CI.
41
40
 
42
41
  Read ALL PR comments to understand the full history — plans, reviews, assessments, progress updates, and discussion.
43
42
 
@@ -90,7 +89,7 @@ Update task: checks → completed, version → in_progress.
90
89
  git push
91
90
  ```
92
91
 
93
- 5. Wait for CI to pass on the version bump commit before proceeding to merge.
92
+ 5. Use `watch_github_ci` with `pr: "<pr-number>"` and proceed only after it reports that CI passed on the version bump commit.
94
93
 
95
94
  If the project doesn't use versioning, skip this step.
96
95
 
@@ -127,7 +126,7 @@ Proactively review and update ALL documentation affected by the PR's changes. Th
127
126
  git push
128
127
  ```
129
128
 
130
- 5. Wait for CI to pass on the docs commit.
129
+ 5. Use `watch_github_ci` with `pr: "<pr-number>"` and proceed only after it reports that CI passed on the docs commit.
131
130
 
132
131
  If no documentation changes are needed (rare), skip this step.
133
132