Skip to content

Commit 9335644

Browse files
ZviBaratzclaude
andcommitted
docs: prepare for gnome review team sharing
Front-load AI transparency by moving "How This Was Built" to position 4 in README (right after reviewer invitation). Strengthen community messaging to frame rules as reviewer-owned. Name hara-hachi-bu as regression baseline. Promote scripts/new-rule.sh as primary contribution path in CONTRIBUTING.md with fixture validation checklist and debugging tips. Separate hara-hachi-bu regression into standalone runner. Fix stale counts in GOVERNANCE.md and ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bc3c2be commit 9335644

File tree

7 files changed

+104
-16
lines changed

7 files changed

+104
-16
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## Unreleased
44

5+
### Changed
6+
7+
- Moved "How This Was Built" section earlier in README for transparency
8+
- Promoted `scripts/new-rule.sh` as primary contribution workflow in CONTRIBUTING.md
9+
- Added fixture validation checklist and debugging tips to CONTRIBUTING.md
10+
- Separated hara-hachi-bu regression into `tests/run-regression.sh`
11+
- Named hara-hachi-bu as regression baseline in README
12+
- Strengthened community ownership messaging in README
13+
- Updated stale assertion/fixture counts in docs
14+
515
### Bug Fixes
616

717
- **ego-review**: Added "NOT a signal" exception to ai-slop checklist item #4`_destroyed` + `_initializing` (re-entrancy guard) is not the over-engineered state machine anti-pattern (#1, PR #4)

CONTRIBUTING.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Thank you for your interest in improving GNOME extension review tooling.
88

99
## For Reviewers: Add a Check in 5 Minutes
1010

