@boyingliu01/xp-gate 0.15.5 → 0.18.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/adapter-common.sh +0 -0
- package/adapters/cpp.sh +0 -0
- package/adapters/dart.sh +0 -0
- package/adapters/flutter.sh +0 -0
- package/adapters/go.sh +0 -0
- package/adapters/iac.sh +0 -0
- package/adapters/java.sh +0 -0
- package/adapters/kotlin.sh +0 -0
- package/adapters/objectivec.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-20132-python/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4081-c/scripts/install-maven.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-gradle.sh +0 -0
- package/adapters/plugins/book299-4083-javascriptes5/scripts/install-maven.sh +0 -0
- package/adapters/powershell.sh +0 -0
- package/adapters/python.sh +0 -0
- package/adapters/shell.sh +0 -0
- package/adapters/swift.sh +0 -0
- package/adapters/typescript.sh +0 -0
- package/bin/xp-gate.js +29 -1
- package/gate-3.sh +0 -0
- package/gate-4.sh +0 -0
- package/gate-7.sh +0 -0
- package/gate-8.sh +0 -0
- package/gate-9.sh +0 -0
- package/hooks/adapter-common.sh +0 -0
- package/hooks/gate-3.sh +0 -0
- package/hooks/gate-4.sh +0 -0
- package/hooks/gate-7.sh +0 -0
- package/hooks/gate-8.sh +0 -0
- package/hooks/gate-9.sh +0 -0
- package/hooks/lib/now-ms.sh +33 -0
- package/hooks/pre-commit +63 -47
- package/hooks/pre-push +0 -0
- package/hooks/sprint-gate.sh +291 -0
- package/lib/__tests__/check-version.test.js +122 -0
- package/lib/__tests__/doctor.test.js +13 -15
- package/lib/__tests__/gate-audit.test.ts +38 -0
- package/lib/__tests__/phase-transition.test.js +512 -272
- package/lib/__tests__/retro.test.js +131 -0
- package/lib/__tests__/sprint-audit.test.js +207 -207
- package/lib/__tests__/sprint-status-rework.test.js +184 -0
- package/lib/check-version.js +9 -0
- package/lib/doctor-tui.js +268 -198
- package/lib/doctor.js +15 -3
- package/lib/gate-audit.ts +18 -7
- package/lib/gate-runner.js +77 -30
- package/lib/init.js +10 -0
- package/lib/language-tools.js +833 -833
- package/lib/mattpocock-license-verdict.json +7 -0
- package/lib/phase-transition.js +499 -249
- package/lib/retro.js +222 -0
- package/lib/shared-utils.js +7 -0
- package/lib/sprint-audit.js +235 -235
- package/lib/sprint-init.js +207 -0
- package/lib/sprint-state-migrator.js +1 -0
- package/lib/sprint-status.js +111 -0
- package/mock-policy/AGENTS.md +3 -3
- package/mutation/AGENTS.md +3 -3
- package/package.json +3 -2
- package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-code/bin/delphi-review-guard.sh +0 -0
- package/plugins/claude-code/bin/xp-gate-check +0 -0
- package/plugins/claude-code/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/claude-code/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/claude-code/skills/delphi-review/SKILL.md +59 -4
- package/plugins/claude-code/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/claude-code/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/claude-code/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/claude-code/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/claude-code/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/claude-code/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/claude-code/skills/grilling/SKILL.md +12 -0
- package/plugins/claude-code/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/claude-code/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/claude-code/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/claude-code/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/claude-code/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/claude-code/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/claude-code/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/claude-code/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/claude-code/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/claude-code/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/claude-code/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/claude-code/skills/to-issues/SKILL.md +1 -1
- package/plugins/opencode/index.ts +1 -0
- package/plugins/opencode/package.json +1 -1
- package/plugins/opencode/skills/batch-grill-me/SKILL.md +15 -0
- package/plugins/opencode/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/opencode/skills/delphi-review/SKILL.md +59 -4
- package/plugins/opencode/skills/delphi-review/references/requirements.md +390 -0
- package/plugins/opencode/skills/delphi-review/references/round-templates.md +67 -0
- package/plugins/opencode/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/plugins/opencode/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/plugins/opencode/skills/domain-modeling/SKILL.md +74 -0
- package/plugins/opencode/skills/grill-with-docs/SKILL.md +7 -0
- package/plugins/opencode/skills/grilling/SKILL.md +12 -0
- package/plugins/opencode/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/opencode/skills/sprint-flow/SKILL.md +168 -43
- package/plugins/opencode/skills/sprint-flow/references/components/memory.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/middleware.md +1 -1
- package/plugins/opencode/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/plugins/opencode/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/plugins/opencode/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/plugins/opencode/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/plugins/opencode/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/plugins/opencode/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/plugins/opencode/skills/sprint-flow/references/phase-overview.md +58 -53
- package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +3 -3
- package/plugins/opencode/skills/test-specification-alignment/SKILL.md +8 -3
- package/plugins/opencode/skills/to-issues/SKILL.md +1 -1
- package/plugins/qoder/agents/delphi-architecture.md +48 -48
- package/plugins/qoder/agents/delphi-feasibility.md +48 -48
- package/plugins/qoder/agents/delphi-technical.md +48 -48
- package/plugins/qoder/bin/sprint-flow-guard.sh +0 -0
- package/plugins/qoder/bin/xp-gate-check +0 -0
- package/plugins/qoder/plugin.json +1 -1
- package/plugins/qoder/skills/delphi-review/AGENTS.md +3 -3
- package/plugins/qoder/skills/sprint-flow/AGENTS.md +3 -3
- package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +3 -3
- package/principles/AGENTS.md +3 -3
- package/scripts/__tests__/check-mattpocock-license.test.js +229 -0
- package/scripts/__tests__/sync-package-content.test.js +50 -0
- package/scripts/check-mattpocock-license.cjs +302 -0
- package/scripts/delphi-external-review.cjs +432 -432
- package/scripts/migrate-audit-anomalies.mjs +78 -0
- package/scripts/sync-package-content.js +52 -5
- package/skills/batch-grill-me/SKILL.md +15 -0
- package/skills/delphi-review/AGENTS.md +3 -3
- package/skills/delphi-review/SKILL.md +59 -4
- package/skills/delphi-review/references/requirements.md +390 -0
- package/skills/delphi-review/references/round-templates.md +67 -0
- package/skills/domain-modeling/ADR-FORMAT.md +64 -0
- package/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/skills/domain-modeling/SKILL.md +74 -0
- package/skills/grill-with-docs/SKILL.md +7 -0
- package/skills/grilling/SKILL.md +12 -0
- package/skills/sprint-flow/AGENTS.md +3 -3
- package/skills/sprint-flow/SKILL.md +168 -43
- package/skills/sprint-flow/references/components/memory.md +1 -1
- package/skills/sprint-flow/references/components/middleware.md +1 -1
- package/skills/sprint-flow/references/components/skill-invocations.md +21 -20
- package/skills/sprint-flow/references/components/tool-descriptions.md +22 -23
- package/skills/sprint-flow/references/orchestration-rules.md +14 -12
- package/skills/sprint-flow/references/phase-2-design.md +145 -133
- package/skills/sprint-flow/references/phase-3-build.md +69 -2
- package/skills/sprint-flow/references/phase-4-verify.md +93 -31
- package/skills/sprint-flow/references/phase-5-ship.md +99 -14
- package/skills/sprint-flow/references/phase-6-close.md +37 -5
- package/skills/sprint-flow/references/phase-overview.md +58 -53
- package/skills/test-specification-alignment/AGENTS.md +3 -3
- package/skills/test-specification-alignment/SKILL.md +8 -3
- package/skills/to-issues/SKILL.md +1 -1
- package/adapters/gate-3.sh +0 -68
- package/adapters/gate-4.sh +0 -80
- package/adapters/gate-7.sh +0 -45
- package/adapters/gate-8.sh +0 -56
- package/adapters/gate-9.sh +0 -104
package/adapters/gate-9.sh
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# ============================================================================
|
|
2
|
-
# GATE 9: Semgrep SAST Security Scan
|
|
3
|
-
# Detects security vulnerabilities (SQL injection, XSS, etc.) in staged files
|
|
4
|
-
# Tool: semgrep -- https://semgrep.dev
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
2>&1 echo ""
|
|
8
|
-
2>&1 echo "→ Gate 9: Semgrep SAST Security Scan..."
|
|
9
|
-
GATE_9_START=$(gate_start_ms)
|
|
10
|
-
|
|
11
|
-
GATE_9_STATUS=""
|
|
12
|
-
|
|
13
|
-
# Semgrep availability check
|
|
14
|
-
SEMGREP_CMD=""
|
|
15
|
-
if command -v semgrep >/dev/null 2>&1; then
|
|
16
|
-
SEMGREP_CMD="semgrep"
|
|
17
|
-
elif [ -f "$HOME/.local/bin/semgrep" ]; then
|
|
18
|
-
SEMGREP_CMD="$HOME/.local/bin/semgrep"
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [ -z "$SEMGREP_CMD" ]; then
|
|
22
|
-
echo " ⚠️ WARN - semgrep not installed — SAST scanning unavailable"
|
|
23
|
-
echo " Install: brew install semgrep (macOS) | pip install semgrep (Linux) | pip install semgrep (Windows)"
|
|
24
|
-
echo " Pre-cache rules: semgrep --config=p/security-audit"
|
|
25
|
-
echo " Gate 9: SAST Security (WARN, semgrep not installed)"
|
|
26
|
-
GATE_9_STATUS="WARN"
|
|
27
|
-
else
|
|
28
|
-
# Get staged files filtered to Semgrep-supported languages
|
|
29
|
-
SEMGREP_FILES=$(git diff --cached --name-only --diff-filter=ACM 2>/dev/null | grep -E '\.(ts|tsx|js|jsx|py|go|java|c|cpp|cs|rb|php|scala|swift)$' || true)
|
|
30
|
-
|
|
31
|
-
if [ -z "$SEMGREP_FILES" ]; then
|
|
32
|
-
echo " ⏭️ SKIPPED - SAST (no supported language files changed)"
|
|
33
|
-
GATE_9_STATUS="SKIP"
|
|
34
|
-
else
|
|
35
|
-
# Run semgrep with JSON output
|
|
36
|
-
# --config=p/security-audit: explicit security ruleset
|
|
37
|
-
# --json: machine-readable output
|
|
38
|
-
# --disable-version-check: skip network call
|
|
39
|
-
SEMGREP_OUTPUT=$($SEMGREP_CMD scan --config=p/security-audit --json --disable-version-check $SEMGREP_FILES 2>&1)
|
|
40
|
-
SEMGREP_EXIT=$?
|
|
41
|
-
|
|
42
|
-
if [ "$SEMGREP_EXIT" -eq 0 ]; then
|
|
43
|
-
echo " ✅ PASSED - No security vulnerabilities found."
|
|
44
|
-
GATE_9_STATUS="PASS"
|
|
45
|
-
elif [ "$SEMGREP_EXIT" -eq 1 ]; then
|
|
46
|
-
# Findings detected - parse JSON to categorize
|
|
47
|
-
CRITICAL_HIGH=$(echo "$SEMGREP_OUTPUT" | node -e "
|
|
48
|
-
let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{
|
|
49
|
-
try{const data=JSON.parse(d);const results=data.results||[];
|
|
50
|
-
const count=results.filter(r=>{const s=(r.extra&&r.extra.severity||'').toUpperCase();return s==='CRITICAL'||s==='HIGH';}).length;
|
|
51
|
-
console.log(count);}catch(e){console.log('0');}
|
|
52
|
-
});" 2>/dev/null || echo "0")
|
|
53
|
-
|
|
54
|
-
MEDIUM_LOW=$(echo "$SEMGREP_OUTPUT" | node -e "
|
|
55
|
-
let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{
|
|
56
|
-
try{const data=JSON.parse(d);const results=data.results||[];
|
|
57
|
-
const count=results.filter(r=>{const s=(r.extra&&r.extra.severity||'').toUpperCase();return s==='MEDIUM'||s==='LOW';}).length;
|
|
58
|
-
console.log(count);}catch(e){console.log('0');}
|
|
59
|
-
});" 2>/dev/null || echo "0")
|
|
60
|
-
|
|
61
|
-
# Extract top finding details
|
|
62
|
-
FINDING_DETAILS=$(echo "$SEMGREP_OUTPUT" | node -e "
|
|
63
|
-
let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{
|
|
64
|
-
try{const data=JSON.parse(d);const results=data.results||[];
|
|
65
|
-
results.slice(0,5).forEach(r=>{const extra=r.extra||{};
|
|
66
|
-
const severity=(extra.severity||'UNKNOWN').toUpperCase();
|
|
67
|
-
const ruleId=r.check_id||'unknown';const path=r.path||'unknown';
|
|
68
|
-
const line=(r.start&&r.start.line)||'?';const msg=(extra.message||'').slice(0,80);
|
|
69
|
-
console.log(' ['+severity+'] '+ruleId);console.log(' '+path+':'+line+' → '+msg);console.log();});
|
|
70
|
-
}catch(e){console.log(' (Failed to parse semgrep output)');}
|
|
71
|
-
});" 2>/dev/null || echo " (Failed to parse semgrep output)")
|
|
72
|
-
|
|
73
|
-
if [ "$CRITICAL_HIGH" -gt 0 ]; then
|
|
74
|
-
echo ""
|
|
75
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
76
|
-
echo " GATE 9: Semgrep Security Gate"
|
|
77
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
78
|
-
echo " CRITICAL/HIGH: ${CRITICAL_HIGH} ❌ BLOCKED"
|
|
79
|
-
echo " MEDIUM/LOW: ${MEDIUM_LOW} ⚠️ warning"
|
|
80
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
81
|
-
echo " ❌ BLOCKED — Critical/High vulnerability found"
|
|
82
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
83
|
-
echo "$FINDING_DETAILS"
|
|
84
|
-
echo " Run 'semgrep scan --config=p/security-audit' to review all findings."
|
|
85
|
-
GATE_9_STATUS="FAIL"
|
|
86
|
-
exit 1
|
|
87
|
-
else
|
|
88
|
-
echo ""
|
|
89
|
-
echo " ✅ PASSED - No critical/high vulnerabilities"
|
|
90
|
-
if [ "$MEDIUM_LOW" -gt 0 ]; then
|
|
91
|
-
echo " ⚠️ ${MEDIUM_LOW} medium/low findings (warnings only)"
|
|
92
|
-
echo "$FINDING_DETAILS"
|
|
93
|
-
fi
|
|
94
|
-
GATE_9_STATUS="PASS"
|
|
95
|
-
fi
|
|
96
|
-
else
|
|
97
|
-
# semgrep runtime error (timeout, config error, etc.)
|
|
98
|
-
echo " ⚠️ semgrep exited with code ${SEMGREP_EXIT} — skipping gate"
|
|
99
|
-
echo " ⏭️ SKIPPED - SAST (semgrep runtime error)"
|
|
100
|
-
GATE_9_STATUS="SKIP"
|
|
101
|
-
fi
|
|
102
|
-
fi
|
|
103
|
-
fi
|
|
104
|
-
record_gate_audit "gate-9" "sast-security" "$GATE_9_STATUS" "0" "$GATE_9_START"
|