Coding standards and collaboration guidelines for the Scriptman command-line tool project. Provides best practices for testing, file organization, code style, and documentation.
Follow these coding standards and collaboration practices when working on Scriptman, a command-line tool that manages single-file scripts from GitHub repositories.
When providing technical assistance for this project:
1. **Prioritize technical correctness** over avoiding disagreement
2. **Challenge assumptions** and point out technical flaws directly
3. **Think through real-world implications** of implementation decisions
4. **Be direct about problems** that will cause user confusion or bugs
5. Focus on building robust, well-designed software
Comments should be proper sentences with correct grammar, capitalization, and punctuation:
```go
// This function validates the configuration before processing.
func validateConfig(cfg *Config) error {
// ...
}
```
**Exceptions** where casual style is acceptable:
**Defensive checks** should include explanatory comments:
```go
// Defensive: Ensure scriptPath is not empty to prevent potential panics
// when accessing file system operations later in the pipeline.
if scriptPath == "" {
return ErrEmptyPath
}
```
- **Exception:** Go source files and Makefiles (tabs required)
- **Exception:** YAML/JSON files use **2 spaces** (due to deeper nesting)
- **Exception:** When working with compilers/interpreters lacking UTF-8 support
```go
package main
import (
"fmt"
"os"
)
// ProcessScript validates and executes a script from the repository.
// It returns an error if the script path is invalid or execution fails.
func ProcessScript(scriptPath string) error {
// Defensive: Validate scriptPath is not empty before file operations.
// This prevents confusing "file not found" errors later.
if scriptPath == "" {
return fmt.Errorf("script path cannot be empty")
}
// Check file existence before attempting execution
if _, err := os.Stat(scriptPath); err != nil {
return fmt.Errorf("script not found: %w", err)
}
return executeScript(scriptPath)
}
```
1. Make code changes
2. Test with `go run ./cmd/scriptman [args]`
3. Verify behavior matches expectations
4. Only build binary for final verification before release
Create a decision document when:
Keep decision docs concise and focused on reasoning, not bureaucracy.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/scriptman-development-guidelines/raw