Conversation
- Add RFC documenting documentation structure and implementation plan - Create docs/ directory with organized sections: - getting-started/: installation, quickstart, mage migration guide - user-guide/: dependencies, configuration - api-reference/: CLI reference, pkg/st, pkg/sh, pkg/target - contributing/: development setup, architecture overview - Include Mermaid diagrams for architecture documentation - Document full API surface for st, sh, and target packages - Provide migration path for Mage users This establishes the foundation for comprehensive Stave documentation covering both end-user usage and contributor guidance.
Structure: - getting-started/: installation, quickstart, migration-from-mage - user-guide/: stavefiles, targets, dependencies, namespaces, arguments, configuration, shell-commands, file-targets, advanced - api-reference/: cli, st, sh, target - contributing/: development, architecture Replaces prior documentation with consolidated layout. Reduces API reference from nested directories to single files per package. Consolidates advanced topics into one file. Adds mermaid diagrams for architecture. All pages include cross-linking navigation. Requires Go 1.25.4.
Updates RFC status to Implemented. Documents actual structure, design decisions, and deviations from original proposal. Resolves open questions.
99b12a0 to
8a3e52f
Compare
…aven't done a proper release yet
…t out its config issues
8a3e52f to
5e6087a
Compare
…ite is run with `-v`
|
Don't use your GH iPhone app to review PRs it too easy to accidentally ask copilot to review a PR 🙄 fucking copilot. What a stupidly named feature. |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive developer documentation for Stave, including API reference documentation for core packages and CLI, architecture documentation for contributors, and RFCs describing the documentation plan and proposed Git hooks feature. Additionally, it fixes a critical bug in bootstrap.go where the API was incorrectly calling an outdated function signature, and makes test assertions more flexible by using assert.Contains instead of strict equality checks.
- Added complete API reference documentation for CLI, pkg/st, pkg/sh, and pkg/target packages
- Added architecture overview and development setup guides for contributors
- Added RFC documents for the documentation plan and Git hooks proposal
- Fixed bootstrap.go to use the correct cmd/stave API instead of pkg/stave.Run
- Updated test assertions to use Contains for more flexible output matching
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/index.md | Landing page with quick example and navigation links (missing import in example) |
| docs/getting-started/*.md | Installation, quickstart, and migration guides (nonexistent Go version referenced) |
| docs/user-guide/*.md | Comprehensive guides for stavefiles, targets, dependencies, namespaces, arguments, configuration, shell commands, file targets, and advanced topics |
| docs/api-reference/*.md | API reference for CLI and core packages (st, sh, target) |
| docs/contributing/*.md | Development setup and architecture documentation (nonexistent Go version referenced) |
| rfcs/rfc-20251204-001-docs-plan.md | RFC documenting the documentation structure (date typo: 2024 instead of 2025) |
| rfcs/rfc-20251204-002-git-hooks.md | RFC proposing native Git hook management |
| rfcs/rfc-20251130-001-xdg.md | Minor whitespace formatting cleanup |
| bootstrap.go | Fixed to use cmd/stave.NewRootCmd and ExecuteWithFang instead of outdated pkg/stave.Run API |
| pkg/stave/args_test.go | Changed assertion from Equal to Contains for more flexible output matching |
| pkg/sh/cmd_test.go | Changed assertion from Equal to Contains for more flexible output matching |
| features.md | New file documenting Stave-specific features beyond Mage (naming inconsistency noted) |
| README.md | Added centered logo image for branding |
| CHANGELOG.md | Removed old changelog entries and updated for v0.1.0 |
| .github/workflows/*.yml | Updated to use go run bootstrap.go instead of go run main.go install |
| .github/ISSUE_TEMPLATE/*.md | Minor YAML formatting cleanup (quotes normalization) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| package main | ||
|
|
||
| import "github.com/yaklabco/stave/pkg/st" |
There was a problem hiding this comment.
Missing import statement for pkg/sh. The example uses sh.Run() but only imports pkg/st. Add "github.com/yaklabco/stave/pkg/sh" to the imports.
| import "github.com/yaklabco/stave/pkg/st" | |
| import ( | |
| "github.com/yaklabco/stave/pkg/st" | |
| "github.com/yaklabco/stave/pkg/sh" | |
| ) |
| **Created:** 2024-12-04 | ||
| **Implemented:** 2024-12-04 |
There was a problem hiding this comment.
The creation date is listed as 2024-12-04, but based on the RFC ID (rfc-20251204-001) and context, this should be 2025-12-04. The year appears to be a typo.
|
|
||
| The baseline for comparison is the Mage history up to the fork point: | ||
|
|
||
| - **Fork commit**: `6189be7 Fork mage as staff` |
There was a problem hiding this comment.
[nitpick] The fork commit message mentions "Fork mage as staff" but the project name is "stave" (not "staff"). This may be a historical artifact, but consider updating the commit message reference to reflect the actual project name if this was a typo.
| - **Fork commit**: `6189be7 Fork mage as staff` | |
| - **Fork commit**: `6189be7 Fork mage as stave` |
This pull request adds comprehensive API reference documentation for the core Stave packages and its CLI, as well as a detailed architecture overview for contributors. The new docs provide clear usage guides, function signatures, and examples for users and developers, making it much easier to understand and use Stave's features and contribute to its codebase.
API Reference Documentation
docs/api-reference/cli.md.pkg/shpackage, covering shell command execution, file helpers, error inspection, and dry-run behavior indocs/api-reference/sh.md.pkg/stpackage, including dependency management, error handling, runtime utilities, and types indocs/api-reference/st.md.pkg/targetpackage, explaining file modification time utilities, incremental build helpers, and usage examples indocs/api-reference/target.md.Contributor Documentation
docs/contributing/architecture.md.Documentation Polish
README.mdfor improved branding and visual appeal.Resolve
bootstap.goIssue