Skip to content
Open
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,17 @@ jobs:
- name: Check protected files
run: |
PROTECTED_FILES=(
"docs/SPEC.md"
"docs/reference/rc/"
"schemas/output_v1.json"
"crates/cli/src/exit_code.rs"
"crates/core/src/config.rs"
)

CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)

for file in "${PROTECTED_FILES[@]}"; do
if echo "$CHANGED_FILES" | grep -q "^$file$"; then
protected_path="${file%/}"
if echo "$CHANGED_FILES" | grep -Fxq "$protected_path" || echo "$CHANGED_FILES" | grep -q "^$protected_path/"; then
echo "::warning::Protected file modified: $file"
echo "This change requires the Breaking Change process. See AGENTS.md."

Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following files require the Breaking Change process for modifications:

| File | Description |
|------|-------------|
| `docs/SPEC.md` | CLI behavior contract |
| `docs/reference/rc/` | CLI behavior contract |
| `schemas/output_v1.json` | JSON output schema |
| `crates/cli/src/exit_code.rs` | Exit code definitions |
| `crates/core/src/config.rs` | Config schema_version related |
Expand All @@ -80,7 +80,7 @@ Modifying protected files requires:

2. **Provide migration path**
- Config migration: add `migrations/v{N}_to_v{N+1}.rs`
- Documentation update: update relevant SPEC.md sections
- Documentation update: update relevant command reference sections

3. **PR marking**
- Include `BREAKING` in PR title or description
Expand Down Expand Up @@ -367,7 +367,7 @@ Before submitting a PR, confirm all of the following:
### Phase 2+: Command Implementation
- Follow command implementation template
- Each command needs tests
- Update SPEC.md (if needed)
- Update the command reference (if needed)
- Update Golden tests

### Git Commit Guidelines
Expand Down
Loading