Golden path — first analysis
Golden path — first analysis
Section titled “Golden path — first analysis”Two milestones on the way to production:
| Milestone | Time | Jira account? | Guide |
|---|---|---|---|
| Local mock smoke | ~5 min | No | Get started |
| Real Jira webhook | ~15 min | Yes | This page |
Complete get started first (agent-detective smoke → [MOCK] Added comment in logs). Then wire Jira through a tunnel.
Target outcome (real Jira)
Section titled “Target outcome (real Jira)”agent-detective doctorpasses — see CLI reference — doctor.- Server answers
GET /api/healthon your port. - A Jira (or Automation) webhook reaches your server through HTTPS (tunnel or reverse proxy).
- With
mockMode: true, logs show[MOCK] Added commentafter an issue with a matching repo label. - With
mockMode: false, a real comment appears on the issue (allow time for API credentials).
Deep detail: jira-manual-e2e.md.
Prerequisites
Section titled “Prerequisites”| Requirement | Notes |
|---|---|
| Node.js 24+ | npm: npm i -g agent-detective. Contributors: pnpm 10+ — development.md. |
git on PATH | local-repos plugin reads your checkout. |
| Agent CLI (OpenCode, Cursor, …) | Match config.agent; authenticated for real analysis. |
| Git clone on disk | repos[].name must match a Jira label (case-insensitive). |
| Jira Cloud | Webhooks or Automation → Send web request. |
| Tunnel (ngrok, Cloudflare Tunnel, …) | Jira needs HTTPS to your host. |
Steps (real Jira)
Section titled “Steps (real Jira)”-
Install and scaffold (if not done)
Terminal window npm i -g agent-detectivemkdir -p ~/agent-detective && cd ~/agent-detectiveagent-detective init --yes --repo-path /absolute/path/to/checkout --repo-name my-appagent-detective doctor --config-root .Contributors from a git clone:
pnpm install, copyconfig/local.example.json→config/local.json,pnpm run dev. -
Local smoke (optional but recommended)
Terminal window agent-detective --config-root . # terminal 1agent-detective smoke --config-root . # terminal 2 -
Run the server (if not already)
Terminal window agent-detective --config-root . -
Tunnel — expose
http://127.0.0.1:<port>(default 3001) as public HTTPS. -
Jira webhook
- URL:
https://<tunnel-host>/plugins/agent-detective-jira-adapter/webhook/jira - Events: Issue created, Comment created (retry path).
- Automation without
webhookEventin the body: add?webhookEvent=jira:issue_created— see jira-manual-e2e.md.
- URL:
-
Create a Jira issue with a label equal to your repo
name. -
Verify — logs: webhook → queued → agent → comment (
[MOCK]or real).
Reference layout
Section titled “Reference layout”flowchart LR
subgraph internet [Internet]
Jira[Jira_Cloud]
end
subgraph host [Your_host]
T[Tunnel_client]
AD[agent-detective]
R[Git_clone]
A[Agent_CLI]
end
Jira -->|HTTPS_webhook| T
T --> AD
AD --> R
AD --> A
Production nginx TLS: deployment.md.
Troubleshooting
Section titled “Troubleshooting”| Symptom | What to check |
|---|---|
| Webhook never hits server | Tunnel URL, Jira rule history, firewall, correct POST path under /plugins/.... |
| 400/404 on webhook | Plugin loaded (doctor, startup logs); path matches Jira adapter route. |
| No analysis | Issue labels match repos[].name — matching docs. |
suppressing auto-analysis … cooldown | Normal echo guard; wait or use explicit retry comment. |
| Agent fails | Agent on PATH, LLM credentials, config.agent id. |
| Real comment fails | mockMode: false + JIRA_* env — configuration.md. |
Next steps
Section titled “Next steps”- CLI reference · Deployment · Threat model
- Linear: linear-manual-e2e.md
- PR pipeline: jira-pr-pipeline-manual-e2e.md
Support matrix: root README.md.