Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
},
"metadata": {
"description": "keepwright — set up and continuously keep engineering quality and architecture true in any git repo.",
"version": "2.0.1"
"version": "2.0.2"
},
"plugins": [
{
"name": "keepwright",
"description": "Interactive wizard that scaffolds a quality architecture (CLAUDE.md, rules, GitHub Actions with AI review, validators, hooks) and keeps it audited and enforced over time.",
"version": "2.0.1",
"version": "2.0.2",
"author": {
"name": "Leonardo Candiani"
},
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keepwright",
"version": "2.0.1",
"version": "2.0.2",
"description": "Set up and continuously keep engineering quality and architecture true in any git repo. Interactive wizard, deterministic scaffolding, multi-agent audits, and AI PR review wired to OAuth.",
"author": {
"name": "Leonardo Candiani"
Expand Down
3 changes: 1 addition & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Paraná, Rio de Janeiro, and Maranhão.

- GitHub: [@sixquasar](https://github.com/sixquasar)
- Site: [sixquasar.pro](https://sixquasar.pro)
- Role: refining the methodology in real production (SixClaw, SixClaw CEO,
Cote.Zap, Ofertix, Sixosteria, Vox, Lupe, EasyQuote), validating the rules on
- Role: refining the methodology in real production, validating the rules on
client projects, ongoing contributions

<br>
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project are documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
versioning follows [SemVer](https://semver.org/).

## [2.0.2] — 2026-06-05

### Fixed

- Workflow templates are now fully generic, so they fit any repo. The PR
auto-review and `@claude` mention workflows no longer hardcode
`runs-on: [self-hosted, ...]` — they use `{{RUNNER}}` from the config
(default `ubuntu-latest`; self-hosted only when chosen). The critical-file
detection greps now come from the config's `criticalFiles[]` instead of
example project paths.

### Removed

- Client project names dropped from `AUTHORS.md` and the 1.0.0 changelog entry.

## [2.0.1] — 2026-06-05

### Fixed
Expand Down Expand Up @@ -94,7 +109,7 @@ First public release. Skill consolidated around a 10-phase flow.
**Co-authorship**: Leonardo Candiani ([@leonardocandiani](https://github.com/leonardocandiani))
and SixQuasar ([@sixquasar](https://github.com/sixquasar)) — a tech company
founded by Leonardo Candiani, Ricardo, and Rodrigo. Refined in production on
SixClaw, Cote.Zap, Ofertix, Sixosteria, Vox, and Lupe.
real-world projects.

### Added

Expand Down
8 changes: 8 additions & 0 deletions scripts/lib/placeholders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function buildPlaceholderMap(
config: KeepwrightConfig,
): Record<string, string> {
const today = new Date().toISOString().slice(0, 10);
const crit = config.criticalFiles ?? [];
return {
PROJECT: config.project,
PROJECT_UPPER: config.project.toUpperCase(),
Expand All @@ -68,9 +69,16 @@ export function buildPlaceholderMap(
STACK: config.stack,
LAYERS_REF: (config.layers ?? []).join(", "),
REVIEW_MODEL: DEFAULT_REVIEW_MODEL,
// GitHub Actions runner. self-hosted only when the config asks for it;
// otherwise the generic GitHub-hosted runner, so workflows run in any repo.
RUNNER: config.runner === "self-hosted" ? "[self-hosted, linux, x64]" : "ubuntu-latest",
CURRENT_DATE: today,
DATE_YYYY_MM_DD: today,
DATE: today,
// criticalFiles[0..1] feed the PR auto-review grep patterns. Left as a
// literal {{CRITICAL_FILE_n}} for the maintainer to fill when unset.
...(crit[0] ? { CRITICAL_FILE_1: crit[0] } : {}),
...(crit[1] ? { CRITICAL_FILE_2: crit[1] } : {}),
};
}

Expand Down
4 changes: 2 additions & 2 deletions templates/workflows/claude-mention.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
name: Check trigger + key
# Loop-safe: greps @claude in the event body. The bot's own comment does
# NOT contain "@claude" → guard skips → no infinite recursion.
runs-on: [self-hosted, linux, x64]
runs-on: {{RUNNER}}
outputs:
go: ${{ steps.decide.outputs.go }}
pr_or_issue: ${{ steps.decide.outputs.pr_or_issue }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
name: Claude responds
needs: guard
if: ${{ needs.guard.outputs.go == 'true' }}
runs-on: [self-hosted, linux, x64]
runs-on: {{RUNNER}}
steps:
- uses: actions/checkout@v5
with:
Expand Down
29 changes: 13 additions & 16 deletions templates/workflows/pr-auto-review.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
auto-review:
name: Heuristic auto-review
runs-on: [self-hosted, linux, x64]
runs-on: {{RUNNER}}
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 0 }
Expand All @@ -30,34 +30,31 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# These patterns come from keepwright.config.json criticalFiles[]. Edit
# them to match YOUR repo's load-bearing files (schemas, auth, core
# runtime, senders — anything a reviewer must watch).
- name: Detect critical layer changes
id: critical
run: |
if grep -qE "(src/utils/types|src/utils/schemas)" changed_files.txt; then
echo "schema_changed=true" >> $GITHUB_OUTPUT
if grep -qE "{{CRITICAL_FILE_1}}" changed_files.txt; then
echo "critical1_changed=true" >> $GITHUB_OUTPUT
fi
if grep -qE "src/whatsapp/sender\.ts" changed_files.txt; then
echo "sender_changed=true" >> $GITHUB_OUTPUT
fi
if grep -qE "src/runtime/(claude-interactive|invoker-stream)\.ts" changed_files.txt; then
echo "runtime_changed=true" >> $GITHUB_OUTPUT
if grep -qE "{{CRITICAL_FILE_2}}" changed_files.txt; then
echo "critical2_changed=true" >> $GITHUB_OUTPUT
fi
if grep -qE "\.claude/rules/" changed_files.txt; then
echo "rules_changed=true" >> $GITHUB_OUTPUT
fi

# CUSTOMIZE: replace sender_changed/runtime_changed with warnings for
# YOUR critical files. The example below is generic — adapt the
# mentioned invariants to your project.
- name: Warn critical file 1 changed
if: steps.critical.outputs.sender_changed == 'true'
if: steps.critical.outputs.critical1_changed == 'true'
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "⚠️ **{{CRITICAL_FILE_1}} changed** — confirm invariants {{INVARIANT_REFS}} in \`.claude/rules/01-invariants.md\`. E2E smoke required."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Warn critical file 2 changed
if: steps.critical.outputs.runtime_changed == 'true'
if: steps.critical.outputs.critical2_changed == 'true'
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "⚠️ **{{CRITICAL_FILE_2}} changed** — confirm invariants {{INVARIANT_REFS}}. E2E smoke required."
env:
Expand Down Expand Up @@ -109,7 +106,7 @@ jobs:

check-key:
name: Check Claude token
runs-on: [self-hosted, linux, x64]
runs-on: {{RUNNER}}
outputs:
has_key: ${{ steps.check.outputs.has_key }}
steps:
Expand All @@ -123,7 +120,7 @@ jobs:

claude-review:
name: Claude AI review (informational)
runs-on: [self-hosted, linux, x64]
runs-on: {{RUNNER}}
needs: check-key
if: ${{ needs.check-key.outputs.has_key == 'true' && !github.event.pull_request.draft }}
timeout-minutes: 20
Expand Down Expand Up @@ -165,7 +162,7 @@ jobs:
with: { fetch-depth: 1 }

# setup-node@v4 required BEFORE the deterministic publish step.
# myoung34/github-runner self-hosted does NOT guarantee native Node.
# Not all runners ship Node natively, so install it explicitly.
# Without it, the node parser reading claude-execution-output.json
# fails silently.
- name: Setup Node (deterministic publish)
Expand Down
Loading