任务即代码:将你的工单移入仓库
Tasks as Code: Move Your Tickets into the Repository

原始链接: https://typemill.net/knowledge-hub/tasks-as-code

Tasks as Code 提议将开发任务作为 Markdown 文件与代码和文档一起存储在 Git 中,以便 AI 编码代理可以在一个地方读取需求、规划工作、实施更改并记录结果。与 Docs as Code 类似,这使任务可版本化、可审查且可供代理访问。任务可以是一段简短的笔记,也可以是包含验收标准的完整规范。工作流包括五个步骤:描述任务、分析需求、创建实施计划、审查并批准,然后实施并报告。一个示例设置使用单独的 Git 仓库存放文档和私有任务,将其克隆到代码仓库并忽略,从而保留独立历史。Typemill 之类的浏览器界面可以与 Git 同步,供非技术用户使用,同时不取代 Git 作为版本控制。关键思想是文件保持可移植且原生 Git,而界面只是提供访问。随着代理承担更多工作,未来工具可能会重新思考传统工单功能。

Hacker News 用户讨论一篇提出“Tasks as Code”的文章,建议将项目工单移入仓库,以便 AI 编码代理获得所需上下文。帖子认为代理在所需内容都在仓库中时表现最佳。评论者大多持怀疑态度。ActionHank 说代理需要的是前置信息,不一定需要仓库存储,且工单可能变得过于冗长。samuelec 认为工单管理器做的不只是存储文本。godzillafarts 指出当利益相关者无法访问代码时该方法会失效。asdfsa32 看到 Typemill 的供应商偏见但称赞其精致;trendschau 澄清其为开源且实验性。biglyburrito 和 vhodges 强调团队/管理者痛点以及对非开发者友好工具的需求。gosugdr 警告这会破坏 Git 历史。svartskogen 认为它对与 LLM 协作的单人开发规划有用。总体而言,基于仓库的任务可能有助于单人 AI 辅助开发,但面临协作、历史记录和利益相关者限制。
相关文章

原文

AI coding agents work from your repository, so why keep tasks in Jira? Learn how Tasks as Code stores them as Markdown in Git, next to code and docs.

AI coding agents work best when everything they need lives in the repository, since the code is their source of truth. Yet most teams still track tasks and requirements in tools like Jira or Redmine that sit outside it. Storing tasks as simple Markdown files changes that: agents can read the requirements and the code in one place, and every task change is versioned and reviewable like any other commit. The Docs as Code approach already offers the blueprint for this evolution, and a web interface that syncs with Git can keep technical writers and product owners in the loop without forcing them into the command line.

Screenshot of tasks edited as Markdown in the IDE

Docs as Code

Documentation has already made the transition from separate documentation software to Markdown files in a Git repository. Today, it often lives in a /docs folder inside the code repository. This practice is known as Docs as Code or Docs Like Code.

With AI coding agents, this approach becomes even more useful. Agents can read documentation to understand a system, make changes to the code, and update the relevant documentation as part of the same workflow. Documentation becomes an integral part of software development rather than a separate activity that must be completed afterward.

Tasks as Code

The same principles apply to development tasks. When tasks are stored as Markdown files, agents can read them directly, use them to plan their work, and record the results in the same files. Git keeps the task history accessible alongside the history of the software and documentation.

This idea is already reflected in the Spec-Driven Development (SDD). SDD uses specifications in Markdown to define intended behavior before an AI agent implements it. A task file can serve a similar purpose, although the level of detail depends on the work. A small maintenance task may need only a short description, while a complex feature may require acceptance criteria, technical decisions, dependencies, and testing requirements.

SDD is often supported by dedicated tools such as Spec Kit, but a simpler approach is enough to start: treat the task file itself as the specification. That makes the transition easier, because it needs nothing beyond Git and an agent.

