@guilz-dev/sdlc-gh 0.1.0
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/.github/CODEOWNERS +5 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +68 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
- package/.github/ISSUE_TEMPLATE/support.yml +56 -0
- package/.github/ISSUE_TEMPLATE/task.yml +89 -0
- package/.github/agents/implementer.agent.md +17 -0
- package/.github/agents/reviewer.agent.md +18 -0
- package/.github/agents/triager.agent.md +13 -0
- package/.github/aw/actions-lock.json +9 -0
- package/.github/copilot-instructions.md +35 -0
- package/.github/hooks/hooks.json +12 -0
- package/.github/instructions/core.instructions.md +11 -0
- package/.github/instructions/profiles/go.instructions.md +10 -0
- package/.github/instructions/profiles/php.instructions.md +11 -0
- package/.github/instructions/profiles/python.instructions.md +11 -0
- package/.github/instructions/profiles/ruby.instructions.md +11 -0
- package/.github/instructions/profiles/typescript.instructions.md +11 -0
- package/.github/labels.yml +55 -0
- package/.github/pull_request_template.md +33 -0
- package/.github/ruleset.example.json +33 -0
- package/.github/ruleset.harness-eval.example.json +29 -0
- package/.github/skills/quality-loop/SKILL.md +23 -0
- package/.github/workflows/agent-retry-orchestrator.yml +161 -0
- package/.github/workflows/copilot-setup-steps.yml +64 -0
- package/.github/workflows/eval-ci.yml +169 -0
- package/.github/workflows/eval-drift.yml +75 -0
- package/.github/workflows/gh-aw-dogfood-ci.yml +73 -0
- package/.github/workflows/harness-ci.yml +244 -0
- package/.github/workflows/harness-sync.yml +28 -0
- package/.github/workflows/l1-readiness-check.yml +45 -0
- package/.github/workflows/labels-sync.yml +24 -0
- package/.github/workflows/nightly-harness-review.lock.yml +1643 -0
- package/.github/workflows/nightly-harness-review.md +87 -0
- package/.github/workflows/nightly-harness-review.yml +63 -0
- package/.github/workflows/npm-publish.yml +49 -0
- package/.github/workflows/pr-context-comment.yml +138 -0
- package/.github/workflows/product-ci-go.yml +33 -0
- package/.github/workflows/product-ci-php.yml +39 -0
- package/.github/workflows/product-ci-python.yml +34 -0
- package/.github/workflows/product-ci-ruby.yml +35 -0
- package/.github/workflows/product-ci-ts.yml +37 -0
- package/.github/workflows/task-issue-label-sync.yml +50 -0
- package/.github/workflows/weekly-redteam.lock.yml +1571 -0
- package/.github/workflows/weekly-redteam.md +76 -0
- package/.github/zizmor.yml +11 -0
- package/AGENTS.md +54 -0
- package/LICENSE +21 -0
- package/README.md +366 -0
- package/config/stacks.json +55 -0
- package/docs/adoption.md +126 -0
- package/docs/arch.md +535 -0
- package/docs/auth-boundaries.md +16 -0
- package/docs/coding-agent-l1.md +152 -0
- package/docs/exceptions/README.md +25 -0
- package/docs/exceptions/TEMPLATE.md +8 -0
- package/docs/failure-taxonomy.md +23 -0
- package/docs/gh-aw-dogfood.md +109 -0
- package/docs/kpi-baseline.md +9 -0
- package/docs/nightly-harness-review.md +94 -0
- package/docs/operations.md +108 -0
- package/docs/publishing.md +79 -0
- package/docs/revert-playbook.md +44 -0
- package/docs/shared-config.md +30 -0
- package/docs/telemetry-artifacts.md +78 -0
- package/docs/telemetry-schema.md +60 -0
- package/evals/.score-baseline.json +6 -0
- package/evals/e2e-bench/README.md +28 -0
- package/evals/e2e-bench/manifest.json +16 -0
- package/evals/e2e-bench/tasks/e2e-001.yml +10 -0
- package/evals/e2e-bench/tasks/e2e-002.yml +11 -0
- package/evals/e2e-bench/tasks/e2e-003.yml +10 -0
- package/evals/e2e-bench/tasks/e2e-004.yml +14 -0
- package/evals/e2e-bench/tasks/e2e-005.yml +11 -0
- package/evals/e2e-bench/tasks/e2e-006.yml +10 -0
- package/evals/e2e-bench/tasks/e2e-007.yml +10 -0
- package/evals/e2e-bench/tasks/e2e-008.yml +10 -0
- package/evals/e2e-bench/tasks/e2e-009.yml +10 -0
- package/evals/trajectories/rubric.md +12 -0
- package/evals/trajectories/test_harness_conventions.py +271 -0
- package/infra/README.md +49 -0
- package/infra/langfuse/docker-compose.yml +25 -0
- package/infra/otel/collector-config.yml +24 -0
- package/infra/samples/gh-aw-dogfood-report.json +44 -0
- package/infra/samples/harness-review-routing-plan.json +19 -0
- package/infra/samples/harness-review-summary.json +61 -0
- package/infra/samples/telemetry-artifact.json +29 -0
- package/infra/samples/telemetry-payload.json +19 -0
- package/package.json +85 -0
- package/prompts/triager-classify.prompt.yml +10 -0
- package/sample/go/add.go +5 -0
- package/sample/go/add_test.go +9 -0
- package/sample/go/go.mod +3 -0
- package/sample/php/composer.json +26 -0
- package/sample/php/composer.lock +1881 -0
- package/sample/php/phpunit.xml +8 -0
- package/sample/php/src/Add.php +13 -0
- package/sample/php/tests/AddTest.php +16 -0
- package/sample/python/requirements-dev.txt +2 -0
- package/sample/python/src/__init__.py +0 -0
- package/sample/python/src/greet.py +3 -0
- package/sample/python/tests/conftest.py +4 -0
- package/sample/python/tests/test_greet.py +5 -0
- package/sample/ruby/.rubocop.yml +10 -0
- package/sample/ruby/Gemfile +6 -0
- package/sample/ruby/Gemfile.lock +58 -0
- package/sample/ruby/lib/add.rb +9 -0
- package/sample/ruby/spec/add_spec.rb +11 -0
- package/sample/ts/biome.json +6 -0
- package/sample/ts/package-lock.json +1763 -0
- package/sample/ts/package.json +15 -0
- package/sample/ts/src/add.ts +3 -0
- package/sample/ts/tests/add.test.ts +8 -0
- package/sample/ts/tsconfig.json +12 -0
- package/scripts/aggregate-harness-review.mjs +48 -0
- package/scripts/bootstrap-harness.sh +411 -0
- package/scripts/check-diff-size.mjs +46 -0
- package/scripts/check-e2e-manifest.mjs +35 -0
- package/scripts/check-eval-score-drift.mjs +31 -0
- package/scripts/check-gh-aw-dogfood-scope.mjs +51 -0
- package/scripts/check-issue-spec.mjs +215 -0
- package/scripts/check-l1-readiness.mjs +82 -0
- package/scripts/check-open-pr-limit.mjs +34 -0
- package/scripts/doctor.mjs +177 -0
- package/scripts/emit-gh-aw-dogfood-report.mjs +112 -0
- package/scripts/emit-telemetry-artifact.mjs +99 -0
- package/scripts/fetch-telemetry-artifacts.mjs +176 -0
- package/scripts/harness-drift-report.mjs +99 -0
- package/scripts/lib/bootstrap-copy.mjs +123 -0
- package/scripts/lib/ccsd-contract.mjs +212 -0
- package/scripts/lib/diff-size.mjs +103 -0
- package/scripts/lib/doctor-local.mjs +179 -0
- package/scripts/lib/e2e-manifest.mjs +76 -0
- package/scripts/lib/gh-aw-dogfood.mjs +293 -0
- package/scripts/lib/github-config.mjs +94 -0
- package/scripts/lib/harness-ci-fragments.mjs +98 -0
- package/scripts/lib/harness-review-routing.mjs +244 -0
- package/scripts/lib/harness-review.mjs +388 -0
- package/scripts/lib/issue-form-label-sync.mjs +56 -0
- package/scripts/lib/l1-readiness.mjs +258 -0
- package/scripts/lib/merge-harness-package.mjs +36 -0
- package/scripts/lib/npm-package.mjs +129 -0
- package/scripts/lib/setup-wizard.mjs +224 -0
- package/scripts/lib/stacks.mjs +138 -0
- package/scripts/lib/telemetry-artifact.mjs +253 -0
- package/scripts/lib/template-root.mjs +39 -0
- package/scripts/merge-harness-package.mjs +14 -0
- package/scripts/route-harness-review.mjs +168 -0
- package/scripts/run-e2e-bench.mjs +216 -0
- package/scripts/sdlc-gh-cli.mjs +91 -0
- package/scripts/select-eval-jobs.mjs +41 -0
- package/scripts/setup-github.mjs +242 -0
- package/scripts/setup-github.sh +4 -0
- package/scripts/setup-wizard.mjs +426 -0
- package/scripts/test-bootstrap-guidance-scenarios.mjs +94 -0
- package/scripts/test-diff-size-scenarios.mjs +88 -0
- package/scripts/test-doctor-scenarios.mjs +70 -0
- package/scripts/test-e2e-manifest-scenarios.mjs +65 -0
- package/scripts/test-gh-aw-dogfood-scenarios.mjs +74 -0
- package/scripts/test-harness-review-routing-scenarios.mjs +130 -0
- package/scripts/test-harness-review-scenarios.mjs +92 -0
- package/scripts/test-hooks-scenarios.mjs +44 -0
- package/scripts/test-issue-form-label-sync-scenarios.mjs +48 -0
- package/scripts/test-issue-spec-scenarios.mjs +258 -0
- package/scripts/test-l1-readiness-scenarios.mjs +204 -0
- package/scripts/test-merge-harness-package-scenarios.mjs +53 -0
- package/scripts/test-npm-package-scenarios.mjs +31 -0
- package/scripts/test-sdlc-gh-cli-scenarios.mjs +54 -0
- package/scripts/test-setup-github-scenarios.mjs +103 -0
- package/scripts/test-setup-wizard-scenarios.mjs +114 -0
- package/scripts/test-telemetry-artifact-scenarios.mjs +69 -0
- package/scripts/trim-harness-ci.mjs +18 -0
- package/scripts/validate-gh-aw-compile.mjs +64 -0
- package/scripts/validate-harness.mjs +199 -0
- package/scripts/validate-telemetry.mjs +21 -0
- package/scripts/verify-bootstrap-stacks.sh +192 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Bootstrap verification for all supported stacks (new + existing modes).
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
5
|
+
TMP="${TMPDIR:-/tmp}/harness-verify-$$"
|
|
6
|
+
mkdir -p "$TMP"
|
|
7
|
+
|
|
8
|
+
cd "$ROOT"
|
|
9
|
+
|
|
10
|
+
STACKS="$(node --input-type=module -e "
|
|
11
|
+
import { loadStacks } from './scripts/lib/stacks.mjs';
|
|
12
|
+
console.log(loadStacks().map((s) => s.id).join(' '));
|
|
13
|
+
")"
|
|
14
|
+
|
|
15
|
+
assert_bootstrapped_repo() {
|
|
16
|
+
local stack="$1"
|
|
17
|
+
local target="$2"
|
|
18
|
+
|
|
19
|
+
local check_file workflow harness_ci product_ci_count
|
|
20
|
+
check_file="$(node --input-type=module -e "
|
|
21
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
22
|
+
console.log(getStack('${stack}').bootstrapCheck);
|
|
23
|
+
")"
|
|
24
|
+
workflow="$(node --input-type=module -e "
|
|
25
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
26
|
+
console.log(getStack('${stack}').workflow);
|
|
27
|
+
")"
|
|
28
|
+
|
|
29
|
+
test -f "$target/$check_file"
|
|
30
|
+
test -f "$target/.github/workflows/harness-ci.yml"
|
|
31
|
+
test -f "$target/.github/workflows/eval-ci.yml"
|
|
32
|
+
test -f "$target/.github/workflows/$workflow"
|
|
33
|
+
|
|
34
|
+
product_ci_count="$(find "$target/.github/workflows" -maxdepth 1 -name 'product-ci-*.yml' | wc -l | tr -d ' ')"
|
|
35
|
+
if [[ "$product_ci_count" != "1" ]]; then
|
|
36
|
+
echo "Expected exactly one product-ci workflow for stack=$stack, found $product_ci_count" >&2
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
harness_ci="$target/.github/workflows/harness-ci.yml"
|
|
41
|
+
for other in $STACKS; do
|
|
42
|
+
if [[ "$other" != "$stack" ]] && grep -q "product-${other}:" "$harness_ci"; then
|
|
43
|
+
echo "harness-ci.yml not trimmed for stack=$stack (found product-${other})" >&2
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
done
|
|
47
|
+
if ! grep -q "product-${stack}:" "$harness_ci"; then
|
|
48
|
+
echo "harness-ci.yml missing product-${stack} job" >&2
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if grep -q "@your-org/harness-engineers" "$target/.github/CODEOWNERS"; then
|
|
53
|
+
echo "CODEOWNERS placeholder was not replaced for stack=$stack" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
for lib in bootstrap-copy.mjs diff-size.mjs e2e-manifest.mjs doctor-local.mjs github-config.mjs; do
|
|
58
|
+
if [[ ! -f "$target/scripts/lib/$lib" ]]; then
|
|
59
|
+
echo "bootstrap missing scripts/lib/$lib for stack=$stack" >&2
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
if [[ ! -f "$target/docs/revert-playbook.md" ]]; then
|
|
65
|
+
echo "bootstrap missing docs/revert-playbook.md for stack=$stack" >&2
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
if [[ ! -f "$target/infra/samples/telemetry-payload.json" ]]; then
|
|
70
|
+
echo "bootstrap missing infra/samples/telemetry-payload.json for stack=$stack" >&2
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
(
|
|
75
|
+
cd "$target"
|
|
76
|
+
node scripts/check-e2e-manifest.mjs >/dev/null
|
|
77
|
+
node scripts/test-diff-size-scenarios.mjs >/dev/null
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
for stack in $STACKS; do
|
|
82
|
+
target="$TMP/${stack}-new"
|
|
83
|
+
"$ROOT/scripts/bootstrap-harness.sh" --repo "$target" --stack "$stack" --mode new --codeowners-team @acme/platform --yes
|
|
84
|
+
assert_bootstrapped_repo "$stack" "$target"
|
|
85
|
+
done
|
|
86
|
+
|
|
87
|
+
for stack in $STACKS; do
|
|
88
|
+
target="$TMP/${stack}-existing"
|
|
89
|
+
mkdir -p "$target"
|
|
90
|
+
|
|
91
|
+
check_file="$(node --input-type=module -e "
|
|
92
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
93
|
+
console.log(getStack('${stack}').bootstrapCheck);
|
|
94
|
+
")"
|
|
95
|
+
sample_dir="$(node --input-type=module -e "
|
|
96
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
97
|
+
console.log(getStack('${stack}').sampleDir);
|
|
98
|
+
")"
|
|
99
|
+
|
|
100
|
+
cp "$ROOT/sample/$sample_dir/$check_file" "$target/$check_file" 2>/dev/null \
|
|
101
|
+
|| touch "$target/$check_file"
|
|
102
|
+
|
|
103
|
+
if [[ "$stack" == "ts" ]]; then
|
|
104
|
+
printf '%s\n' '{"name":"existing-product","scripts":{"start":"node app.js"},"dependencies":{"lodash":"1.0.0"}}' > "$target/package.json"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
"$ROOT/scripts/bootstrap-harness.sh" --repo "$target" --stack "$stack" --mode existing --codeowners-team @acme/platform --yes
|
|
108
|
+
assert_bootstrapped_repo "$stack" "$target"
|
|
109
|
+
|
|
110
|
+
if [[ "$stack" == "ts" ]]; then
|
|
111
|
+
if ! grep -q '"name": "existing-product"' "$target/package.json"; then
|
|
112
|
+
echo "bootstrap overwrote existing package.json name for stack=$stack" >&2
|
|
113
|
+
exit 1
|
|
114
|
+
fi
|
|
115
|
+
if ! grep -q '"start": "node app.js"' "$target/package.json"; then
|
|
116
|
+
echo "bootstrap overwrote existing package.json scripts for stack=$stack" >&2
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
if ! grep -q '"check-l1-readiness"' "$target/package.json"; then
|
|
120
|
+
echo "bootstrap did not merge harness scripts into package.json for stack=$stack" >&2
|
|
121
|
+
exit 1
|
|
122
|
+
fi
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
if [[ -d "$target/sample" ]]; then
|
|
126
|
+
echo "existing mode should not copy sample/ tree for stack=$stack" >&2
|
|
127
|
+
exit 1
|
|
128
|
+
fi
|
|
129
|
+
done
|
|
130
|
+
|
|
131
|
+
for stack in $STACKS; do
|
|
132
|
+
target="$TMP/${stack}-auto-existing"
|
|
133
|
+
mkdir -p "$target"
|
|
134
|
+
|
|
135
|
+
check_file="$(node --input-type=module -e "
|
|
136
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
137
|
+
console.log(getStack('${stack}').bootstrapCheck);
|
|
138
|
+
")"
|
|
139
|
+
sample_dir="$(node --input-type=module -e "
|
|
140
|
+
import { getStack } from './scripts/lib/stacks.mjs';
|
|
141
|
+
console.log(getStack('${stack}').sampleDir);
|
|
142
|
+
")"
|
|
143
|
+
cp "$ROOT/sample/$sample_dir/$check_file" "$target/$check_file" 2>/dev/null || touch "$target/$check_file"
|
|
144
|
+
|
|
145
|
+
(
|
|
146
|
+
cd "$target"
|
|
147
|
+
"$ROOT/scripts/bootstrap-harness.sh" --codeowners-team @acme/platform --yes
|
|
148
|
+
)
|
|
149
|
+
assert_bootstrapped_repo "$stack" "$target"
|
|
150
|
+
done
|
|
151
|
+
|
|
152
|
+
target="$TMP/auto-new"
|
|
153
|
+
mkdir -p "$target"
|
|
154
|
+
(
|
|
155
|
+
cd "$target"
|
|
156
|
+
"$ROOT/scripts/bootstrap-harness.sh" --stack ts --codeowners-team @acme/platform --yes
|
|
157
|
+
)
|
|
158
|
+
assert_bootstrapped_repo "ts" "$target"
|
|
159
|
+
|
|
160
|
+
ambiguous="$TMP/ambiguous-stack"
|
|
161
|
+
mkdir -p "$ambiguous"
|
|
162
|
+
touch "$ambiguous/package.json" "$ambiguous/requirements-dev.txt"
|
|
163
|
+
if "$ROOT/scripts/bootstrap-harness.sh" --repo "$ambiguous" --mode existing --codeowners-team @acme/platform --yes; then
|
|
164
|
+
echo "Expected bootstrap to fail for ambiguous stack detection" >&2
|
|
165
|
+
exit 1
|
|
166
|
+
fi
|
|
167
|
+
|
|
168
|
+
git_only="$TMP/git-only"
|
|
169
|
+
mkdir -p "$git_only"
|
|
170
|
+
git -C "$git_only" init >/dev/null 2>&1
|
|
171
|
+
if "$ROOT/scripts/bootstrap-harness.sh" --repo "$git_only" --stack ts --codeowners-team @acme/platform --yes; then
|
|
172
|
+
echo "Expected bootstrap to fail for ambiguous mode detection (.git only)" >&2
|
|
173
|
+
exit 1
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
seed_repo="$TMP/seed-repo"
|
|
177
|
+
mkdir -p "$seed_repo"
|
|
178
|
+
touch "$seed_repo/README.md"
|
|
179
|
+
if "$ROOT/scripts/bootstrap-harness.sh" --repo "$seed_repo" --stack ts --codeowners-team @acme/platform --yes; then
|
|
180
|
+
echo "Expected bootstrap to fail for seed repo mode detection" >&2
|
|
181
|
+
exit 1
|
|
182
|
+
fi
|
|
183
|
+
|
|
184
|
+
nested_ts="$TMP/nested-ts"
|
|
185
|
+
mkdir -p "$nested_ts/tools"
|
|
186
|
+
touch "$nested_ts/tools/package.json"
|
|
187
|
+
if "$ROOT/scripts/bootstrap-harness.sh" --repo "$nested_ts" --mode existing --codeowners-team @acme/platform --yes; then
|
|
188
|
+
echo "Expected bootstrap to fail for nested TypeScript-only detection" >&2
|
|
189
|
+
exit 1
|
|
190
|
+
fi
|
|
191
|
+
|
|
192
|
+
echo "Bootstrap verification passed (${STACKS// /, }, modes=new+existing)"
|