Refactor AGENTS structure and relocate docs#86
Conversation
📝 WalkthroughWalkthroughDocumentation restructuring consolidates and simplifies project guidance files. AGENTS.md and docs/architecture.md are condensed to lean overviews, while docs/testing-guidelines.md is removed entirely. New documentation files for code conventions and dev commands are introduced. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR refactors the AGENTS documentation by replacing the comprehensive single-file guide with a modular structure. The main AGENTS.md file now serves as a brief entry point with links to specialized documentation files.
Changes:
- Replaced 121-line AGENTS.md with a concise 21-line overview that links to modular docs
- Deleted 394-line docs/testing-guidelines.md and created simplified 20-line docs/agents/code-and-tests.md
- Added new modular documentation files: dev-commands.md (18 lines), workflow.md (13 lines)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| AGENTS.md | Replaced comprehensive guide with concise overview linking to modular docs |
| docs/testing-guidelines.md | Deleted extensive testing guidelines (394 lines) |
| docs/agents/dev-commands.md | New file documenting Task commands and dev workflow |
| docs/agents/code-and-tests.md | New file with condensed coding conventions and testing basics |
| docs/agents/workflow.md | New file documenting Git/PR workflow and config management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/agents/code-and-tests.md
Outdated
| - Prefer unit tests for fast feedback (table-driven, mocked git interactions). | ||
| - Use E2E tests in `test/e2e` for real git workflow validation. | ||
| - Unit test naming: `TestFunction_Condition`. | ||
| - E2E naming: `TestUserAction_WhenCondition_ShouldOutcome`. |
There was a problem hiding this comment.
The testing guidance is significantly reduced compared to the deleted testing-guidelines.md. The existing E2E tests follow detailed conventions (Given-When-Then structure, User Stories, Business Value documentation) that are no longer documented anywhere. Consider adding a reference to at least one example test that demonstrates the expected E2E test structure, or include key points about:
- Test pyramid ratios (70% unit, 30% E2E)
- E2E tests requiring Given-When-Then comments and business value documentation
- Unit tests avoiding excessive documentation
- When to use table-driven tests
Without this guidance, future contributors may not understand why existing E2E tests have extensive documentation or how to write new tests consistently.
| - Prefer unit tests for fast feedback (table-driven, mocked git interactions). | |
| - Use E2E tests in `test/e2e` for real git workflow validation. | |
| - Unit test naming: `TestFunction_Condition`. | |
| - E2E naming: `TestUserAction_WhenCondition_ShouldOutcome`. | |
| - Aim for a test pyramid of roughly **70% unit tests** and **30% E2E** by count. | |
| - Prefer unit tests for fast feedback (table-driven where it reduces duplication, mocked git interactions). | |
| - Use E2E tests in `test/e2e` for real git workflow validation; use existing tests there as examples of structure and documentation. | |
| - Unit test naming: `TestFunction_Condition`. | |
| - E2E naming: `TestUserAction_WhenCondition_ShouldOutcome`. | |
| - E2E tests must document: | |
| - a short “Business value” / user story comment explaining why the flow matters, and | |
| - Given / When / Then comments that outline the scenario steps. | |
| - Keep unit tests focused and readable; avoid extensive prose documentation unless the behavior is unusually subtle. | |
| - Use table-driven tests when validating multiple input/output combinations or edge cases for the same behavior; prefer simple tests for one-off scenarios. |
AGENTS.md
Outdated
| - [Dev commands](docs/agents/dev-commands.md) | ||
| - [Code and tests](docs/agents/code-and-tests.md) | ||
| - [Workflow](docs/agents/workflow.md) | ||
| - [Architecture](docs/architecture.md) |
There was a problem hiding this comment.
Several important sections from the original AGENTS.md are not present in the new modular documentation:
- Core Design Decisions (Why Go vs Shell, Configuration format, Hook system design, Worktree naming convention) - This provides valuable context for understanding architectural choices
- Shell Integration Architecture (v1.2.0 details about command structure and user experience matrix) - Important for understanding the shell integration design
- Project Structure & Modules - Helps contributors understand the codebase organization
Consider either:
- Adding these sections to docs/architecture.md or a new docs/agents/design-decisions.md file
- Or documenting in the PR description why these sections are intentionally removed (if they're outdated or no longer needed)
The refactoring should preserve important historical and architectural context that helps contributors understand the "why" behind implementation choices.
| - [Architecture](docs/architecture.md) | |
| - [Architecture](docs/architecture.md) | |
| - Core design decisions (e.g., Go vs shell, configuration format, hook system design, worktree naming convention) | |
| - Shell integration architecture (including v1.2.0 command structure and user experience matrix) | |
| - Project structure and modules (high-level overview of packages and responsibilities) |
Summary
docs/testing-guidelines.mdand consolidate testing guidance intodocs/agents/code-and-tests.mdTesting
Summary by CodeRabbit