11+
> **Fastest path:** Run `bash scripts/new-rule.sh` — it scaffolds the YAML rule, test fixture, and assertion file interactively (with next-ID suggestion). The walkthrough below explains what it creates, so you understand the pieces.
12+
1113
You just rejected an extension because it uses `navigator.clipboard` (a browser API that doesn't exist in GJS). Here's how to encode that rejection so ego-lint catches it automatically next time.
1214

1315
### Step 1: Add the rule to `rules/patterns.yaml`
@@ -85,6 +87,18 @@ if [[ -f "$ASSERTIONS_DIR/your-category.sh" ]]; then
8587
fi
8688
```
8789

90+
### Before running tests: Verify your fixture
91+
92+
Common fixture mistakes that cause confusing failures:
93+
94+
- Directory name contains `@` (e.g., `my-rule@test`)
95+
- `uuid` in metadata.json matches directory name exactly
96+
- metadata.json includes a `"url"` field
97+
- LICENSE file exists with SPDX identifier
98+
- UUID/name does not contain "gnome" (trademark check will fail)
99+
100+
Or run `bash scripts/validate-fixture.sh` to check all of the above automatically.
101+
88102
### Step 4: Run tests
89103

90104
```bash
@@ -93,7 +107,11 @@ bash tests/run-tests.sh
93107

94108
All existing tests must still pass alongside your new assertion.
95109

96-
**Shortcut:** Use `scripts/new-rule.sh` to scaffold all of the above interactively, or `scripts/validate-fixture.sh` to check that your fixtures meet the structural requirements.
110+
### Debugging tips
111+
112+
- **Pattern doesn't match?** Test your rule in isolation: `bash scripts/validate-rule.sh R-XXXX-NN tests/fixtures/your-fixture@test`
113+
- **Fixture fails validation?** Run `bash scripts/validate-fixture.sh` to identify structural issues
114+
- **Not sure which check fires?** Run `./ego-lint tests/fixtures/your-fixture@test --verbose` and look for your rule ID in the output
97115

98116
## First Contribution Workflow
99117

GOVERNANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ For rule changes:
5757
1. Proposer opens issue or PR with citation
5858
2. At least one co-maintainer (or the project lead) reviews
5959
3. New rules land as advisory; severity upgrades require test validation
60-
4. Changes that affect blocking rules require running the full test suite (373+ assertions) and regression baseline
60+
4. Changes that affect blocking rules require running the full test suite (378+ assertions) and regression baseline

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ This tool encodes the mechanical checks you already do by hand — import segreg
4242

4343
You are invited to shape the rules, adjust severity, and add checks for rejection patterns you see often.
4444

45+
## How This Was Built
46+
47+
- **Claude Code wrote the code** — scripts, rules, tests, and docs were developed using [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (Anthropic's AI coding tool). Every design decision was human-reviewed. The AI slop detection rules are based on patterns observed in real EGO rejections of AI-generated submissions.
48+
- **Research was AI-assisted** — Discourse mining, guideline extraction, cross-source synthesis, and gap analysis were performed with Claude Code and verified against real EGO reviews on extensions.gnome.org, [gjs.guide](https://gjs.guide) requirements, and GNOME Shell GitLab history. Regression-tested against a real 11-module extension as baseline.
49+
- **ego-lint itself is AI-free** — The output artifact is deterministic bash + python + YAML. No API calls. No network access. No model inference. AI was the development tool, not the runtime tool.
50+
4551
## Where to Start
4652

4753
- **Adding rules**: [CONTRIBUTING.md](CONTRIBUTING.md) — 5-minute workflow for adding a check
@@ -139,7 +145,7 @@ The rules and checks are grounded in analysis of real EGO review behavior — no
139145
- Cross-referenced [gjs.guide](https://gjs.guide) guidelines (109 extracted requirements) with actual reviewer behavior
140146
- Traced GNOME Shell guideline evolution across versions 44–50 via GitLab history
141147
- Reverse-engineered patterns from 5 popular approved extensions
142-
- Regression-tested all checks against a real 11-module extension as baseline
148+
- Regression-tested all checks against [hara-hachi-bu](https://github.com/ZviBaratz/hara-hachi-bu) (an 11-module power management extension, submitted to EGO) as baseline
143149
144150
Key unwritten rules discovered:
145151
1. No "GNOME" in UUID, extension name, or schema ID (trademark)
@@ -163,7 +169,7 @@ Full research: [docs/RESEARCH-SUMMARY.md](docs/RESEARCH-SUMMARY.md) | Detailed f
163169

164170
## Community
165171

166-
This project is looking for community co-maintainers among EGO reviewers. If you'd like to help shape the rules — add checks for rejection patterns you see often, adjust severity, or improve heuristics — open an issue or PR. See [GOVERNANCE.md](GOVERNANCE.md) for how rule decisions are made.
172+
The rules belong to whoever shapes them. Reviewers who contribute checks, adjust severity, or report false positives define what ego-lint enforces and how. If you see a rejection pattern that ego-lint misses, [adding it](CONTRIBUTING.md) is a 4-line YAML change. See [GOVERNANCE.md](GOVERNANCE.md) for how rule decisions are made.
167173

168174
### Help Wanted
169175

@@ -183,12 +189,6 @@ Self-contained improvements where reviewer expertise would be especially valuabl
183189

184190
Full gap list: [docs/research/gap-analysis.md](docs/research/gap-analysis.md)
185191

186-
## How This Was Built
187-
188-
- **Claude Code wrote the code** — scripts, rules, tests, and docs were developed using [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (Anthropic's AI coding tool). Every design decision was human-reviewed. The AI slop detection rules are based on patterns observed in real EGO rejections of AI-generated submissions.
189-
- **Research was AI-assisted** — Discourse mining, guideline extraction, cross-source synthesis, and gap analysis were performed with Claude Code and verified against real EGO reviews on extensions.gnome.org, [gjs.guide](https://gjs.guide) requirements, and GNOME Shell GitLab history. Regression-tested against a real 11-module extension as baseline.
190-
- **ego-lint itself is AI-free** — The output artifact is deterministic bash + python + YAML. No API calls. No network access. No model inference. AI was the development tool, not the runtime tool.
191-
192192
## Advanced: Claude Code Plugin (Optional)
193193

194194
ego-lint is the primary offering — it works standalone without Claude Code or any AI. The skills below are experimental extras for developers who use [Claude Code](https://docs.anthropic.com/en/docs/claude-code).

docs/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ skills/
119119
tests/
120120
run-tests.sh Test runner
121121
assertions/ Assertion files (sourced by runner)
122-
fixtures/ 142 test fixtures
122+
fixtures/ 144 test fixtures
123123
docs/
124124
ci-integration.md GitHub Actions / GitLab CI examples
125125
ARCHITECTURE.md This file

tests/run-regression.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Standalone regression runner for hara-hachi-bu baseline.
5+
# Run locally to verify no new false positives from newly added checks.
6+
# Not part of CI (depends on locally installed extension).
7+
8+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9+
LINT="$SCRIPT_DIR/skills/ego-lint/scripts/ego-lint.sh"
10+
PASS_COUNT=0
11+
FAIL_COUNT=0
12+
13+
# Colors
14+
RED='\033[0;31m'
15+
GREEN='\033[0;32m'
16+
NC='\033[0m' # No Color
17+
18+
assert_output_contains() {
19+
local label="$1" pattern="$2"
20+
if echo "$output" | grep -qE "$pattern"; then
21+
echo -e " ${GREEN}${NC} $label"
22+
PASS_COUNT=$((PASS_COUNT + 1))
23+
else
24+
echo -e " ${RED}${NC} $label (expected pattern: $pattern)"
25+
FAIL_COUNT=$((FAIL_COUNT + 1))
26+
fi
27+
}
28+
29+
assert_output_not_contains() {
30+
local label="$1" pattern="$2"
31+
if ! echo "$output" | grep -qE "$pattern"; then
32+
echo -e " ${GREEN}${NC} $label"
33+
PASS_COUNT=$((PASS_COUNT + 1))
34+
else
35+
echo -e " ${RED}${NC} $label (should NOT match: $pattern)"
36+
FAIL_COUNT=$((FAIL_COUNT + 1))
37+
fi
38+
}
39+
40+
echo "============================================"
41+
echo " ego-lint Regression Runner"
42+
echo "============================================"
43+
echo ""
44+
45+
# Source the regression assertions
46+
ASSERTIONS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/assertions"
47+
if [[ -f "$ASSERTIONS_DIR/hara-hachi-bu-regression.sh" ]]; then
48+
source "$ASSERTIONS_DIR/hara-hachi-bu-regression.sh"
49+
else
50+
echo "Assertion file not found: $ASSERTIONS_DIR/hara-hachi-bu-regression.sh"
51+
exit 1
52+
fi
53+
54+
# --- Summary ---
55+
echo "============================================"
56+
echo " Results: $PASS_COUNT passed, $FAIL_COUNT failed"
57+
echo "============================================"
58+
59+
if [[ "$FAIL_COUNT" -gt 0 ]]; then
60+
echo -e "${RED}REGRESSION FAILURES DETECTED${NC}"
61+
exit 1
62+
else
63+
echo -e "${GREEN}ALL REGRESSION CHECKS PASSED${NC}"
64+
exit 0
65+
fi

tests/run-tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,6 @@ if [[ -f "$ASSERTIONS_DIR/quick-wins.sh" ]]; then
653653
source "$ASSERTIONS_DIR/quick-wins.sh"
654654
fi
655655

656-
# Hara-hachi-bu regression (conditional)
657-
if [[ -f "$ASSERTIONS_DIR/hara-hachi-bu-regression.sh" ]]; then
658-
source "$ASSERTIONS_DIR/hara-hachi-bu-regression.sh"
659-
fi
660-
661656
# --- Summary ---
662657
echo "============================================"
663658
echo " Results: $PASS_COUNT passed, $FAIL_COUNT failed"

0 commit comments

Comments
 (0)