Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ac1b47e
ci: add required ci.yml workflow, claude.yml stub, and markdownlint c…
claude May 17, 2026
ba77770
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
34cfcb5
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
fbf6bef
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
d81f4db
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
3d3f415
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
1cba40f
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
dd86c03
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
66b5675
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
e9fa317
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
7585bb3
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
f7be869
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
a63b071
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 17, 2026
eb56a5d
fix(ci): fix markdownlint violations to pass CI lint job
Copilot May 17, 2026
9c78407
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 18, 2026
bbeec33
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 18, 2026
767a3b9
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 18, 2026
50961db
chore: apply manual instructions [skip ci-relay]
donpetry-bot May 18, 2026
40bc409
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 19, 2026
f08308e
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 19, 2026
2c9eac4
chore: apply manual instructions [skip ci-relay]
donpetry-bot May 19, 2026
56a44cf
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 19, 2026
0804167
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 19, 2026
7ce134b
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 19, 2026
ba5e3cf
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
03b4349
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
3a909c5
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
5b5716a
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
95f4597
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
1fab625
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 2026
c716b13
Merge branch 'main' into claude/issue-46-20260508-1409
don-petry May 20, 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
2 changes: 1 addition & 1 deletion .github/workflows/agent-shield.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
agent-shield:
uses: petry-projects/.github/.github/workflows/agent-shield-reusable.yml@761dd4a1a484a239429ed15d44d068de04fe2ee1 # v1
with:
required-files: AGENTS.md
required-files: AGENTS.md
2 changes: 1 addition & 1 deletion .github/workflows/auto-rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
contents: write # update-branch via GITHUB_TOKEN (may touch .github/workflows/)
pull-requests: write # post comments on PRs
uses: petry-projects/.github/.github/workflows/auto-rebase-reusable.yml@761dd4a1a484a239429ed15d44d068de04fe2ee1 # v1
secrets: inherit
secrets: inherit
114 changes: 114 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# CI pipeline for the .github-private repository.
# Lints markdown, YAML, GitHub Actions, and shell scripts; runs AgentShield; scans for secrets.
# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions: {}

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Comment thread
don-petry marked this conversation as resolved.
Resolved

- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@6b51ade7a9e4a75a7ad929842dd298a3804ebe8b # v23.1.0
with:
globs: '**/*.md'

- name: Lint YAML
run: |
pip install --quiet --only-binary :all: "yamllint==1.38.0" # v1.38.0
yamllint -c <(cat <<'YAMLLINTRC'
extends: default
rules:
line-length:
max: 250
truthy:
check-keys: false
document-start: disable
comments:
min-spaces-from-content: 1
YAMLLINTRC
) .github/workflows/
Comment thread
don-petry marked this conversation as resolved.
Resolved

