Skip to content

feat(agent-integration): CLI docs, agent skill, and bin build wiring#3851

Merged
mabry1985 merged 1 commit into
mainfrom
feat/agent-integration-consolidate
May 26, 2026
Merged

feat(agent-integration): CLI docs, agent skill, and bin build wiring#3851
mabry1985 merged 1 commit into
mainfrom
feat/agent-integration-consolidate

Conversation

@mabry1985
Copy link
Copy Markdown
Contributor

@mabry1985 mabry1985 commented May 26, 2026

Consolidates the Agent integration & docs epic into main atomically (the features landed on the epic branch, not main — same fragmentation as Core, #3825). Fresh branch off main → clean CI.

Contents

  • .claude/skills/protomaker-cli.md — agent skill teaching the CLI
  • docs/how-to/drive-the-board.md + docs/reference/cli-commands.md + TOC links
  • package.json: ./packages/cli added to build:packages

Supersedes #3844 (docs) and the closed #3846 (make-bin). Closes the epic.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive protomaker CLI documentation including skills guide, complete command reference, and how-to guide for board operations workflow.
    • New CLI Commands reference section with global flags, exit codes, and per-command usage details.
    • Updated documentation structure and index to organize CLI guides and reference materials.

Review Change Stack

Consolidates the Agent integration & docs epic into main as one atomic PR
(the individual features landed on the epic branch, not main):

- .claude/skills/protomaker-cli.md — agent skill teaching the protomaker CLI
- docs/how-to/drive-the-board.md — CLI how-to guide
- docs/reference/cli-commands.md — complete CLI command reference
- docs/reference/index.md + docs/README.md — TOC links
- package.json: add ./packages/cli to build:packages so the CLI builds with
  the standard package build (makes the bin available)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@protoquinn
Copy link
Copy Markdown

protoquinn Bot commented May 26, 2026

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

This PR adds comprehensive documentation for the protomaker CLI across multiple new guides and reference pages, updates the documentation index and structure, and includes a build configuration change to ensure the CLI package is included in the build process.

Changes

CLI Documentation Suite

Layer / File(s) Summary
Documentation index and structure
docs/reference/index.md, docs/README.md
Reference index adds CLI Commands link; main README reformats how-to guides into a table and adds the CLI Commands reference entry.
CLI command reference documentation
docs/reference/cli-commands.md
Complete protomaker CLI reference with global flags, exit codes, and detailed usage for all command groups (feature, agent, PR, queue, auto-mode, context, board, query, health, sitrep).
CLI how-to workflow guide
docs/how-to/drive-the-board.md
End-to-end workflow guide covering server health verification, board inspection, feature/epic creation, agent lifecycle, PR workflows, auto-mode processing, situation reporting, and JSON scripting patterns.
AI agent skills documentation
.claude/skills/protomaker-cli.md
Claude skills guide documenting command discovery, flags, command inventory, example workflows, JSON parsing for scripting, exit codes, and operational best practices.
Build configuration
package.json
build:packages script adds --filter="./packages/cli" to Turborepo targets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • protoquinn

Poem

📋 CLI docs unfurl like morning light,
Commands and workflows shine so bright,
From health checks through to merges grand,
Your guide to protomaker's every command. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR adds documentation and updates build wiring, but it is unclear if the binary is actually made available on PATH in agent environments as required by issue #3846. Confirm that the package.json change ensures the protomaker CLI binary is resolvable on PATH in agent shells. Clarify where and how the CLI binary gets installed/exposed to the agent launch environment.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: CLI documentation, agent skill definition, and build configuration updates for the CLI binary.
Out of Scope Changes check ✅ Passed All changes are directly related to the PR objectives: CLI documentation (3 docs files), agent skill definition, and build configuration for the CLI package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agent-integration-consolidate

Comment @coderabbitai help to get the list of available commands and usage tips.

protoquinn[bot]
protoquinn Bot previously requested changes May 26, 2026
Copy link
Copy Markdown

@protoquinn protoquinn Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #3851 | feat(agent-integration): CLI docs, agent skill, and bin build wiring

VERDICT: FAIL


CI Status

  • No CI checks found for PR#3851 (head b46e7d8) — BLOCKING

Diff Review

  • Adds .claude/skills/protomaker-cli.md — comprehensive 200-line agent skill documenting CLI commands
  • Adds docs/how-to/drive-the-board.md + docs/reference/cli-commands.md with TOC links
  • Adds ./packages/cli to build:packages in root package.json
  • All changes are additive (documentation/config) with no destructive edits visible

Observations

  • CRITICAL: No CI checks detected for this PR. Cannot verify the package.json build change produces a valid output. All PRs require at least one passing CI check before merge.
  • LOW: CLAWPATCH structural review unavailable (HTTP 502 during repo checkout cache init). Diff-level review shows no code logic changes — only docs + config.
  • INFO: Content quality appears solid — skill file is well-structured, docs cover the full CLI surface, JSON mode for parsing is documented.
  • INFO: PR body notes it supersedes #3844 and #3846, closing the Agent integration epic atomically.

Checks: 0 | Passed: 0 | Failed: 0 | Gaps: 1
[CRITICAL]: No CI checks found — at minimum, a build check is required before merge. Please trigger CI (e.g., push to branch, or check if branch protection rules need adjustment).

— Quinn, QA Engineer

@protoquinn
Copy link
Copy Markdown

protoquinn Bot commented May 26, 2026

Submitted REQUEST_CHANGES review on protoLabsAI/protoMaker#3851.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
.claude/skills/protomaker-cli.md (1)

144-144: ⚡ Quick win

Avoid brittle ID extraction from feature list

jq -r '.[0].id' assumes ordering and non-empty results. Prefer a deterministic selector (for example filtering by the created title) or show extraction from the create command’s JSON output if available.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/protomaker-cli.md at line 144, The current FEATURE_ID
extraction uses a brittle index selector (jq -r '.[0].id') which can break if
ordering or emptiness changes; instead capture the feature ID deterministically
by either parsing the JSON output from the create command or filtering the list
by a known title—e.g., run the create command and parse its JSON response to set
FEATURE_ID, or replace the jq selector with a filter like select(.title ==
"<expected-title>") to reliably pick the intended feature ID when using
`protomaker feature list`.
docs/how-to/drive-the-board.md (1)

27-33: 🏗️ Heavy lift

Reorder sections so commands appear before explanatory prose.

Across multiple sections, prose precedes snippets. For consistency with the docs standard, place the command block first, then the explanation.

As per coding guidelines, "Code before prose — show the snippet first, explain it second."

Also applies to: 41-42, 76-77, 108-109, 125-126, 139-140, 159-160, 167-168

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/how-to/drive-the-board.md` around lines 27 - 33, Several sections in
docs/how-to/drive-the-board.md currently place explanatory prose before command
snippets; move each command code block to appear immediately before its
explanatory paragraph so "code before prose" is respected. For the blocks at the
reported ranges (around the "protomaker board" example and the other instances
at 41-42, 76-77, 108-109, 125-126, 139-140, 159-160, 167-168), cut each fenced
code block (the bash/command snippet) and paste it above its following
explanatory sentence or paragraph so the snippet is shown first, then the
explanation; ensure surrounding blank lines and markdown headings remain intact
and update any adjacent punctuation to keep sentences grammatically correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/protomaker-cli.md:
- Line 197: Update the "Use `--json` for parsing" guidance to explicitly warn
that the `--quiet` flag suppresses all output (including JSON), so combining
`--quiet` with `--json` will produce no machine-readable payload and will break
downstream jq or script pipelines; reference the `--json` and `--quiet` flags in
the sentence and add a short cautionary note about avoiding `--quiet` when you
need JSON output.

In `@docs/how-to/drive-the-board.md`:
- Line 20: Remove the emoji from the example line "Server: ✅ healthy" so the
documentation example uses plain text; update that string to "Server: healthy"
(i.e., remove the "✅" character) and ensure similar examples in the same file do
not contain emojis unless they are table/checklist status indicators.
- Around line 19-23: The fenced block in the documentation snippet is missing a
language tag which triggers MD040; update the triple-backtick fence around the
server status block in docs/how-to/drive-the-board.md to include a language
identifier (e.g., change ``` to ```text) so the fence becomes ```text and keep
the block content unchanged; verify the surrounding section still follows the
repository doc template (title, orientation, prerequisites, code first then
explanation).

In `@docs/reference/cli-commands.md`:
- Around line 1-3: The doc claims "Complete reference" but omits the registered
command groups "project" and "dev"; update docs/reference/cli-commands.md to add
full sections for the protomaker project commands (at minimum "project init" and
"project config" with usage and short descriptions) and for protomaker dev
(e.g., "dev info" with usage and description), and also add corresponding rows
in the "Command Summary" table for `project init`, `project config`, and `dev
info` so the reference is accurate and complete.
- Around line 23-35: Reorder the CLI command sections so the usage snippet
appears before the descriptive prose: for the "protomaker board" section
(heading `protomaker board`) move the usage code block (```bash protomaker board
[global-flags]```) above the sentence "Print a per-status summary of the feature
board." and similarly for the `protomaker query` section (and any other sections
called out in the comment, e.g., the block covering lines 37-55) place their
usage code blocks before their explanatory paragraphs and the "Output:" lines,
ensuring each section now follows the "code before prose" guideline.

---

Nitpick comments:
In @.claude/skills/protomaker-cli.md:
- Line 144: The current FEATURE_ID extraction uses a brittle index selector (jq
-r '.[0].id') which can break if ordering or emptiness changes; instead capture
the feature ID deterministically by either parsing the JSON output from the
create command or filtering the list by a known title—e.g., run the create
command and parse its JSON response to set FEATURE_ID, or replace the jq
selector with a filter like select(.title == "<expected-title>") to reliably
pick the intended feature ID when using `protomaker feature list`.

In `@docs/how-to/drive-the-board.md`:
- Around line 27-33: Several sections in docs/how-to/drive-the-board.md
currently place explanatory prose before command snippets; move each command
code block to appear immediately before its explanatory paragraph so "code
before prose" is respected. For the blocks at the reported ranges (around the
"protomaker board" example and the other instances at 41-42, 76-77, 108-109,
125-126, 139-140, 159-160, 167-168), cut each fenced code block (the
bash/command snippet) and paste it above its following explanatory sentence or
paragraph so the snippet is shown first, then the explanation; ensure
surrounding blank lines and markdown headings remain intact and update any
adjacent punctuation to keep sentences grammatically correct.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d4fa6464-8c7a-465e-bf65-51d42ffe88cf

📥 Commits

