forgedock 1.0.1 → 1.0.2

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 (41) hide show
  1. package/README.md +19 -2
  2. package/bin/forgedock.mjs +286 -10
  3. package/commands/analytics.md +129 -52
  4. package/commands/audit-agents.md +29 -5
  5. package/commands/audit.md +55 -17
  6. package/commands/autopilot.md +11 -6
  7. package/commands/cleanup.md +44 -24
  8. package/commands/deploy-info.md +7 -3
  9. package/commands/forge-stats.md +13 -4
  10. package/commands/forgedock-init.md +534 -0
  11. package/commands/geo-audit.md +114 -26
  12. package/commands/incident-response.md +4 -1
  13. package/commands/issue.md +26 -25
  14. package/commands/milestone.md +80 -59
  15. package/commands/orchestrate.md +38 -21
  16. package/commands/pipeline-health.md +26 -15
  17. package/commands/qa-sweep.md +68 -5
  18. package/commands/quality-gate.md +18 -0
  19. package/commands/review-pr-agents.md +58 -90
  20. package/commands/review-pr.md +58 -16
  21. package/commands/rollback.md +8 -5
  22. package/commands/security-audit.md +68 -12
  23. package/commands/sync-ecosystem.md +196 -156
  24. package/commands/work-on/build/architect.md +2 -2
  25. package/commands/work-on/build/context.md +2 -2
  26. package/commands/work-on/build/implement.md +3 -3
  27. package/commands/work-on/build/validate.md +3 -3
  28. package/commands/work-on/build.md +6 -6
  29. package/commands/work-on/close.md +59 -30
  30. package/commands/work-on/decompose.md +6 -6
  31. package/commands/work-on/investigate.md +16 -20
  32. package/commands/work-on/review.md +4 -4
  33. package/commands/work-on-monolithic.md +15 -16
  34. package/commands/work-on.md +45 -33
  35. package/docs/CODEX.md +1 -1
  36. package/docs/CONFIG.md +398 -0
  37. package/docs/WORKFLOW.md +115 -72
  38. package/package.json +1 -1
  39. package/scripts/verify-host-headers.sh +14 -9
  40. package/scripts/verify-route-registration.sh +10 -10
  41. package/commands/failure-recon.md +0 -375
