Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e9b1763
infra: mandatory PR hygiene gate + CI hardening [Build 1111.011]
mkalhitti-cloud May 20, 2026
f44543b
fix: purge non-ASCII from Markdown to satisfy Jules audit [Build 1111…
mkalhitti-cloud May 20, 2026
c74c8e0
fix: PHS Perfection Loop - PR #110
mkalhitti-cloud May 20, 2026
c546920
fix: purge emojis from workflow_health.md to satisfy Jules ASCII audi…
mkalhitti-cloud May 20, 2026
8810b9c
infra: upgrade Jules to Native GitHub Check Run (Kilo-parity) [Build …
mkalhitti-cloud May 20, 2026
6432df4
fix: Jules API 401 - restore exact manual trigger logic [Build 1111.015]
mkalhitti-cloud May 20, 2026
006b56e
fix: rewrite Jules trigger to use fetch API to prevent 401 header ble…
mkalhitti-cloud May 21, 2026
751d385
fix: Jules API - use Authorization: Bearer for OAuth token support [B…
mkalhitti-cloud May 21, 2026
2a12a92
fix: Jules API - revert to proven https and x-goog-api-key pattern [B…
mkalhitti-cloud May 21, 2026
db40d90
infra: switch to official Jules SDK for Gemini-style native audits [B…
mkalhitti-cloud May 21, 2026
18b4b87
fix: remove npm cache to unblock Jules SDK workflow [Build 1111.020]
mkalhitti-cloud May 21, 2026
71ca4c0
fix: convert Jules SDK script to ESM (.mjs) to satisfy export require…
mkalhitti-cloud May 21, 2026
4893acc
fix: Jules SDK - correct API method names to session() and result() […
mkalhitti-cloud May 21, 2026
3b525ae
infra: restore full PR review team - expanded path filters [Build 111…
mkalhitti-cloud May 21, 2026
8a009cc
infra: force trigger full 28-audit fleet - fixed path filters [Build …
mkalhitti-cloud May 21, 2026
74ceaab
infra: force-trigger AI audits - removed path filters for diagnostics…
mkalhitti-cloud May 21, 2026
515398d
diag: Jules API 401 - bypass script and use official CLI to confirm k…
mkalhitti-cloud May 21, 2026
7453cec
fix: Jules REST API - implement documented X-Goog-Api-Key pattern [Bu…
mkalhitti-cloud May 21, 2026
d877eb2
fix: indestructible Jules reporting - ensure failure conclusion on 40…
mkalhitti-cloud May 21, 2026
3a0c4c5
fix: apply Jules native integration fix from extracted zip [Build 111…
mkalhitti-cloud May 21, 2026
38dd7d8
infra: remove redundant custom Jules workflow in favor of official Gi…
mkalhitti-cloud May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .bob/commands/pr-loop.md
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.
```
Comment on lines +30 to +36
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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
-```
+```text
 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.

@@
- +text
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.
  4. If Score < 15, repeat Step 1.
  5. If Score = 15, emit: [LOCAL-READY] PHS 15/15.
@@
-```
+```text
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.
</details>
 


Also applies to: 41-50, 55-63

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 30-30: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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).


</details>

<!-- fingerprinting:phantom:poseidon:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->


### 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`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0: Missing required script scripts/calculate_fleet_score.ps1. Both Step 1 (Local Integrity) and Step 2 (Global Audit) instruct the orchestrator to run this script to calculate the fleet/health score, but the file does not exist in the repository. The workflow will fail at runtime when attempting to execute this command.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .bob/commands/pr-loop.md, line 47:

<comment>Missing required script `scripts/calculate_fleet_score.ps1`. Both Step 1 (Local Integrity) and Step 2 (Global Audit) instruct the orchestrator to run this script to calculate the fleet/health score, but the file does not exist in the repository. The workflow will fail at runtime when attempting to execute this command.</comment>

<file context>
@@ -0,0 +1,73 @@
+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`.
+  4. If Score < 15, repeat Step 1.
+  5. If Score = 15, emit: [LOCAL-READY] PHS 15/15.
</file context>

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."
30 changes: 24 additions & 6 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Removing obj/** and bin/** from exclude_paths will cause Codacy to scan .NET build output directories. This wastes CI resources on compiled binaries/intermediate artifacts and can produce false positives from auto-generated code. Add both back to exclude_paths.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .codacy.yaml, line 14:

<comment>Removing `obj/**` and `bin/**` from `exclude_paths` will cause Codacy to scan .NET build output directories. This wastes CI resources on compiled binaries/intermediate artifacts and can produce false positives from auto-generated code. Add both back to `exclude_paths`.</comment>

<file context>
@@ -1,17 +1,35 @@
+  remark-lint: false
+
 exclude_paths:
+  - "scripts/**"
   - "docs/**"
-  - ".github/**"
</file context>

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"
22 changes: 22 additions & 0 deletions .codacyignore
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
8 changes: 8 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ lang_version = "8.0"
exclude_patterns = [
"docs/**",
".github/**",
"scripts/**",
"**/*.md",
"**/*.py",
"**/*.ps1",
"**/*.bat",
"**/*.json",
"**/*.yaml",
"**/*.yml",
".agent/**",
".agents/**",
".bob/**",
".codex/**",
".cursor/**",
".gemini/**",
".antigravitycli/**",
"Traycerrefactor/**",
"artifacts/**",
"benchmarks/**"
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dotnet_analyzer_diagnostic.severity = warning
# StyleCop specific configurations (optional, can be expanded as needed)
dotnet_diagnostic.SA1633.severity = none # File must have header
dotnet_diagnostic.SA1200.severity = none # Using directives must be placed correctly
dotnet_diagnostic.SA1101.severity = none # Prefix local calls with this (conflicts with modern C# conventions)
9 changes: 8 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ name: CodeQL
on:
push:
branches: ["main", "dev"]
paths:
- 'src/**/*.cs'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The added paths filter under pull_request contradicts the existing comment, which states CodeQL runs on ALL PRs for maximum coverage. The paths filter will silently skip CodeQL on PRs that change only non-C# files (e.g., workflow YAML, scripts, docs), reducing PR-time coverage. Either remove the paths filter from pull_request (to preserve all-PR coverage) or update the comment to reflect the new narrower scope.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/codeql.yml, line 7:

<comment>The added `paths` filter under `pull_request` contradicts the existing comment, which states CodeQL runs on ALL PRs for maximum coverage. The `paths` filter will silently skip CodeQL on PRs that change only non-C# files (e.g., workflow YAML, scripts, docs), reducing PR-time coverage. Either remove the `paths` filter from `pull_request` (to preserve all-PR coverage) or update the comment to reflect the new narrower scope.</comment>

<file context>
@@ -3,9 +3,14 @@ name: CodeQL
   push:
     branches: ["main", "dev"]
+    paths:
+      - 'src/**/*.cs'
+      - 'tests/**/*.cs'
   pull_request:
</file context>

- 'tests/**/*.cs'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Comment thread
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"

Expand Down
Loading
Loading