forgedock 1.0.18 → 1.0.19

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.
@@ -3,7 +3,7 @@ description: Recover full pipeline context after compaction — find the last ac
3
3
  argument-hint: [issue number (optional — auto-detects if omitted)]
4
4
  ---
5
5
 
6
- # /resume — Context Recovery After Compaction
6
+ # /pipeline-resume — Context Recovery After Compaction
7
7
 
8
8
  **Input**: $ARGUMENTS
9
9
 
@@ -110,7 +110,7 @@ for NUMBER in $(echo "$RECENT_ISSUES" | jq -r '.number'); do
110
110
  done
111
111
  ```
112
112
 
113
- If still no candidate: display `No recent active issues found. To resume work on a specific issue, run: /resume {issue-number}` and STOP.
113
+ If still no candidate: display `No recent active issues found. To resume work on a specific issue, run: /pipeline-resume {issue-number}` and STOP.
114
114
 
115
115
  ---
116
116
 
@@ -247,7 +247,7 @@ Invoke `/work-on` to re-enter the pipeline. Work-on reads GitHub state independe
247
247
  Skill("work-on", args="{TARGET_NUMBER}")
248
248
  ```
249
249
 
250
- **Why delegation works**: `/work-on` Phase 0B already implements "Determine resume point" — it reads issue labels and FORGE annotations to route to the correct phase. `/resume` provides the human-readable context summary, then hands off to `/work-on` for execution.
250
+ **Why delegation works**: `/work-on` Phase 0B already implements "Determine resume point" — it reads issue labels and FORGE annotations to route to the correct phase. `/pipeline-resume` provides the human-readable context summary, then hands off to `/work-on` for execution.
251
251
 
252
252
  **Do NOT re-implement pipeline logic here.** The context summary above is for the agent's working memory only — the actual phase routing and execution is owned by `/work-on`.
253
253
 
@@ -258,7 +258,7 @@ Skill("work-on", args="{TARGET_NUMBER}")
258
258
  | Condition | Response |
259
259
  |-----------|----------|
260
260
  | `forge.yaml` missing | Stop: "Run \`npx forgedock init\` to generate forge.yaml" |
261
- | No active issues + no FORGE annotations found | Stop: "No recent active issues found. Run \`/resume {number}\` with an explicit issue number, or \`/work-on next\` to start a new issue." |
261
+ | No active issues + no FORGE annotations found | Stop: "No recent active issues found. Run \`/pipeline-resume {number}\` with an explicit issue number, or \`/work-on next\` to start a new issue." |
262
262
  | Issue is closed with `workflow:merged` | Stop: "Issue #{number} is already merged. Nothing to resume." |
263
263
  | Issue is closed with `workflow:invalid` | Stop: "Issue #{number} was closed as invalid. Nothing to resume." |
264
264
  | Issue has `needs-human` label | Stop: "Issue #{number} is blocked (needs-human). Review the blocking comment and resolve it manually before resuming." |
@@ -3,7 +3,7 @@ description: Pipeline-wide situational awareness — groups open issues by workf
3
3
  argument-hint: [--repo <owner/repo> | --stale-days <N>]
4
4
  ---
5
5
 
6
- # /status — Pipeline Status
6
+ # /pipeline-status — Pipeline Status
7
7
 
8
8
  **Input**: $ARGUMENTS (optional: `--repo <owner/repo>`, `--stale-days <N>`)
9
9
 
@@ -442,6 +442,33 @@ fi
442
442
 
443
443
  Report each `[HARD]` line as **HIGH** — a dangling `Skill()` target or a label set by no command is a real pipeline break (an agent will invoke a phase that does not exist, or a state will never be entered/exited). Orphan-annotation `[SOFT]` lines are advisory: surface them in the report for periodic triage but do NOT block the commit. Scaffolding `[INFO]` lines are expected and need no action. To gate on HARD findings (fail the build), drop `--soft`; the default keeps existing baseline orphans from blocking until they are triaged. <!-- Added: forge#869 -->
444
444
 
