Merged
Conversation
- scripts/audit-constitution.sh was untracked; CI could not find it - Remove go version pin from .golangci.yml: golangci-lint v2.5.0 is built with Go 1.25 and rejects a config targeting Go 1.26 - Hook script now exits silently when no TTY is available so that non-interactive shells and --no-verify flows are unblocked
Superseded by git-msg. Kept only as historical context in PRD.md.
Remove .opencode/ (AI slash commands) and .specify/ (spec-driven development scaffolding) from version control. Both directories are added to .gitignore so they remain available locally but are never published. specs/ is also explicitly ignored.
Update go.mod module path and all import paths, docs, CI config, and the audit script to use github.com/madstone-tech/git-msg.
Add to .gitignore alongside .opencode/ and .specify/.
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s public-facing documentation and project metadata after a module/repo rename, while also cleaning out internal spec-generation tooling and tightening git-hook behavior to avoid running interactive UI in non-TTY contexts.
Changes:
- Rename the Go module/import path to
github.com/madstone-tech/git-msgacross code, tests, and release docs. - Add a full docs set (README + docs pages) and GitHub issue templates; remove legacy/internal planning/spec tooling files.
- Add a “constitution” audit script and update the installed git hook script to skip generation when no TTY is present.
Reviewed changes
Copilot reviewed 72 out of 73 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/audit-constitution.sh | New bash audit script enforcing architectural/import constraints. |
| main.go | Update import path to new module path. |
| go.mod | Update module path to github.com/madstone-tech/git-msg. |
| cmd/root.go | Update imports to new module path. |
| cmd/root_cobra.go | Update imports to new module path. |
| cmd/root_test.go | Update imports to new module path. |
| cmd/generate.go | Update imports to new module path. |
| cmd/generate_cobra.go | Update imports to new module path. |
| cmd/generate_test.go | Update imports to new module path. |
| cmd/config.go | Update imports to new module path. |
| cmd/config_cobra.go | Update imports to new module path. |
| cmd/config_test.go | Update imports to new module path. |
| cmd/prompt.go | Update imports to new module path. |
| cmd/prompt_cobra.go | Update imports to new module path. |
| cmd/prompt_test.go | Update imports to new module path. |
| cmd/llm.go | Update imports to new module path. |
| cmd/llm_test.go | Update imports to new module path. |
| cmd/hook.go | Update imports to new module path. |
| cmd/hook_cobra.go | Update imports to new module path. |
| cmd/hook_test.go | Update imports to new module path. |
| internal/config/file.go | Update imports to new module path. |
| internal/config/file_test.go | Update imports to new module path. |
| internal/prompt/file.go | Update imports to new module path. |
| internal/prompt/renderer_test.go | Update imports to new module path. |
| internal/prompt/store_test.go | Update imports to new module path. |
| internal/secret/keychain_test.go | Update imports to new module path. |
| internal/ui/setup_test.go | Update imports to new module path. |
| internal/git/branch_test.go | Update imports to new module path. |
| internal/git/diff_test.go | Update imports to new module path. |
| internal/git/log_test.go | Update imports to new module path. |
| internal/llm/anthropic_test.go | Update imports to new module path. |
| internal/llm/gemini_test.go | Update imports to new module path. |
| internal/llm/ollama_test.go | Update imports to new module path. |
| internal/llm/openai_test.go | Update imports to new module path. |
| internal/hook/install.go | Add TTY guard to generated hook script. |
| internal/hook/install_test.go | Update imports to new module path. |
| internal/hook/source_test.go | Update imports to new module path. |
| .goreleaser.yaml | Update go install path to new module path. |
| .golangci.yml | Remove pinned Go version setting in golangci config. |
| .gitignore | Ignore internal/local dev tooling directories (.specify/, .opencode/, specs/, etc.). |
| README.md | New README with usage + links to docs. |
| docs/getting-started.md | New getting-started guide. |
| docs/configuration.md | New configuration reference guide. |
| docs/cli-reference.md | New CLI reference. |
| docs/providers.md | New provider setup guide. |
| docs/prompt-templates.md | New prompt template format/usage guide. |
| docs/git-hook.md | New git-hook installation/behavior guide. |
| .github/ISSUE_TEMPLATE/config.yml | Add issue template configuration. |
| .github/ISSUE_TEMPLATE/bug_report.yml | Add bug report issue template. |
| .github/ISSUE_TEMPLATE/feature_request.yml | Add feature request issue template. |
| git-gemini-commit.sh | Remove legacy Gemini commit helper script. |
| PRD.md | Remove PRD document from repo root. |
| .specify/memory/constitution.md | Remove internal constitution file. |
| .specify/templates/tasks-template.md | Remove internal template. |
| .specify/templates/spec-template.md | Remove internal template. |
| .specify/templates/plan-template.md | Remove internal template. |
| .specify/templates/constitution-template.md | Remove internal template. |
| .specify/templates/checklist-template.md | Remove internal template. |
| .specify/templates/agent-file-template.md | Remove internal template. |
| .specify/scripts/bash/common.sh | Remove internal scripting. |
| .specify/scripts/bash/create-new-feature.sh | Remove internal scripting. |
| .specify/scripts/bash/setup-plan.sh | Remove internal scripting. |
| .specify/scripts/bash/check-prerequisites.sh | Remove internal scripting. |
| .specify/scripts/bash/update-agent-context.sh | Remove internal scripting. |
| .opencode/command/speckit.specify.md | Remove internal opencode command. |
| .opencode/command/speckit.plan.md | Remove internal opencode command. |
| .opencode/command/speckit.tasks.md | Remove internal opencode command. |
| .opencode/command/speckit.taskstoissues.md | Remove internal opencode command. |
| .opencode/command/speckit.implement.md | Remove internal opencode command. |
| .opencode/command/speckit.analyze.md | Remove internal opencode command. |
| .opencode/command/speckit.clarify.md | Remove internal opencode command. |
| .opencode/command/speckit.checklist.md | Remove internal opencode command. |
| .opencode/command/speckit.constitution.md | Remove internal opencode command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
internal/hook/install.go
Outdated
Comment on lines
10
to
17
| const hookScript = `#!/bin/sh | ||
| # Managed by git-msg. Do not edit manually. | ||
| # Skip generation when there is no interactive terminal (e.g. --no-verify, | ||
| # non-interactive shells, or CI environments). | ||
| if ! [ -t 1 ]; then | ||
| exit 0 | ||
| fi | ||
| exec git-msg generate --hook-mode --hook-msg-file "$1" --hook-source "${2:-}" |
internal/hook/install.go
Outdated
Comment on lines
10
to
18
| const hookScript = `#!/bin/sh | ||
| # Managed by git-msg. Do not edit manually. | ||
| # Skip generation when there is no interactive terminal (e.g. --no-verify, | ||
| # non-interactive shells, or CI environments). | ||
| if ! [ -t 1 ]; then | ||
| exit 0 | ||
| fi | ||
| exec git-msg generate --hook-mode --hook-msg-file "$1" --hook-source "${2:-}" | ||
| ` |
docs/git-hook.md
Outdated
Comment on lines
+42
to
+55
| # Skip generation when there is no interactive terminal (e.g. --no-verify, | ||
| # non-interactive shells, or CI environments). | ||
| if ! [ -t 1 ]; then | ||
| exit 0 | ||
| fi | ||
| exec git-msg generate --hook-mode --hook-msg-file "$1" --hook-source "${2:-}" | ||
| ``` | ||
|
|
||
| Key behaviours: | ||
|
|
||
| - **No TTY, no generation** — the script exits silently when `stdout` is not | ||
| an interactive terminal. This prevents the hook from blocking in CI, editor | ||
| integrations, or `--no-verify` flows. | ||
| - **Hook mode** — `git-msg` writes the generated message to the commit message |
Comment on lines
+38
to
+50
| while IFS= read -r -d '' file; do | ||
| # Only non-cobra logic files | ||
| if [[ "$file" == *"_cobra.go" ]]; then | ||
| continue | ||
| fi | ||
| if grep -q '"github.com/spf13/cobra"' "$file"; then | ||
| fail "Cobra import in logic file: $file" \ | ||
| "Non-_cobra.go files must not import cobra. Move wiring to $(basename "${file%.go}")_cobra.go" | ||
| fi | ||
| done < <(find "$ROOT/cmd" -name "*.go" -not -name "*_test.go" -print0) | ||
|
|
||
| pass "cmd/*.go (non-cobra) files have no cobra imports" | ||
|
|
Comment on lines
+57
to
+63
| while IFS= read -r -d '' file; do | ||
| if grep -qE '"github.com/madstone-tech/git-msg/internal/(config|secret|git|llm|prompt|hook|dirs)"' "$file"; then | ||
| IMPORT=$(grep -E '"github.com/madstone-tech/git-msg/internal/' "$file" | head -1 | xargs) | ||
| fail "internal/ui imports another internal package: $file" \ | ||
| "Found: $IMPORT" \ | ||
| "ui must return plain values. Persistence belongs in cmd/root.go:EnsureConfig." | ||
| fi |
v2.5.0 was built with Go 1.25 and rejected go.mod targeting Go 1.26. v2.11.3 is the current release and supports Go 1.26.
C1+C3: Hook TTY guard checks stdin (-t 0) not stdout (-t 1). The review TUI reads from stdin so that is the correct descriptor to test. Update the comment and docs to remove the incorrect --no-verify reference. C2: Export HookScript constant and add TestFileManager_Install_ScriptContent which asserts the installed file matches exactly and explicitly checks for '-t 0' guard and exec line. C4: Audit script pass() was unconditional — violations in a loop still printed a green pass line. Replace with check_pass() which compares VIOLATIONS before and after each block. C5: internal/ui import check now greps for any internal/ import rather than a hardcoded package list, so future packages are caught automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.