Skip to content

docs: add repository gotchas to copilot-instructions#421

Open
spboyer wants to merge 1 commit into
mainfrom
spboyer-chronicle-improve-instructions
Open

docs: add repository gotchas to copilot-instructions#421
spboyer wants to merge 1 commit into
mainfrom
spboyer-chronicle-improve-instructions

Conversation

@spboyer

@spboyer spboyer commented Jul 7, 2026

Copy link
Copy Markdown
Member

Captures recurring friction patterns observed across ~70 recent Copilot CLI sessions in this repo, so future sessions don't rediscover them.

Added: "Repository Gotchas" section

  1. Fresh worktree web/dist stub — Go binary embeds dashboard via //go:embed all:dist (web/embed.go). Fresh worktrees have no built assets, so go build/test/lint fails until you scaffold web/dist/index.html. Seen in 7+ sessions.
  2. Don't restage regenerated web/dist/index.htmlweb/dist/assets/* is gitignored but index.html is tracked. npm run build rewrites it with new hashed refs; revert unless intentional. Seen in 5+ sessions.
  3. Verify chain: gofmt → test → lintgolangci-lint fails on unformatted code, forcing retry cycles.
  4. Clean up scratch dirs.impeccable/, web/node_modules/, site/node_modules/ should never be staged.

Sourced from /chronicle improve analysis of session store data.

Capture recurring friction patterns observed across recent sessions:
- web/dist stub needed for //go:embed on fresh worktrees
- Don't restage regenerated web/dist/index.html
- gofmt -> test -> lint verify chain
- Clean up .impeccable/ and node_modules before committing

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Copilot instructions to capture recurring “gotchas” observed in past Copilot CLI sessions, aiming to reduce repeated friction when setting up/building/testing in fresh environments.

Changes:

  • Adds a “Repository Gotchas” section with guidance around web/dist stubbing for go:embed.
  • Documents handling of web/dist/index.html being tracked while web/dist/assets/ is ignored.
  • Recommends a standard local verification flow (format → test → lint) and pre-commit cleanup steps.
Show a summary per file
File Description
.github/copilot-instructions.md Adds a new “Repository Gotchas” section with setup/verification/cleanup guidance to prevent common session pitfalls.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines +97 to +99
```bash
gofmt -w ./... && go test ./... && golangci-lint run
```
worktree the built assets don't exist, so any Go command fails until you scaffold them:

```bash
mkdir -p web/dist && [ -f web/dist/index.html ] || echo '<html></html>' > web/dist/index.html
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.

3 participants