445
+ ### 2G.7: Native command conflict check (FORGE_GRAPH domain)
446
+
447
+ **Triggered when**: changed files include `commands/*.md` files (top-level, not sub-phase subdirectories). Skips silently in any project without `scripts/check-native-conflicts.sh`.
448
+
449
+ **Why this matters**: ForgeDock commands are installed into `~/.claude/commands/`, the same namespace as native Claude Code built-in slash commands. A top-level command file whose basename matches a native command name (e.g. `resume.md` → `/resume`, `status.md` → `/status`) completely shadows the native command — users lose access to core Claude Code functionality with no error message. This check prevents the bug class from ever reaching `staging` or `npm publish`. <!-- Added: forge#1074 -->
450
+
451
+ ```bash
452
+ # Run only when top-level commands/*.md files changed and the script ships in this repo.
453
+ # Sub-phase files in subdirectories (commands/work-on/*.md) are installed with their
454
+ # relative path preserved and resolve to namespaced commands — they cannot shadow
455
+ # root-level native commands and are not scanned.
456
+ CONFLICT_CHECKER="$FORGEDOCK_SCRIPTS/check-native-conflicts.sh"
457
+ [ -f "$CONFLICT_CHECKER" ] || CONFLICT_CHECKER="{WORKTREE_PATH}/scripts/check-native-conflicts.sh"
458
+ if [ -f "$CONFLICT_CHECKER" ]; then
459
+ CONFLICT_REPORT=$(bash "$CONFLICT_CHECKER" "{WORKTREE_PATH}/commands" 2>&1) || CONFLICT_EXIT=$?
460
+ echo "$CONFLICT_REPORT"
461
+ if [ "${CONFLICT_EXIT:-0}" -ne 0 ]; then
462
+ # Extract each conflicting file from the report and emit a gate finding.
463
+ echo "$CONFLICT_REPORT" | grep -E '^\s+commands/' | while IFS= read -r hit; do
464
+ echo "FORGE_GRAPH | HIGH | native-conflict | ${hit#* }"
465
+ done
466
+ fi
467
+ fi
468
+ ```
469
+
470
+ Report each conflict as **HIGH** — a shadowed native command is a silent user-facing regression (the native command becomes unreachable without warning). The builder must rename the conflicting file before the commit. Blocklist updates are in `scripts/check-native-conflicts.sh` (NATIVE_COMMANDS array).
471
+
445
472
  ### 2H: Asyncio cancellation safety (Python async code)
446
473
 
447
474
  **Triggered when**: changed Python files contain `asyncio.shield`, `asyncio.wait_for`, or `Task.cancel`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgedock",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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"
