跪拜 Guibai
← All articles
Artificial Intelligence

Eight Modules for an Agentic Dev System: Continuity, Verification, and Reuse

By 京东云开发者 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Most agent workflows treat a task as a one-shot prompt, leaving no way to resume after interruption or to trust that a verified result applies to the current target. This system shows how to attach state, evidence, and versioned methods to every action, making agentic development auditable and reproducible, which is a practical blueprint for any team building serious AI-assisted engineering pipelines.

Summary

A code change is not a single tool call. The system must answer how work resumes, what proves completion, and which practices are worth reusing. JD Cloud's design addresses this with eight logical modules, not microservices: the main Agent orchestrates tool use; rules and skills separate project knowledge from operational procedures; retrieval splits historical search, exact identifier lookup, and semantic intent search; task state uses file locks and optimistic versioning to prevent old progress from overwriting new progress; action policies bind decisions to precise fingerprints and fail closed in pre-execution hooks; evidence is graded from E0 observation to E5 outcome impact; and a method library versions reusable practices, counting only independent successes per content hash.

The system is implemented with local files, SQLite, Python, and Node.js CLIs, deliberately avoiding a unified workflow engine. The main Agent drives everything through a tool-call loop, reading context, executing actions, and validating results. A concrete walkthrough for fixing duplicate search results shows how the modules interlock: clarify the target, locate the responsibility, select a versioned method, execute with policy checks, verify business behavior with full assertions, and write back both progress and method feedback.

The design reuses optimistic concurrency, content hashing, explicit contracts, and hierarchical acceptance. Its main contribution is binding these mechanisms to real development objects, so state changes, execution policies, evidence levels, and method maturity are all verifiable. Still, the authors note that module existence or partial tests do not prove overall efficiency gains; long-term measurement remains necessary.

Takeaways
— The system is divided into eight logical modules M1-M8, which are responsibilities, not microservices; implementation uses local files, SQLite, Python, and Node.js CLIs.
— Task files use file locks (flock) and optimistic version checks (expected_revision) to prevent stale state from overwriting newer progress; a failed version check forces the writer to re-read and merge.
— Evidence is graded E0 through E5, from observation to outcome impact; each level answers a different question, and not all tasks require E5.
— Quality gates (quality_gate.py) run before task closure; if the quality contract is incomplete or tests do not align with the target, the task stays in its current state.
— Method governance binds feedback to the content version via a contract hash; old successes from previous versions cannot boost the maturity of a new version, and independent successes are counted using an independent_key.
— Action policy uses a fingerprint sha256 over a canonical JSON contract; the fingerprint changes if the target, parameter, or policy changes, and pre-execution hooks fail closed for policy-covered commands.
— A false-interception incident showed that text describing a dangerous operation triggered the block even when the command was only recording that description; fix required restricted rules for recording and authorization paths.
— The system has a bounded trial for semantic context: max 200 files, 256 KiB per file, 4 MiB total; the local adapter uses a local ONNX model with no remote fallback.
— Evidence must bind to the target: passing verification for image A does not vouch for image B; after a target changes, affected config, runtime, and requests must be re-verified.
— Outcome metrics (E5) must be defined before seeing results, including formula, population, window, baseline, owner, and stopping conditions.
Conclusions

The system treats resumability and evidence binding as first-class concerns, not afterthoughts, which is a significant departure from most agent frameworks that only capture conversation history.

The method library's versioning and independent-key counting directly addresses a common failure mode where teams over-trust 'This method worked before' without accounting for semantic changes.

The false-block incident reveals a subtle trap in policy engines: authorization checks must distinguish between executing a dangerous action and merely describing it, which is a classic text-vs-execution ambiguity.

By routing the main Agent through a tool-call loop rather than a centralized workflow service, the system keeps orchestration flexible and local, though it places heavy responsibility on the Agent's semantic judgment.

The E0-E5 evidence ladder is a useful communication tool, but the article honestly notes that program gates cannot verify the authenticity of raw evidence or business semantics, so human oversight remains necessary.

Concepts & terms
Evidence Level (E0-E5)
A five-level scale for grading how strong a claim is: E0 observation, E1 code behavior, E2 config and data, E3 runtime state, E4 business acceptance, E5 outcome impact. Each level answers a different question, and tasks may require different levels based on their nature.
Method Fingerprint / Content Hash
A SHA-256 hash computed over the semantic fields of a method (trigger, prerequisites, steps, exclusions, thresholds, safety boundaries). It identifies a specific version of a method so that feedback and maturity counts are tied to that exact version, not to a generic 'method name'.
Independent Key
A unique identifier for a distinct task instance. It prevents multiple probes, retries, or stages of the same event from being counted as multiple independent successes, ensuring that maturity levels reflect truly separate occurrences.
Optimistic Version Check
A concurrency control technique where writers include an expected version (revision) in their update; if the current version differs, the write is rejected. It prevents stale data from overwriting newer state, used here in task and requirement files.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