package/docs/CONFIG.md ADDED
@@ -0,0 +1,398 @@
1
+ # forge.yaml Configuration Reference
2
+
3
+ `forge.yaml` is placed at your project root and tells ForgeDock commands how to interact with your specific project. Without it, commands cannot resolve your GitHub repository, paths, or branches.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ cp forge.yaml.example forge.yaml
9
+ # Edit forge.yaml with your project details
10
+ echo "forge.yaml" >> .gitignore # if your credentials path is sensitive
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Schema Overview
16
+
17
+ | Section | Required | Purpose |
18
+ |---------|----------|---------|
19
+ | [`project`](#project-required) | **Yes** | GitHub identity (owner, repo, name) |
20
+ | [`paths`](#paths-required) | **Yes** | Local filesystem locations |
21
+ | [`branches`](#branches-required) | **Yes** | Branch naming conventions |
22
+ | [`repos`](#repos-optional) | No | Multi-repository routing |
23
+ | [`project_board`](#project_board-optional) | No | GitHub Projects v2 integration |
24
+ | [`services`](#services-optional) | No | External service URLs and IDs |
25
+ | [`review`](#review-optional) | No | Context injected into review agents |
26
+ | [`verification`](#verification-optional) | No | Health-check patterns |
27
+ | [`billing`](#billing-optional) | No | Enable financial integrity audit phase |
28
+
29
+ ---
30
+
31
+ ## `project` (REQUIRED)
32
+
33
+ Core identity fields. Used by every command that calls `gh issue`, `gh pr`, or `gh project`.
34
+
35
+ ```yaml
36
+ project:
37
+ name: "Acme Platform"
38
+ owner: "acme-org"
39
+ repo: "acme-platform"
40
+ description: "SaaS platform for automated data processing"
41
+ # forge_repo: "acme-org/acme-forge"
42
+ ```
43
+
44
+ | Field | Type | Required | Description |
45
+ |-------|------|----------|-------------|
46
+ | `name` | string | **Yes** | Human-readable name used in pipeline reports and issue comments |
47
+ | `owner` | string | **Yes** | GitHub org or username. Used as `GH_REPO` prefix and `--owner` flag |
48
+ | `repo` | string | **Yes** | Repository name. Combined: `owner/repo` = the `GH_REPO` value in all commands |
49
+ | `description` | string | No | One-line description used in issue templates |
50
+ | `forge_repo` | string | No | Pipeline repository in `owner/repo` format. Set this when your ForgeDock pipeline lives in a different repo than the project being developed. Used by `audit.md`, `audit-agents.md`, and `security-audit.md` to resolve `{FORGE_REPO}` when looking up pipeline issues and commands. Defaults to `project.owner/project.repo` if omitted. |
51
+
52
+ **Commands that use this section**: `work-on`, `review-pr`, `orchestrate`, `issue`, `milestone`, `cleanup`, `audit`, `audit-agents`, `security-audit`, `pipeline-health`
53
+
54
+ ---
55
+
56
+ ## `paths` (REQUIRED)
57
+
58
+ Local filesystem paths. Commands use these to locate the project, create git worktrees, and read credential files.
59
+
60
+ ```yaml
61
+ paths:
62
+ root: "/home/youruser/projects/acme-platform"
63
+ worktree_base: "/home/youruser/projects/acme-platform/.claude/worktrees"
64
+ # credentials:
65
+ # file: "/home/youruser/credentials.yaml"
66
+ ```
67
+
68
+ | Field | Type | Required | Description |
69
+ |-------|------|----------|-------------|
70
+ | `root` | string (absolute path) | **Yes** | Absolute path to the project root. Used as the base for `git worktree add` |
71
+ | `worktree_base` | string (absolute path) | **Yes** | Directory where per-branch git worktrees are created. Default: `{root}/.claude/worktrees` |
72
+ | `credentials.file` | string (absolute path) | No | Path to a YAML credentials file for analytics/monitoring tools. **Do not commit.** |
73
+
74
+ **Commands that use this section**: `work-on` (Phase 3E), `quality-gate`, `deploy-info`
75
+
76
+ ---
77
+
78
+ ## `branches` (REQUIRED)
79
+
80
+ Branch naming conventions that control PR targeting and source branch selection.
81
+
82
+ ```yaml
83
+ branches:
84
+ default: "main"
85
+ staging: "staging"
86
+ feature_pattern: "milestone/{slug}"
87
+ ```
88
+
89
+ | Field | Type | Required | Description |
90
+ |-------|------|----------|-------------|
91
+ | `default` | string | **Yes** | Default branch (`main` or `master`). Used as fallback PR base |
92
+ | `staging` | string | **Yes** | Staging branch for fast-lane PRs (issues without a milestone). Set to `main` if you have no staging branch |
93
+ | `feature_pattern` | string | **Yes** | Pattern for feature branches. `{slug}` is the milestone title in kebab-case. Example: `milestone/{slug}` → `milestone/user-auth-v2` |
94
+
95
+ **Lane routing logic** (from `work-on.md`):
96
+ - Issue has no milestone → fast lane → PR targets `branches.staging`
97
+ - Issue has milestone → feature lane → PR targets branch matching `branches.feature_pattern`
98
+
99
+ **Commands that use this section**: `work-on`, `review-pr`, `cleanup`
100
+
101
+ ---
102
+
103
+ ## `repos` (OPTIONAL)
104
+
105
+ Multi-repository routing. Use this when your project spans multiple GitHub repositories and you want to route issues to satellite repos by prefix.
106
+
107
+ Without this section, all issues route to `project.owner/project.repo`.
108
+
109
+ ```yaml
110
+ repos:
111
+ default:
112
+ repo: "acme-org/acme-platform"
113
+ staging_branch: "staging"
114
+
115
+ satellites:
116
+ - prefix: "mcp"
117
+ repo: "acme-org/acme-mcp-server"
118
+ staging_branch: "main"
119
+ local_path: "/home/youruser/projects/acme-mcp-server"
120
+
121
+ - prefix: "sdk"
122
+ repo: "acme-org/acme-python-sdk"
123
+ staging_branch: "main"
124
+ local_path: "/home/youruser/projects/acme-python-sdk"
125
+ # billing_enabled: false # set true to run /security-audit Phase 4 on this repo
126
+
127
+ # Monorepo satellite: multiple packages in one repo.
128
+ # subpaths maps named identifiers to per-package root directories
129
+ # relative to local_path. Used by /sync-ecosystem when the repo
130
+ # contains multiple independently published packages.
131
+ - prefix: "mono"
132
+ repo: "acme-org/acme-sdks"
133
+ staging_branch: "main"
134
+ local_path: "/home/youruser/projects/acme-sdks"
135
+ subpaths:
136
+ python_sdk: "sdk/python"
137
+ node_sdk: "sdk/node"
138
+ ```
139
+
140
+ | Field | Type | Required | Description |
141
+ |-------|------|----------|-------------|
142
+ | `default.repo` | string | No | Full `owner/repo` of the primary repo. Should match `project.owner/project.repo` |
143
+ | `default.staging_branch` | string | No | Staging branch for the default repo |
144
+ | `satellites[].prefix` | string | **Yes (per entry)** | Short prefix used in issue routing (e.g., `mcp:5` routes issue 5 to the MCP server repo) |
145
+ | `satellites[].repo` | string | **Yes (per entry)** | Full `owner/repo` of the satellite repository |
146
+ | `satellites[].staging_branch` | string | **Yes (per entry)** | Target branch for fast-lane PRs in this repo |
147
+ | `satellites[].local_path` | string | No | Absolute local path to the satellite repo's checkout |
148
+ | `satellites[].subpaths` | map(string→string) | No | Named sub-directory paths within `local_path`, for monorepo satellites that publish multiple packages. Each key is a logical name; the value is the relative path to that package's root. Used by `/sync-ecosystem` to locate per-package version files and publish workflows. |
149
+ | `satellites[].billing_enabled` | boolean | No | Set to `true` to run Phase 4 (Financial Integrity) of `/security-audit` against this satellite repo. Mirrors the top-level [`billing.enabled`](#billing-optional) flag but scoped per-satellite. Defaults to `false` when absent. |
150
+
151
+ **Routing syntax in commands**: `<prefix>:<issue_number>` — e.g., `mcp:5`, `sdk:12`
152
+
153
+ **Commands that use this section**: `work-on` (multi-repo prefix table), `sync-ecosystem`, `security-audit` (satellite billing audit)
154
+
155
+ ---
156
+
157
+ ## `project_board` (OPTIONAL)
158
+
159
+ GitHub Projects v2 integration. When configured, ForgeDock automatically adds issues to the project board and updates Status, Lane, Component, Priority, and Workflow fields as issues progress through the pipeline.
160
+
161
+ ```yaml
162
+ project_board:
163
+ owner: "acme-org"
164
+ project_number: 1
165
+ project_id: "PVT_kwHOxxxxxxxxxxxxxxxx"
166
+
167
+ field_ids:
168
+ status: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
169
+ lane: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
170
+ component: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
171
+ priority: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
172
+ workflow: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
173
+
174
+ option_ids:
175
+ status:
176
+ todo: "xxxxxxxx"
177
+ in_progress: "xxxxxxxx"
178
+ done: "xxxxxxxx"
179
+ lane:
180
+ fast: "xxxxxxxx"
181
+ feature: "xxxxxxxx"
182
+ sync: "xxxxxxxx"
183
+ priority:
184
+ p0: "xxxxxxxx"
185
+ p1: "xxxxxxxx"
186
+ p2: "xxxxxxxx"
187
+ p3: "xxxxxxxx"
188
+ workflow:
189
+ investigating: "xxxxxxxx"
190
+ building: "xxxxxxxx"
191
+ in_review: "xxxxxxxx"
192
+ merged: "xxxxxxxx"
193
+
194
+ components:
195
+ - repo: "acme-org/acme-platform"
196
+ option_id: "xxxxxxxx"
197
+ label: "Platform"
198
+ ```
199
+
200
+ ### Finding Your IDs
201
+
202
+ ```bash
203
+ # List projects and their numbers/IDs
204
+ gh project list --owner <owner> --format json | jq '.projects[] | {number, id, title}'
205
+
206
+ # List field IDs for a project
207
+ gh project field-list <project_number> --owner <owner> --format json | jq '.fields[]'
208
+
209
+ # List option IDs for a single-select field
210
+ gh project field-list <project_number> --owner <owner> --format json \
211
+ | jq '.fields[] | select(.name == "Status") | .options[]'
212
+ ```
213
+
214
+ | Field | Type | Required | Description |
215
+ |-------|------|----------|-------------|
216
+ | `owner` | string | **Yes** | GitHub org/user that owns the project board |
217
+ | `project_number` | integer | **Yes** | Project number visible in the URL (`/projects/1`) |
218
+ | `project_id` | string | **Yes** | GraphQL node ID (`PVT_...`) returned by `gh project list` |
219
+ | `field_ids.*` | string | **Yes (per field)** | `PVTSSF_...` IDs for each custom field |
220
+ | `option_ids.*.*` | string | **Yes (per option)** | 8-char hex IDs for each single-select option |
221
+ | `components` | array | No | Maps `owner/repo` values to Component field option IDs |
222
+
223
+ **Commands that use this section**: `work-on` (Phase 0C, Phase 6B), `orchestrate`
224
+
225
+ ---
226
+
227
+ ## `services` (OPTIONAL)
228
+
229
+ External service endpoints and identifiers. Used by analytics and monitoring commands.
230
+
231
+ ```yaml
232
+ services:
233
+ domain: "acme.io"
234
+ gsc_property: "https://acme.io"
235
+
236
+ analytics:
237
+ umami:
238
+ url: "https://umami.acme.io"
239
+ website_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
240
+ clarity:
241
+ project_id: "xxxxxxxxxx"
242
+ history_file: "/home/youruser/analytics-history.yaml"
243
+ ga4:
244
+ property_id: "000000000"
245
+ service_account_key: "/home/youruser/credentials/ga4-service-account.json"
246
+
247
+ app_url: "https://acme.io"
248
+ api_url: "https://api.acme.io"
249
+
250
+ # server_ssh: "ubuntu@203.0.113.42"
251
+ # ememo_path: "/home/ubuntu/ememo"
252
+ ```
253
+
254
+ | Field | Type | Required | Description |
255
+ |-------|------|----------|-------------|
256
+ | `domain` | string | No | Primary public domain. Used in GEO and SEO checks |
257
+ | `gsc_property` | string | No | Google Search Console property URL or `domain:` prefix |
258
+ | `analytics.umami.url` | string | No | Base URL for Umami self-hosted analytics instance |
259
+ | `analytics.umami.website_id` | string | No | Umami website UUID for metric queries |
260
+ | `analytics.clarity.project_id` | string | No | Microsoft Clarity project identifier |
261
+ | `analytics.history_file` | string (absolute path) | No | Path to the persistent audit history YAML file. Written after each `/analytics` run; provides trend baselines. Do not commit. |
262
+ | `analytics.ga4.property_id` | string | No | Numeric Google Analytics 4 property ID (from GA4 Admin → Property Details) |
263
+ | `analytics.ga4.service_account_key` | string (absolute path) | No | Path to a GA4 service account JSON key file. Grant the account Viewer access in GA4. Do not commit. |
264
+ | `app_url` | string | No | Frontend app URL used by `qa-sweep` for page accessibility testing. Default: `http://localhost:3000` |
265
+ | `api_url` | string | No | Base URL for the project's API. Used in health checks |
266
+ | `server_ssh` | string | No | SSH target for production server health checks. Format: `user@host` (e.g., `ubuntu@203.0.113.42`). Used by `/autopilot` Phase 1 to run server-level checks over SSH. |
267
+ | `ememo_path` | string | No | Absolute path on the production server to open eMemo files. Used by `/autopilot` to surface in-progress work notes. Only relevant if your team uses eMemo. |
268
+
269
+ **Commands that use this section**: `analytics`, `geo-audit`, `autopilot` (analytics snapshot, SSH health check)
270
+
271
+ ---
272
+
273
+ ## `review` (OPTIONAL)
274
+
275
+ Context injected into review agent prompts. Helps the 9-agent review system give relevant, project-specific feedback.
276
+
277
+ ```yaml
278
+ review:
279
+ tech_stack: "Next.js 15 App Router, FastAPI, PostgreSQL 16, Docker, Traefik"
280
+
281
+ context: |
282
+ Multi-service monorepo: services/api (Python/FastAPI), web/ (Next.js).
283
+ Deploy: blue/green via Docker Compose on a single VPS behind Traefik.
284
+ Database: PostgreSQL with async SQLAlchemy. No ORM migrations — raw SQL.
285
+
286
+ domains:
287
+ billing: "Stripe webhooks; idempotency keys required on all handlers"
288
+ auth: "JWT + refresh token rotation; sessions stored in Redis"
289
+ database: "Always use docker exec <container> for psql/migrations"
290
+
291
+ # key_paths:
292
+ # auth: ["services/api/auth/**", "web/src/lib/auth/**"]
293
+ # billing: ["services/api/billing/**", "web/src/app/billing/**"]
294
+ # database: ["services/api/db/**", "migrations/**"]
295
+ ```
296
+
297
+ | Field | Type | Required | Description |
298
+ |-------|------|----------|-------------|
299
+ | `tech_stack` | string | No | One-line tech stack summary. Injected into all review agent prompts |
300
+ | `context` | string (multiline) | No | Freeform context about architecture, deploy model, and known pitfalls |
301
+ | `domains.*` | string | No | Domain-specific notes keyed by review agent name (`billing`, `auth`, `database`, `frontend`, `api`, `infra`, `security`) |
302
+ | `key_paths` | map(string→list of strings) | No | Domain-to-file mapping used by `/work-on` investigation and `/review-pr` agents to quickly locate relevant files. Keys are domain names matching issue labels; values are lists of file path patterns (glob-style, relative to repo root). When present, agents use this table instead of inferring files from labels and issue body. |
303
+
304
+ **Commands that use this section**: `review-pr`, `review-pr-agents` (all domain agents), `work-on` (Phase 1B investigation)
305
+
306
+ ---
307
+
308
+ ## `verification` (OPTIONAL)
309
+
310
+ Service health-check patterns for the quality gate and validate commands.
311
+
312
+ ```yaml
313
+ verification:
314
+ health_endpoint: "https://api.acme.io/health"
315
+
316
+ health_patterns:
317
+ - '"status": "ok"'
318
+ - '"database": "connected"'
319
+
320
+ services:
321
+ - name: "api"
322
+ container: "acme-api-blue"
323
+ health_url: "http://localhost:8000/health"
324
+ - name: "web"
325
+ container: "acme-web-blue"
326
+ health_url: "http://localhost:3000"
327
+ ```
328
+
329
+ | Field | Type | Required | Description |
330
+ |-------|------|----------|-------------|
331
+ | `health_endpoint` | string | No | Primary health-check URL that should return HTTP 200 |
332
+ | `health_patterns` | array of strings | No | Strings that must appear in the health endpoint response body |
333
+ | `services` | array | No | Named services to verify as part of deployment validation |
334
+ | `services[].name` | string | **Yes (per entry)** | Human-readable service name |
335
+ | `services[].container` | string | No | Docker container name for `docker exec` verification |
336
+ | `services[].health_url` | string | No | Local URL for container-level health checks |
337
+
338
+ **Commands that use this section**: `quality-gate`, `validate`
339
+
340
+ ---
341
+
342
+ ## Credentials File Format
343
+
344
+ If `paths.credentials.file` is set, the file at that path is expected to be a YAML file with this structure:
345
+
346
+ ```yaml
347
+ # credentials.yaml — DO NOT COMMIT
348
+ umami:
349
+ username: "admin"
350
+ password: "your-password"
351
+
352
+ cloudflare:
353
+ api_token: "your-cf-token"
354
+ zone_id: "your-zone-id"
355
+
356
+ # QA test user credentials — read by /qa-sweep for browser-based authentication
357
+ qa:
358
+ username: "test@example.com"
359
+ password: "your-test-password"
360
+
361
+ # Add other service credentials as needed
362
+ ```
363
+
364
+ The credentials file is read directly by analytics and monitoring commands. It is never committed — add it to `.gitignore`.
365
+
366
+ ---
367
+
368
+ ## `billing` (OPTIONAL)
369
+
370
+ Controls whether financial integrity checks run in `/security-audit`. Only relevant for projects with Stripe or similar billing infrastructure. When omitted or set to `false`, Phase 4 (Financial Integrity) of the security audit is skipped.
371
+
372
+ ```yaml
373
+ billing:
374
+ enabled: false
375
+ ```
376
+
377
+ | Field | Type | Required | Default | Description |
378
+ |-------|------|----------|---------|-------------|
379
+ | `enabled` | boolean | No | `false` | Set to `true` to enable Phase 4 (Financial Integrity) in `/security-audit`. When `false`, the billing audit phase is skipped — appropriate for projects that do not process payments or have no Stripe integration. |
380
+
381
+ **Commands that use this section**: `security-audit` (Phase 4 — Financial Integrity)
382
+
383
+ ---
384
+
385
+ ## Config Reading Conventions
386
+
387
+ ForgeDock commands use two accepted patterns for reading `forge.yaml`:
388
+
389
+ - **`yq` (standard)**: Simple field reads use `yq '.section.field // ""' forge.yaml 2>/dev/null || echo ""`. This is the canonical pattern used by the majority of commands (`cleanup`, `orchestrate`, `work-on/close`, etc.).
390
+ - **Python `yaml.safe_load` (complex extraction)**: Commands that need to extract many fields from optional nested sections in a single pass (e.g., `analytics`, `geo-audit`, `qa-sweep`) use a Python heredoc. This avoids chaining many `yq` calls and allows structured error messaging when optional sections are absent.
391
+
392
+ Do **not** mix the two patterns for the same block of variables (e.g., `yq` with Python fallback). If a command needs more than 5 fields from a deeply nested optional section, use Python. Otherwise, use `yq`.
393
+
394
+ ---
395
+
396
+ ## Complete Example
397
+
398
+ See [`forge.yaml.example`](../forge.yaml.example) at the repository root for a fully annotated example covering all sections.
package/docs/WORKFLOW.md CHANGED
@@ -1,104 +1,147 @@
1
1
  # Workflow Reference
2
2
 
3
- Canonical reference for field IDs, option IDs, and integration constants used by Forge commands.
3
+ Canonical reference for configuring and querying the GitHub Projects v2 field IDs and option IDs used by ForgeDock commands.
4
4
 
5
5
  ---
6
6
 
7
7
  ## Project Board Integration
8
8
 
9
- **Project ID**: `PVT_kwHOCx3gR84BSK2L`
9
+ ForgeDock commands add issues to a GitHub Projects v2 board and update fields (Status, Lane, Component, Priority, Workflow) as issues move through the pipeline.
10
10
 
11
- All commands that add issues to the GitHub Project board use the field and option IDs below.
12
- Reference this document rather than hardcoding values inline.
11
+ **All board IDs are project-specific.** You cannot reuse IDs from another project. Use the discovery commands below to find yours, or run `/forgedock-init` which does this automatically.
13
12
 
14
- ### Field IDs
13
+ ---
15
14
 
16
- | Field | Field ID |
17
- |-------|----------|
18
- | Status | `PVTSSF_lAHOCx3gR84BSK2Lzg_yF6E` |
19
- | Lane | `PVTSSF_lAHOCx3gR84BSK2Lzg_yF98` |
20
- | Component | `PVTSSF_lAHOCx3gR84BSK2Lzg_yF-o` |
21
- | Priority | `PVTSSF_lAHOCx3gR84BSK2Lzg_yF8o` |
22
- | Workflow | `PVTSSF_lAHOCx3gR84BSK2Lzg_yGAA` |
15
+ ## Configuration
16
+
17
+ Project board IDs are stored in `forge.yaml` under the `project_board` section. See [`docs/CONFIG.md`](CONFIG.md#project_board-optional) for the full schema.
18
+
19
+ ```yaml
20
+ project_board:
21
+ owner: "your-org"
22
+ project_number: 1
23
+ project_id: "PVT_kwHOxxxxxxxxxxxxxxxx"
24
+
25
+ field_ids:
26
+ status: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
27
+ lane: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
28
+ component: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
29
+ priority: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
30
+ workflow: "PVTSSF_xxxxxxxxxxxxxxxxxxxxxxxx"
31
+
32
+ option_ids:
33
+ status:
34
+ todo: "xxxxxxxx"
35
+ in_progress: "xxxxxxxx"
36
+ done: "xxxxxxxx"
37
+ lane:
38
+ fast: "xxxxxxxx"
39
+ feature: "xxxxxxxx"
40
+ sync: "xxxxxxxx"
41
+ priority:
42
+ p0: "xxxxxxxx"
43
+ p1: "xxxxxxxx"
44
+ p2: "xxxxxxxx"
45
+ p3: "xxxxxxxx"
46
+ workflow:
47
+ investigating: "xxxxxxxx"
48
+ building: "xxxxxxxx"
49
+ in_review: "xxxxxxxx"
50
+ merged: "xxxxxxxx"
51
+
52
+ components:
53
+ - repo: "your-org/your-repo"
54
+ option_id: "xxxxxxxx"
55
+ label: "Platform"
56
+ ```
23
57
 
24
- ### Status Field Options (`PVTSSF_lAHOCx3gR84BSK2Lzg_yF6E`)
58
+ ---
25
59
 
26
- | Value | Option ID |
27
- |-------|-----------|
28
- | Todo | `f75ad846` |
29
- | In Progress | _(query live if needed)_ |
30
- | Done | `98236657` |
60
+ ## Finding Your IDs
31
61
 
32
- ### Lane Field Options (`PVTSSF_lAHOCx3gR84BSK2Lzg_yF98`)
62
+ ### Step 1 — Find your project number and project ID
33
63
 
34
- | Value | Option ID |
35
- |-------|-----------|
36
- | Fast | `62864af4` |
37
- | Feature | `4ff6f9e6` |
38
- | Sync | `c0c37d33` |
64
+ ```bash
65
+ # List all projects owned by your org or user
66
+ gh project list --owner <your-org-or-username> --format json \
67
+ | jq '.projects[] | {number: .number, id: .id, title: .title}'
68
+ ```
39
69
 
40
- ### Component Field Options (`PVTSSF_lAHOCx3gR84BSK2Lzg_yF-o`)
70
+ The `id` value is your `project_id` (`PVT_...`). The `number` is used in all subsequent queries.
41
71
 
42
- | Value | Option ID | Repo |
43
- |-------|-----------|------|
44
- | Platform | `214c4d65` | `RapierCraft/AlterLab` |
45
- | MCP Server | _(query live if needed)_ | `RapierCraft/alterlab-mcp-server` |
46
- | n8n Node | _(query live if needed)_ | `RapierCraft/n8n-nodes-alterlab` |
47
- | Python SDK | _(query live if needed)_ | `RapierCraft/alterlab-python` |
48
- | Node SDK | _(query live if needed)_ | `RapierCraft/alterlab-node` |
72
+ ### Step 2 — List field IDs
49
73
 
50
- ### Priority Field Options (`PVTSSF_lAHOCx3gR84BSK2Lzg_yF8o`)
74
+ ```bash
75
+ gh project field-list <project_number> --owner <your-org-or-username> --format json \
76
+ | jq '.fields[] | {name: .name, id: .id}'
77
+ ```
51
78
 
52
- | Value | Option ID |
53
- |-------|-----------|
54
- | P0 | _(query live if needed)_ |
55
- | P1 | _(query live if needed)_ |
56
- | P2 | `4d95eef3` |
57
- | P3 | _(query live if needed)_ |
79
+ Each field's `id` value (`PVTSSF_...`) maps to a key under `field_ids` in your `forge.yaml`.
58
80
 
59
- ### Workflow Field Options (`PVTSSF_lAHOCx3gR84BSK2Lzg_yGAA`)
81
+ ### Step 3 — List option IDs for single-select fields
60
82
 
61
- | Value | Option ID |
62
- |-------|-----------|
63
- | Investigating | _(query live if needed)_ |
64
- | Building | _(query live if needed)_ |
65
- | In Review | _(query live if needed)_ |
66
- | Merged | `b510c537` |
83
+ ```bash
84
+ # Get all options for a specific field (e.g. Status)
85
+ gh project field-list <project_number> --owner <your-org-or-username> --format json \
86
+ | jq '.fields[] | select(.name == "Status") | .options[] | {name: .name, id: .id}'
87
+ ```
67
88
 
68
- ### Usage Pattern
89
+ Repeat for each field (Lane, Priority, Workflow, Component). The 8-character hex IDs are your `option_ids` values.
69
90
 
70
- ```bash
71
- # Add issue to project board and set initial fields
72
- ITEM_ID=$(gh project item-add PVT_kwHOCx3gR84BSK2L --owner RapierCraft --url "$ISSUE_URL" --format json --jq '.id')
91
+ ---
92
+
93
+ ## Automated Setup
94
+
95
+ Running `/forgedock-init` in Claude Code walks you through the full setup interactively: it queries your project board, extracts all field and option IDs, and writes them to `forge.yaml` automatically.
96
+
97
+ ---
73
98
 
74
- # Set Status=Todo
75
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
76
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yF6E --single-select-option-id f75ad846 2>/dev/null || true
99
+ ## Usage Pattern
77
100
 
78
- # Set Lane (Fast=62864af4, Feature=4ff6f9e6, Sync=c0c37d33)
79
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
80
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yF98 --single-select-option-id 62864af4 2>/dev/null || true
101
+ Once IDs are in `forge.yaml`, ForgeDock reads them at runtime. The pattern used by commands:
81
102
 
82
- # Set Component=Platform
83
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
84
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yF-o --single-select-option-id 214c4d65 2>/dev/null || true
103
+ ```bash
104
+ # Add issue to project board
105
+ ITEM_ID=$(gh project item-add <project_id> --owner <owner> --url "$ISSUE_URL" \
106
+ --format json --jq '.id')
107
+
108
+ # Set Status field
109
+ gh project item-edit --project-id <project_id> --id "$ITEM_ID" \
110
+ --field-id <status_field_id> --single-select-option-id <todo_option_id> \
111
+ 2>/dev/null || true
85
112
 
86
- # Set Priority (P2=4d95eef3)
87
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
88
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yF8o --single-select-option-id 4d95eef3 2>/dev/null || true
113
+ # Set Lane field
114
+ gh project item-edit --project-id <project_id> --id "$ITEM_ID" \
115
+ --field-id <lane_field_id> --single-select-option-id <fast_option_id> \
116
+ 2>/dev/null || true
89
117
 
90
118
  # On merge: set Status=Done and Workflow=Merged
91
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
92
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yF6E --single-select-option-id 98236657 2>/dev/null || true
93
- gh project item-edit --project-id PVT_kwHOCx3gR84BSK2L --id "$ITEM_ID" \
94
- --field-id PVTSSF_lAHOCx3gR84BSK2Lzg_yGAA --single-select-option-id b510c537 2>/dev/null || true
119
+ gh project item-edit --project-id <project_id> --id "$ITEM_ID" \
120
+ --field-id <status_field_id> --single-select-option-id <done_option_id> \
121
+ 2>/dev/null || true
122
+ gh project item-edit --project-id <project_id> --id "$ITEM_ID" \
123
+ --field-id <workflow_field_id> --single-select-option-id <merged_option_id> \
124
+ 2>/dev/null || true
95
125
  ```
96
126
 
97
- ### Querying Unknown Option IDs
127
+ All `<placeholder>` values come from your `forge.yaml` — commands read `forge.yaml` and substitute them at runtime.
98
128
 
99
- For option IDs marked "_(query live if needed)_", use:
129
+ ---
100
130
 
101
- ```bash
102
- gh project field-list PVT_kwHOCx3gR84BSK2L --owner RapierCraft --format json \
103
- --jq '.fields[] | select(.name == "Status") | .options'
104
- ```
131
+ ## Adding a Component Field
132
+
133
+ The Component field maps each repository in your project to a selectable option. For each repo you track:
134
+
135
+ 1. Create a single-select option in your GitHub project's Component field (via the project UI)
136
+ 2. Query the new option's ID:
137
+ ```bash
138
+ gh project field-list <project_number> --owner <owner> --format json \
139
+ | jq '.fields[] | select(.name == "Component") | .options[]'
140
+ ```
141
+ 3. Add an entry under `components` in `forge.yaml`:
142
+ ```yaml
143
+ components:
144
+ - repo: "your-org/your-repo"
145
+ option_id: "xxxxxxxx"
146
+ label: "Platform"
147
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgedock",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "GitHub as a knowledge graph for AI agents. Autonomous dev pipeline for Claude Code.",
5
5
  "bin": {
6
6
  "forgedock": "bin/forgedock.mjs"