Enhance UX and Coordinator Role Constraints in Skills Documentation

- Added detailed constraints for the Coordinator role in the team UX improvement skill, emphasizing orchestration responsibilities and workflow management.
- Updated test cases in DashboardToolbar, useIssues, and useWebSocket to improve reliability and clarity.
- Introduced new tests for configStore and ignore patterns in Codex Lens to ensure proper functionality and configuration handling.
- Enhanced smart search functionality with improved embedding selection logic and added tests for various scenarios.
- Updated installation and usage documentation to reflect changes in directory structure and role specifications.
This commit is contained in:
catlog22
2026-03-08 23:43:44 +08:00
parent f3ae78f95e
commit 61ea9d47a6
110 changed files with 1516 additions and 218 deletions

View File

@@ -217,8 +217,8 @@ Each wave generates a temporary `wave-{N}.csv` with extra `prev_context` column
4. Create subdirectories: plan/, review/, artifacts/, interactive/, agents/
5. Initialize registry.json: { "active": [], "closed": [] }
6. Initialize discoveries.ndjson (empty file)
7. Read specs: .codex/skills/team-edict/specs/team-config.json
8. Read quality gates: .codex/skills/team-edict/specs/quality-gates.md
7. Read specs: ~ or <project>/.codex/skills/team-edict/specs/team-config.json
8. Read quality gates: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md
9. Log session start to context.md
```
@@ -236,9 +236,9 @@ const zhongshu = spawn_agent({
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: .codex/skills/team-edict/agents/zhongshu-planner.md (MUST read first)
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/zhongshu-planner.md (MUST read first)
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries, skip if not exists)
3. Read: .codex/skills/team-edict/specs/team-config.json (routing rules)
3. Read: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules)
---
@@ -285,7 +285,7 @@ while (!approved && reviewRound < 3) {
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: .codex/skills/team-edict/agents/menxia-reviewer.md (MUST read first)
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/menxia-reviewer.md (MUST read first)
2. Read: ${sessionDir}/plan/zhongshu-plan.md (plan to review)
3. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
@@ -336,10 +336,10 @@ const shangshu = spawn_agent({
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: .codex/skills/team-edict/agents/shangshu-dispatcher.md (MUST read first)
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/shangshu-dispatcher.md (MUST read first)
2. Read: ${sessionDir}/plan/zhongshu-plan.md (approved plan)
3. Read: ${sessionDir}/review/menxia-review.md (review conditions)
4. Read: .codex/skills/team-edict/specs/team-config.json (routing rules)
4. Read: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules)
---
@@ -416,8 +416,8 @@ For each wave W in 1..max_wave:
5. EXECUTE csv-wave tasks:
spawn_agents_on_csv({
task_csv_path: "${sessionDir}/wave-{W}.csv",
instruction_path: ".codex/skills/team-edict/instructions/agent-instruction.md",
schema_path: ".codex/skills/team-edict/schemas/tasks-schema.md",
instruction_path: "~ or <project>/.codex/skills/team-edict/instructions/agent-instruction.md",
schema_path: "~ or <project>/.codex/skills/team-edict/schemas/tasks-schema.md",
additional_instructions: "Session directory: ${sessionDir}. Department: {department}. Priority: {priority}.",
concurrency: CONCURRENCY
})
@@ -457,10 +457,10 @@ const aggregator = spawn_agent({
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: .codex/skills/team-edict/agents/aggregator.md (MUST read first)
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/aggregator.md (MUST read first)
2. Read: ${sessionDir}/tasks.csv (master state)
3. Read: ${sessionDir}/discoveries.ndjson (all discoveries)
4. Read: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
4. Read: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
---
@@ -472,7 +472,7 @@ Deliverables: ${sessionDir}/context.md (final report)
${listAllArtifacts()}
### Quality Gate Standards
Read from: .codex/skills/team-edict/specs/quality-gates.md
Read from: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md
`
})
@@ -609,9 +609,9 @@ const agent = spawn_agent({
## TASK ASSIGNMENT
### MANDATORY FIRST STEPS (Agent Execute)
1. **Read role definition**: .codex/skills/team-edict/agents/qa-verifier.md (MUST read first)
1. **Read role definition**: ~ or <project>/.codex/skills/team-edict/agents/qa-verifier.md (MUST read first)
2. Read: ${sessionDir}/discoveries.ndjson (shared discoveries)
3. Read: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
3. Read: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
---
@@ -740,3 +740,42 @@ spawn_agent({
12. **Rejection Loop Max 3**: Menxia can reject max 3 times before escalating to user
13. **Kanban is Mandatory**: All agents must report state transitions via discoveries.ndjson
14. **Quality Gates Apply**: Phase 3 aggregator validates all outputs against specs/quality-gates.md
---
## Coordinator Role Constraints (Crown Prince / Main Agent)
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned agents (Three Departments and Six Ministries). The coordinator only:
- Spawns agents with task assignments
- Waits for agent callbacks
- Merges results into master CSV
- Coordinates workflow transitions between phases
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
- Wait patiently for `wait()` calls to complete
- NOT skip workflow steps due to perceived delays
- NOT assume agents have failed just because they're taking time
- Trust the timeout mechanisms (600s for planning, 300s for execution)
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
- Use `send_input()` to ask questions or provide clarification
- NOT skip the agent or move to next phase prematurely
- Give agents opportunity to respond before escalating
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
- Skip phases or stages (e.g., jumping from Zhongshu directly to Shangshu)
- Bypass the Three Departments serial pipeline
- Execute wave N before wave N-1 completes
- Assume task completion without explicit agent callback
- Make up or fabricate agent results
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
- Total execution time: 30-90 minutes for typical edicts
- Phase 0 (Three Departments): 15-30 minutes
- Phase 2 (Wave Execution): 10-20 minutes per wave
- Phase 3 (Aggregation): 5-10 minutes
- The coordinator must remain active and attentive throughout the entire process

View File

@@ -68,7 +68,7 @@ Post-wave aggregation agent -- collects all ministry outputs, validates against
4. Use Glob to find all files in `<session>/interactive/`
5. Read each interactive result file
6. Read `<session>/discoveries.ndjson` (all entries)
7. Read `.codex/skills/team-edict/specs/quality-gates.md`
7. Read `~ or <project>/.codex/skills/team-edict/specs/quality-gates.md`
**Output**: All artifacts and status data collected

View File

@@ -64,7 +64,7 @@ Xingbu (Ministry of Justice / Quality Assurance) -- executes quality verificatio
**Steps**:
1. Read `.codex/skills/team-edict/specs/quality-gates.md`
1. Read `~ or <project>/.codex/skills/team-edict/specs/quality-gates.md`
2. Read `<session>/plan/dispatch-plan.md` for acceptance criteria
3. Read implementation artifacts from `<session>/artifacts/`
4. Read `<session>/discoveries.ndjson` for implementation notes

View File

@@ -62,7 +62,7 @@ Shangshu (Department of State Affairs / Dispatch) -- parses the approved plan, r
1. Read `<session>/plan/zhongshu-plan.md`
2. Read `<session>/review/menxia-review.md`
3. Read `.codex/skills/team-edict/specs/team-config.json`
3. Read `~ or <project>/.codex/skills/team-edict/specs/team-config.json`
4. Extract subtask list from plan
5. Extract conditions from review
6. Report state "Doing":

View File

@@ -64,7 +64,7 @@ Zhongshu (Central Secretariat) -- analyzes the edict, explores the codebase, and
**Steps**:
1. Parse the edict text from the spawn message
2. Read `.codex/skills/team-edict/specs/team-config.json` for routing rules
2. Read `~ or <project>/.codex/skills/team-edict/specs/team-config.json` for routing rules
3. If revision round: Read `<session>/review/menxia-review.md` for rejection feedback
4. Read `<session>/discoveries.ndjson` if it exists

View File

@@ -4,8 +4,8 @@
1. Read shared discoveries: .workflow/.csv-wave/{session-id}/discoveries.ndjson (if exists, skip if not)
2. Read dispatch plan: .workflow/.csv-wave/{session-id}/plan/dispatch-plan.md (task details and acceptance criteria)
3. Read approved plan: .workflow/.csv-wave/{session-id}/plan/zhongshu-plan.md (overall strategy and context)
4. Read quality gates: .codex/skills/team-edict/specs/quality-gates.md (quality standards)
5. Read team config: .codex/skills/team-edict/specs/team-config.json (routing rules and artifact paths)
4. Read quality gates: ~ or <project>/.codex/skills/team-edict/specs/quality-gates.md (quality standards)
5. Read team config: ~ or <project>/.codex/skills/team-edict/specs/team-config.json (routing rules and artifact paths)
> **Note**: The session directory path is provided by the orchestrator in `additional_instructions`. Use it to resolve the paths above.