Here is a simple workflow with five steps:

  1. Describe the task. Write a short description of the change or feature that needs to be implemented.
  2. Analyze the requirements. The agent reads the task and examines the relevant code and documentation.
  3. Create an implementation plan. The agent adds a proposed solution and identifies the changes it intends to make.
  4. Review and approve. A developer reviews the plan and authorizes implementation.
  5. Implement and report. The agent changes the code, updates the documentation where necessary, and appends an implementation report to the task file.

The task description, implementation plan, and report remain together in one file. This makes it easy to review the original requirements, understand the planned approach, and see what the agent actually changed.

The approval step keeps people in control. The agent does not proceed directly from the task description to implementation; the plan can be reviewed and corrected first.

An example setup

In my own setup, I use three separate Git repositories:

Documentation and tasks often have different access requirements. Documentation may be public, while tasks can contain sensitive information about unfinished security fixes, internal planning, or features that have not yet been announced. Separate repositories let you configure access independently and keep tasks private.

Locally, a developer clones the documentation and task repositories into folders inside the code repository. Both folders are listed in the code repository's .gitignore file, so the parent repository does not track their contents. Each cloned repository retains its own Git history and can be committed, pushed, and synchronized independently.

/code-repo
  /src
  /tests
  /docs                 # Separate documentation repository
    /user-guides
    /admin-manuals
    /developer-docs
  /tasks                # Separate private task repository
    /release-123
      task-551-something-descriptive.md
      task-552-something-descriptive.md
  .gitignore            # Excludes docs and tasks

All information is now available to a local coding assistant such as Claude Code or OpenCode. When implementing a task, the agent reads the task, analyzes the code, implements the change, and updates the relevant documentation. The implementation report stays with the task, while the actual code changes are recorded in the code repository. Referencing the task filename in a Git commit helps connect the implementation to the original requirements.

When tasks are organized into release folders, the agent can use completed tasks and Git history to draft the changelog and release notes. The same information can help identify documentation that needs updating.

Adding an Interface

Git and an AI coding agent are sufficient to run this workflow. A browser-based interface adds another way to browse, edit, and organize the files without replacing Git as the underlying version control system.

Typemill can synchronize content with Git repositories. Because it supports multiple repositories, you can configure a separate project for private tasks alongside the documentation project. This allows you to manage both through the same interface even though the content lives in separate repositories.

Tasks:

Screenshot Tasks as Code

Documentation:

Screenshot of the documentation in Typemill

The same files are accessible through three interfaces:

  • In an IDE: Developers and AI agents work directly with the local repositories.
  • On GitHub: Contributors can review changes and edit files through the repository interface.
  • In a browser: Typemill provides an interface for reading and managing tasks and documentation.

Each interface serves a different purpose. The IDE supports implementation, GitHub provides repository-level collaboration, and the CMS offers a content interface and publishing platform for non-technical users such as product owners and technical writers. Git remains responsible for version history and synchronization.

This setup illustrates an important distinction: the interface does not have to own the data. It provides a convenient way to work with files that remain portable and accessible to other tools.

Local, Private, and File-Based

Typemill and a flat-file CMS are only one quick option to experiment with this workflow. Any setup that keeps Markdown files in Git and gives agents access to them will work, and you can start with nothing more than a folder of task files.

The more interesting question is what happens next. Once tasks follow documentation into the repository, we will see new software and interfaces designed for this model. Developers, product owners, and technical writers will need a shared place to work, and agents will be part of that workflow. It is also an open question which features of current ticket systems are still needed: assignments, comments, kanban boards, sprints? Probably not all of them if agents do most of the work.

Based on the setup above, these are the properties I would look for:

  • Git-native: Tasks and specifications are readable files managed through Git and connected to the code and documentation.
  • Docs and tasks together: One interface provides access to both documentation and task management.
  • File-based: Markdown remains readable, portable, and independent of a particular platform.
  • Self-hosted: Teams retain control over their data, privacy, and infrastructure.
  • Open to AI services: Developers can choose their preferred AI provider, and the interface should offer generic integrations rather than lock users into a single service.
联系我们 contact @ memedata.com