adopt
Bootstrap an existing repo for ForgeDock — triage open issues, apply labels, suggest a starter milestone, and identify first…
<!-- SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios --> <!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
> /plugin marketplace add RapierCraftStudios/ForgeDock > /plugin install forgedock@forgedock
How it fires
How this command gets triggered: by you, by Claude, or both.
/phase-3-dependencyContext preview
What this command does when you run it.
<!-- SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios --> <!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
user-invocable: false install: core
<!-- SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios --> <!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
> **Skill names**: `{FORGE_SKILL_PREFIX}` is `forgedock:` (plugin install) or empty (`install.sh`), resolved once per run by `commands/work-on.md` § Skill Name Resolution. If the skill is not found under either name, STOP and report "skill not found" — never run the phase inline.
For each issue (including newly spawned ones from Phase 2), check: 1. **Explicit dependencies**: Issue body contains "Depends on #X" or "Blocked by #X" 2. **Milestone ordering**: Issues within a milestone may have a natural order (foundation → features → UI) 3. **File conflicts**: If two issues modify the same files, they should be sequential (not parallel) 4. **Parent-child links**: If issue body contains "Parent investigation: #{X}", it was spawned by an investigation — no special ordering needed unless explicitly stated
Read each issue's body briefly to check for dependency markers:
for NUM in {issue_numbers}; do
gh issue view $NUM --json body --jq '.body' | grep -iE 'depends on|blocked by|after #|parent investigation' || echo "no deps"
doneFor each issue, estimate which domains it touches based on title, body, and labels. This improves DAG construction — issues in the same domain likely touch the same files and should be serialized (one becomes a predecessor of the other).
declare -A ISSUE_DOMAIN # issue → comma-separated matched domain tags, or "NONE" (forge#1913)
for NUM in {issue_numbers}; do
ISSUE=$(gh issue view $NUM --json title,body,labels --jq '{title: .title, labels: [.labels[].name], body: (.body[:300])}')
echo "=== #$NUM ==="
MATCHED_DOMAINS=()
if echo "$ISSUE" | grep -qiE "credit|billing|pricing|stripe|charge|refund"; then echo " BILLING"; MATCHED_DOMAINS+=("BILLING"); fi
if echo "$ISSUE" | grep -qiE "auth|session|jwt|login|permission|oauth"; then echo " AUTH"; MATCHED_DOMAINS+=("AUTH"); fi
if echo "$ISSUE" | grep -qiE "worker|queue|job|task|background|consumer"; then echo " WORKER"; MATCHED_DOMAINS+=("WORKER"); fi
if echo "$ISSUE" | grep -qiE "migration|\.sql|database|postgres|alembic"; then echo " DATABASE"; MATCHED_DOMAINS+=("DATABASE"); fi
if echo "$ISSUE" | grep -qiE "component|page|layout|dashboard|ui|ux|frontend|web/src"; then echo " FRONTEND"; MATCHED_DOMAINS+=("FRONTEND"); fi
if echo "$ISSUE" | grep -qiE "docker|deploy|traefik|nginx|ci|cd|infra|github.action"; then echo " INFRA"; MATCHED_DOMAINS+=("INFRA"); fi
if echo "$ISSUE" | grep -qiE "llm|extract|schema|format|embedding|model"; then echo " AI"; MATCHED_DOMAINS+=("AI"); fi
# For project-specific domains, configure keywords in forge.yaml → review.domains and extend above
# Materialize the result — every issue gets an explicit ISSUE_DOMAIN entry, even when no
# keyword matched ("NONE"). This is what Step 3D.6's completion gate checks for key presence
# (not truthiness) — an un-set key means this loop never ran for that issue. <!-- forge#1913 -->
if [ "${#MATCHED_DOMAINS[@]}" -eq 0 ]; then
ISSUE_DOMAIN[$NUM]="NONE"
else
ISSUE_DOMAIN[$NUM]=$(IFS=,; echo "${MATCHED_DOMAINS[*]}")
fi
done**Use domain info for DAG edge construction:**
**Domain tags are stored in `ISSUE_DOMAIN[$NUM]`** (materialized above) for use in the plan presentation (Step 3E) and the Step 3D.6 completion gate.
Domain estimation (above) catches broad category overlap but misses cases where two issues modify the exact same file without mentioning the same keywords, or where two issues touch different files that share indirect dependencies (imports, config, barrel exports). This step uses three layers of structural analysis to catch conflicts the keyword heuristic misses.
**For issues that already have a `FORGE:CONTRACT` comment** (built in a prior wave or session, or re-extracted mid-batch), extract its `### Deliverables` table first — that table states intent to change, so it outranks every other source (forge#2848). **For issues that already have an INVESTIGATOR comment** (from Wave 0 or a prior session) and no contract-derived paths, extract their Affected Files list, scoped to that comment's own `### Affected Files` section. **For issues WITHOUT an investigation comment**, fall back to parsing the issue body, scoped to a deliverables-shaped heading (`## Affected Files`, `## Deliverables`, or `### Files to change`) — never the whole body. Both code paths accumulate into a single `LAYER1_FILES` array (declared once, before the loop) — this is the batch-wide file set that Layer 5's co-change query (below) reuses, per the "file list already extracted in Layer 1" reference in Layer 2 and Layer 5. Extraction runs through `scripts/extract-affected-files.sh` (not an inline `grep -oP` over the whole text) so that stray paths mentioned in `## Context` / `## Prior art` / `## Related` / `## Root Cause` — or anywhere outside a deliverables-shaped heading — are never
ForgeDock — autonomous AI dev pipeline for Claude Code. GitHub as agent memory: issue in, PR out.
Bootstrap an existing repo for ForgeDock — triage open issues, apply labels, suggest a starter milestone, and identify first…
Pull production analytics from GSC, Bing Webmaster, Clarity, Umami, Cloudflare, Stripe, and GA4 — generate insights and create…
Audit agent outputs from an orchestration run — timeline analysis, stall detection, active vs idle time breakdown
Trace a production issue or pipeline failure end-to-end through GitHub artifacts, then file a detailed improvement issue to the…
Autonomous deploy loop — runs until zero open issues remain. Detects pipeline state and resumes from any position. Fully…
Guided idea-to-backlog setup for a brand-new project — interview, defaults, doubts, spike doc, validated orchestrate-ready backlog