kenaz 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/.claude/commands/agent-worker.md +1 -1
- package/core/.claude/commands/architect.md +1 -2
- package/core/.claude/commands/spec.md +1 -1
- package/core/.claude/commands//347/224/242/345/223/201.md +1 -1
- package/core/.claude/hooks/__tests__/task-1977-dedupe-guard.test.js +8 -8
- package/core/.claude/skills/architect_agent/SKILL.md +11 -92
- package/core/.claude/skills/assessment_agent/SKILL.md +0 -1
- package/core/.claude/skills/backend_engineer/SKILL.md +3 -6
- package/core/.claude/skills/code_reviewer/SKILL.md +1 -1
- package/core/.claude/skills/code_reviewer/patterns.yaml +1 -1
- package/core/.claude/skills/designer/SKILL.md +3 -6
- package/core/.claude/skills/dev_agent/SKILL.md +30 -491
- package/core/.claude/skills/developer/SKILL.md +3 -6
- package/core/.claude/skills/feature_agent/SKILL.md +3 -17
- package/core/.claude/skills/product_manager/SKILL.md +29 -1064
- package/core/.claude/skills/qa_engineer/SKILL.md +12 -17
- package/core/.claude/skills/spec_optimizer/SKILL.md +25 -275
- package/core/.claude/skills/sre_agent/SKILL.md +3 -6
- package/core/.collaboration/README.md +2 -3
- package/core/.collaboration/core/task-api.js +5 -138
- package/core/.collaboration/docs/CLI.md +0 -2
- package/core/.failure/INDEX.yaml +6 -40
- package/core/.failure/agent-execution/FAIL-013-search-cwd-drift-and-case-mismatch.yaml +1 -1
- package/core/.failure/tools/README.md +9 -227
- package/core/.formation/bifrost/launch.js +1 -6
- package/core/.formation/bifrost/launch.test.js +1 -1
- package/core/.formation/bifrost/shared/ansuz-boot-policy.js +3 -3
- package/core/.formation/bifrost/shared/ansuz-boot-policy.test.js +1 -2
- package/core/.formation/tools/__tests__/arms.test.js +41 -0
- package/core/.formation/tools/__tests__/diagnose-bug.test.js +10 -0
- package/core/.formation/tools/__tests__/m1-hmap-convid.test.js +1 -124
- package/core/.formation/tools/arms.js +48 -0
- package/core/.formation/tools/dispatch.js +24 -15
- package/core/.formation/tools/kenaz-stats.js +32 -8
- package/core/.formation/tools/kenaz-stats.test.js +15 -2
- package/core/.formation/tools/loader.js +17 -140
- package/core/.formation/tools/post-complete.js +0 -31
- package/core/.formation/tools/prompt.js +16 -1
- package/core/.formation/tools/prompt.test.js +20 -0
- package/core/.rule/INDEX.yaml +0 -18
- package/core/.rule/general/agent-workflow.yaml +14 -164
- package/core/.rule/general/project-self-containment.yaml +8 -19
- package/core/.rule/general/rust-verify-target.yaml +6 -5
- package/core/.rule/general/synapse-code-intelligence.yaml +3 -3
- package/core/.specialist/Amelia/capability.yaml +12 -12
- package/core/.specialist/Amelia/workflow.yaml +2 -2
- package/core/.specialist/Ansuz/SYSTEM_DOC.md +20 -578
- package/core/.specialist/Ansuz/cognitive_principles.yaml +2 -3
- package/core/.specialist/Ansuz/concepts/boot_rules_summary.yaml +0 -1
- package/core/.specialist/Ansuz/concepts/deep_knowledge_pointers.yaml +1 -2
- package/core/.specialist/Ansuz/core.yaml +6 -108
- package/core/.specialist/Ansuz/guards/lesson_guards.yaml +0 -3
- package/core/.specialist/Ansuz/identity_contract.yaml +0 -1
- package/core/.specialist/Ansuz/knowledge.yaml +0 -4
- package/core/.specialist/Ansuz/rule.yaml +0 -1
- package/core/.specialist/Ansuz/tools/handoff-session-identity.test.js +6 -150
- package/core/.specialist/tests/runtime-discovery/README.md +1 -1
- package/core/.specialist/tools/__tests__/task-2374-usage-counter.test.js +1 -12
- package/core/.specialist/tools/ansuz-boot-fast.js +7 -4
- package/core/.specialist/tools/ansuz-boot-fast.test.js +10 -3
- package/core/.specialist/tools/prompt-files.test.js +1 -0
- package/core/.specialist/tools/task-bridge.js +1 -66
- package/core/.system/README.md +11 -552
- package/core/.system/collaboration/README.md +10 -174
- package/core/CLAUDE.md +1 -6
- package/core/KENAZ_CORE_VERSION +1 -1
- package/core/dev/scripts/js-yaml-resolution.test.js +1 -1
- package/core/dev/scripts/peer-identity-e2e.js +402 -0
- package/core/dev/scripts/peer-identity-e2e.md +47 -0
- package/core/dev/scripts/relay-admin.js +94 -0
- package/core/dev/scripts/relay-admin.test.js +131 -0
- package/core/dev/scripts/run-rust-tests.js +9 -45
- package/core/dev/scripts/rust-verify-worktree.js +4 -4
- package/core/dev/scripts/verify-target-dir.js +6 -6
- package/core/plugins/kenaz/INVENTORY.md +8 -8
- package/core/plugins/kenaz/README.md +10 -0
- package/core/plugins/kenaz/commands/architect.md +1 -2
- package/core/plugins/kenaz/commands/spec.md +1 -1
- package/core/plugins/kenaz/commands//347/224/242/345/223/201.md +1 -1
- package/core/plugins/kenaz/guidance.md +1 -1
- package/core/plugins/kenaz/hooks/kenaz-hook.js +2 -1
- package/core/plugins/kenaz/hooks/sdk-gate.js +9 -0
- package/core/plugins/kenaz/scripts/kenaz.test.js +15 -3
- package/core/plugins/kenaz/scripts/sync.js +1 -1
- package/core/plugins/kenaz/scripts/ygg.js +8 -0
- package/core/plugins/kenaz/scripts/ygg.test.js +72 -0
- package/core/plugins/kenaz/skills/architect_agent/SKILL.md +11 -92
- package/core/plugins/kenaz/skills/assessment_agent/SKILL.md +0 -1
- package/core/plugins/kenaz/skills/backend_engineer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/code_reviewer/SKILL.md +1 -1
- package/core/plugins/kenaz/skills/code_reviewer/patterns.yaml +1 -1
- package/core/plugins/kenaz/skills/designer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/dev_agent/SKILL.md +30 -491
- package/core/plugins/kenaz/skills/developer/SKILL.md +3 -6
- package/core/plugins/kenaz/skills/feature_agent/SKILL.md +3 -17
- package/core/plugins/kenaz/skills/product_manager/SKILL.md +29 -1064
- package/core/plugins/kenaz/skills/qa_engineer/SKILL.md +12 -17
- package/core/plugins/kenaz/skills/spec_optimizer/SKILL.md +25 -275
- package/core/plugins/kenaz/skills/sre_agent/SKILL.md +3 -6
- package/core/plugins/kenaz-peer/hooks/register.test.ts +32 -0
- package/core/plugins/kenaz-peer/hooks/register.ts +9 -0
- package/package.json +6 -6
- package/core/.claude/commands/archive.md +0 -24
- package/core/.claude/commands/init.md +0 -112
- package/core/.claude/commands/legacy_dev.md +0 -18
- package/core/.claude/commands/product-review.md +0 -131
- package/core/.claude/commands/strategy.md +0 -141
- package/core/.claude/commands/sunny.md +0 -1
- package/core/.claude/commands//347/224/242/345/223/201/346/252/242/350/246/226.md +0 -129
- package/core/.claude/commands//351/200/262/345/272/246.md +0 -15
- package/core/.claude/hooks/__tests__/substrate.test.js +0 -122
- package/core/.claude/hooks/_substrate-paths.js +0 -95
- package/core/.claude/hooks/context-check.js +0 -51
- package/core/.claude/hooks/fatigue-check.js +0 -52
- package/core/.claude/hooks/handoff-snapshot-on-commit.js +0 -154
- package/core/.claude/hooks/handoff-snapshot-on-question.js +0 -158
- package/core/.claude/hooks/handoff-staleness.js +0 -197
- package/core/.claude/hooks/jev-thalamus-context.js +0 -17
- package/core/.claude/hooks/jev-thalamus-context.test.js +0 -41
- package/core/.claude/hooks/lease-release.js +0 -119
- package/core/.claude/hooks/lease-touch.js +0 -96
- package/core/.claude/hooks/reflex-feedback.js +0 -5
- package/core/.claude/hooks/session-init.ps1 +0 -49
- package/core/.claude/hooks/sound-event.js +0 -70
- package/core/.claude/hooks/sound-event.sh +0 -37
- package/core/.claude/hooks/stream-delta.js +0 -169
- package/core/.claude/no-hooks.settings.json +0 -3
- package/core/.claude/skills/legacy_dev/SKILL.md +0 -202
- package/core/.claude/skills/sunny/SKILL.md +0 -74
- package/core/.collaboration/cli/commands/assign.js +0 -39
- package/core/.collaboration/cli/commands/claim.js +0 -33
- package/core/.collaboration/cli/commands/complete.js +0 -44
- package/core/.collaboration/cli/commands/create.js +0 -110
- package/core/.collaboration/cli/commands/get.js +0 -83
- package/core/.collaboration/cli/commands/index.js +0 -52
- package/core/.collaboration/cli/commands/list.js +0 -51
- package/core/.collaboration/cli/commands/lock.js +0 -45
- package/core/.collaboration/cli/commands/rebuild.js +0 -39
- package/core/.collaboration/cli/commands/search.js +0 -61
- package/core/.collaboration/cli/commands/stats.js +0 -61
- package/core/.collaboration/cli/commands/transfer.js +0 -41
- package/core/.collaboration/cli/commands/unlock.js +0 -48
- package/core/.collaboration/cli/formatters/help-formatter.js +0 -70
- package/core/.collaboration/cli/formatters/index.js +0 -7
- package/core/.collaboration/cli/task-cli.js +0 -46
- package/core/.collaboration/cli/utils/arg-parser.js +0 -74
- package/core/.collaboration/cli/utils/git-user.js +0 -25
- package/core/.collaboration/cli/utils/index.js +0 -9
- package/core/.collaboration/cli/utils/output.js +0 -10
- package/core/.collaboration/config/default.yaml +0 -189
- package/core/.collaboration/core/conflict-resolver.js +0 -461
- package/core/.collaboration/core/conflict-resolver.test.js +0 -389
- package/core/.collaboration/core/migrate-legacy.js +0 -260
- package/core/.collaboration/docs/API.md +0 -787
- package/core/.collaboration/docs/ARCHITECTURE.md +0 -596
- package/core/.collaboration/docs/FAQ.md +0 -695
- package/core/.collaboration/docs/MIGRATION.md +0 -804
- package/core/.collaboration/docs/examples/README.md +0 -320
- package/core/.collaboration/docs/examples/advanced-queries.js +0 -261
- package/core/.collaboration/docs/examples/basic-usage.js +0 -184
- package/core/.collaboration/docs/examples/team-workflow.js +0 -352
- package/core/.failure/agent-execution/FAIL-001-agent-no-output.yaml +0 -391
- package/core/.failure/agent-execution/FAIL-007-pm-lead-wrong-team-invocation.yaml +0 -0
- package/core/.failure/agent-execution/FAIL-010-phase0-poem-format-skipped.yaml +0 -28
- package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml +0 -59
- package/core/.failure/agent-execution/FAIL-012-grep-shortcut-during-investigation.yaml +0 -85
- package/core/.failure/architecture/FAIL-006-python-version-compatibility.yaml +0 -445
- package/core/.failure/pipeline/FAIL-003-queue-pollution.yaml +0 -335
- package/core/.failure/pipeline/README.md +0 -95
- package/core/.failure/retired/FAIL-009-skipping-synapse-pulse-before-code-change.yaml +0 -49
- package/core/.failure/tools/USAGE_GUIDE.md +0 -323
- package/core/.failure/tools/check_failures.ps1 +0 -387
- package/core/.failure/tools/log_failure.ps1 +0 -474
- package/core/.formation/.episode-input.json +0 -10
- package/core/.formation/.merge-lock +0 -1
- package/core/.formation/lead.yaml +0 -118
- package/core/.formation/legacy.bak/designer.yaml +0 -57
- package/core/.formation/legacy.bak/pm.yaml +0 -57
- package/core/.formation/legacy.bak/qa.yaml +0 -57
- package/core/.formation/legacy.bak/review.yaml +0 -62
- package/core/.formation/legacy.bak/scheduler.yaml +0 -129
- package/core/.formation/legacy.bak/sre.yaml +0 -57
- package/core/.formation/role-map.yaml +0 -274
- package/core/.formation/roles/_shared/modules/code_review.yaml +0 -98
- package/core/.formation/roles/_shared/modules/security.yaml +0 -103
- package/core/.formation/roles/_shared/modules/testing.yaml +0 -14
- package/core/.formation/roles/backend/role.yaml +0 -93
- package/core/.formation/roles/code_reviewer/role.yaml +0 -102
- package/core/.formation/roles/database_optimizer/role.yaml +0 -107
- package/core/.formation/roles/designer/role.yaml +0 -66
- package/core/.formation/roles/developer/role.yaml +0 -75
- package/core/.formation/roles/frontend/role.yaml +0 -134
- package/core/.formation/roles/incident_response/role.yaml +0 -89
- package/core/.formation/roles/qa/role.yaml +0 -89
- package/core/.formation/roles/security/role.yaml +0 -87
- package/core/.formation/roles/sre/role.yaml +0 -66
- package/core/.formation/skills/coordinator.yaml +0 -52
- package/core/.formation/solo/diagnosis.yaml +0 -78
- package/core/.formation/solo/strategy.yaml +0 -121
- package/core/.formation/tests/hello.txt +0 -2
- package/core/.formation/tools/coordinator.js +0 -350
- package/core/.formation/tools/jev-correction.js +0 -214
- package/core/.formation/tools/jev-correction.test.js +0 -178
- package/core/.formation/tools/log-reader.js +0 -232
- package/core/.formation/tools/revert-daemon-state.js +0 -162
- package/core/.formation/tools/test-drift.js +0 -148
- package/core/.formation/unit/heimdall.yaml +0 -96
- package/core/.formation/unit/plan.yaml +0 -67
- package/core/.formation/unit/think.yaml +0 -58
- package/core/.kenaz/MUNINN_SNAPSHOT9_EPISODE.json +0 -32
- package/core/.kenaz/MUNINN_SNAPSHOT9_RUNE.json +0 -23
- package/core/.kenaz/MUNINN_SNAPSHOT9_SUMMARY.md +0 -89
- package/core/.kenaz/ash_TASK_1428-20260507.json +0 -14
- package/core/.kenaz/muninn_episode_write.ps1 +0 -17
- package/core/.kenaz/muninn_snapshot11_rune_candidates.md +0 -63
- package/core/.kenaz/muninn_snapshot1_rune_candidates.md +0 -49
- package/core/.kenaz/runes_TASK_1428.json +0 -57
- package/core/.kenaz/tmp_heimdall_proposal_8d3e392.json +0 -13
- package/core/.kenaz/tmp_props.json +0 -1
- package/core/.kenaz/tmp_sounddrop_t1_prompt.txt +0 -371
- package/core/.rule/MECHANIZED.md +0 -61
- package/core/.rule/general/cortex-memory-recall.yaml +0 -446
- package/core/.rule/general/pipeline.yaml +0 -246
- package/core/.rule/general/sunny-access-control.yaml +0 -60
- package/core/.rule/general/system-invariants.yaml +0 -231
- package/core/.rule/pipeline/PPL-002-completed-task-archival.yaml +0 -528
- package/core/.rule/pipeline/auto-update.yaml +0 -282
- package/core/.rule/pipeline/task-execution.yaml +0 -365
- package/core/.specialist/Ansuz/concepts/phase_protocol.yaml +0 -65
- package/core/.specialist/Ansuz/experiments/boot_ablation_replay.js +0 -197
- package/core/.specialist/Ansuz/tools/bootstrap-anchors.js +0 -289
- package/core/.specialist/Ansuz/workflow.yaml +0 -1225
- package/core/.specialist/experiments/rg_benchmark.js +0 -523
- package/core/.specialist/experiments/rg_benchmark_results.json +0 -27
- package/core/.specialist/tools/jev-optional-context.js +0 -107
- package/core/.specialist/tools/jev-optional-context.test.js +0 -152
- package/core/.specialist/tools/memory-action-log.js +0 -839
- package/core/.specialist/tools/phase-gate.js +0 -3534
- package/core/.specialist/tools/phase-gate.test.js +0 -85
- package/core/.specialist/tools/precompute-runner.js +0 -444
- package/core/.specialist/tools/rule-engine.js +0 -621
- package/core/.specialist/tools/task-bridge-jev.test.js +0 -170
- package/core/.synapse/memory-shared.json.sync +0 -1
- package/core/.system/agent-skills/README.md +0 -724
- package/core/.system/cli-tools/README.md +0 -724
- package/core/.system/cortex/MODULES.md +0 -1046
- package/core/.system/dashboard/FRONTEND.md +0 -812
- package/core/.system/dashboard/README.md +0 -737
- package/core/.system/failure/README.md +0 -723
- package/core/.system/formation/LEGACY_SKILLS.md +0 -974
- package/core/.system/formation/POST_COMPLETE.md +0 -602
- package/core/.system/formation/README.md +0 -1094
- package/core/.system/formation/TOOLS_REFERENCE.md +0 -1145
- package/core/.system/kenaz/README.md +0 -787
- package/core/.system/memory/README.md +0 -719
- package/core/.system/pipeline/README.md +0 -712
- package/core/.system/rule/README.md +0 -794
- package/core/.system/sunny/README.md +0 -476
- package/core/.system/sunny/RULES.json +0 -89
- package/core/.system/sunny/knowledge/INDEX.md +0 -37
- package/core/.system/sunny/knowledge/agent-teams-api.md +0 -0
- package/core/.system/sunny/knowledge/ansuz-specialist.md +0 -500
- package/core/.system/sunny/knowledge/claude-cli-spawn.md +0 -177
- package/core/.system/sunny/knowledge/collaboration-api.md +0 -925
- package/core/.system/sunny/teammates/README.md +0 -107
- package/core/.system/sunny/teammates/how_to_use.yaml +0 -101
- package/core/.system/sunny/teammates/tools/headless/launcher.js +0 -318
- package/core/.system/sunny/teammates/tools/powershell/launcher.js +0 -241
- package/core/.system/sunny/teammates/tools/powershell/start.bat +0 -50
- package/core/.system/sunny/teammates/tools/utils/env.js +0 -96
- package/core/.system/sunny/teammates/tools/utils/format-output.js +0 -329
- package/core/.system/sunny/tools.json +0 -101
- package/core/dev/scripts/cleanup-queue.js +0 -184
- package/core/dev/scripts/cleanup_queue.js +0 -86
- package/core/dev/scripts/legacy/README.md +0 -39
- package/core/dev/scripts/legacy/dev_agent_scheduler.ps1.bak +0 -536
- package/core/dev/scripts/legacy/multi_agent_scheduler.ps1.bak +0 -1978
- package/core/dev/scripts/matrix/CLI_README.md +0 -214
- package/core/dev/scripts/matrix/README.md +0 -310
- package/core/dev/scripts/matrix/package-lock.json +0 -4266
- package/core/dev/scripts/matrix/package.json +0 -55
- package/core/dev/scripts/matrix/src/abbreviations.ts +0 -295
- package/core/dev/scripts/matrix/src/cli/commands/convert.ts +0 -211
- package/core/dev/scripts/matrix/src/cli/commands/create.ts +0 -95
- package/core/dev/scripts/matrix/src/cli/commands/delete.ts +0 -102
- package/core/dev/scripts/matrix/src/cli/commands/list-tags.ts.wip +0 -140
- package/core/dev/scripts/matrix/src/cli/commands/manage-tags.ts.wip +0 -173
- package/core/dev/scripts/matrix/src/cli/commands/query.ts +0 -261
- package/core/dev/scripts/matrix/src/cli/commands/read.ts +0 -77
- package/core/dev/scripts/matrix/src/cli/commands/stats.ts.wip +0 -168
- package/core/dev/scripts/matrix/src/cli/commands/tokens.ts.wip +0 -126
- package/core/dev/scripts/matrix/src/cli/commands/update.ts +0 -147
- package/core/dev/scripts/matrix/src/cli/commands/validate.ts +0 -275
- package/core/dev/scripts/matrix/src/cli/index.ts +0 -350
- package/core/dev/scripts/matrix/src/cli/utils/file-handler.ts +0 -72
- package/core/dev/scripts/matrix/src/cli/utils/logger.ts +0 -65
- package/core/dev/scripts/matrix/src/index.ts +0 -62
- package/core/dev/scripts/matrix/src/indexer/tag-indexer.ts +0 -165
- package/core/dev/scripts/matrix/src/parser.ts +0 -281
- package/core/dev/scripts/matrix/src/serializer.ts +0 -151
- package/core/dev/scripts/matrix/src/validator.ts +0 -301
- package/core/dev/scripts/matrix/tests/abbreviations.test.ts +0 -122
- package/core/dev/scripts/matrix/tests/cli.test.ts +0 -177
- package/core/dev/scripts/matrix/tests/convert.test.ts +0 -143
- package/core/dev/scripts/matrix/tests/parser.test.ts +0 -203
- package/core/dev/scripts/matrix/tests/query.test.ts +0 -85
- package/core/dev/scripts/matrix/tests/serializer.test.ts +0 -197
- package/core/dev/scripts/matrix/tests/validate.test.ts +0 -141
- package/core/dev/scripts/matrix/tests/validator.test.ts +0 -167
- package/core/dev/scripts/matrix/tsconfig.json +0 -20
- package/core/dev/scripts/matrix/types/index.d.ts +0 -111
- package/core/dev/scripts/matrix/types/index.d.ts.map +0 -1
- package/core/dev/scripts/matrix/types/index.js +0 -8
- package/core/dev/scripts/matrix/types/index.js.map +0 -1
- package/core/dev/scripts/matrix/types/index.ts +0 -124
- package/core/dev/scripts/memory-usage-report.js +0 -152
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.js +0 -579
- package/core/dev/scripts/probe/ansuz-scaffold-ablation.test.js +0 -244
- package/core/dev/scripts/probe/hook-latency-probe.js +0 -315
- package/core/dev/scripts/probe/hook-latency-probe.test.js +0 -105
- package/core/dev/scripts/probe/prediction-signal-auc.js +0 -483
- package/core/dev/scripts/probe/prediction-signal-auc.test.js +0 -200
- package/core/dev/scripts/test-pty-ws-tunnel.js +0 -229
- package/core/dev/scripts/validate_pipeline.js +0 -197
- package/core/dev/spikes/task2145-evidence-20261004/backend-log-excerpt.txt +0 -56
- package/core/dev/spikes/task2145-evidence-20261004/graph.shadow +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph.wal +0 -0
- package/core/dev/spikes/task2145-evidence-20261004/graph_corrupt_suspect.marker +0 -1
- package/core/plugins/kenaz/commands/strategy.md +0 -141
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
# [FAIL-001] Agent 執行無輸出問題
|
|
2
|
-
|
|
3
|
-
_meta:
|
|
4
|
-
id: "FAIL-001"
|
|
5
|
-
category: "agent_execution"
|
|
6
|
-
severity: "critical"
|
|
7
|
-
date: "2026-02-05"
|
|
8
|
-
related_tasks: ["TASK_078"]
|
|
9
|
-
related_commits: []
|
|
10
|
-
status: "resolved"
|
|
11
|
-
|
|
12
|
-
## 失敗描述
|
|
13
|
-
|
|
14
|
-
**現象**:Agent 被 Multi-Agent Scheduler 調用執行任務後,沒有產生任何實際輸出或結果。
|
|
15
|
-
|
|
16
|
-
**預期行為**:
|
|
17
|
-
- Agent 應該讀取任務規格
|
|
18
|
-
- 執行任務要求的代碼實現
|
|
19
|
-
- 產生可見的輸出(文件變更、代碼提交)
|
|
20
|
-
- 更新任務狀態到 completed
|
|
21
|
-
|
|
22
|
-
**實際結果**:
|
|
23
|
-
- Agent 進程啟動並執行
|
|
24
|
-
- 但未產生任何文件變更或提交
|
|
25
|
-
- 任務保持 in_progress 狀態
|
|
26
|
-
- 日誌中無明確錯誤信息,只有空輸出
|
|
27
|
-
|
|
28
|
-
## 根本原因
|
|
29
|
-
|
|
30
|
-
深入分析後,發現此問題的根本原因通常有以下幾種:
|
|
31
|
-
|
|
32
|
-
### 1. Skill 路徑錯誤或不存在
|
|
33
|
-
```yaml
|
|
34
|
-
# TASK_QUEUE.json 中的錯誤示例
|
|
35
|
-
"skill_path": ".claude/skills/nonexistent_agent/SKILL.md" # 路徑不存在
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
- Agent 無法載入正確的技能定義
|
|
39
|
-
- 導致執行邏輯缺失,無法理解任務要求
|
|
40
|
-
- 進程執行但不知道要做什麼
|
|
41
|
-
|
|
42
|
-
### 2. Agent 執行邏輯問題
|
|
43
|
-
```bash
|
|
44
|
-
# Scheduler 調用 Claude CLI 時的命令結構問題
|
|
45
|
-
claude -p "/agent-worker --task TASK_XXX --agent agent_XXX"
|
|
46
|
-
|
|
47
|
-
# 如果 /agent-worker 指令未正確定義或解析失敗:
|
|
48
|
-
- Agent 收到指令但無法解析參數
|
|
49
|
-
- 任務 ID、Agent ID、Branch 信息丟失
|
|
50
|
-
- 無法載入任務規格,導致空跑
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 3. 輸出格式問題
|
|
54
|
-
- Agent 產生了輸出,但格式不符合預期
|
|
55
|
-
- 輸出被寫入錯誤位置(如 /tmp 而非專案目錄)
|
|
56
|
-
- Git commit 失敗但未報錯
|
|
57
|
-
|
|
58
|
-
### 4. Context 不足
|
|
59
|
-
- Agent 未讀取 .memory/CONTEXT.md
|
|
60
|
-
- 缺少專案背景信息
|
|
61
|
-
- 無法理解任務在整體架構中的位置
|
|
62
|
-
|
|
63
|
-
## 影響範圍
|
|
64
|
-
|
|
65
|
-
### 受影響的模組/文件
|
|
66
|
-
- `dev/pipeline/TASK_QUEUE.json` - 任務佇列
|
|
67
|
-
- `dashboard/src-tauri/src/cmd_modules/scheduler/` - Scheduler 模組
|
|
68
|
-
- `.claude/commands/agent-worker.md` - Agent Worker 指令定義
|
|
69
|
-
- `dev/pipeline/logs/` - 執行日誌(空日誌)
|
|
70
|
-
|
|
71
|
-
### 受影響的功能
|
|
72
|
-
- Multi-Agent 並行開發系統無法正常運作
|
|
73
|
-
- 任務卡在 in_progress 狀態
|
|
74
|
-
- 路徑鎖定無法釋放(其他 Agent 被阻塞)
|
|
75
|
-
- Scheduler 無法繼續調度新任務
|
|
76
|
-
|
|
77
|
-
### 潛在的連鎖反應
|
|
78
|
-
- 整個 Pipeline 停滯
|
|
79
|
-
- 路徑鎖定洩漏(dead lock)
|
|
80
|
-
- 需要手動清理 LOCK_STATE.json
|
|
81
|
-
- 影響其他依賴此任務的 Agent
|
|
82
|
-
|
|
83
|
-
## 重現步驟
|
|
84
|
-
|
|
85
|
-
1. 建立一個任務,skill_path 指向不存在的路徑
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"id": "TASK_999",
|
|
89
|
-
"skill_path": ".claude/skills/invalid_agent/SKILL.md",
|
|
90
|
-
"status": "pending"
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
2. 啟動 Multi-Agent Scheduler
|
|
95
|
-
```bash
|
|
96
|
-
.\dev\scripts\START_MULTI_AGENT.bat
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
3. 觀察到的錯誤:
|
|
100
|
-
- Agent 進程啟動
|
|
101
|
-
- 任務狀態變為 in_progress
|
|
102
|
-
- 等待數分鐘後,無任何輸出
|
|
103
|
-
- git log main..HEAD 顯示無提交
|
|
104
|
-
- 任務仍然 in_progress
|
|
105
|
-
|
|
106
|
-
## 解決方案
|
|
107
|
-
|
|
108
|
-
### 短期修復(手動干預)
|
|
109
|
-
|
|
110
|
-
#### 步驟 1:驗證 Skill 路徑
|
|
111
|
-
```bash
|
|
112
|
-
# 檢查 TASK_QUEUE.json 中的 skill_path 是否存在
|
|
113
|
-
node -e "
|
|
114
|
-
const queue = require('./dev/pipeline/TASK_QUEUE.json');
|
|
115
|
-
const fs = require('fs');
|
|
116
|
-
queue.tasks.forEach(t => {
|
|
117
|
-
if (t.skill_path && !fs.existsSync(t.skill_path)) {
|
|
118
|
-
console.error(\`❌ TASK \${t.id}: skill_path不存在 - \${t.skill_path}\`);
|
|
119
|
-
} else if (t.skill_path) {
|
|
120
|
-
console.log(\`✅ TASK \${t.id}: skill_path有效\`);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
#### 步驟 2:檢查執行日誌
|
|
127
|
-
```bash
|
|
128
|
-
# 查看最新的 Agent 執行日誌
|
|
129
|
-
Get-ChildItem dev/pipeline/logs/*.log | Sort-Object LastWriteTime -Descending | Select-Object -First 1 | Get-Content -Tail 50
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
#### 步驟 3:清理卡住的任務
|
|
133
|
-
```javascript
|
|
134
|
-
// cleanup_stuck_tasks.js
|
|
135
|
-
const fs = require('fs');
|
|
136
|
-
const queue = JSON.parse(fs.readFileSync('dev/pipeline/TASK_QUEUE.json', 'utf8'));
|
|
137
|
-
|
|
138
|
-
// 將長時間 in_progress 的任務標記為 blocked
|
|
139
|
-
queue.tasks.forEach(t => {
|
|
140
|
-
if (t.status === 'in_progress') {
|
|
141
|
-
const startTime = new Date(t.started_at);
|
|
142
|
-
const now = new Date();
|
|
143
|
-
const hours = (now - startTime) / (1000 * 60 * 60);
|
|
144
|
-
|
|
145
|
-
if (hours > 2) { // 超過 2 小時視為卡住
|
|
146
|
-
console.log(`⚠️ Task ${t.id} stuck for ${hours.toFixed(1)} hours, marking as blocked`);
|
|
147
|
-
t.status = 'blocked';
|
|
148
|
-
t.blocked_reason = 'Agent execution timeout - no output';
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
fs.writeFileSync('dev/pipeline/TASK_QUEUE.json', JSON.stringify(queue, null, 2));
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
#### 步驟 4:釋放路徑鎖定
|
|
157
|
-
```bash
|
|
158
|
-
# 清理卡住任務的路徑鎖定
|
|
159
|
-
node -e "
|
|
160
|
-
const fs = require('fs');
|
|
161
|
-
const locks = JSON.parse(fs.readFileSync('dev/pipeline/LOCK_STATE.json', 'utf8'));
|
|
162
|
-
const queue = JSON.parse(fs.readFileSync('dev/pipeline/TASK_QUEUE.json', 'utf8'));
|
|
163
|
-
|
|
164
|
-
// 獲取所有 blocked 任務的 Agent ID
|
|
165
|
-
const blockedAgents = queue.tasks
|
|
166
|
-
.filter(t => t.status === 'blocked')
|
|
167
|
-
.map(t => t.assigned_agent);
|
|
168
|
-
|
|
169
|
-
// 清理這些 Agent 的鎖定
|
|
170
|
-
Object.keys(locks.path_locks).forEach(path => {
|
|
171
|
-
if (blockedAgents.includes(locks.path_locks[path].locked_by)) {
|
|
172
|
-
console.log(\`🔓 Releasing lock on \${path}\`);
|
|
173
|
-
delete locks.path_locks[path];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
fs.writeFileSync('dev/pipeline/LOCK_STATE.json', JSON.stringify(locks, null, 2));
|
|
178
|
-
"
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### 長期解決方案(預防機制)
|
|
182
|
-
|
|
183
|
-
#### 1. Scheduler 驗證增強
|
|
184
|
-
```rust
|
|
185
|
-
// dashboard/src-tauri/src/cmd_modules/scheduler/dispatcher.rs
|
|
186
|
-
async fn assign_task_to_agent(&mut self, task: &Task) -> Result<(), SchedulerError> {
|
|
187
|
-
// ✅ 新增:驗證 skill_path 存在性
|
|
188
|
-
if let Some(skill_path) = &task.skill_path {
|
|
189
|
-
if !std::path::Path::new(skill_path).exists() {
|
|
190
|
-
return Err(SchedulerError::InvalidSkillPath {
|
|
191
|
-
task_id: task.id.clone(),
|
|
192
|
-
path: skill_path.clone(),
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// 原有邏輯...
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
#### 2. Agent 輸出驗證
|
|
202
|
-
```rust
|
|
203
|
-
// 執行 Agent 後驗證輸出
|
|
204
|
-
async fn monitor_agent_execution(&self, agent_id: &str, task_id: &str) -> Result<(), SchedulerError> {
|
|
205
|
-
// 等待執行完成
|
|
206
|
-
let result = self.wait_for_agent(agent_id).await?;
|
|
207
|
-
|
|
208
|
-
// ✅ 新增:驗證是否有 Git commit
|
|
209
|
-
let has_commits = Command::new("git")
|
|
210
|
-
.args(&["log", "main..HEAD", "--oneline"])
|
|
211
|
-
.output()
|
|
212
|
-
.await?
|
|
213
|
-
.stdout
|
|
214
|
-
.len() > 0;
|
|
215
|
-
|
|
216
|
-
if !has_commits && result.exit_code == 0 {
|
|
217
|
-
return Err(SchedulerError::AgentNoOutput {
|
|
218
|
-
agent_id: agent_id.to_string(),
|
|
219
|
-
task_id: task_id.to_string(),
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
Ok(())
|
|
224
|
-
}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
#### 3. 超時機制
|
|
228
|
-
```rust
|
|
229
|
-
// 為每個 Agent 設置執行超時
|
|
230
|
-
use tokio::time::{timeout, Duration};
|
|
231
|
-
|
|
232
|
-
let execution_timeout = Duration::from_secs(60 * 60); // 1 小時
|
|
233
|
-
|
|
234
|
-
match timeout(execution_timeout, self.execute_agent(agent_id, task_id)).await {
|
|
235
|
-
Ok(Ok(_)) => {
|
|
236
|
-
// 執行成功
|
|
237
|
-
}
|
|
238
|
-
Ok(Err(e)) => {
|
|
239
|
-
// 執行失敗
|
|
240
|
-
error!("Agent execution failed: {}", e);
|
|
241
|
-
}
|
|
242
|
-
Err(_) => {
|
|
243
|
-
// 超時
|
|
244
|
-
error!("Agent execution timeout for task {}", task_id);
|
|
245
|
-
self.mark_task_blocked(task_id, "Execution timeout").await?;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
## 預防措施
|
|
251
|
-
|
|
252
|
-
### 檢查清單
|
|
253
|
-
|
|
254
|
-
在任務分配前(Scheduler 層面):
|
|
255
|
-
- [ ] 驗證 task.skill_path 文件存在
|
|
256
|
-
- [ ] 驗證 task.scope_paths 目錄存在且可訪問
|
|
257
|
-
- [ ] 驗證 Git branch 已建立且可切換
|
|
258
|
-
- [ ] 驗證路徑鎖定可以成功獲取
|
|
259
|
-
|
|
260
|
-
在 Agent 執行前(Agent 層面):
|
|
261
|
-
- [ ] 確認已讀取 .memory/CONTEXT.md
|
|
262
|
-
- [ ] 確認任務 ID、Agent ID、Branch 參數正確解析
|
|
263
|
-
- [ ] 確認 Skill 文件已載入並解析成功
|
|
264
|
-
- [ ] 確認目前在正確的 Git branch
|
|
265
|
-
|
|
266
|
-
在 Agent 執行後(驗證層面):
|
|
267
|
-
- [ ] 檢查 git log main..HEAD 有無新 commit
|
|
268
|
-
- [ ] 檢查 scope_paths 內有無文件變更
|
|
269
|
-
- [ ] 檢查執行日誌有無錯誤信息
|
|
270
|
-
- [ ] 驗證任務狀態已更新為 completed
|
|
271
|
-
|
|
272
|
-
### 規則建議
|
|
273
|
-
|
|
274
|
-
建議建立以下 .rule/ 規則:
|
|
275
|
-
|
|
276
|
-
#### AGT-005: Agent 輸出驗證規則
|
|
277
|
-
```yaml
|
|
278
|
-
# .rule/general/agent-execution.yaml (新增規則)
|
|
279
|
-
|
|
280
|
-
AGT-005:
|
|
281
|
-
title: "Agent 必須產生可驗證的輸出"
|
|
282
|
-
priority: "critical"
|
|
283
|
-
|
|
284
|
-
requirements:
|
|
285
|
-
- "每個 Agent 執行必須產生至少一個 Git commit"
|
|
286
|
-
- "Commit message 必須包含 Task ID"
|
|
287
|
-
- "修改的文件必須在 scope_paths 範圍內"
|
|
288
|
-
|
|
289
|
-
validation:
|
|
290
|
-
pre_execution:
|
|
291
|
-
- "驗證 skill_path 存在"
|
|
292
|
-
- "驗證 scope_paths 可訪問"
|
|
293
|
-
- "驗證 Git branch 正確"
|
|
294
|
-
|
|
295
|
-
post_execution:
|
|
296
|
-
- "git log main..HEAD --oneline | wc -l > 0"
|
|
297
|
-
- "git diff main --name-only 在 scope_paths 內"
|
|
298
|
-
|
|
299
|
-
failure_handling:
|
|
300
|
-
- "如無 commit,標記任務為 blocked"
|
|
301
|
-
- "記錄失敗原因到 dev/pipeline/logs/"
|
|
302
|
-
- "釋放路徑鎖定"
|
|
303
|
-
- "通知 Scheduler 重新調度"
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
#### PPL-003: Scheduler 驗證規則
|
|
307
|
-
```yaml
|
|
308
|
-
# .rule/pipeline/scheduler-validation.yaml (新增規則)
|
|
309
|
-
|
|
310
|
-
PPL-003:
|
|
311
|
-
title: "Scheduler 必須驗證任務有效性"
|
|
312
|
-
priority: "high"
|
|
313
|
-
|
|
314
|
-
validation_steps:
|
|
315
|
-
before_assignment:
|
|
316
|
-
- "檢查 skill_path 存在性"
|
|
317
|
-
- "檢查 scope_paths 有效性"
|
|
318
|
-
- "檢查依賴任務已完成"
|
|
319
|
-
- "檢查路徑鎖定可獲取"
|
|
320
|
-
|
|
321
|
-
during_execution:
|
|
322
|
-
- "每 5 分鐘檢查 Agent 心跳"
|
|
323
|
-
- "監控輸出日誌大小"
|
|
324
|
-
- "超時後自動中止進程"
|
|
325
|
-
|
|
326
|
-
after_execution:
|
|
327
|
-
- "驗證有 Git commit"
|
|
328
|
-
- "驗證任務狀態已更新"
|
|
329
|
-
- "釋放資源和鎖定"
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
## 教訓與啟示
|
|
333
|
-
|
|
334
|
-
### 關鍵教訓
|
|
335
|
-
|
|
336
|
-
1. **驗證優於信任**
|
|
337
|
-
- 不能假設 TASK_QUEUE.json 中的數據都是正確的
|
|
338
|
-
- 必須在執行前驗證所有路徑和文件存在性
|
|
339
|
-
- 特別是 skill_path,這是 Agent 行為的核心依賴
|
|
340
|
-
|
|
341
|
-
2. **可觀測性至關重要**
|
|
342
|
-
- 空輸出比錯誤輸出更難診斷
|
|
343
|
-
- 必須有心跳機制和進度報告
|
|
344
|
-
- 日誌需要結構化,便於快速定位問題
|
|
345
|
-
|
|
346
|
-
3. **超時是必要的防護**
|
|
347
|
-
- Agent 可能因各種原因卡住
|
|
348
|
-
- 必須有超時機制自動中止
|
|
349
|
-
- 超時後必須清理資源(路徑鎖定、Git branch)
|
|
350
|
-
|
|
351
|
-
4. **失敗恢復機制**
|
|
352
|
-
- 不能讓一個 Agent 失敗影響整個 Pipeline
|
|
353
|
-
- 必須有自動清理和恢復機制
|
|
354
|
-
- blocked 任務應該可以手動或自動重試
|
|
355
|
-
|
|
356
|
-
### 如何避免類似問題
|
|
357
|
-
|
|
358
|
-
1. **在 Scheduler 層面**
|
|
359
|
-
- 實作完整的預執行驗證(見 PPL-003 規則)
|
|
360
|
-
- 加入執行監控和超時機制
|
|
361
|
-
- 提供清理工具和恢復命令
|
|
362
|
-
|
|
363
|
-
2. **在 Agent 層面**
|
|
364
|
-
- 強制要求載入 CONTEXT.md(見 .rule/general/agent-workflow.yaml)
|
|
365
|
-
- 執行完必須產生可驗證的輸出(見 AGT-005 規則)
|
|
366
|
-
- 失敗時必須明確報告原因
|
|
367
|
-
|
|
368
|
-
3. **在測試層面**
|
|
369
|
-
- 建立 Scheduler 集成測試
|
|
370
|
-
- 模擬各種失敗場景(skill_path 不存在、超時、空輸出)
|
|
371
|
-
- 驗證恢復機制正確運作
|
|
372
|
-
|
|
373
|
-
4. **在文檔層面**
|
|
374
|
-
- 更新 .claude/commands/agent-worker.md 說明輸出要求
|
|
375
|
-
- 在 .failure/INDEX.yaml 記錄此失敗模式
|
|
376
|
-
- 提供故障排查指南
|
|
377
|
-
|
|
378
|
-
### 與現有系統整合
|
|
379
|
-
|
|
380
|
-
此失敗記錄已整合到以下系統:
|
|
381
|
-
|
|
382
|
-
- **規則系統**:建議建立 AGT-005 和 PPL-003 規則
|
|
383
|
-
- **記憶系統**:已記錄到全局 MEMORY.md(JSON 編輯最佳實踐可參考)
|
|
384
|
-
- **Pipeline 系統**:Scheduler 應該實作此驗證邏輯
|
|
385
|
-
- **失敗系統**:此記錄成為 Agent 執行前必讀的檢查清單
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
**最後更新**: 2026-02-05
|
|
390
|
-
**貢獻者**: Developer Agent (TASK_078)
|
|
391
|
-
**狀態**: Resolved - 已提出規則建議和預防機制
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
id: "FAIL-010"
|
|
2
|
-
category: "agent_execution"
|
|
3
|
-
severity: "medium"
|
|
4
|
-
date: "2026-03-21"
|
|
5
|
-
title: "Phase 0 記憶之烏鴉歸巢段落持續缺失"
|
|
6
|
-
related_tasks: []
|
|
7
|
-
|
|
8
|
-
## 失敗描述
|
|
9
|
-
Phase 0 初始化輸出缺少「🪶 記憶之烏鴉歸巢」段落(header + 分隔線 + episode 白話摘要列表)。
|
|
10
|
-
Agent 只輸出裸詩句,每次都只部分完成 cli_format。
|
|
11
|
-
用戶反映「幾乎沒有完整正常進行過」。
|
|
12
|
-
|
|
13
|
-
## 根本原因
|
|
14
|
-
phase-gate.js Phase 0 enter response 只注入 `poem_stanza`(裸詩句),
|
|
15
|
-
`cli_format`(完整輸出模板含 🪶 header、分隔線、episode 列表格式)從未注入。
|
|
16
|
-
Agent 看到 `poem_stanza` 就只輸出詩句,沒有模板可以參考。
|
|
17
|
-
|
|
18
|
-
次要原因:`extractBlockScalar` regex 在空行處截斷,導致即使加入 `poem_cli_format`
|
|
19
|
-
也只拿到 cli_format 的前半段(統計表部分),烏鴉段落被截掉。
|
|
20
|
-
|
|
21
|
-
## 修復
|
|
22
|
-
1. phase-gate.js 加入 `poem_cli_format` 欄位到 Phase 0 enter response
|
|
23
|
-
2. 修復 `extractBlockScalar` 以支援 YAML block scalar 內的空行(改用逐行掃描取代 regex)
|
|
24
|
-
|
|
25
|
-
## 預防措施
|
|
26
|
-
- phase-gate.js Phase 0 enter 現在同時提供 `poem_stanza` 和 `poem_cli_format`
|
|
27
|
-
- Agent 應以 `poem_cli_format` 為模板,填入實際數據後輸出
|
|
28
|
-
- `poem_cli_format` 包含 🪶 section:若有 episodes → 顯示完整段落;無 episodes → 省略
|
package/core/.failure/agent-execution/FAIL-010-skipping-cognitive-checkpoint-after-verification.yaml
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
id: FAIL-010
|
|
2
|
-
title: "Ansuz 跳過 Phase 9 cognitive checkpoint — 多任務並行時遺忘認知融合"
|
|
3
|
-
category: agent_execution
|
|
4
|
-
severity: high
|
|
5
|
-
|
|
6
|
-
description: |
|
|
7
|
-
Ansuz 在 Phase 9 驗證通過後直接 complete + post-complete,
|
|
8
|
-
跳過 cognitive_checkpoint(rune/sigil 評估)。
|
|
9
|
-
三個任務全部未寫入任何 rune 或 sigil,直到用戶指出才補做。
|
|
10
|
-
|
|
11
|
-
incident:
|
|
12
|
-
date: "2026-03-18"
|
|
13
|
-
project: "kenaz-web"
|
|
14
|
-
context: "TASK_10/11/12 — ControlPlane scroll lock、EngineRoom expo-slider、Step3 mock web 滾動"
|
|
15
|
-
what_happened: |
|
|
16
|
-
Ansuz 並行 dispatch 三個任務,每個完成後只做了:
|
|
17
|
-
驗證 acceptance criteria → complete → post-complete → 回報
|
|
18
|
-
完全跳過 cognitive_checkpoint。
|
|
19
|
-
三個任務共解決了 5 個 non-obvious pattern/decision,產出為 0 rune、0 sigil。
|
|
20
|
-
what_was_missed: |
|
|
21
|
-
應記錄的知識:
|
|
22
|
-
- Unified scroll lock pattern (IntersectionObserver + body.position=fixed + wheel/touch)
|
|
23
|
-
- Interactive embedded content event routing (data-attribute + closest() delegation)
|
|
24
|
-
- Terminal auto-scroll pattern (scrollRef + useEffect on content changes)
|
|
25
|
-
- Expo-slider 3D parameters (perspective:1200, rotateY:±35°, translateZ:-250 per offset)
|
|
26
|
-
- Focus-captures-scroll UX decision (boundary-based → full capture, user-driven pivot)
|
|
27
|
-
|
|
28
|
-
root_cause: |
|
|
29
|
-
兩個因素疊加:
|
|
30
|
-
1. 多任務並行時注意力分散 — 急著驗證下一個完成的任務,把 checkpoint 當可選步驟跳過
|
|
31
|
-
2. 對 rune 價值的誤判 — 只在「遇到 bug 或風險」時才想到 inscribe,
|
|
32
|
-
忽略了 pattern 和 decision 級的知識才是最高價值的認知資產
|
|
33
|
-
|
|
34
|
-
深層原因:Ansuz 把 cognitive_checkpoint 理解為「有空就做」的軟性建議,
|
|
35
|
-
而非 workflow.yaml 明確定義的 hard gate。
|
|
36
|
-
|
|
37
|
-
prevention:
|
|
38
|
-
rule: "Phase 9 cognitive_checkpoint 是 hard gate,與 acceptance criteria 驗證同級"
|
|
39
|
-
mental_model: |
|
|
40
|
-
錯誤模型:「驗證通過 → 完成 → 下一個」
|
|
41
|
-
正確模型:「驗證通過 → 認知評估 → inscribe/skip(顯式決定)→ 完成」
|
|
42
|
-
|
|
43
|
-
cognitive_checkpoint 不是額外工作 — 是 Phase 9 的一部分。
|
|
44
|
-
跳過它等同於跳過 acceptance criteria 驗證。
|
|
45
|
-
checklist:
|
|
46
|
-
- "Phase 9 驗證通過後,必須問:這次有 pattern/decision/fix/risk 值得記錄嗎?"
|
|
47
|
-
- "多任務並行不是跳過的理由 — 每個任務獨立 checkpoint"
|
|
48
|
-
- "設計決策和互動模式是 HIGH-VALUE rune 目標,不只是 bug fix"
|
|
49
|
-
- "3+ symbols 涉及的跨切面模式 → 必須評估是否 forge Sigil"
|
|
50
|
-
- "顯式 skip:如果真的沒什麼可寫,在回報中寫「cognitive checkpoint: no rune needed」"
|
|
51
|
-
|
|
52
|
-
prevention_primary: "workflow.yaml phase_9 已有 cognitive_checkpoint.rule — 問題不是規則缺失而是執行遺忘"
|
|
53
|
-
prevention_secondary: "Phase 11 回報格式應包含 🧠 認知層更新區塊(即使是空的),強迫 Ansuz 意識到這個步驟"
|
|
54
|
-
prevention_tertiary: "多任務並行時,每個 Phase 9 開始前 re-read workflow.yaml post-dispatch 區塊(memory_refresh 機制)"
|
|
55
|
-
|
|
56
|
-
related:
|
|
57
|
-
- "FAIL-009: 跳過 pulse — 同類問題的上游版本(寫前不查 vs 寫後不記)"
|
|
58
|
-
- "SYN-008~011: 認知融合規則"
|
|
59
|
-
- ".rule/general/synapse-cognitive-fusion.yaml"
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
id: FAIL-012
|
|
2
|
-
title: "Agent 在調查/診斷模式下跳過 Synapse 直接用 Grep"
|
|
3
|
-
category: agent_execution
|
|
4
|
-
severity: high
|
|
5
|
-
|
|
6
|
-
description: |
|
|
7
|
-
Agent 收到 Bug 報告(截圖/錯誤訊息)後,直接用 Grep 搜精確字串,
|
|
8
|
-
繞過 Synapse 的語義搜尋和 pulse 分析。
|
|
9
|
-
理由通常是「我知道要搜什麼字串」「這是精確搜尋,Grep 更適合」。
|
|
10
|
-
但調查需要的是理解拓撲和關係,不只是找到字串。
|
|
11
|
-
|
|
12
|
-
incident:
|
|
13
|
-
date: "2026-03-26"
|
|
14
|
-
context: "用戶報告 HTTP Server health check 間歇性 timeout,附截圖"
|
|
15
|
-
what_happened: |
|
|
16
|
-
Ansuz 看到截圖後:
|
|
17
|
-
1. 用 synapse_search 找到 checkHealth 和 health_check(正確)
|
|
18
|
-
2. 但隨即切換到 Grep 搜 "signal timed out" 和 "spawn_blocking"(錯誤)
|
|
19
|
-
3. 被用戶糾正後才補做 synapse_pulse
|
|
20
|
-
第 2 步的思維捷徑:「我已經知道要找什麼了,Grep 更快」
|
|
21
|
-
what_was_missed: |
|
|
22
|
-
如果先跑 pulse:
|
|
23
|
-
- checkHealth 的 48 個 impacted symbol 和 43 個 community crossings 會立即可見
|
|
24
|
-
- 會發現 health_check 有 2 個同名 symbol 需要消歧
|
|
25
|
-
- 會看到 Real-Time Agent Coordination Bus sigil 的 known_risk 關聯
|
|
26
|
-
- 語義搜尋能找到 tokio runtime 相關的架構模式(connection pool、blocking patterns)
|
|
27
|
-
Grep 只能找到你已經猜到的字串 — Synapse 能找到你不知道要找的東西。
|
|
28
|
-
|
|
29
|
-
root_cause: |
|
|
30
|
-
FAIL-009 的心理模型修正只覆蓋了「修改代碼前」,
|
|
31
|
-
但「調查/診斷」是另一個高頻場景,沒有被規則明確覆蓋。
|
|
32
|
-
|
|
33
|
-
Agent 的認知分裂:
|
|
34
|
-
- 修改模式 → 知道要 pulse(FAIL-009 訓練過)
|
|
35
|
-
- 調查模式 → 覺得「不改代碼,查就好」→ 退化為 Grep
|
|
36
|
-
|
|
37
|
-
根因:Synapse-first 規則的措辭聚焦在「修改前」,
|
|
38
|
-
沒有明確說「調查時也必須 Synapse-first」。
|
|
39
|
-
Agent 把 Synapse 歸類為「寫代碼的前置步驟」而非「所有代碼認知的入口」。
|
|
40
|
-
|
|
41
|
-
prevention:
|
|
42
|
-
rule: |
|
|
43
|
-
SYN-001 擴展:Synapse 是所有代碼認知的入口,不只是修改前。
|
|
44
|
-
三個場景都必須 Synapse-first:
|
|
45
|
-
1. 修改代碼前 → pulse(已有規則)
|
|
46
|
-
2. 調查/診斷 → synapse_search + pulse 目標 symbol(本次新增)
|
|
47
|
-
3. 回答「怎麼運作」→ synapse_search(已有規則)
|
|
48
|
-
mental_model: |
|
|
49
|
-
Grep 回答「這個字串在哪裡?」
|
|
50
|
-
Synapse 回答「這個概念的拓撲長什麼樣?」
|
|
51
|
-
調查 Bug 需要的是拓撲理解,不是字串定位。
|
|
52
|
-
|
|
53
|
-
診斷三步驟(強制順序):
|
|
54
|
-
Step 1: synapse_search(語義找相關 symbol)
|
|
55
|
-
Step 2: synapse_pulse(目標 symbol 的爆炸半徑 + 已知風險)
|
|
56
|
-
Step 3: 需要時才 Grep(精確字串匹配作為補充)
|
|
57
|
-
|
|
58
|
-
觸發信號:如果你發現自己在想「我知道要搜什麼字串」—
|
|
59
|
-
這正是你需要 Synapse 的時候,因為你只知道你知道的,
|
|
60
|
-
不知道你不知道的。
|
|
61
|
-
trigger: |
|
|
62
|
-
任何以下情境都必須走「診斷三步驟」:
|
|
63
|
-
- 用戶報告 Bug(截圖、錯誤訊息、異常行為)
|
|
64
|
-
- 調查間歇性問題
|
|
65
|
-
- 理解一段不熟悉的代碼
|
|
66
|
-
- 追蹤 error propagation path
|
|
67
|
-
|
|
68
|
-
checklist:
|
|
69
|
-
- "收到 Bug 報告後,是否先用 synapse_search 語義搜尋?"
|
|
70
|
-
- "是否對目標 symbol 執行了 synapse_pulse?"
|
|
71
|
-
- "Grep 是否只用於補充 Synapse 結果(而非替代)?"
|
|
72
|
-
- "如果跳過 Synapse,理由是什麼?「已知字串」不是合理理由"
|
|
73
|
-
|
|
74
|
-
related:
|
|
75
|
-
rules:
|
|
76
|
-
- ".rule/general/synapse-code-intelligence.yaml (SYN-001~007)"
|
|
77
|
-
failures:
|
|
78
|
-
- "FAIL-009: 跳過 pulse 直接修改代碼(修改場景)"
|
|
79
|
-
- "FAIL-011: CGDD 選擇性執行(只 pulse 重要的 symbol)"
|
|
80
|
-
pattern: |
|
|
81
|
-
FAIL-009 + FAIL-011 + FAIL-012 構成三連擊:
|
|
82
|
-
- FAIL-009: 修改時跳過 pulse(「太簡單」)
|
|
83
|
-
- FAIL-011: 修改時選擇性 pulse(「只 pulse 重要的」)
|
|
84
|
-
- FAIL-012: 調查時完全跳過 Synapse(「不改代碼不需要」)
|
|
85
|
-
共同根因:把 Synapse 視為「風險工具」而非「認知入口」
|