forgedock 1.1.7 → 1.1.9
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.
- package/README.md +10 -33
- package/bin/cinema.mjs +23 -5
- package/bin/engine/invariants.mjs +361 -0
- package/bin/engine-cli.mjs +137 -11
- package/bin/env-detect.mjs +249 -0
- package/bin/forge-utils.mjs +364 -4
- package/bin/forgedock.mjs +1064 -135
- package/bin/hooks/pre-tool-use.mjs +182 -0
- package/bin/hooks/session-start.mjs +68 -3
- package/bin/init-detect.mjs +101 -12
- package/bin/journey.mjs +917 -16
- package/bin/labels.json +10 -0
- package/bin/recall.mjs +557 -0
- package/bin/registry.mjs +91 -3
- package/bin/runner.mjs +38 -2
- package/bin/tui.mjs +49 -3
- package/commands/adopt.md +1 -1
- package/commands/analytics.md +8 -8
- package/commands/audit.md +1 -1
- package/commands/autopilot.md +958 -77
- package/commands/ci-audit.md +1 -1
- package/commands/cleanup.md +139 -55
- package/commands/compat-audit.md +1 -1
- package/commands/deploy-info.md +1 -1
- package/commands/deploy-pr.md +1 -1
- package/commands/diagnose.md +1 -1
- package/commands/explain.md +1 -1
- package/commands/fix-ci.md +1 -1
- package/commands/forgedock-init.md +1 -1
- package/commands/incident-response.md +3 -3
- package/commands/issue.md +1 -1
- package/commands/optimize.md +586 -1
- package/commands/orchestrate/config.md +13 -3
- package/commands/orchestrate/phase-1-resolve.md +36 -26
- package/commands/orchestrate/phase-2-triage.md +1 -1
- package/commands/orchestrate/phase-2.5-synthesis.md +1 -1
- package/commands/orchestrate/phase-3-dependency.md +587 -48
- package/commands/orchestrate/phase-4-execution.md +1031 -57
- package/commands/orchestrate/phase-5-cleanup.md +1 -1
- package/commands/orchestrate/phase-6-report.md +248 -11
- package/commands/orchestrate/safety.md +2 -2
- package/commands/pipeline-health/phase-2-metrics.md +305 -1
- package/commands/pipeline-health/phase-4-proposals.md +127 -0
- package/commands/qa-sweep.md +1 -1
- package/commands/quality-gate.md +418 -1
- package/commands/recover-orphans.md +5 -5
- package/commands/replay.md +1 -1
- package/commands/review-pr-agents/api.md +2 -2
- package/commands/review-pr-agents/auth.md +2 -2
- package/commands/review-pr-agents/billing.md +2 -2
- package/commands/review-pr-agents/concurrency.md +2 -2
- package/commands/review-pr-agents/database.md +2 -2
- package/commands/review-pr-agents/frontend.md +2 -2
- package/commands/review-pr-agents/infra.md +2 -2
- package/commands/review-pr-agents/protocols.md +1 -1
- package/commands/review-pr-agents/scraper.md +2 -2
- package/commands/review-pr-agents/security.md +2 -2
- package/commands/review-pr-staging.md +41 -3
- package/commands/review-pr.md +462 -19
- package/commands/rollback.md +1 -1
- package/commands/scope.md +1 -1
- package/commands/security-audit.md +1 -1
- package/commands/spec-doctor.md +429 -0
- package/commands/test-gate.md +1 -1
- package/commands/validate.md +53 -1
- package/commands/work-on/build/architect.md +78 -1
- package/commands/work-on/build/context.md +360 -22
- package/commands/work-on/build/implement.md +3 -1
- package/commands/work-on/build/validate.md +29 -1
- package/commands/work-on/build.md +75 -6
- package/commands/work-on/close.md +624 -10
- package/commands/work-on/decompose.md +1 -1
- package/commands/work-on/investigate.md +235 -5
- package/commands/work-on/remediate.md +331 -0
- package/commands/work-on/review.md +1 -1
- package/commands/work-on-monolithic.md +1 -1
- package/commands/work-on.md +205 -66
- package/docs/CI.md +2 -2
- package/docs/CODEX.md +1 -1
- package/docs/CONFIG.md +186 -0
- package/docs/FORGE-PROTOCOL.md +101 -0
- package/docs/site/command-reference.md +31 -1
- package/docs/site/getting-started.md +9 -34
- package/docs/site/index.md +1 -1
- package/docs/spec/forge-protocol-v1.md +97 -5
- package/docs/spec/label-state-machine.md +6 -1
- package/package.json +3 -2
- package/packages/protocol/src/cli.js +374 -84
- package/packages/protocol/src/types.js +75 -1
- package/scripts/build-knowledge-index.mjs +1761 -0
- package/scripts/calibration.mjs +996 -0
- package/scripts/check-command-docs-drift.sh +4 -2
- package/scripts/danger-zones.mjs +789 -0
- package/scripts/doctor-pipeline-state.sh +88 -2
- package/scripts/select-fix-targets.sh +234 -0
- package/scripts/transition-label.sh +245 -6
- package/scripts/refresh-bot-token.sh +0 -97
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
install:
|
|
2
|
+
install: core
|
|
3
3
|
---
|
|
4
4
|
<!-- SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios -->
|
|
5
5
|
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
|
|
@@ -64,48 +64,57 @@ If a `workflow:decomposed` issue is found, automatically expand it to its open s
|
|
|
64
64
|
### P3 Review-Finding Batching (deterministic grouping rule)
|
|
65
65
|
|
|
66
66
|
<!-- Added: forge#1333 -->
|
|
67
|
+
<!-- Extended: forge#1818 — default-batchable eligibility, surface-area grouping, lowered same-file threshold -->
|
|
67
68
|
|
|
68
69
|
Before finalizing the issue set, apply the P3 batching rule to reduce full-pipeline overhead on low-severity review findings.
|
|
69
70
|
|
|
70
|
-
**Trigger conditions** (
|
|
71
|
+
**Trigger conditions** (default-batchable — no opt-in marker required):
|
|
71
72
|
1. The issue has labels `review-finding` + `priority:P3`
|
|
72
|
-
2. The issue
|
|
73
|
+
2. The issue does NOT match any Safety exclusion below
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
- Issue body contains the word "security" or "billing" anywhere in the title or `## Problem` section
|
|
76
|
-
- Issue has a `security` label
|
|
77
|
-
- Issue has a `billing` label
|
|
75
|
+
The `<!-- FORGE:BATCHABLE -->` marker (still appended by `review-pr.md` at finding-creation time) is honored when present but is no longer REQUIRED for eligibility — a `review-finding`+`priority:P3` issue is batchable by default unless explicitly excluded. This closes the gap where cascade-spawned findings that never carried the marker sat un-batched indefinitely. <!-- Added: forge#1818 -->
|
|
78
76
|
|
|
79
|
-
**
|
|
77
|
+
**Safety exclusions — NEVER batch, at any priority** (override all trigger conditions):
|
|
78
|
+
- Issue body contains the word "security", "billing", "anti-bot", or "auth" anywhere in the title or `## Problem` section
|
|
79
|
+
- Issue has a `security`, `billing`, `anti-bot`, or `auth` label
|
|
80
|
+
|
|
81
|
+
These exclusions apply regardless of priority: P1/P2 findings are already never batched (see Important limits), and P3 findings in these domains are excluded even though they would otherwise qualify for default-batchable treatment. <!-- Added: forge#1818 -->
|
|
82
|
+
|
|
83
|
+
**Grouping algorithm (surface area — same file first, leaf directory as broader fallback):** <!-- Changed: forge#1818 — was domain-only -->
|
|
80
84
|
```bash
|
|
81
|
-
# Fetch all open batchable P3 issues
|
|
85
|
+
# Fetch all open batchable P3 issues (default-batchable; marker no longer required)
|
|
82
86
|
BATCHABLE_P3=$(gh issue list {GH_FLAG} \
|
|
83
87
|
--state open \
|
|
84
88
|
--label "review-finding,priority:P3" \
|
|
85
89
|
--limit 500 \
|
|
86
90
|
--json number,title,body,labels \
|
|
87
|
-
--jq '.[] | select(.
|
|
88
|
-
| select(
|
|
89
|
-
| select(.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
# "
|
|
96
|
-
# "commands/review-pr.md"
|
|
91
|
+
--jq '.[] | select((.title | test("security|billing|anti-bot|auth"; "i")) | not)
|
|
92
|
+
| select(.body | test("## Problem[\\s\\S]{0,500}(security|billing|anti-bot|auth)"; "i") | not)
|
|
93
|
+
| select(([.labels[].name] | any(. == "security" or . == "billing" or . == "anti-bot" or . == "auth")) | not)')
|
|
94
|
+
|
|
95
|
+
# Surface area = the exact affected file path listed first under "## Affected Files" (primary grouping key).
|
|
96
|
+
# Leaf directory = dirname of that file (broader fallback grouping key, formerly called "domain").
|
|
97
|
+
# e.g., "services/api/auth/login.py" → EXCLUDED (auth path)
|
|
98
|
+
# "web/src/app/billing/page.tsx" → EXCLUDED (billing path)
|
|
99
|
+
# "commands/orchestrate/phase-1-resolve.md" → file "commands/orchestrate/phase-1-resolve.md", leaf-dir "commands/orchestrate"
|
|
100
|
+
# "commands/review-pr.md" → file "commands/review-pr.md", leaf-dir "commands"
|
|
97
101
|
```
|
|
98
102
|
|
|
99
|
-
**Batch creation rule
|
|
103
|
+
**Batch creation rule (two-tier threshold):** <!-- Changed: forge#1818 — added lower same-file tier -->
|
|
104
|
+
- **Same-file cluster** (primary, low threshold): When **2+** batchable P3 issues share the exact same affected file, create a batch issue for that file cluster. Same-file P3 findings are the dominant low-value token sink (dead imports, stale comments, style nits) and already conflict with each other if built individually — the low threshold reflects that they'd otherwise serialize into slow one-at-a-time chains regardless of count.
|
|
105
|
+
- **Leaf-directory cluster** (broader grouping, existing threshold preserved): When **5+** batchable P3 issues share the same leaf directory but are not already covered by a same-file cluster above, OR the oldest batchable P3 in that leaf directory exceeds 72 hours, create a batch issue for that leaf-directory cluster.
|
|
106
|
+
- Form same-file clusters first; evaluate any remaining ungrouped findings for leaf-directory clustering. A finding is claimed by at most one batch.
|
|
100
107
|
|
|
108
|
+
**Sanitize the surface-area path before interpolation (MANDATORY):** `{SURFACE_AREA}` is an affected-file path derived from an issue body, and git filenames can legally carry shell metacharacters (`` ` ``, `$()`, quotes). Restrict it to a validated `[A-Za-z0-9._/-]` charset before templating it into `--title` / `--body`, so an untrusted issue body cannot break the `gh` argument boundary. The same guard is applied at the mirror site in `phase-4-execution.md`. <!-- forge#1833, forge#1835 -->
|
|
101
109
|
```bash
|
|
110
|
+
SAFE_SURFACE_AREA=$(printf '%s' "{SURFACE_AREA}" | tr -cd 'A-Za-z0-9._/-')
|
|
102
111
|
BATCH_ISSUE_NUM=$(gh issue create {GH_FLAG} \
|
|
103
|
-
--title "fix(batch): P3 review findings — {
|
|
112
|
+
--title "fix(batch): P3 review findings — ${SAFE_SURFACE_AREA} (batch #{BATCH_N})" \
|
|
104
113
|
--label "review-finding,priority:P3,batch" \
|
|
105
114
|
--body "$(cat <<'BATCH_EOF'
|
|
106
115
|
## Problem
|
|
107
116
|
|
|
108
|
-
Batch of P3 review findings in
|
|
117
|
+
Batch of P3 review findings in **{SURFACE_AREA}** (same file or leaf directory), grouped to reduce per-finding pipeline overhead.
|
|
109
118
|
|
|
110
119
|
## Member Findings
|
|
111
120
|
|
|
@@ -117,11 +126,11 @@ Batch of P3 review findings in the **{DOMAIN}** domain, grouped to reduce per-fi
|
|
|
117
126
|
|
|
118
127
|
- [ ] All member findings addressed or closed as false-positive
|
|
119
128
|
- [ ] Member issues auto-closed with reference to this batch PR on merge
|
|
120
|
-
- [ ] No security or
|
|
129
|
+
- [ ] No security, billing, anti-bot, or auth paths touched (validated before batching)
|
|
121
130
|
|
|
122
131
|
## Context
|
|
123
132
|
|
|
124
|
-
**Batch policy**:
|
|
133
|
+
**Batch policy**: 2+ open P3 findings sharing the same file, or 5+ sharing the same leaf directory, or oldest > 72h.
|
|
125
134
|
**Member issues**: #{N1}, #{N2}, #{N3}, ...
|
|
126
135
|
|
|
127
136
|
<!-- FORGE:BATCHABLE -->
|
|
@@ -132,11 +141,12 @@ BATCH_EOF
|
|
|
132
141
|
**Replace member issues with the batch issue** in the resolved issue set. Member issues are NOT individually dispatched to `/work-on` — the batch issue is the single pipeline unit.
|
|
133
142
|
|
|
134
143
|
**Important limits**:
|
|
135
|
-
- Max
|
|
144
|
+
- Max **8** members per batch issue — if more than 8 batchable P3s exist in a surface-area cluster, create multiple batch issues of ≤ 8 each <!-- Changed: forge#1818 — was 10 -->
|
|
136
145
|
- P1 and P2 issues are NEVER batched — they keep the standard one-issue-one-PR path
|
|
146
|
+
- Security/billing/anti-bot/auth findings are NEVER batched at any priority (see Safety exclusions above) <!-- Added: forge#1818 -->
|
|
137
147
|
- Batch issues themselves are never nested inside other batch issues
|
|
138
148
|
|
|
139
|
-
If fewer than
|
|
149
|
+
If fewer than 2 batchable P3 findings share a file, AND fewer than 5 share a leaf directory, AND none exceed 72h, skip batch creation entirely — individual P3s run through the standard pipeline.
|
|
140
150
|
|
|
141
151
|
### CRITICAL: No duplicate detection at orchestrator level
|
|
142
152
|
|