@groupby/ai-dev 0.5.8 → 0.5.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.
Files changed (28) hide show
  1. package/package.json +1 -1
  2. package/teams/agentic-checkout/prompts/AGENTS.md +103 -0
  3. package/teams/agentic-checkout/prompts/create-plan.md +103 -0
  4. package/teams/agentic-checkout/prompts/create-pull-request.md +157 -0
  5. package/teams/agentic-checkout/prompts/fix-pr-comments.md +170 -0
  6. package/teams/agentic-checkout/prompts/fix-review-findings.md +1 -12
  7. package/teams/agentic-checkout/prompts/implement-task.md +62 -0
  8. package/teams/agentic-checkout/prompts/new-workspace.md +12 -0
  9. package/teams/agentic-checkout/prompts/orchestrate-component-change.md +25 -0
  10. package/teams/agentic-checkout/prompts/review-change.md +8 -2
  11. package/teams/agentic-checkout/scripts/check-secrets +51 -0
  12. package/teams/agentic-checkout/scripts/install-git-hooks +15 -0
  13. package/teams/agentic-checkout/scripts/local-fast-report +5 -0
  14. package/teams/agentic-checkout/scripts/local-report +205 -0
  15. package/teams/agentic-checkout/scripts/local-summarize +47 -0
  16. package/teams/agentic-checkout/scripts/logs-deps +9 -0
  17. package/teams/agentic-checkout/scripts/setup-local-fast-model +20 -0
  18. package/teams/agentic-checkout/scripts/start-deps +15 -0
  19. package/teams/agentic-checkout/scripts/status-deps +9 -0
  20. package/teams/agentic-checkout/scripts/stop-deps +9 -0
  21. package/teams/agentic-checkout/scripts/sync-components +110 -0
  22. package/teams/agentic-checkout/skills/approval-gated-task-execution/SKILL.md +57 -0
  23. package/teams/agentic-checkout/skills/component-verification/SKILL.md +34 -0
  24. package/teams/agentic-checkout/skills/grill-me/SKILL.md +23 -0
  25. package/teams/agentic-checkout/skills/karpathy-guidelines/SKILL.md +67 -0
  26. package/teams/agentic-checkout/skills/secret-safety/SKILL.md +41 -0
  27. package/teams/agentic-checkout/skills/sync-components/SKILL.md +23 -60
  28. package/teams/agentic-checkout/skills/tdd/SKILL.md +48 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  Review the current changes in `components/`.
4
4
 
5
+ Use **Claude Sonnet 4.6** (`claude-sonnet-4.6`) for this workflow. If the current session is not already using Claude Sonnet 4.6, switch to it before performing the review.
6
+
5
7
  ## Review Focus
6
8
 
7
9
  - Correctness and regressions
@@ -9,6 +11,7 @@ Review the current changes in `components/`.
9
11
  - Producer/consumer alignment for events and APIs
10
12
  - Validation and error handling
11
13
  - Secret leakage in logs/config/examples
14
+ - Secret-bearing files or token patterns that would be committed or pushed
12
15
  - Missing or weak tests
13
16
  - Build/test risk
14
17
 
@@ -30,7 +33,7 @@ Lead with findings:
30
33
 
31
34
  ## Checks
32
35
 
33
- - {command}: {result}
36
+ - {component-dir} `{command}`: {result}
34
37
 
35
38
  ## Summary
36
39
 
@@ -41,4 +44,7 @@ If no issues are found, say that clearly and list residual risks.
41
44
 
42
45
  ## Optional Next Step
43
46
 
44
- If findings or suggestions are reported and code updates are required, run `prompts/fix-review-findings.md`.
47
+ If findings or suggestions are reported and code updates are required:
48
+
49
+ 1. Use the `secret-safety` skill if any findings involve config, examples, logs, or credential-adjacent files before editing.
50
+ 2. Run `prompts/fix-review-findings.md`.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ target="${1:-.}"
5
+ repo_root="$(CDPATH='' cd -- "$target" && git rev-parse --show-toplevel)"
6
+
7
+ cd "$repo_root"
8
+
9
+ fail=0
10
+
11
+ suspicious_files="$(
12
+ git ls-files --cached --others --exclude-standard | awk '
13
+ function basename(path, parts, count) {
14
+ count = split(path, parts, "/")
15
+ return parts[count]
16
+ }
17
+ {
18
+ name = basename($0)
19
+ if (name == ".env" ||
20
+ (name ~ /^\.env\./ && name !~ /^\.env\.(example|sample|template)$/) ||
21
+ name ~ /^(id_rsa|id_dsa|id_ecdsa|id_ed25519)$/ ||
22
+ name ~ /\.(pem|key|p12|pfx|jks|keystore)$/ ||
23
+ name ~ /^(credentials|secrets)\.(json|ya?ml|toml|ini)$/) {
24
+ print $0
25
+ }
26
+ }
27
+ '
28
+ )"
29
+
30
+ if [ -n "$suspicious_files" ]; then
31
+ echo "Potential secret-bearing files are tracked:" >&2
32
+ echo "$suspicious_files" >&2
33
+ fail=1
34
+ fi
35
+
36
+ secret_pattern='-----BEGIN (RSA |OPENSSH |EC |DSA )?PRIVATE KEY-----|gh[pousr]_[A-Za-z0-9_]{36,}|github_pat_[A-Za-z0-9_]{22,}|AKIA[0-9A-Z]{16}|ASIA[0-9A-Z]{16}|xox[baprs]-[A-Za-z0-9-]{20,}|(sk|rk)_live_[A-Za-z0-9]{20,}|SG\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}|AIza[0-9A-Za-z_-]{35}'
37
+
38
+ matches="$(git grep --untracked --exclude-standard -nIE -e "$secret_pattern" -- . || true)"
39
+
40
+ if [ -n "$matches" ]; then
41
+ echo "Potential hard-coded secrets found in tracked files:" >&2
42
+ echo "$matches" >&2
43
+ fail=1
44
+ fi
45
+
46
+ if [ "$fail" -ne 0 ]; then
47
+ echo "Secret scan failed. Remove secrets from tracked files and use environment variables or local untracked config." >&2
48
+ exit "$fail"
49
+ fi
50
+
51
+ echo "Secret scan passed for $repo_root"
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ repo_root="$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)"
5
+ hook_dir="$repo_root/.git/hooks"
6
+
7
+ if [ ! -d "$hook_dir" ]; then
8
+ echo "error: git hooks directory not found: $hook_dir" >&2
9
+ exit 1
10
+ fi
11
+
12
+ cp "$repo_root/hooks/pre-push" "$hook_dir/pre-push"
13
+ chmod +x "$hook_dir/pre-push"
14
+
15
+ echo "Installed pre-push secret scan hook"
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
5
+ exec "$script_dir/local-report" "$@"
@@ -0,0 +1,205 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH='' cd -- "$script_dir/.." && pwd)"
6
+ tmp_dir="$framework_dir/tmp"
7
+ model="${BC_FORGE_LOCAL_MODEL:-qwen2.5-coder:1.5b}"
8
+ mode="${BC_FORGE_LOCAL_FAST_MODEL_MODE:-off}"
9
+ mkdir -p "$tmp_dir"
10
+
11
+ usage() {
12
+ printf '%s\n' \
13
+ "Usage: scripts/local-report <kind> [args...]" \
14
+ " scripts/local-fast-report <kind> [args...]" \
15
+ "" \
16
+ "Run an approved deterministic report and summarize it with the local fast model." \
17
+ "Mode is controlled by BC_FORGE_LOCAL_FAST_MODEL_MODE=auto|always|off (default: off)." \
18
+ "" \
19
+ "Kinds:" \
20
+ " sync Run scripts/sync-components" \
21
+ " deps-start Run scripts/start-deps" \
22
+ " deps-status Run scripts/status-deps" \
23
+ " deps-stop Run scripts/stop-deps" \
24
+ " deps-logs Summarize bounded dependency logs (default tail: 200)" \
25
+ " git-status Summarize framework git status" \
26
+ " diff-stat Summarize framework diff stat and changed files" \
27
+ " workspace Summarize component checkout presence/branch/dirty state" \
28
+ " secrets Run scripts/check-secrets .; summarize pass only" \
29
+ " hooks Run scripts/install-git-hooks"
30
+ }
31
+
32
+ sanitize_for_model() {
33
+ sed -E \
34
+ -e 's/-----BEGIN ([A-Z0-9 ]+)?PRIVATE KEY-----/[REDACTED PRIVATE KEY]/g' \
35
+ -e 's/gh[pousr]_[A-Za-z0-9_]{36,}/[REDACTED GITHUB TOKEN]/g' \
36
+ -e 's/github_pat_[A-Za-z0-9_]{22,}/[REDACTED GITHUB TOKEN]/g' \
37
+ -e 's/(AKIA|ASIA)[0-9A-Z]{16}/[REDACTED AWS KEY]/g' \
38
+ -e 's/xox[baprs]-[A-Za-z0-9-]{20,}/[REDACTED SLACK TOKEN]/g' \
39
+ -e 's/(sk|rk)_live_[A-Za-z0-9]{20,}/[REDACTED LIVE KEY]/g' \
40
+ -e 's/SG\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}/[REDACTED SENDGRID TOKEN]/g' \
41
+ -e 's/AIza[0-9A-Za-z_-]{35}/[REDACTED GOOGLE API KEY]/g'
42
+ }
43
+
44
+ summarize_file() {
45
+ input_file="$1"
46
+ case "$mode" in
47
+ off)
48
+ echo "Local fast model mode is off; using hosted model for this summary." >&2
49
+ ;;
50
+ always)
51
+ echo "Summarizing deterministic output with required local fast model: $model (mode: always)" >&2
52
+ ;;
53
+ auto)
54
+ echo "Attempting deterministic output summary with local fast model: $model (mode: auto)" >&2
55
+ ;;
56
+ *)
57
+ echo "Invalid BC_FORGE_LOCAL_FAST_MODEL_MODE: $mode" >&2
58
+ return 2
59
+ ;;
60
+ esac
61
+ if ! "$script_dir/local-summarize" < "$input_file"; then
62
+ if [ "$mode" = "always" ]; then
63
+ echo "Local fast model is required but unavailable; not falling back to the hosted model." >&2
64
+ return 79
65
+ fi
66
+ echo "Local fast model is not available; falling back to the hosted model for this summary." >&2
67
+ echo "Deterministic output for hosted-model summary:" >&2
68
+ cat "$input_file"
69
+ fi
70
+ }
71
+
72
+ run_and_summarize() {
73
+ output_file="$tmp_dir/local-report.$$"
74
+ if "$@" > "$output_file" 2>&1; then
75
+ status=0
76
+ else
77
+ status=$?
78
+ fi
79
+ sanitize_for_model < "$output_file" > "$output_file.sanitized"
80
+ summarize_file "$output_file.sanitized"
81
+ rm -f "$output_file" "$output_file.sanitized"
82
+ return "$status"
83
+ }
84
+
85
+ workspace_inventory() {
86
+ components_file="$framework_dir/components.txt"
87
+ if [ ! -f "$components_file" ]; then
88
+ echo "missing components.txt"
89
+ return 1
90
+ fi
91
+
92
+ awk '
93
+ {
94
+ sub(/\r$/, "")
95
+ sub(/^[[:space:]]+/, "")
96
+ sub(/[[:space:]]+$/, "")
97
+ if ($0 != "" && $0 !~ /^#/) print
98
+ }
99
+ ' "$components_file" | while IFS= read -r remote || [ -n "$remote" ]; do
100
+ repo_name="${remote##*/}"
101
+ repo_name="${repo_name%.git}"
102
+ repo_path="$framework_dir/components/$repo_name"
103
+
104
+ if [ ! -d "$repo_path" ]; then
105
+ printf 'missing %s\n' "$repo_name"
106
+ continue
107
+ fi
108
+
109
+ if ! git -C "$repo_path" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
110
+ printf 'not-git-repository %s\n' "$repo_name"
111
+ continue
112
+ fi
113
+
114
+ branch="$(git -C "$repo_path" branch --show-current)"
115
+ if [ -n "$(git -C "$repo_path" status --short)" ]; then
116
+ state="dirty"
117
+ else
118
+ state="clean"
119
+ fi
120
+
121
+ printf 'component %s branch=%s state=%s\n' "$repo_name" "${branch:-detached}" "$state"
122
+ done
123
+ }
124
+
125
+ if [ "$#" -lt 1 ]; then
126
+ usage >&2
127
+ exit 2
128
+ fi
129
+
130
+ kind="$1"
131
+ shift
132
+
133
+ case "$kind" in
134
+ -h|--help)
135
+ usage
136
+ ;;
137
+ sync)
138
+ run_and_summarize "$script_dir/sync-components" "$@"
139
+ ;;
140
+ deps-start)
141
+ run_and_summarize "$script_dir/start-deps" "$@"
142
+ ;;
143
+ deps-status)
144
+ run_and_summarize "$script_dir/status-deps" "$@"
145
+ ;;
146
+ deps-stop)
147
+ run_and_summarize "$script_dir/stop-deps" "$@"
148
+ ;;
149
+ deps-logs)
150
+ output_file="$tmp_dir/local-report.$$"
151
+ log_tail="${BC_FORGE_LOG_TAIL:-200}"
152
+ if docker compose -f "$framework_dir/docker-compose.dependencies.yml" logs --no-color --tail="$log_tail" "$@" > "$output_file" 2>&1; then
153
+ status=0
154
+ else
155
+ status=$?
156
+ fi
157
+ sanitize_for_model < "$output_file" > "$output_file.sanitized"
158
+ summarize_file "$output_file.sanitized"
159
+ rm -f "$output_file" "$output_file.sanitized"
160
+ exit "$status"
161
+ ;;
162
+ git-status)
163
+ output_file="$tmp_dir/local-report.$$"
164
+ {
165
+ git -C "$framework_dir" status --short --branch
166
+ git -C "$framework_dir" log --oneline --max-count=3
167
+ } > "$output_file" 2>&1
168
+ summarize_file "$output_file"
169
+ rm -f "$output_file"
170
+ ;;
171
+ diff-stat)
172
+ output_file="$tmp_dir/local-report.$$"
173
+ {
174
+ git -C "$framework_dir" diff --stat
175
+ git -C "$framework_dir" diff --name-only
176
+ } > "$output_file" 2>&1
177
+ summarize_file "$output_file"
178
+ rm -f "$output_file"
179
+ ;;
180
+ workspace)
181
+ output_file="$tmp_dir/local-report.$$"
182
+ workspace_inventory > "$output_file" 2>&1
183
+ summarize_file "$output_file"
184
+ rm -f "$output_file"
185
+ ;;
186
+ secrets)
187
+ output_file="$tmp_dir/local-report.$$"
188
+ if "$script_dir/check-secrets" "$framework_dir" > "$output_file" 2>&1; then
189
+ summarize_file "$output_file"
190
+ rm -f "$output_file"
191
+ else
192
+ cat "$output_file" >&2
193
+ rm -f "$output_file"
194
+ echo "Secret scan failed; not sending failure output to any model." >&2
195
+ exit 1
196
+ fi
197
+ ;;
198
+ hooks)
199
+ run_and_summarize "$script_dir/install-git-hooks" "$@"
200
+ ;;
201
+ *)
202
+ usage >&2
203
+ exit 2
204
+ ;;
205
+ esac
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
5
+ model="${BC_FORGE_LOCAL_MODEL:-qwen2.5-coder:1.5b}"
6
+ mode="${BC_FORGE_LOCAL_FAST_MODEL_MODE:-off}"
7
+ input="$(cat)"
8
+
9
+ if [ -z "$input" ]; then
10
+ echo "No input received on stdin." >&2
11
+ echo "Usage: <command> | scripts/local-summarize" >&2
12
+ exit 2
13
+ fi
14
+
15
+ case "$mode" in
16
+ off)
17
+ echo "Local fast model mode is off; use the hosted model for this summary." >&2
18
+ exit 78
19
+ ;;
20
+ auto|always) ;;
21
+ *)
22
+ echo "Invalid BC_FORGE_LOCAL_FAST_MODEL_MODE: $mode" >&2
23
+ exit 2
24
+ ;;
25
+ esac
26
+
27
+ if ! "$script_dir/setup-local-fast-model" >/dev/null; then
28
+ if [ "$mode" = "always" ]; then
29
+ echo "Local fast model is required but not available; not falling back to hosted summary." >&2
30
+ exit 79
31
+ fi
32
+ echo "Local fast model is not available; use the hosted model for this summary." >&2
33
+ exit 78
34
+ fi
35
+
36
+ echo "Using local fast model for summary: $model (mode: $mode)" >&2
37
+
38
+ {
39
+ printf '%s\n' "Summarize this deterministic command output for a developer."
40
+ printf '%s\n' "Rules:"
41
+ printf '%s\n' "- Be concise."
42
+ printf '%s\n' "- Report pass/fail/skipped items exactly when present."
43
+ printf '%s\n' "- Do not infer code behavior, propose code changes, or debug failures."
44
+ printf '%s\n' "- If output mentions possible secrets, say to inspect the scanner output manually and do not reproduce secret-like values."
45
+ printf '\n%s\n\n' "Command output:"
46
+ printf '%s\n' "$input"
47
+ } | ollama run "$model"
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH= cd -- "$script_dir/.." && pwd)"
6
+
7
+ cd "$framework_dir"
8
+ docker compose -f docker-compose.dependencies.yml logs -f "$@"
9
+
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ model="${BC_FORGE_LOCAL_MODEL:-qwen2.5-coder:1.5b}"
5
+
6
+ if ! command -v ollama >/dev/null 2>&1; then
7
+ echo "Ollama is required for the local fast model workflow." >&2
8
+ echo "Install it with: brew install ollama" >&2
9
+ echo "Then start it with: ollama serve" >&2
10
+ exit 127
11
+ fi
12
+
13
+ if ollama list | awk 'NR > 1 { print $1 }' | grep -Fx "$model" >/dev/null 2>&1; then
14
+ printf 'Local fast model already available: %s\n' "$model"
15
+ exit 0
16
+ fi
17
+
18
+ printf 'Downloading local fast model: %s\n' "$model"
19
+ ollama pull "$model"
20
+ printf 'Local fast model ready: %s\n' "$model"
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH= cd -- "$script_dir/.." && pwd)"
6
+
7
+ cd "$framework_dir"
8
+ docker compose -f docker-compose.dependencies.yml up -d "$@"
9
+
10
+ printf '\nDependencies are starting.\n'
11
+ printf 'RabbitMQ: amqp://guest:guest@localhost:5672 UI: http://localhost:15672\n'
12
+ printf 'PostgreSQL: postgres://postgres:postgres@localhost:5432/bc_agent_db\n'
13
+ printf 'OTEL: grpc://localhost:4319 http://localhost:4320 metrics: http://localhost:8890\n'
14
+ printf 'Jaeger: http://localhost:16687\n'
15
+ printf 'Prometheus: http://localhost:9091\n'
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH= cd -- "$script_dir/.." && pwd)"
6
+
7
+ cd "$framework_dir"
8
+ docker compose -f docker-compose.dependencies.yml ps
9
+
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH= cd -- "$script_dir/.." && pwd)"
6
+
7
+ cd "$framework_dir"
8
+ docker compose -f docker-compose.dependencies.yml down "$@"
9
+
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
5
+ framework_dir="$(CDPATH='' cd -- "$script_dir/.." && pwd)"
6
+ components_file="$framework_dir/components.txt"
7
+ components_dir="$framework_dir/components"
8
+ tmp_dir="$framework_dir/tmp"
9
+ entries_file="$tmp_dir/sync-components.entries"
10
+ fail=0
11
+
12
+ usage() {
13
+ printf '%s\n' \
14
+ "Usage: scripts/sync-components" \
15
+ "" \
16
+ "Clone missing repositories from components.txt into components/ and sync existing" \
17
+ "repositories by checking out main, fetching origin/main, and rebasing main onto origin/main." \
18
+ "" \
19
+ "Dirty existing repositories are skipped to avoid destructive changes."
20
+ }
21
+
22
+ if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then
23
+ usage
24
+ exit 0
25
+ fi
26
+
27
+ if [ "$#" -ne 0 ]; then
28
+ usage >&2
29
+ exit 2
30
+ fi
31
+
32
+ if [ ! -f "$components_file" ]; then
33
+ echo "failed: components.txt not found at $components_file" >&2
34
+ exit 1
35
+ fi
36
+
37
+ mkdir -p "$components_dir" "$tmp_dir"
38
+
39
+ awk '
40
+ {
41
+ sub(/\r$/, "")
42
+ sub(/^[[:space:]]+/, "")
43
+ sub(/[[:space:]]+$/, "")
44
+ if ($0 != "" && $0 !~ /^#/) print
45
+ }
46
+ ' "$components_file" > "$entries_file"
47
+
48
+ while IFS= read -r remote || [ -n "$remote" ]; do
49
+ repo_name="${remote##*/}"
50
+ repo_name="${repo_name%.git}"
51
+ repo_path="$components_dir/$repo_name"
52
+
53
+ if [ -z "$repo_name" ] || [ "$repo_name" = "$remote" ]; then
54
+ printf 'failed invalid-entry %s\n' "$remote" >&2
55
+ fail=1
56
+ continue
57
+ fi
58
+
59
+ if [ ! -d "$repo_path" ]; then
60
+ if git clone "$remote" "$repo_path"; then
61
+ printf 'cloned %s\n' "$repo_name"
62
+ else
63
+ printf 'failed clone %s\n' "$repo_name" >&2
64
+ fail=1
65
+ continue
66
+ fi
67
+ else
68
+ printf 'exists %s\n' "$repo_name"
69
+ fi
70
+
71
+ if ! git -C "$repo_path" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
72
+ printf 'failed not-git-repository %s\n' "$repo_name" >&2
73
+ fail=1
74
+ continue
75
+ fi
76
+
77
+ if [ -n "$(git -C "$repo_path" status --short)" ]; then
78
+ printf 'skipped-dirty %s\n' "$repo_name" >&2
79
+ continue
80
+ fi
81
+
82
+ if ! git -C "$repo_path" checkout main >/dev/null 2>&1; then
83
+ if ! git -C "$repo_path" fetch origin main; then
84
+ printf 'failed fetch-before-checkout %s\n' "$repo_name" >&2
85
+ fail=1
86
+ continue
87
+ fi
88
+ if ! git -C "$repo_path" checkout main >/dev/null 2>&1; then
89
+ printf 'failed checkout-main %s\n' "$repo_name" >&2
90
+ fail=1
91
+ continue
92
+ fi
93
+ fi
94
+ printf 'checked-out-main %s\n' "$repo_name"
95
+
96
+ if ! git -C "$repo_path" fetch origin main; then
97
+ printf 'failed fetch-main %s\n' "$repo_name" >&2
98
+ fail=1
99
+ continue
100
+ fi
101
+
102
+ if git -C "$repo_path" rebase origin/main; then
103
+ printf 'rebased-main %s\n' "$repo_name"
104
+ else
105
+ printf 'failed rebase-main %s\n' "$repo_name" >&2
106
+ fail=1
107
+ fi
108
+ done < "$entries_file"
109
+
110
+ exit "$fail"
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: approval-gated-task-execution
3
+ description: Execute planned implementation tasks sequentially with per-task approval, critique, scoped sub-agents, handoff bundles, and a final integration gate.
4
+ license: MIT
5
+ ---
6
+
7
+ # Approval-Gated Task Execution
8
+
9
+ Use this skill when implementing an approved component plan.
10
+
11
+ ## Workflow
12
+
13
+ 1. Build an execution matrix from the approved plan:
14
+ - task
15
+ - affected component
16
+ - dependencies
17
+ - files/contracts
18
+ - verification checks
19
+ 2. Execute tasks sequentially, one task at a time, in approved plan order.
20
+ 3. Before each task starts, prepare a short approval summary containing:
21
+ - goal
22
+ - affected component
23
+ - key files/contracts
24
+ - risks
25
+ - checks
26
+ - rollback note
27
+ 4. Apply the `karpathy-guidelines` skill to the task summary before the critique: check for overcomplication, scope creep, and missing success criteria.
28
+ 5. Run a quick rubber-duck critique on the task summary before implementation.
29
+ - In Brain Checkout implementation workflows, rely on the current session/default model for the rubber-duck sub-agent unless the user requests another model.
30
+ 6. If the critique flags a likely flaw, pause, revise the task summary, and get user approval again.
31
+ 7. After approval, use a component-scoped sub-agent when useful to keep context small.
32
+ - In Brain Checkout implementation workflows, rely on the current session/default model for implementation/check sub-agents unless the user requests another model.
33
+ 8. Hard-limit the sub-agent to task-scoped files unless the user explicitly approves broader scan access.
34
+ 9. After the task completes, capture a compact result bundle:
35
+ - files changed
36
+ - spec/contract deltas
37
+ - tests/checks run
38
+ - unresolved risks
39
+ 10. Use the completed task result bundle as the primary handoff artifact for the next task instead of replaying full history.
40
+ 11. After all tasks finish, run a final integration gate across affected components and summarize:
41
+ - cross-component contract consistency status
42
+ - all task result bundles
43
+ - unresolved risks
44
+
45
+ ## Rules
46
+
47
+ - Follow the approved plan exactly; do not derail from the plan or reorder tasks unless the plan itself is updated first.
48
+ - Implement every planned item; do not leave planned tasks partially done or forgotten.
49
+ - For multi-component work, implement the plan across all affected components.
50
+ - Do not ask the user to choose which planned tasks to do; all approved plan tasks must be executed.
51
+ - If new required work is discovered outside the approved plan, stop, update the plan, and re-approve before continuing.
52
+ - On failed checks, keep fixing within the same task until passing, unless blocked.
53
+ - Treat a task as blocked only when required information is missing, destructive action on a dirty repository is needed, or external credentials/access are required.
54
+ - Make only the changes needed for the plan scope.
55
+ - Preserve existing formatting and component patterns.
56
+ - Do not add unrelated dependencies.
57
+ - Do not edit out-of-scope folders.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: component-verification
3
+ description: Select and run the relevant Brain Checkout component checks using AGENTS.md as the canonical verification matrix.
4
+ license: MIT
5
+ ---
6
+
7
+ # Component Verification
8
+
9
+ Use this skill when code, specs, contracts, prompts, or component behavior changes need verification.
10
+
11
+ ## Source Of Truth
12
+
13
+ Use the verification matrix in `AGENTS.md` as the canonical source for component install, test, build, lint, and format commands.
14
+
15
+ ## Workflow
16
+
17
+ 1. Identify touched components from changed files and plan scope.
18
+ 2. Read component-local `.github/copilot-instructions.md` when present and prefer any narrower local check guidance.
19
+ 3. Run the narrowest relevant check first.
20
+ 4. Broaden verification when the change touches:
21
+ - shared contracts
22
+ - event payloads
23
+ - public APIs
24
+ - payment framework libraries
25
+ - cross-component producer/consumer behavior
26
+ 5. For documentation-only harness changes, review the diff; do not run component builds unless docs have dedicated checks.
27
+ 6. Report commands run, results, checks intentionally skipped, and remaining risk.
28
+
29
+ ## Rules
30
+
31
+ - Run checks from the affected component directory.
32
+ - Do not invent new tooling or commands.
33
+ - Do not copy verification command lists into prompts; reference `AGENTS.md`.
34
+ - If a check is unavailable or known unsupported in the current component, report that explicitly and run the nearest meaningful check.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: grill-me
3
+ description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
4
+ license: MIT
5
+ ---
6
+
7
+ # Grill Me
8
+
9
+ ## Workflow
10
+
11
+ 1. Ask the user what plan or design to stress-test if not already stated.
12
+ 2. Identify the top-level decision branches in the plan.
13
+ 3. Walk through each branch sequentially, resolving dependencies between decisions before moving on.
14
+ 4. For each question, provide your recommended answer before asking.
15
+ 5. If a question can be answered by exploring the codebase, explore it and present the finding instead of asking.
16
+ 6. Continue until every branch is resolved and a shared understanding is reached.
17
+
18
+ ## Rules
19
+
20
+ - One question per turn — do not stack multiple questions.
21
+ - Do not accept vague answers; follow up until the answer is concrete.
22
+ - Surface tradeoffs explicitly for each design decision.
23
+ - Recommend an answer for every question you raise.