- name: Lint GitHub Actions
run: |
# Install actionlint via verified download (pinned version + checksum)
ACTIONLINT_VERSION="1.7.7"
ACTIONLINT_SHA="023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757"
curl --fail --location --retry 3 --retry-delay 5 -so actionlint.tar.gz "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
echo "${ACTIONLINT_SHA} actionlint.tar.gz" | sha256sum -c -
tar xzf actionlint.tar.gz actionlint
chmod +x actionlint
rm actionlint.tar.gz
./actionlint -ignore 'SC2129' .github/workflows/*.yml

shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Comment thread
don-petry marked this conversation as resolved.
Resolved

- name: Run ShellCheck
run: |
# Recurse so subdirectories like scripts/lib/ (sourceable libraries)
# are linted too. -x follows `# shellcheck source=...` directives.
shopt -s globstar nullglob
shell_files=(scripts/**/*.sh)
if [ ${#shell_files[@]} -gt 0 ]; then
shellcheck --severity=warning -x "${shell_files[@]}"
else
echo "No shell scripts found — skipping"
fi

agent-security:
name: Agent Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Comment thread
don-petry marked this conversation as resolved.
Resolved
with:
node-version: '20'

- name: Run AgentShield
run: |
npx --yes --ignore-scripts ecc-agentshield@1.4.0 scan --path . --format json --min-severity high

secret-scan:
name: Secret scan (gitleaks)
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout (full history)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Comment thread
don-petry marked this conversation as resolved.
Resolved
with:
fetch-depth: 0

- name: Run gitleaks
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
with:
args: detect --source . --redact --verbose --exit-code 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
68 changes: 68 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ─────────────────────────────────────────────────────────────────────────────
# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/claude.yml
# Standard: petry-projects/.github/standards/ci-standards.md#4-claude-code-claudeyml
# Reusable: petry-projects/.github/.github/workflows/claude-code-reusable.yml
#
# AGENTS — READ BEFORE EDITING:
# • This file is a THIN CALLER STUB. All Claude Code logic, the prompt,
# allowedTools, and trigger gating live in the reusable workflow above.
# • You MAY change: nothing in this file in normal use. Adopt verbatim.
# • You MUST NOT change: trigger events, job permissions, the `uses:` line,
# or `secrets: inherit`. These are required for the reusable to work.
# • If you need different behaviour, open a PR against the reusable in the
# central repo. The change will propagate everywhere on next run.
#
# WHY THIS FILE IS IMMUTABLE (agents: read before opening any PR here):
# Anthropic's OIDC token endpoint validates that this file on a PR branch
# is byte-for-byte identical to the file on the default branch. Any diff —
# even a whitespace or comment change — causes the token exchange to fail:
# "401 Unauthorized — Workflow validation failed"
# Claude Code will not run on that PR. Do not open compliance PRs against
# this file. Do not SHA-pin the `uses:` line — internal reusable workflow
# refs are exempt from the Action Pinning Policy (ci-standards.md
# §Action Pinning Policy). The @v2 tag is the correct, stable reference.
#
# NARROW GUARD: The paths-ignore setting (lines 38-39) under pull_request
# prevents the workflow from triggering only when the PR's entire changeset
# is limited to claude.yml alone. PRs that modify claude.yml *plus other
# files* will still trigger the workflow and hit the 401 error at token
# exchange. Other triggers (issue_comment, pull_request_review_comment,
# issues, check_run) are unaffected by paths-ignore and run as configured.
# ─────────────────────────────────────────────────────────────────────────────
#
# Claude Code — thin caller that delegates to the org-level reusable workflow.
# To adopt: copy this file to .github/workflows/claude.yml in your repo.
# Required org/repo secret: CLAUDE_CODE_OAUTH_TOKEN
# Optional org/repo secret: GH_PAT_WORKFLOWS (PAT with `workflow` scope —
# required if Claude needs to push changes to .github/workflows/*.yml)

name: Claude Code

on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
paths-ignore:
- '.github/workflows/claude.yml' # OIDC invariant — see header above
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [labeled]
check_run:
types: [completed]

permissions: {}

jobs:
claude-code:
uses: petry-projects/.github/.github/workflows/claude-code-reusable.yml@v2
secrets: inherit
permissions:
contents: write
id-token: write
pull-requests: write
issues: write
actions: read
checks: read
50 changes: 50 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Markdownlint configuration for .github-private.
//
// Rules are calibrated against the existing file baseline (2026-05-08).
// Rules listed as "disabled" below had widespread pre-existing violations
// when markdownlint CI was introduced. Enable them one by one via a
// follow-up PR once the violations are fixed.
//
// Reference: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
"config": {
"default": true,

// Line length — relaxed to cover docs with long tables/URLs.
// Matches the spirit of the org yamllint config (line-length: 200),
// but raised higher for investigation reports with long prose lines.
"MD013": {
"line_length": 400,
"heading_line_length": 400,
"code_block_line_length": 400
},

// -- Rules disabled pending cleanup of pre-existing violations --
// MD022: blanks-around-headings — many docs use compact heading+list blocks.
"MD022": false,
// MD026: trailing-punctuation — headings like "### Issue: Token expired" and
// "### The agent isn't working, help!" would require rewrites.
"MD026": false,
// MD031: blanks-around-fences — widespread in IMPLEMENTATION.md etc.
"MD031": false,
// MD032: blanks-around-lists — widespread across most docs.
"MD032": false,
// MD034: no-bare-urls — BOT_SETUP.md uses bare URLs in a setup guide.
"MD034": false,
// MD040: fenced-code-language — many code blocks lack language specifiers.
"MD040": false,
// MD041: first-line-heading — agents/*.md files are prompt files, not docs.
"MD041": false,
// MD029: ol-prefix — some docs use cross-section sequential numbering (1/2/3)
// that renderers handle correctly but linter expects 1/1/1 style.
"MD029": false,
// MD060: table-column-style — newer rule; many tables use compact style.
"MD060": false
},
// Exclude generated/internal directories from linting.
"ignores": [
".claude/**",
"frameworks/**",
"prompts/**"
]
}
6 changes: 3 additions & 3 deletions docs/dev-lead/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Every GitHub webhook event that reaches `dev-lead.yml` is classified into exactl
| `issue_comment` created on PR | Human OWNER/MEMBER/COLLABORATOR + trigger phrase | `human` | `dev-lead-fix-reviews.sh` |
| `issue_comment` created on PR | `<!-- auto-rebase-conflict:` marker | `rebase` | `dev-lead-fix-reviews.sh` |
| `issues` labeled `dev-lead` or `claude` | Any | `issue` | `dev-lead-fix-issue.sh` |
| `check_run` completed, failure | Not a `dev-lead / ` check | _relay only_ | `ci-relay` job |
| `check_run` completed, failure | Not a `dev-lead /` check | _relay only_ | `ci-relay` job |
| `repository_dispatch` `dev-lead-ci-failure` | Dispatched by `ci-relay` | `fix-ci` | `dev-lead-fix-ci.sh` |
| All others | — | `skip` | (no-op) |

Expand Down Expand Up @@ -157,7 +157,7 @@ coderabbitai[bot]
sonarqubecloud[bot]
```

The `ci-relay` job separately gates on the check name not starting with `dev-lead / ` to prevent recursive self-triggering.
The `ci-relay` job separately gates on the check name not starting with `dev-lead /` to prevent recursive self-triggering.

### 5.3 Trigger phrases

Expand Down Expand Up @@ -709,4 +709,4 @@ The `ci-relay` job uses `GH_PAT_WORKFLOWS || github.token` to emit `repository_d

---

_See also: [PR Review Agent spec](../pr-review-agent/pr-review-agent.md) · [Engine implementation](../../scripts/engine.sh) · [CI standards](https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md)_
_See also: [PR Review Agent spec](../pr-review-agent/pr-review-agent.md) · [Engine implementation](../../scripts/engine.sh) · [CI standards](https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md)_
2 changes: 1 addition & 1 deletion docs/pr-review-agent/failure-investigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Add a verification step to the workflow:

## Deployment Status

**Status:** ✅ **FIXED**
**Status:** ✅ **FIXED**

**Applied:** Commit `522dc75` to main branch

Expand Down
Loading