agentleFS
veggiemonkveggiemonk/backlog/AGENTS.md

backlog

AGENTS.md8 starsChanged 15 months agoApache-2.0Archived repositoryView on GitHub

This document provides a comprehensive and unified set of instructions for AI agents working on this project. To work effectively, you must understand these core components: Follow these steps for reading, analyzing, and editing code. Use make for simplicity. You MUST use the gopls tools for code intelligence. Reading & Understanding Code: Editing Code: Non-negotiable rules for interacting with the task system: FULLY READ THE INSTRUCTIONS FOR BACKLOG CLI prompt-cli.md

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

16 rules. About 0 are common, 3 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Storage Location: All task files are stored in the .backlog/ directory.

    line 20
  2. Distinctive:

    Follow these steps for reading, analyzing, and editing code.

    line 33
  3. Very specific:

    Use make for simplicity.

    line 37
  4. Very specific:

    Workspace Overview: Start with go_workspace to understand the project structure.

    line 52
  5. Very specific:

    Find Symbols: Use go_search with a fuzzy query to locate types, functions, or variables.

    line 53
  6. Very specific:

    File Context: After reading a Go file, immediately use go_file_context to understand its dependencies within the same package.

    line 54
  7. Very specific:

    Package API: Use go_package_api to understand the public API of any package (internal or third-party).

    line 55
  8. Distinctive:

    Understand First: Follow the reading workflow above before any modification.

    line 59
  9. Very specific:

    Find References: Before changing a symbol, you MUST use go_symbol_references to find all its usages and assess the impact.

    line 60
  10. Very specific:

    Check for Errors: After every edit, you MUST run go_diagnostics on the changed files.

    line 62
  11. Very specific:

    Fix Errors: If go_diagnostics reports errors, fix them.

    line 63
  12. Very specific:

    NEVER EDIT TASK FILES DIRECTLY: Do not write to, modify, or delete any file in the .backlog/ directory.

    line 72
  13. Very specific:

    DO NOT DELETE TASK FILES: Never delete task markdown files.

    line 73
  14. Very specific:

    TaskID Parsing: Always use core.ParseTaskID() to handle user-provided task IDs, as it supports flexible formats (e.g., "T1.2", "1.2").

    line 89
  15. Very specific:

    Testing: Use afero.NewMemMapFs() to create an in-memory filesystem for tests.

    line 90
  16. Distinctive:

    When to use: Use this agent when you need an expert review of new features, architectural changes, or refactoring, especially concerning …

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AI Agent Instructions for the backlog Repository

This document provides a comprehensive and unified set of instructions for AI agents working on this project.

1. Project Overview

  • Project Name: backlog
  • Description: A Go-based, offline-first, portable task management CLI that stores tasks as Markdown files within a Git repository.
  • Key Feature: Designed for seamless integration with AI agents via CLI commands.

2. Core Architecture & Concepts

To work effectively, you must understand these core components:

  • Task: The fundamental data unit. A task is a Markdown file with YAML frontmatter.
  • TaskStore: The storage abstraction layer. The primary implementation is FileTaskStore, which uses the afero library for filesystem operations (allowing for in-memory mocking in tests).
  • TaskID: A hierarchical, dot-notation identifier (e.g., T01, T01.01). IDs are auto-generated and should be treated as immutable.
  • Storage Location: All task files are stored in the .backlog/ directory.
  • File Naming: Task files follow the convention: T{ID}-{slugified-title}.md.
  • Directory Structure:
    • internal/core/: Contains all core business logic (creating, listing, updating tasks).
    • internal/cmd/: Defines the CLI commands using the Cobra framework.
    • internal/commit/: Handles automatic Git integration.
    • internal/mcp/: Implements the MCP server for AI agent tool-based interaction.
    • internal/logging/: Logging for this project.

3. Development Workflow

Follow these steps for reading, analyzing, and editing code.

3.1. Standard Build & Test Commands

Use make for simplicity.

  • Build: make build
  • Run all tests: make test
  • Run tests for a specific package: go test ./internal/core
  • Lint: make lint
  • Generate Docs: make docs
  • Install: make install

3.2. Go-Specific Analysis & Editing Workflow (gopls)

You MUST use the gopls tools for code intelligence.

Reading & Understanding Code:

  1. Workspace Overview: Start with go_workspace to understand the project structure.
  2. Find Symbols: Use go_search with a fuzzy query to locate types, functions, or variables.
  3. File Context: After reading a Go file, immediately use go_file_context to understand its dependencies within the same package.
  4. Package API: Use go_package_api to understand the public API of any package (internal or third-party).

Editing Code:

  1. Understand First: Follow the reading workflow above before any modification.
  2. Find References: Before changing a symbol, you MUST use go_symbol_references to find all its usages and assess the impact.
  3. Make Edits: Perform all necessary code changes.
  4. Check for Errors: After every edit, you MUST run go_diagnostics on the changed files.
  5. Fix Errors: If go_diagnostics reports errors, fix them. Review and apply suggested quick fixes if they are correct.
  6. Run Tests: Once go_diagnostics is clean, run the relevant tests using go test [packagePath...].

4. Critical Rules & Safety Guidelines

Non-negotiable rules for interacting with the task system:

  1. NEVER EDIT TASK FILES DIRECTLY: Do not write to, modify, or delete any file in the .backlog/ directory. All task manipulations MUST go through the backlog CLI commands. Direct edits will corrupt metadata and break the system.
  2. DO NOT DELETE TASK FILES: Never delete task markdown files. Use the backlog archive command instead.
  3. ALWAYS USE THE backlog TOOL: For any operation related to task management (create, list, view, edit, search, archive), you MUST use the backlog CLI tool.

5. Planning and Task Management (backlog)

FULLY READ THE INSTRUCTIONS FOR BACKLOG CLI prompt-cli.md


6. Code Style & Architectural Patterns

  • Error Handling: Wrap errors with context using fmt.Errorf("context: %w", err).
  • CLI Output: In CLI command functions, use logging.Info(msg, "key", "value", ...) which has the same interface as slog.Info.
  • Dependency Injection: Business logic is implemented as methods on the FileTaskStore. The FileTaskStore is created with an afero.Fs instance, allowing for dependency injection.
  • TaskID Parsing: Always use core.ParseTaskID() to handle user-provided task IDs, as it supports flexible formats (e.g., "T1.2", "1.2").
  • Testing: Use afero.NewMemMapFs() to create an in-memory filesystem for tests.
  • Git Integration: Task operations trigger automatic Git commits. Ensure the repository is a valid Git repository.

7. AI Agent

7.1. Specialist Agents

  • go-task-manager-reviewer: An expert agent for reviewing Go code related to this project.
  • When to use: Use this agent when you need an expert review of new features, architectural changes, or refactoring, especially concerning task management logic, storage, or CLI commands.

8. Documentation

  • Primary Source of Truth: The README.md file is the main source of truth for project setup, usage, and high-level concepts.
  • Generated Docs: The docs/ directory contains documentation generated from the source code and other resources. Refer to these for detailed information on CLI commands and other aspects of the project.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.