Reviewing files that changed from the base of the PR and between 30c0ec6 and b46e7d8.

📒 Files selected for processing (6)
  • .claude/skills/protomaker-cli.md
  • docs/README.md
  • docs/how-to/drive-the-board.md
  • docs/reference/cli-commands.md
  • docs/reference/index.md
  • package.json

## Best Practices for Agents

1. **Discover via `--help`** — run `protomaker --help` before using unfamiliar commands
2. **Use `--json` for parsing** — always use JSON mode when extracting IDs or values for scripting
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Clarify that --quiet suppresses JSON output too

This line can mislead scripting users: --quiet takes precedence over --json, so combining them returns no machine-readable payload. Add an explicit caution here to prevent broken jq pipelines.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/protomaker-cli.md at line 197, Update the "Use `--json` for
parsing" guidance to explicitly warn that the `--quiet` flag suppresses all
output (including JSON), so combining `--quiet` with `--json` will produce no
machine-readable payload and will break downstream jq or script pipelines;
reference the `--json` and `--quiet` flags in the sentence and add a short
cautionary note about avoiding `--quiet` when you need JSON output.

Comment on lines +19 to +23
```
Server: ✅ healthy
Version: 0.1.0
Checked: 2026-05-26T10:30:00.000Z
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the expected-output fence.

This code fence is missing a language identifier and will keep triggering MD040.

Suggested fix
-```
+```text
 Server: ✅ healthy
 Version: 0.1.0
 Checked: 2026-05-26T10:30:00.000Z
</details>

As per coding guidelines, "Documentation pages follow a standard template: outcome-focused title, orientation paragraph, prerequisites (if non-trivial), verb-phrase section headings, code first then explanation, next steps."

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 19-19: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/how-to/drive-the-board.md` around lines 19 - 23, The fenced block in the
documentation snippet is missing a language tag which triggers MD040; update the
triple-backtick fence around the server status block in
docs/how-to/drive-the-board.md to include a language identifier (e.g., change
``` to ```text) so the fence becomes ```text and keep the block content
unchanged; verify the surrounding section still follows the repository doc
template (title, orientation, prerequisites, code first then explanation).

Expected output:

```
Server: ✅ healthy
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove emoji from the documentation output example.

is used in a regular code example, not a checklist/table status context.

