-
Notifications
You must be signed in to change notification settings - Fork 3
infra: mandatory PR hygiene gate + CI hardening [Build 1111.011] #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e9b1763
f44543b
c74c8e0
c546920
8810b9c
6432df4
006b56e
751d385
2a12a92
db40d90
18b4b87
71ca4c0
4893acc
3b525ae
8a009cc
74ceaab
515398d
7453cec
d877eb2
3a0c4c5
38dd7d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| description: Repeatable 100/100 Perfection Loop. Iteratively repairs and verifies code until the Project Health Score is 100/100. | ||
| argument-hint: <pr-number> | ||
| --- | ||
| # PR PERFECTION LOOP (pr-loop) | ||
| **Target PR:** $1 | ||
| **Goal:** 100/100 (25/25 Points) | ||
| **Mode:** Orchestrator (YOLO-parity) | ||
| **Protocol:** V12 Autonomous Perfection mandate. | ||
|
|
||
| You are the V12 Perfection Orchestrator. You MUST NOT STOP until PHS is 100/100. | ||
|
|
||
| --- | ||
|
|
||
| ## ORCHESTRATION RULES | ||
|
|
||
| - **SCORE 100 MANDATE**: You are BANNED from merging or ending the loop if PHS < 100. | ||
| - **HYGIENE GATE**: You MUST pass Step 0 (Clean Branch & Diff Size) before every push. | ||
| - **LOCAL FIRST**: You must achieve Local Score 15/15 before every push. | ||
| - **FORENSIC AUDIT**: Every failure must be categorized as [VALID], [HALLUCINATION], [INFRA-NOISE], or [ACCESS_BLOCKED]. | ||
| - **F5 GATE**: The only manual action is the final NinjaTrader verification at Score 100. | ||
|
|
||
| --- | ||
|
|
||
| ## THE PERFECTION CYCLE | ||
|
|
||
| ### Step 0: Pre-Flight Hygiene (MANDATORY) | ||
| **Switch to: Advanced mode** | ||
| Hand off: | ||
| ``` | ||
| TASK: Verify PR Hygiene | ||
| PROTOCOL: | ||
| 1. Run `powershell -File .\scripts\verify_pr_hygiene.ps1`. | ||
| 2. If FAIL: HALT and report the violation (e.g. "Diff > 10k" or "Branch is dirty"). | ||
| 3. If PASS: Advance to Step 1. | ||
| ``` | ||
|
|
||
| ### Step 1: Local Integrity (Goal: 15/15) | ||
| **Switch to: v12-engineer mode** | ||
| Hand off: | ||
| ``` | ||
| TASK: Local Repair & Hygiene | ||
| INPUT: PR #$1 bot findings + local lint/test results. | ||
| PROTOCOL: | ||
| 1. FIX all surgical violations (braces, sealed classes, complexity). | ||
| 2. CATEGORIZE issues in docs/brain/workflow_health.md ([VALID], [HALLUCINATION], [INFRA-NOISE]). | ||
| 3. VERIFY: Run `powershell -File .\scripts\calculate_fleet_score.ps1`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P0: Missing required script Prompt for AI agents |
||
| 4. If Score < 15, repeat Step 1. | ||
| 5. If Score = 15, emit: [LOCAL-READY] PHS 15/15. | ||
| ``` | ||
|
|
||
| ### Step 2: Global Integrity (Goal: 25/25) | ||
| **Switch to: Advanced mode** | ||
| Hand off: | ||
| ``` | ||
| TASK: Global Audit & Monitor | ||
| PROTOCOL: | ||
| 1. git add . && git commit -m "fix: PHS Perfection Loop - PR #$1" && git push | ||
| 2. monitor_pr_checks $1 (Wait for all bots). | ||
| 3. Run `powershell -File .\scripts\calculate_fleet_score.ps1 -PrNumber $1`. | ||
| 4. If Score < 100, emit: [PHS-RETRY] Current: X/100. | ||
| 5. If Score = 100, emit: [PHS-PERFECT] 100/100. | ||
| ``` | ||
|
|
||
| ### Step 3: Loop Control | ||
| - If [PHS-RETRY]: **Restart at Step 1.** | ||
| - If [PHS-PERFECT]: **Advance to final F5 verification.** | ||
|
|
||
| --- | ||
|
|
||
| ## FINAL HANDSHAKE | ||
| Once 100/100 is achieved, STOP and ask Director: | ||
| "PHS 100/100 achieved. Please press F5 in NinjaTrader. Type 'F5 done' to merge." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,35 @@ | ||
| --- | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Removing Prompt for AI agents |
||
| engines: | ||
| csharp: true | ||
| markdown: false | ||
| python: false | ||
| shell: false | ||
| duplication: false | ||
| prospector: false | ||
| pylint: false | ||
| bandit: false | ||
| remark-lint: false | ||
|
|
||
| exclude_paths: | ||
| - "scripts/**" | ||
| - "docs/**" | ||
| - ".github/**" | ||
| - "**/*.md" | ||
| - "testsprite_tests/**" | ||
| - ".agent/**" | ||
| - ".agents/**" | ||
| - ".bob/**" | ||
| - ".codex/**" | ||
| - ".cursor/**" | ||
| - ".gemini/**" | ||
| - ".antigravitycli/**" | ||
| - "Traycerrefactor/**" | ||
| - "artifacts/**" | ||
| - "benchmarks/**" | ||
| - "node_modules/**" | ||
| - "obj/**" | ||
| - "bin/**" | ||
| - "**/*.md" | ||
| - "**/*.py" | ||
| - "**/*.ps1" | ||
| - "**/*.bat" | ||
| - "**/*.json" | ||
| - "**/*.yaml" | ||
| - "**/*.yml" | ||
| - "deploy-sync.ps1" | ||
| - "check_ascii.py" | ||
| - "fix_skills.py" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| scripts/** | ||
| docs/** | ||
| testsprite_tests/** | ||
| .agent/** | ||
| .agents/** | ||
| .bob/** | ||
| .codex/** | ||
| .cursor/** | ||
| .gemini/** | ||
| .antigravitycli/** | ||
| Traycerrefactor/** | ||
| artifacts/** | ||
| **/*.md | ||
| **/*.py | ||
| **/*.ps1 | ||
| **/*.bat | ||
| **/*.json | ||
| **/*.yaml | ||
| **/*.yml | ||
| deploy-sync.ps1 | ||
| check_ascii.py | ||
| fix_skills.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,9 +3,16 @@ name: CodeQL | |
| on: | ||
| push: | ||
| branches: ["main", "dev"] | ||
| paths: | ||
| - 'src/**/*.cs' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The added Prompt for AI agents |
||
| - 'tests/**/*.cs' | ||
|
coderabbitai[bot] marked this conversation as resolved.
cubic-dev-ai[bot] marked this conversation as resolved.
|
||
| - '.github/workflows/**' | ||
| pull_request: | ||
| # CodeQL runs on ALL PRs regardless of target branch for maximum coverage. | ||
| # Previously limited to main -- expanded to catch vulnerabilities in feature branches before merge. | ||
| paths: | ||
| - 'src/**/*.cs' | ||
| - 'tests/**/*.cs' | ||
| - '.github/workflows/**' | ||
| schedule: | ||
| - cron: "0 6 * * 1" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add language identifiers to fenced code blocks.
The three fenced blocks are missing language tags, which triggers markdownlint MD040 and can fail docs hygiene checks.
Suggested patch
@@
-
+textTASK: Local Repair & Hygiene
INPUT: PR #$1 bot findings + local lint/test results.
PROTOCOL:
powershell -File .\scripts\calculate_fleet_score.ps1.Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.bob/commands/pr-loop.md around lines 30 - 36, Add language identifiers to
the three fenced code blocks so markdownlint MD040 is satisfied: update the
fences surrounding the blocks that start with "TASK: Verify PR Hygiene", "TASK:
Local Repair & Hygiene", and "TASK: Global Audit & Monitor" to use a language
tag such as "text" (i.e., change
totext for each of those fenced blocks)so the docs pass hygiene checks; apply the same change to the other occurrences
mentioned (lines referenced in the review: the additional blocks at 41-50 and
55-63).