From 24a1d21e5c005ccccc5a97182eb3019a8323f21c Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 13 Aug 2025 11:38:29 +0200 Subject: [PATCH] configure opencode agent with project guidelines and safety rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- AGENTS.md | 24 ++++++++++++++++++++++++ opencode.json | 9 +++++++++ 2 files changed, 33 insertions(+) create mode 100644 AGENTS.md create mode 100644 opencode.json diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ddba039 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,24 @@ +# AGENTS.md + +This file provides guidelines for AI coding agents operating within this repository. + +## Build, Lint, and Test Commands + +- **Build**: `make build-usb` (Builds the NixOS workshop ISO) +- **Lint**: No specific linting command found. Follow general code style guidelines. +- **Test**: No specific testing command found. Use `make status-cloud` for health checks. +- **Single Test**: No specific command for running a single test. + +## Code Style Guidelines + +- **Imports**: Organize imports alphabetically. Avoid unused imports. +- **Formatting**: Adhere to Nixpkgs formatting conventions. Use `nixpkgs-fmt` if available. +- **Types**: Use Nix's type system rigorously. Define types explicitly where possible. +- **Naming Conventions**: + - Variables and functions: `camelCase` or `snake_case` (be consistent). + - Package names: `lowercase-with-hyphens`. +- **Error Handling**: Handle errors explicitly. Use Nix's error reporting mechanisms. +- **General**: + - Keep code concise and readable. + - Prefer declarative over imperative approaches. + - Document complex logic. diff --git a/opencode.json b/opencode.json new file mode 100644 index 0000000..b3fb8fe --- /dev/null +++ b/opencode.json @@ -0,0 +1,9 @@ +{ + "build": "make build-usb", + "lint": "markdownlint . || true && jsonlint . || true && nixpkgs-fmt . || true", + "test": "make status-cloud" +, + "ask_before_executing_commands": true, + "ask_before_git_commands": true, + "ask_before_reading_file": "^(?!\./).*" +} \ No newline at end of file