@@ -0,0 +1,200 @@
1
+ #!/usr/bin/env bash
2
+ # SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
3
+ # SPDX-License-Identifier: AGPL-3.0-or-later
4
+ #
5
+ # check-native-conflicts.sh — Validate that ForgeDock command names do not shadow
6
+ # native Claude Code built-in slash commands.
7
+ #
8
+ # ForgeDock commands are installed as custom slash commands in ~/.claude/commands/.
9
+ # If a command file shares its name with a native Claude Code built-in (e.g. /resume,
10
+ # /status), it shadows the native command entirely — users lose access to core
11
+ # Claude Code functionality.
12
+ #
13
+ # This script:
14
+ # 1. Maintains a blocklist of known native Claude Code slash command names.
15
+ # 2. Scans all .md files in commands/ (recursively) and extracts the command
16
+ # name (filename without .md extension).
17
+ # 3. Checks each command name against the blocklist (case-insensitive).
18
+ # 4. Exits non-zero if any conflict is found, printing the offending file(s).
19
+ #
20
+ # Usage:
21
+ # check-native-conflicts.sh [<commands_dir>]
22
+ # commands_dir: path to the commands/ directory (default: ./commands)
23
+ #
24
+ # Exit codes:
25
+ # 0 no conflicts found
26
+ # 1 one or more conflicts found (names listed to stderr)
27
+ # 2 usage / dependency error (commands_dir not found)
28
+ #
29
+ # <!-- Added: forge#1074 -->
30
+
31
+ set -euo pipefail
32
+
33
+ COMMANDS_DIR="${1:-./commands}"
34
+
35
+ if [ ! -d "$COMMANDS_DIR" ]; then
36
+ echo "ERROR: commands directory not found: $COMMANDS_DIR" >&2
37
+ echo "Usage: $0 [<commands_dir>]" >&2
38
+ exit 2
39
+ fi
40
+
41
+ # ---------------------------------------------------------------------------
42
+ # Blocklist of known native Claude Code slash command names.
43
+ # These are names that Claude Code reserves as built-in commands.
44
+ # Command names are always lowercase — comparison is case-insensitive.
45
+ #
46
+ # To update this list: add the new native command name (without leading /).
47
+ # Keep entries alphabetically sorted within logical groups for readability.
48
+ # ---------------------------------------------------------------------------
49
+ NATIVE_COMMANDS=(
50
+ # Core session management
51
+ resume
52
+ status
53
+ exit
54
+ clear
55
+ compact
56
+ config
57
+ memory
58
+ permissions
59
+ rewind
60
+ init
61
+
62
+ # Model and capability controls
63
+ model
64
+ plan
65
+ effort
66
+ focus
67
+
68
+ # Code and diff operations
69
+ diff
70
+ review
71
+ debug
72
+ run
73
+ verify
74
+ branch
75
+ rename
76
+ copy
77
+
78
+ # Help and onboarding
79
+ help
80
+ doctor
81
+ feedback
82
+ setup-bedrock
83
+ setup-vertex
84
+ terminal-setup
85
+ web-setup
86
+ team-onboarding
87
+ upgrade
88
+
89
+ # Agents and orchestration
90
+ agents
91
+ context
92
+ tasks
93
+ fork
94
+ batch
95
+ loop
96
+ goal
97
+ background
98
+ teleport
99
+ remote-control
100
+ remote-env
101
+
102
+ # Skills and plugins
103
+ skills
104
+ plugin
105
+ reload-plugins
106
+ reload-skills
107
+ run-skill-generator
108
+
109
+ # Review and code quality
110
+ code-review
111
+ security-review
112
+ simplify
113
+ ultraplan
114
+ ultrareview
115
+
116
+ # Usage and billing
117
+ usage
118
+ extra-usage
119
+ usage-credits
120
+
121
+ # UI and display
122
+ theme
123
+ tui
124
+ statusline
125
+ powerup
126
+
127
+ # Workflow and scheduling
128
+ schedule
129
+ workflows
130
+ stop
131
+ recap
132
+
133
+ # MCP
134
+ mcp
135
+
136
+ # Miscellaneous
137
+ btw
138
+ sandbox
139
+ voice
140
+ radio
141
+ stickers
142
+ release-notes
143
+ privacy-settings
144
+ setup
145
+ )
146
+
147
+ # ---------------------------------------------------------------------------
148
+ # Build a fast-lookup set from the blocklist (bash associative array).
149
+ # ---------------------------------------------------------------------------
150
+ declare -A BLOCKLIST
151
+ for name in "${NATIVE_COMMANDS[@]}"; do
152
+ BLOCKLIST["${name,,}"]=1 # store as lowercase
153
+ done
154
+
155
+ # ---------------------------------------------------------------------------
156
+ # Scan commands/ for .md files and check each basename against the blocklist.
157
+ #
158
+ # Scope: TOP-LEVEL files in commands/ only.
159
+ #
160
+ # ForgeDock installs commands preserving their relative path:
161
+ # commands/foo.md → ~/.claude/commands/foo.md → /foo
162
+ # commands/work-on/bar.md → ~/.claude/commands/work-on/bar.md → /work-on/bar
163
+ #
164
+ # Only top-level .md files resolve to a root-level slash command (e.g. /foo).
165
+ # Sub-phase files in subdirectories (commands/work-on/*.md) resolve to namespaced
166
+ # commands (/work-on/bar) and cannot shadow native root commands.
167
+ # ---------------------------------------------------------------------------
168
+ CONFLICTS=()
169
+
170
+ while IFS= read -r -d '' md_file; do
171
+ # Extract command name: basename without .md extension, lowercased.
172
+ basename_no_ext="${md_file##*/}"
173
+ basename_no_ext="${basename_no_ext%.md}"
174
+ cmd_name="${basename_no_ext,,}"
175
+
176
+ if [[ -n "${BLOCKLIST[$cmd_name]+_}" ]]; then
177
+ CONFLICTS+=("$md_file (conflicts with native /$cmd_name)")
178
+ fi
179
+ done < <(find "$COMMANDS_DIR" -maxdepth 1 -name "*.md" -print0 | sort -z)
180
+
181
+ # ---------------------------------------------------------------------------
182
+ # Report and exit.
183
+ # ---------------------------------------------------------------------------
184
+ if [ ${#CONFLICTS[@]} -gt 0 ]; then
185
+ echo "ERROR: ForgeDock command name(s) shadow native Claude Code built-in commands:" >&2
186
+ echo "" >&2
187
+ for conflict in "${CONFLICTS[@]}"; do
188
+ echo " $conflict" >&2
189
+ done
190
+ echo "" >&2
191
+ echo "Native Claude Code commands are inaccessible when a ForgeDock command" >&2
192
+ echo "shares their name. Rename the conflicting file(s) before publishing." >&2
193
+ echo "" >&2
194
+ echo "To update the native command blocklist, edit:" >&2
195
+ echo " scripts/check-native-conflicts.sh (NATIVE_COMMANDS array)" >&2
196
+ exit 1
197
+ fi
198
+
199
+ echo "OK: No native Claude Code command conflicts detected in $COMMANDS_DIR"
200
+ exit 0