Skip to content

Add git safety rules to copilot-instructions.md#635

Merged
bradygaster merged 3 commits intodevfrom
squad/631-copilot-git-safety
Mar 26, 2026
Merged

Add git safety rules to copilot-instructions.md#635
bradygaster merged 3 commits intodevfrom
squad/631-copilot-git-safety

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Part of #631 — adds a Git Safety section to .github/copilot-instructions.md:

  • Bans git add . and git add -A (use explicit paths)
  • Requires feature branches + PRs for all changes
  • Pre-push checklist: verify file count, check for unintended deletions
  • Red-flag stop conditions

Prevents @copilot from accidentally staging mass deletions.

bradygaster and others added 3 commits March 26, 2026 10:14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit 328e1df into dev Mar 26, 2026
3 checks passed
larsontim12 pushed a commit to larsontim12/squad that referenced this pull request Mar 27, 2026
) (bradygaster#636)

* test: add comprehensive nap feature tests (38 tests)

Covers 11 test categories for the nap context hygiene engine:
- Metrics collection (before state)
- History compression (Tier 1, ## section boundaries)
- Log pruning (7-day threshold)
- Inbox cleanup (merge + delete)
- Decision archival (20KB threshold, 30-day age)
- Deep mode (3 entries vs 5)
- Dry-run mode (no file modifications)
- Journal safety (.nap-journal lifecycle)
- Report formatting (humanized bytes, tokens, NO_COLOR)
- Edge cases (missing dirs, empty files, 100KB+ files, multi-agent)
- Combined scenarios (all actions + flag combinations)

Tests use isolated temp directories with cleanup. Written against
the NapOptions/NapResult/NapAction interface contract.

Closes bradygaster#635

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: update Hockney history with nap test learnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: implement nap feature — context hygiene for .squad/ state (bradygaster#635)

Add squad nap command with tiered compression, log pruning, decision
archival, and inbox cleanup. Supports --deep and --dry-run flags.

- Core engine: packages/squad-cli/src/cli/core/nap.ts
  - Tier 1: history compression (keep 5), log pruning (7d), inbox merge, decision archival (20KB/30d)
  - Tier 2 (--deep): aggressive history compression (keep 3)
  - Dry-run: scan and report without modifications
  - Journal-based safety (.nap-journal) for interrupted runs
  - Both async (runNap) and sync (runNapSync) exports
  - Humanized before/after report with token estimates
  - NO_COLOR support

- CLI entry: squad nap command + help text in cli-entry.ts
- REPL: /nap slash command + help text in commands.ts
- Skill template: .squad-templates/skills/nap/SKILL.md

All 3229 tests pass (38 nap-specific). TypeScript compiles clean.

Closes bradygaster#635

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant