فهرست منبع

chore: configure dynamic native multi-agent workflow

Codex Resource Selftest 4 ماه پیش
والد
کامیت
428c6ca8db
7فایلهای تغییر یافته به همراه78 افزوده شده و 31 حذف شده
  1. 9 0
      .codex/agents/cpld_engineer.toml
  2. 9 0
      .codex/agents/cpld_explorer.toml
  3. 9 0
      .codex/agents/cpld_reviewer.toml
  4. 9 0
      .codex/agents/cpld_test_engineer.toml
  5. 6 0
      .codex/config.toml
  6. 9 0
      .gitignore
  7. 27 31
      AGENTS.md

+ 9 - 0
.codex/agents/cpld_engineer.toml

@@ -0,0 +1,9 @@
+name = "cpld_engineer"
+description = "Scoped CPLD implementation engineer constrained to Root-owned paths."
+sandbox_mode = "workspace-write"
+developer_instructions = """
+Implement only the task and owned paths assigned by Root.
+Do not modify files outside the assigned ownership boundary, stage or commit unless Root explicitly assigns that action, or access COM/JTAG, TD, or hardware.
+Respect the active phase contract; Phase 0 changes are coordination-only and must not touch product RTL, project configuration, protocol, pins, TD, or product contracts.
+Return changed paths, validation commands, and unresolved risks without fabricating evidence.
+"""

+ 9 - 0
.codex/agents/cpld_explorer.toml

@@ -0,0 +1,9 @@
+name = "cpld_explorer"
+description = "Read-only CPLD code, constraint, log, and evidence explorer."
+sandbox_mode = "read-only"
+developer_instructions = """
+Trace the real code paths, constraints, logs, and hardware evidence requested by Root.
+Return concise file, symbol, and conclusion references.
+Do not edit files, stage, commit, access hardware, launch external Codex tools, or invent unobserved evidence.
+Follow Root-assigned read-only scope and report uncertainty explicitly.
+"""

+ 9 - 0
.codex/agents/cpld_reviewer.toml

@@ -0,0 +1,9 @@
+name = "cpld_reviewer"
+description = "Independent read-only reviewer for requirements, implementation, tests, resources, and delivery evidence."
+sandbox_mode = "read-only"
+developer_instructions = """
+Review independently and report concrete correctness, ownership, compatibility, security, and evidence findings.
+Do not edit files, stage, commit, access hardware, launch external Codex tools, or complete implementation on behalf of an author.
+Check the active phase contract and distinguish observed facts from inference.
+Return findings with file and symbol references plus residual risks.
+"""

+ 9 - 0
.codex/agents/cpld_test_engineer.toml

@@ -0,0 +1,9 @@
+name = "cpld_test_engineer"
+description = "Scoped test and evidence engineer for CPLD coordination contracts."
+sandbox_mode = "workspace-write"
+developer_instructions = """
+Modify only tests, formal wrappers, test manifests, and receipt-validation logic assigned by Root.
+Never modify production RTL, project configuration, protocol, pins, TD, or product contracts.
+Use focused deterministic tests with negative cases and preserve fail-closed evidence semantics.
+Return changed paths, exact test commands, and any blocked validation layers.
+"""

+ 6 - 0
.codex/config.toml

@@ -0,0 +1,6 @@
+[features]
+multi_agent = true
+
+[agents]
+enabled = true
+max_concurrent_threads_per_session = 6

+ 9 - 0
.gitignore

@@ -42,6 +42,15 @@ tmp_last_pkg*.txt
 
 
 # Python/runtime caches.
 # Python/runtime caches.
 .codex/
 .codex/
+!.codex/
+.codex/*
+!.codex/config.toml
+!.codex/agents/
+.codex/agents/*
+!.codex/agents/cpld_explorer.toml
+!.codex/agents/cpld_engineer.toml
+!.codex/agents/cpld_test_engineer.toml
+!.codex/agents/cpld_reviewer.toml
 .planning/
 .planning/
 runs/
 runs/
 __pycache__/
 __pycache__/

+ 27 - 31
AGENTS.md

@@ -1,42 +1,38 @@
-# CPLD UART Refactor Operating Rules
+# Prod2U CPLD Operating Rules
 
 
 This repository is the active `dev` branch for the Prod2U multi-project UART refactor.
 This repository is the active `dev` branch for the Prod2U multi-project UART refactor.
 
 
-## Authority
+## [DYNAMIC-NATIVE-MA]
 
 
-- `CPLD_多项目_UART协议_项目适配_Codex并行Harness_详细设计_v1.0.md` is the design authority.
-- `BASELINE_REPORT.md` records the frozen 1920ab3e source/tag and 7c5918ac bitstream baseline.
-- `projects/<project_id>/project.json` is the only machine configuration source.
-- Hardware facts must match the selected baseline package, current production constraints, and TD project. Conflicts are blockers.
+- Tasks marked `[DYNAMIC-NATIVE-MA]` must use the current client's native multi-agent/subagent tools.
+- Root builds a dependency graph before delegation and only runs independent, clearly bounded work in parallel.
+- Normal concurrency is 2-4 agents; 6 is the hard upper bound.
+- Prefer parallel read-heavy exploration, test review, and log triage.
+- Write-heavy work uses independent worktrees or mutually exclusive owned paths.
+- Two write agents must never modify the same file concurrently.
+- Test agents do not modify production RTL; reviewers are read-only.
+- Root owns interface freezes, integration, conflict resolution, and final candidate selection.
+- The Harness must not start Codex, call model APIs, or create agent threads.
+- Background build/test processes are ordinary processes, not subagents.
 
 
-## Protocol
+## Phase boundaries
 
 
-- UART is fixed at 115200 8N1, no flow control, 25 MHz, 217 clocks per bit.
-- Frames are `A5 5A type payload_length payload crc16_le`.
-- CRC is CRC-16/CCITT-FALSE over type, length, and payload only.
-- The only supported types are `0x01 SET_ALL`, `0x02 GET_TEMPERATURE`, and `0x82 TEMPERATURE_DATA`.
-- Do not restore Binary921, 921600, ACK, ERROR, BUSY, JOG, STOP, watchdog, replay, pagination, limits, or runtime project discovery.
+- Phase 0 establishes native coordination, Git isolation, ownership validation, and minimal evidence only.
+- Phase 0 must not implement product functionality or modify RTL, project configuration, protocol, pins, TD, or product contracts.
+- Phase 1 must review every nested `AGENTS.md` before product work and replace historical rules that conflict with the accepted Phase 1 product contract.
+- Historical v1 product prohibitions are not a permanent blocker for a later accepted Phase 1 contract; Phase 0 remains strictly non-product.
 
 
 ## Safety and evidence
 ## Safety and evidence
 
 
-- Never call ChatGPT Adviser or create Adviser artifacts.
-- Never open COM/JTAG, program hardware, install drivers, or modify global PATH.
-- Distinguish source, offline simulation, formal, TD, package, and physical hardware evidence.
-- A blocked, dry-run, fixture, or partial receipt is not a pass.
-- Preserve ignored generated evidence unless the user explicitly requests its removal.
+- Do not call ChatGPT Adviser or create Adviser artifacts.
+- Do not access COM/JTAG, program hardware, install drivers, or modify global PATH.
+- Keep source, offline simulation, formal, TD, package, and physical-hardware evidence separate.
+- Blocked, dry-run, fixture, and partial evidence is not a pass.
+- Preserve unrelated dirty work and ignored generated evidence.
 
 
-## Ownership
+## Ownership and delivery
 
 
-- Each temporary agent worktree owns an exclusive path set.
-- Only the coordinator integrates commits into `dev` and modifies the production top.
-- Tests do not modify production RTL.
-- Common UART/CRC/frame modules do not know project channel counts or pins.
-- Project modules do not parse UART bytes directly.
-
-## Delivery
-
-- Every run uses one 32-character lowercase `run_id`.
-- Receipts bind run ID, commit, project configuration SHA-256, and bitstream SHA-256.
-- Generate an `UNVERIFIED` package immediately after a non-empty TD bitstream.
-- Promote the same bitstream to `VERIFIED` only after all applicable tests pass.
-- Do not delete the old production RTL until the new top produces a non-empty bitstream.
+- Each temporary worktree or owned path has one coordinator-assigned owner.
+- Only Root integrates commits into `dev` and modifies production tops.
+- Every run uses one 32-character lowercase hexadecimal `run_id`.
+- Phase 0 changed paths are restricted to the approved allowlist and every final worktree must be clean.