Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba803b401b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds self-describing agent integration to the Basecamp CLI by embedding skills in the binary, providing structured --help --agent JSON output, and extending doctor with Claude Code integration checks.
Changes:
- Embed
skills/basecamp/SKILL.mdinto the binary and addbasecamp skillto print it. - Override Cobra help to support
basecamp <cmd> --help --agentstructured JSON (flags, notes, subcommands). - Add Claude Code harness detection + doctor check, plus hook hardening and updated install/docs.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/embed.go | Adds embedded filesystem for skill assets. |
| skills/basecamp/SKILL.md | Updates and trims the embedded skill content/triggers/invariants. |
| scripts/install-skills.sh | Removes the legacy skills installer script. |
| internal/harness/harness.go | Introduces harness status check schema. |
| internal/harness/claude.go | Detects Claude Code and checks for Basecamp plugin installation. |
| internal/harness/claude_test.go | Adds schema-resilience tests for plugin detection. |
| internal/commands/skill.go | Adds basecamp skill command to print embedded SKILL.md. |
| internal/cli/root.go | Adds --help --agent JSON help override + data model. |
| internal/commands/doctor.go | Integrates Claude harness checks into doctor when Claude is detected. |
| internal/commands/commands_test.go | Registers the new skill command in catalog parity tests. |
| internal/commands/commands.go | Adds skill to the command catalog. |
| internal/commands/webhooks.go | Adds agent notes annotations. |
| internal/commands/url.go | Adds agent notes annotations. |
| internal/commands/tools.go | Adds agent notes annotations. |
| internal/commands/todos.go | Adds agent notes annotations. |
| internal/commands/timesheet.go | Adds agent notes annotations. |
| internal/commands/timeline.go | Adds agent notes annotations. |
| internal/commands/templates.go | Adds agent notes annotations. |
| internal/commands/subscriptions.go | Adds agent notes annotations. |
| internal/commands/search.go | Adds agent notes annotations. |
| internal/commands/schedule.go | Adds agent notes annotations. |
| internal/commands/reports.go | Adds agent notes annotations. |
| internal/commands/recordings.go | Adds agent notes annotations. |
| internal/commands/projects.go | Adds agent notes annotations. |
| internal/commands/people.go | Adds agent notes annotations. |
| internal/commands/messages.go | Adds agent notes annotations. |
| internal/commands/lineup.go | Adds agent notes annotations. |
| internal/commands/forwards.go | Adds agent notes annotations. |
| internal/commands/files.go | Adds agent notes annotations. |
| internal/commands/events.go | Adds agent notes annotations. |
| internal/commands/config.go | Adds agent notes annotations. |
| internal/commands/comment.go | Adds agent notes annotations (comments + comment). |
| internal/commands/checkins.go | Adds agent notes annotations. |
| internal/commands/cards.go | Adds agent notes annotations. |
| internal/commands/campfire.go | Adds agent notes annotations. |
| internal/commands/boost.go | Adds agent notes annotations. |
| install.md | Updates install instructions to remove skills installer and document Claude plugin install + --help --agent. |
| README.md | Updates agent integration docs and advertises --help --agent. |
| .claude-plugin/hooks/session-start.sh | Adds jq requirement + richer context (CLI version, profile) in hook output. |
| .claude-plugin/hooks/post-commit-check.sh | Hardens commit-success detection and removes bare #12345 matching. |
Comments suppressed due to low confidence (1)
.claude-plugin/hooks/session-start.sh:37
- Because the script runs with
set -euo pipefail, anyjqparse failure in these command substitutions (e.g., if basecamp outputs non-JSON on error) will terminate the hook instead of failing silently. Consider adding|| true(like cli_version/active_profile do) and treating empty values as “no config/auth” so the hook remains non-disruptive.
# Get CLI version
cli_version=$("$BASECAMP_BIN" version --json 2>/dev/null | jq -r '.version // empty' 2>/dev/null || true)
# Check if we have any Basecamp configuration
config_output=$("$BASECAMP_BIN" config show --json 2>/dev/null || echo '{}')
has_config=$(echo "$config_output" | jq -r '.data // empty' 2>/dev/null)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The CLI now describes itself to agents at runtime instead of relying on static reference files. Three complementary discovery mechanisms: - `basecamp skill` prints the embedded SKILL.md from the binary - `basecamp <cmd> --help --agent` emits structured JSON (flags, notes, subcommands) for any command - `basecamp commands --json` provides the full catalog Migrated gotchas and cross-references from 18 reference files into Annotations["agent_notes"] on 25 cobra commands. These surface in the notes field of --help --agent JSON output. Added internal/harness package for Claude Code detection and plugin health checks, wired into doctor (check 12, silent when ~/.claude/ absent). Hardened hooks: negative failure guard in post-commit-check, jq requirement in session-start, dropped bare #12345 pattern. SKILL.md trimmed to invariants + decision trees + discovery pointers. Deleted references/, install-skills.sh (obsolete — embedded skills, claude plugin install is the distribution path).
- Narrow hook failure regex: strip git success line before scanning so commit subjects like "Fix failed login" don't false-positive - Handle fmt.Fprint error return in skill command - Use cmd.OutOrStdout() instead of os.Stdout in emitAgentHelp
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- session-start.sh: use --version flag instead of nonexistent version subcommand - doctor_test.go: add TestCheckClaudeIntegration covering the harness integration path
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Summary
basecamp skill— prints embedded SKILL.md from the binary. Any agent bootstraps from the CLI itself, no external files needed.basecamp <cmd> --help --agent— structured JSON help for any command: flags, notes (gotchas/cross-refs), subcommands, inherited flags.basecamp commands --json— full command catalog (existing, unchanged).~/.claude/absent.Annotations["agent_notes"]on 25 cobra commands.#12345pattern.Deleted:
skills/basecamp/references/*.md(18 files),scripts/install-skills.sh.New:
skills/embed.go,internal/harness/,internal/commands/skill.go.Test plan
make build— embedded skills compilemake test— all Go tests green (including 10 harness schema resilience tests)make test-e2e— all 267 e2e tests passbasecamp skill— prints full SKILL.mdbasecamp --help --agent— JSON with all top-level commandsbasecamp todos --help --agent— JSON with flags, notes, subcommandsbasecamp todos list --help --agent— JSON for leaf commandbasecamp --help(no --agent) — normal plaintext help unchangedbasecamp doctorwith~/.claude/present — shows plugin checkbasecamp doctorwithout~/.claude/— no harness check appears