parallel-subagent-code-integration
Reconcile, verify, and fix interdependent code produced by multiple parallel subagents working on a shared package. Covers tree inventory, import cross-checks, end-to-end validation harnesses, and the recurring SQLAlchemy 2.0 / Pydantic / Python binding breakages that appear when sibling agents each write part of a package.
- License 许可
- MIT
- 所属仓库
- zapabob/Skills
- 最近更新
- 2026-10-26
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- parallel-subagent-code-integration
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "delegation", "subagent", "parallel", "integration", "debugging", "validation" ], "related_skills": [ "subagent-driven-development", "systematic-debugging", "code-review" ] } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Reconcile, verify, and fix interdependent code produced by multiple parallel subagents working on a shared package. Covers tree inventory, import cross-checks, end-to-end validation harnesses, and the recurring SQLAlchemy 2.0 / Pydantic / Python binding breakages that appear when sibling agents each write part of a package.
03 SKILL.md 正文
Parallel Subagent Code Integration
Overview
When two or more subagents implement different parts of the same new package
in parallel (e.g. one writes models/, another writes api/ routers, a third
writes config.py/database.py), each file can be individually "correct" yet
the package as a whole fails to import or run. The breakage lives between the
files, not within them. This skill is the integration/reconciliation playbook for
that exact situation, and it doubles as a fast-debugging reference for the
framework-specific breakages that show up most often.
When to Use
- You dispatched parallel subagents on one package and must combine their output.
- The package imports fail, or a router 404s / 500s, even though each agent reported success.
- You see cross-file errors like
ImportError,InvalidRequestError,OperationalError: ... already exists, or Pydantic "Field required". - Load this alongside
subagent-driven-developmentwhen its two-stage review reports integration issues between tasks.
The Reconciliation Playbook
- Inventory the whole tree before trusting anything.
find/search_filesthe target directory andread_fileevery file — including ones you didn't write. A sibling may have created the module your code imports (e.g.api/__init__.py, a missingSessionUpdateschema). Do not assume your own files are the only ones present. Parallel runs routinely produce files in every subdirectory unexpectedly. - Read imports, not filenames. For every symbol your code imports, confirm
it exists with the expected name and type in the sibling's module. Cross-
subagent runs produce: undefined symbols, type mismatches (a schema field
typed
dictvs a model column expectingstr), and missing reciprocal ORM relationships. - Treat the write tool's "modified by sibling subagent" warning as a guard, not a conflict. It fires on parallel runs even when nothing clobbered you. After writing into a shared tree, re-read the file to confirm your canonical content landed — a lagging sibling or stale in-memory buffer can differ from what you think you wrote.
- Build one end-to-end validation harness and actually run it. Importing
the top-level package and issuing a real request (or constructing a real ORM
object) catches cross-file breakage that per-task lint/compile misses. Pattern:
- Create a throwaway venv with
uv venv --python <ver> .tmp-venvthenuv pip install --python .tmp-venv/Scripts/python.exe <deps>so you don't contaminate the project's real environments. - Point the DB at a temp file (
tempfile.mkstemp(suffix=".db")) or in-memory SQLite; set the settings URL beforeinit_db(); delete the file after. - Drive the app via
httpx.AsyncClient(transport=httpx.ASGITransport(app=app), base_url="http://t"). Exercise create→read→update→delete + a 404 path per resource. Then assert real row counts via a direct session. - Delete the harness script and the venv afterward.
- Create a throwaway venv with
- Fix the package, don't weaken the test. If validation fails, find the
root cause (see
references/parallel-subagent-integration-pitfalls.md) and patch the real defect — usually in a sibling's file. Never edit your assertion to make a broken package "pass."
Why this class exists separately
The sibling skill subagent-driven-development governs dispatching and
two-stage review. It does not cover the controller-side integration/verification
of parallel outputs in a shared tree, nor the framework-specific breakage
catalog. That gap is filled here.
Further reading
references/parallel-subagent-integration-pitfalls.md— The concrete, copy-paste-able failure modes (SQLAlchemy 2.0 relationship/index/circular-import traps, Pydantic path-vs-body field handling, and the Pythonfrom module import singletonstaleness trap) with the exact fixes that worked.
04 同仓库更多 Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
writing-plans
Write implementation plans: bite-sized tasks, paths, code.
whisper
OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.
weights-and-biases
W&B: log ML experiments, sweeps, model registry, dashboards.
watchers
Poll RSS, JSON APIs, and GitHub with watermark dedup.
serving-llms-vllm
vLLM: high-throughput LLM serving, OpenAI API, quantization.