Skip to content

Add Copilot instructions for repository context#7

Merged
fredli74 merged 9 commits intomasterfrom
copilot/setup-copilot-instructions
Jan 31, 2026
Merged

Add Copilot instructions for repository context#7
fredli74 merged 9 commits intomasterfrom
copilot/setup-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Adds .github/copilot-instructions.md to provide AI coding assistants with project-specific context following GitHub's recommended structure.

Changes

  • Created .github/copilot-instructions.md with:

    • Project overview: Cross-platform backup/storage system with de-duplication
    • Tech stack: Go 1.25.6 with Docker support
    • Project structure: Current organization with pkg/ directory containing core, accountdb, storagedb, and lockablefile submodules; server, hashback, and util top-level modules; scripts/ folder with build and test scripts; Docker configuration files
    • Coding guidelines: Platform-specific file patterns (*_unix.go, *_windows.go), cross-platform compatibility requirements, ASCII art header format
    • Project philosophy: 8 core principles including first principles/design by contract, use of asserts, panic on unexpected errors, optimization, testing practices, code verification, refactoring guidelines, and canonical API preferences
    • Build/test commands: ./scripts/build_all.sh for multi-platform builds, ./scripts/docker_build.sh for Docker images, go test ./... per module (pkg/core, pkg/accountdb, pkg/storagedb, pkg/lockablefile, server, hashback, util), E2E smoke tests via ./scripts/e2e_hashbox.sh with environment overrides (E2E_SOURCE_DIR, E2E_DATASET, E2E_TMP_ROOT, E2E_DOCKER)
    • Security considerations: Authentication, path sanitization, data integrity
  • Updated .gitignore to exclude server/test/ artifacts

The instructions enable Copilot to generate code that matches existing patterns: single-binary philosophy, minimal dependencies, platform-specific conventions, and the project's specific coding philosophy used throughout the codebase.

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 29, 2026 13:21
Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for the repository Add Copilot instructions for repository context Jan 29, 2026
Copilot AI requested a review from fredli74 January 29, 2026 13:27
@fredli74
Copy link
Owner

@copilot additional project pointers
1) Follow first principles and design by contract.
2) Use asserts to catch incorrect usage; do not guard-rail invalid input outside the contract.
3) Panic on unexpected errors; only recover when errors are expected (rare).
4) Optimize and reduce redundancies; split into functions if the same work repeats.
5) Test, iterate, and test again.
6) Second-pass verification that all code is needed; delete if possible.
7) When refactoring, compare logic to ensure behavior is unchanged; if changed, explain why.
8) Avoid aliases/duplicate helpers; prefer a single canonical API. Do not keep backward-compat shims unless strictly required, and remove them promptly after migration.

Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot additional project pointers
1) Follow first principles and design by contract.
2) Use asserts to catch incorrect usage; do not guard-rail invalid input outside the contract.
...

Added all 8 project principles to the Copilot instructions under a new "Project Philosophy" section in commit 14df6f4.

@fredli74 fredli74 marked this pull request as ready for review January 29, 2026 13:38
@fredli74
Copy link
Owner

@copilot Please note files in script folder and that tests are now:

  • Default test hint: run tests per module (e.g., cd server && go test ./...).
  • E2E smoke: from repo root run ./scripts/e2e_hashbox.sh (see script header for env overrides like E2E_SOURCE_DIR, E2E_DATASET, E2E_TMP_ROOT). For full coverage, run both local and Docker modes: ./scripts/e2e_hashbox.sh and E2E_DOCKER=1 ./scripts/e2e_hashbox.sh.

Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot Please note files in script folder and that tests are now:

  • Default test hint: run tests per module (e.g., cd server && go test ./...).
  • E2E smoke: from repo root run `./scripts/e2e_h...

Updated the Copilot instructions with scripts folder reference and corrected testing approach: module tests using go test ./... and E2E smoke tests with environment overrides in commit 19e8404.

@fredli74
Copy link
Owner

@copilot project structure is not correct

Co-authored-by: fredli74 <6632456+fredli74@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot project structure is not correct

Corrected project structure to reflect current organization: pkg/ with submodules (core, accountdb, storagedb, lockablefile), util/ directory, scripts/ location, Docker files, and updated Go 1.25.6 in commit 55b88df.

@fredli74 fredli74 merged commit 6fd8b5a into master Jan 31, 2026
@fredli74 fredli74 deleted the copilot/setup-copilot-instructions branch January 31, 2026 03:47
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.

✨ Set up Copilot instructions

2 participants