As per coding guidelines, "No emojis in docs or code — exceptions only for ✅ and ❌ as status indicators in documentation tables or checklists."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/how-to/drive-the-board.md` at line 20, Remove the emoji from the example
line "Server: ✅ healthy" so the documentation example uses plain text; update
that string to "Server: healthy" (i.e., remove the "✅" character) and ensure
similar examples in the same file do not contain emojis unless they are
table/checklist status indicators.

Comment on lines +1 to +3
# CLI Command Reference

Complete reference for the `protomaker` CLI. Every command supports the global flags `--json`, `--quiet`, and `--project <path>`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Reference is marked complete but omits registered command groups (project, dev).

Line 3 says this is a complete reference, but the page and summary don’t document protomaker project and protomaker dev, which are wired in packages/cli/src/cli.ts.

Suggested doc patch
 ## `protomaker context`
@@
 **Filename rules:** Must end in `.md` or `.txt`.
 
 ---
 
+## `protomaker project`
+
+Manage protomaker projects.
+
+### `project init`
+
+Initialize a new protomaker project.
+
+**Usage:**
+
+```bash
+protomaker project init [options] [global-flags]
+```
+
+### `project config`
+
+View or edit project configuration.
+
+**Usage:**
+
+```bash
+protomaker project config [options] [global-flags]
+```
+
+---
+
+## `protomaker dev`
+
+Development and debugging utilities.
+
+### `dev info`
+
+Show environment and project info.
+
+**Usage:**
+
+```bash
+protomaker dev info [global-flags]
+```
+
+---
+
 ## Command Summary
@@
 | `context create <filename> [--content]`      | Create a context file           |
 | `context delete <filename> [--yes]`          | Delete a context file           |
+| `project init`                               | Initialize a project            |
+| `project config`                             | View/edit project config        |
+| `dev info`                                   | Show env and project info       |

As per coding guidelines, reference docs must be “Reference (complete, accurate)”.

Also applies to: 479-509

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/reference/cli-commands.md` around lines 1 - 3, The doc claims "Complete
reference" but omits the registered command groups "project" and "dev"; update
docs/reference/cli-commands.md to add full sections for the protomaker project
commands (at minimum "project init" and "project config" with usage and short
descriptions) and for protomaker dev (e.g., "dev info" with usage and
description), and also add corresponding rows in the "Command Summary" table for
`project init`, `project config`, and `dev info` so the reference is accurate
and complete.

Comment on lines +23 to +35
## `protomaker board`

Print a per-status summary of the feature board.

**Usage:**

```bash
protomaker board [global-flags]
```

**Output:** Text summary table (counts per status, WIP limits). Use `--json` for raw JSON.

---
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Put usage snippets before prose to match docs standard.

Several sections start with explanation first, then usage. Reorder to show the code block first, then the description (for example in board and query).

Example reorder for one section
 ## `protomaker board`
 
-Print a per-status summary of the feature board.
-
 **Usage:**
 
 ```bash
 protomaker board [global-flags]

+Print a per-status summary of the feature board.
+
Output: Text summary table (counts per status, WIP limits). Use --json for raw JSON.

</details>

 
As per coding guidelines, “Code before prose — show the snippet first, explain it second.”


Also applies to: 37-55

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/reference/cli-commands.md around lines 23 - 35, Reorder the CLI command
sections so the usage snippet appears before the descriptive prose: for the
"protomaker board" section (heading protomaker board) move the usage code
block (bash protomaker board [global-flags]) above the sentence "Print a
per-status summary of the feature board." and similarly for the protomaker query section (and any other sections called out in the comment, e.g., the
block covering lines 37-55) place their usage code blocks before their
explanatory paragraphs and the "Output:" lines, ensuring each section now
follows the "code before prose" guideline.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

@mabry1985 mabry1985 closed this May 26, 2026
@mabry1985 mabry1985 reopened this May 26, 2026
@mabry1985 mabry1985 closed this May 26, 2026
@mabry1985 mabry1985 reopened this May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

@mabry1985 mabry1985 dismissed protoquinn[bot]’s stale review May 26, 2026 17:56

Stale — Quinn's only concern was 'No CI checks found' (it reviewed before CI ran, during the namespace-runner outage). CI is now green: build pass, test pass, checks pass. That was its explicit re-review condition.

@mabry1985 mabry1985 merged commit f561dc7 into main May 26, 2026
7 checks passed
@mabry1985 mabry1985 deleted the feat/agent-integration-consolidate branch May 26, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant