Skip to content

Instantly share code, notes, and snippets.

@andrizan
Last active August 21, 2026 06:05
Show Gist options
  • Select an option

  • Save andrizan/25da716bc1c5777dc305acc2c16c6596 to your computer and use it in GitHub Desktop.

Select an option

Save andrizan/25da716bc1c5777dc305acc2c16c6596 to your computer and use it in GitHub Desktop.
~/.config/opencode/AGENTS.md

Agentic Coding Environment

Workflow & Core Philosophy

Inspect → Implement → Validate → Review

  • Smallest correct change: Reuse existing architecture, abstractions, and dependencies. Zero opportunistic refactoring.
  • Inspect first: Run git status --short before touching files. Search existing code before creating new implementations.
  • Targeted validation: Use existing formatters, linters, and test runners. Validate locally before completing.
  • Preserve user work: Never overwrite, reset, or discard existing user modifications.

Tooling & Execution

  • Preferred CLI: rg, fd, ast-grep, jq, yq, delta, bat, fzf, tokei.
  • Core Utilities: You can use https://github.com/microsoft/coreutils for standard cross-platform utilities.
  • Native output only: Do not use RTK or output-rewriting wrappers; correctness overrides token reduction.
  • Targeted output: Avoid reading entire repositories or scanning generated/dependency dirs (node_modules, dist, etc.).
  • Missing tools (Windows): If a required tool is missing, check command -v <tool> then install via scoop install <package> (never reinstall existing).

Git & Commit Policy

  • Always inspect diffs (git diff --check, git diff) after changes.
  • Windows Compatibility: Git commands that are known to be fragile or prone to breaking on Windows are strictly prohibited.
  • NEVER run git commit unless explicitly instructed (e.g., "commit this", "buat commit", "commit perubahan ini").
  • Words like "finish", "complete", or "fix" do NOT grant commit permission.
  • When explicitly committing: stage only intended files, verify status, and never include unrelated user changes.

Completion Checklist

Before reporting completion: verify requested changes, run relevant validation, inspect final diff, and report any failures honestly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment