Skip to content

docs: split AGENTS.md into separate documents#14

Merged
timzsu merged 5 commits into
mainfrom
zsu/agents-polish
May 4, 2026
Merged

docs: split AGENTS.md into separate documents#14
timzsu merged 5 commits into
mainfrom
zsu/agents-polish

Conversation

@timzsu
Copy link
Copy Markdown
Collaborator

@timzsu timzsu commented May 4, 2026

Purpose

AGENTS.md had grown into a monolithic agent guide that mixed routing, architecture, style rules, API notes, SDK/CLI examples, executor details, environment tables, and plugin examples. That made every agent session load a large amount of context even when only one area was relevant.

This PR turns AGENTS.md into a compact routing document and moves the long-form reference material into focused docs. It also adds docs: as an allowed PR title type and configures heavy CI jobs to skip doc-only changes.

Changes

File Lines Contents
AGENTS.md 74 Routing doc with required @ imports for architecture, code style, and contributing guidance; optional links for API, SDK, CLI, executors, workflows, env, and plugins; short reminders only.
docs/ARCHITECTURE.md 129 Workspace layout, topology, components, communication, object IDs, task state machine, directory map, runtime behavior, Redis channels, and plugin extension pointer.
docs/CODE_STYLE.md 110 Python rules, comment/docstring rules, object ID rules, bandit / # nosec policy, and pip-audit policy with current GHSA ignore rationale.
docs/API.md 87 Common server REST endpoints, including workflows, tasks, results, traces, workers, nodes, SSH, system, and cursor pagination.
docs/SDK.md 70 Sync and async SDK usage, common resource operations, traces, cursor handling, and error behavior.
docs/CLI.md 90 flowmesh command groups, common workflow/log/result/trace commands, local stack lifecycle, and SSH tasks.
docs/EXECUTORS.md 39 taskType -> Executor registry table, executor utility locations, and AgentExecutor environment requirements.
docs/WORKFLOWS.md 81 Workflow YAML hierarchy: single task, multi-stage DAG, graph DAG, and schedule hints.
docs/ENV.md 59 Curated server, worker, and supervisor environment variable tables.
docs/PLUGINS.md 66 Plugin hook contract, loader semantics, lifecycle forms, import locations, and DB-owning plugin example.
CONTRIBUTING.md 148 Adds commit message and PR title conventions, including the `feat

docs: PR type and CI skip

  • scripts/ci/check_pr_title.py now accepts docs: PR titles.
  • .github/workflows/{lint-typecheck,unit-tests,security,env-examples,requirements-sync}.yml now use paths-ignore for Markdown / docs-only changes.
  • The skip is path-based. A docs: PR that changes non-doc files still
    runs the relevant CI jobs.

Test plan

Documentation-focused change. Commit hooks ran successfully on the doc commits.


Pre-submission Checklist
  • I have read the contribution guidelines.
  • I have run the applicable pre-commit hooks and fixed any issues.
  • I have added or updated tests covering my changes (if applicable). N/A — docs + CI plumbing.
  • I have verified that uv run pytest tests/ passes locally. N/A — no runtime code changed.
  • If I changed shared schemas or proto definitions, I have checked downstream compatibility across Server and Worker. N/A.
  • If I changed the SDK or CLI, I have verified the affected packages work. N/A — docs only.
  • If this is a breaking change, I have prefixed the PR title with [BREAKING]. Not breaking.
  • I have updated documentation or config examples if user-facing behavior changed.

@timzsu timzsu marked this pull request as draft May 4, 2026 01:51
@timzsu timzsu force-pushed the zsu/agents-polish branch from 4740e00 to 714637b Compare May 4, 2026 01:52
@timzsu timzsu changed the title docs: polish AGENTS.md chore: polish AGENTS.md May 4, 2026
@timzsu timzsu force-pushed the zsu/agents-polish branch 2 times, most recently from d71230f to d194263 Compare May 4, 2026 03:16
@timzsu timzsu changed the title chore: polish AGENTS.md chore: split AGENTS.md into ARCHITECTURE / CODE_STYLE / CONTRIBUTING May 4, 2026
@timzsu timzsu force-pushed the zsu/agents-polish branch from d194263 to 675eed5 Compare May 4, 2026 03:30
@timzsu timzsu changed the title chore: split AGENTS.md into ARCHITECTURE / CODE_STYLE / CONTRIBUTING chore: split AGENTS.md into ARCHITECTURE / CODE_STYLE / API / SDK / CLI / CONTRIBUTING May 4, 2026
@timzsu timzsu force-pushed the zsu/agents-polish branch from 675eed5 to 3e7e169 Compare May 4, 2026 07:24
@timzsu timzsu changed the title chore: split AGENTS.md into ARCHITECTURE / CODE_STYLE / API / SDK / CLI / CONTRIBUTING chore: split AGENTS.md into routing doc + ARCHITECTURE / CODE_STYLE / API / SDK / CLI / EXECUTORS / WORKFLOWS / ENV / PLUGINS May 4, 2026
@timzsu timzsu force-pushed the zsu/agents-polish branch from 3e7e169 to 5502ef2 Compare May 4, 2026 07:36
…API / SDK / CLI / EXECUTORS / WORKFLOWS / ENV / PLUGINS

The previous AGENTS.md was 704 lines and inlined every concern at once.
Restructure as a thin routing doc that points to dedicated documents:

- docs/ARCHITECTURE.md — workspace layout, topology, components,
  communication, object IDs, task state machine, directory map, runtime
  behavior (task merge, stage stickiness, context reuse, Redis
  control + telemetry + log channels).
- docs/CODE_STYLE.md — Python rules, docstring rules, bandit rules +
  nosec policy, pip-audit policy + GHSA ignore list.
- docs/API.md — common server REST endpoints + cursor pagination.
- docs/SDK.md — sync (FlowMesh) and async (AsyncFlowMesh) clients.
- docs/CLI.md — flowmesh command groups, common workflows, local stack
  lifecycle.
- docs/EXECUTORS.md — taskType → Executor registry table; AgentExecutor
  env requirements (UTU_LLM_*, SERPER_API_KEY, JINA_API_KEY).
- docs/WORKFLOWS.md — workflow YAML format hierarchy: single task,
  multi-stage DAG, graph DAG, schedule hints.
- docs/ENV.md — curated server / worker / supervisor env var tables.
- docs/PLUGINS.md — IdentityProvider / SubmissionGuard / UsageSink hook
  contract, loader semantics, worked example.
- CONTRIBUTING.md — gains the commit + PR title conventions section.
- AGENTS.md — 79 lines: brief project intro, pointers to all of the
  above plus templates/, a Reminders cheat sheet for the rules that
  come up most often, and a dev-workflow snippet.

Adds a `docs:` PR title type to ``scripts/ci/check_pr_title.py`` and
configures the heavy CI workflows (lint-typecheck, unit-tests,
security, env-examples, requirements-sync) with
``paths-ignore: ['**.md', 'docs/**']`` so doc-only PRs skip code CI.
Only the title-check and DCO-signoff workflows run on a pure docs PR.

Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
@timzsu timzsu changed the title chore: split AGENTS.md into routing doc + ARCHITECTURE / CODE_STYLE / API / SDK / CLI / EXECUTORS / WORKFLOWS / ENV / PLUGINS docs: split AGENTS.md into routing doc + ARCHITECTURE / CODE_STYLE / API / SDK / CLI / EXECUTORS / WORKFLOWS / ENV / PLUGINS May 4, 2026
@timzsu timzsu force-pushed the zsu/agents-polish branch from 5502ef2 to 749a1ff Compare May 4, 2026 07:42
@timzsu timzsu marked this pull request as ready for review May 4, 2026 07:53
@timzsu timzsu requested a review from kaiitunnz May 4, 2026 07:53
Copy link
Copy Markdown
Collaborator

@kaiitunnz kaiitunnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave some comments. PTAL.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread docs/ARCHITECTURE.md Outdated
Comment thread AGENTS.md
Comment thread AGENTS.md
Comment thread docs/CLI.md Outdated
Comment thread docs/SDK.md Outdated
Comment thread docs/SDK.md Outdated
Comment thread docs/SDK.md Outdated
Comment thread docs/SDK.md Outdated
Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
@timzsu timzsu changed the title docs: split AGENTS.md into routing doc + ARCHITECTURE / CODE_STYLE / API / SDK / CLI / EXECUTORS / WORKFLOWS / ENV / PLUGINS docs: split AGENTS.md into separate documents May 4, 2026
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
@timzsu timzsu requested a review from kaiitunnz May 4, 2026 12:04
Copy link
Copy Markdown
Collaborator

@kaiitunnz kaiitunnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments.

Comment thread AGENTS.md
Comment thread CONTRIBUTING.md Outdated
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
@timzsu timzsu force-pushed the zsu/agents-polish branch 3 times, most recently from 0a5d2c8 to f543fd1 Compare May 4, 2026 13:36
The previous routing list mixed Claude Code @-imports
(``@docs/ARCHITECTURE.md``, ``@docs/CODE_STYLE.md``, ``@CONTRIBUTING.md``)
with normal markdown links. Each @-import is inlined into the loaded
context at parse time, which broke the bullet structure of "Where to
read what": the trailing description text dangled after a fully-inlined
multi-section file, and only three of ten docs were auto-loaded.

Convert all "Where to read what" entries to plain markdown links so
the section is a clean router, and add an "Auto-loaded references"
section at the end of the doc that holds the three @-imports on their
own lines. Same eager-load behavior, no structural damage.

Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
@timzsu timzsu force-pushed the zsu/agents-polish branch from f543fd1 to 042bfde Compare May 4, 2026 13:41
@timzsu timzsu requested a review from kaiitunnz May 4, 2026 13:42
Copy link
Copy Markdown
Collaborator

@kaiitunnz kaiitunnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@timzsu timzsu merged commit 817f19e into main May 4, 2026
10 checks passed
@timzsu timzsu deleted the zsu/agents-polish branch May 4, 2026 14:06
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.

2 participants