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
package/core/.system/README.md
CHANGED
|
@@ -1,555 +1,14 @@
|
|
|
1
|
-
# .system -
|
|
1
|
+
# .system - subsystem docs
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> **建立日期**: 2026-02-13 | **更新**: 2026-02-19
|
|
5
|
-
> **文檔版本**: v3.1
|
|
3
|
+
Reference docs for the subsystems that are still live. Rules in `.rule/INDEX.yaml`, failure patterns in `.failure/INDEX.yaml`, commands in `.claude/commands/` and skills in `.claude/skills/` are self-describing; read them directly.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
| Doc | Subsystem |
|
|
6
|
+
|---|---|
|
|
7
|
+
| [collaboration/README.md](./collaboration/README.md) | Task system: `.kenaz/tasks/{status}/` YAML cards, `.collaboration/core/task-api.js` |
|
|
8
|
+
| [specialist/README.md](./specialist/README.md) | Specialist system (`.specialist/`: Ansuz, Amelia) |
|
|
9
|
+
| [assessment/README.md](./assessment/README.md) | Feature assessment reports (`.assessment/`) |
|
|
10
|
+
| [githooks/README.md](./githooks/README.md) | Git hooks (`.githooks/`) |
|
|
11
|
+
| [external-skills/README.md](./external-skills/README.md) | External skills (`.agents/skills/`) |
|
|
12
|
+
| [archive/README.md](./archive/README.md) | Long-term archive (`.archive/`) |
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Kenaz AI 採用**模組化系統架構**,各子系統獨立運作且相互協作:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
┌──────────────────────────────────────────────────────────────┐
|
|
15
|
-
│ Kenaz AI 系統 │
|
|
16
|
-
│ │
|
|
17
|
-
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
|
18
|
-
│ │ 規則系統 │ │ Agent系統 │ │ 記憶系統 │ │
|
|
19
|
-
│ │ .rule/ │ │ .claude/ │ │ .memory/ │ │
|
|
20
|
-
│ └────────────┘ └────────────┘ └────────────┘ │
|
|
21
|
-
│ │
|
|
22
|
-
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
|
23
|
-
│ │ 任務系統 │ │ Formation │ │ 失敗學習 │ │
|
|
24
|
-
│ │.collaboration/│ .formation/│ │ .failure/ │ │
|
|
25
|
-
│ └────────────┘ └────────────┘ └────────────┘ │
|
|
26
|
-
│ │
|
|
27
|
-
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
|
28
|
-
│ │ Dashboard │ │ CLI Tools │ │ Git Hooks │ │
|
|
29
|
-
│ │ dashboard/ │ │dev/scripts/│ │ .githooks/ │ │
|
|
30
|
-
│ └────────────┘ └────────────┘ └────────────┘ │
|
|
31
|
-
└──────────────────────────────────────────────────────────────┘
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 🗂️ 子系統快速導航
|
|
37
|
-
|
|
38
|
-
| 子系統 | 路徑 | 說明 | 狀態 |
|
|
39
|
-
|--------|------|------|------|
|
|
40
|
-
| [規則系統](#rule---規則系統) | `.rule/` | 最高優先級規則庫 | ✅ Active |
|
|
41
|
-
| [Agent 系統](#agent-skills--commands---agent-定義與指令系統) | `.claude/` | Agent 定義與斜線指令 | ✅ Active |
|
|
42
|
-
| [Sunny 系統](#sunny---內部系統開發-agent) | `.system/sunny/` | 內部系統開發特權 Agent | ✅ Active |
|
|
43
|
-
| [失敗學習](#failure---失敗學習系統) | `.failure/` | 失敗經驗記錄與預防 | ✅ Active |
|
|
44
|
-
| [記憶系統](#memory---記憶系統) | `.memory/` | 智能記憶與知識管理 | ✅ Active |
|
|
45
|
-
| [Kenaz 主記憶](#kenaz---主記憶與文檔工具) | `.kenaz/` | 跨專案共享知識庫 | ✅ Active |
|
|
46
|
-
| [Collaboration](#collaboration---新任務系統) | `.collaboration/` | 第二代任務管理系統 | ✅ Active (v3.x) |
|
|
47
|
-
| [Pipeline](#pipeline---舊任務系統-legacy) | `dev/pipeline/` | 第一代任務系統 | ⚠️ Legacy |
|
|
48
|
-
| [Formation](#formation---多陣型調度系統) | `.formation/` | 多陣型 Agent 調度 | ✅ Active |
|
|
49
|
-
| [Dashboard](#dashboard---tauri-後端架構) | `dashboard/src-tauri/` | 桌面應用後端 | ✅ Active |
|
|
50
|
-
| [CLI Tools](#cli-tools---開發工具集) | `dev/scripts/` | 開發與維護腳本 | ✅ Active |
|
|
51
|
-
| [Git Hooks](#git-hooks---自動化系統) | `.githooks/` | Git 生命週期自動化 | ✅ Active |
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Rule - 規則系統
|
|
56
|
-
|
|
57
|
-
`.rule/` 是專案的**最高優先級規則庫**,定義所有 AI Agent 和人類開發者必須遵守的核心約束與標準。
|
|
58
|
-
|
|
59
|
-
### 規則優先級
|
|
60
|
-
|
|
61
|
-
當規則發生衝突時,按以下優先級順序執行:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
1. .rule/* ← 最高優先級(所有人必須遵守)
|
|
65
|
-
2. CLAUDE.md ← 專案級指令與工作流程
|
|
66
|
-
3. .claude/skills/ ← Agent 行為定義
|
|
67
|
-
4. .agents/skills/ ← 外部安裝的最佳實踐
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 目錄結構
|
|
71
|
-
|
|
72
|
-
| 分類 | 說明 |
|
|
73
|
-
|------|------|
|
|
74
|
-
| `general/` | 通用規則(所有 Agent 適用) |
|
|
75
|
-
| `pipeline/` | Pipeline 專用規則(任務執行、封存、自動更新) |
|
|
76
|
-
| `code/` | 代碼規範(命名、結構、複用性、可維護性) |
|
|
77
|
-
| `design/` | 設計規範(UI、UX、色彩系統) |
|
|
78
|
-
| `architecture/` | 架構決策記錄(未來擴展) |
|
|
79
|
-
| `business/` | 業務邏輯約束(未來擴展) |
|
|
80
|
-
|
|
81
|
-
### 嚴重程度
|
|
82
|
-
|
|
83
|
-
| 級別 | 說明 | 圖標 |
|
|
84
|
-
|------|------|------|
|
|
85
|
-
| **MUST** | 必須遵守,違反將導致拒絕合併 | 🔴 |
|
|
86
|
-
| **SHOULD** | 應該遵守,除非有合理理由 | 🟡 |
|
|
87
|
-
| **MAY** | 建議遵守,可依情況調整 | 🟢 |
|
|
88
|
-
|
|
89
|
-
### 重要規則速查
|
|
90
|
-
|
|
91
|
-
| 規則 ID | 標題 | 嚴重程度 | 說明 |
|
|
92
|
-
|---------|------|---------|------|
|
|
93
|
-
| **GEN-007** | 專案自包含原則 | 🔴 | 所有操作必須在專案目錄內 |
|
|
94
|
-
| **AGT-001** | 記憶點優先 | 🔴 | 任務開始前檢查 .memory/ |
|
|
95
|
-
| **AGT-005** | 失敗經驗查閱 | 🔴 | 失敗時必須查閱 .failure/ |
|
|
96
|
-
| **PPL-107** | 工作啟動前展示計劃 | 🔴 | 必須向用戶展示計劃並等待確認 |
|
|
97
|
-
| **PPL-111** | scope_paths 衝突檢測 | 🔴 | 並行任務不可有路徑衝突 |
|
|
98
|
-
|
|
99
|
-
### 使用方式
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
# 讀取規則索引
|
|
103
|
-
cat .rule/INDEX.yaml
|
|
104
|
-
|
|
105
|
-
# 檢查相關規則
|
|
106
|
-
cat .rule/general/agent-workflow.yaml # 所有 Agent 必讀
|
|
107
|
-
cat .rule/pipeline/task-execution.yaml # Pipeline 任務必讀
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**詳細文檔**:請參閱 [`rule/README.md`](./rule/README.md)
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Agent Skills & Commands - Agent 定義與指令系統
|
|
115
|
-
|
|
116
|
-
`.claude/` 是 Kenaz AI 專案的 **Agent 定義與指令系統**,提供完整的 AI Agent 管理框架。
|
|
117
|
-
|
|
118
|
-
### 核心組件
|
|
119
|
-
|
|
120
|
-
| 組件 | 說明 |
|
|
121
|
-
|------|------|
|
|
122
|
-
| `skills/` | Agent 角色定義(職責、能力、工作流程) |
|
|
123
|
-
| `commands/` | 斜線指令觸發機制(如 `/Ansuz`, `/產品`) |
|
|
124
|
-
| `hooks/` | Session 生命週期鉤子(自動初始化) |
|
|
125
|
-
| `settings.json` | 權限管理與配置 |
|
|
126
|
-
| `mcp.json` | MCP 整合(Cortex RAG 引擎) |
|
|
127
|
-
|
|
128
|
-
### 現有 Agent
|
|
129
|
-
|
|
130
|
-
| Agent | 指令 | 職責 |
|
|
131
|
-
|-------|------|------|
|
|
132
|
-
| Formation Lead | `/lead` | 需求分析、陣型調度、結果追蹤 |
|
|
133
|
-
| Product Manager | `/產品` | 需求分析、PRD 撰寫、任務規劃 |
|
|
134
|
-
| Designer | `/設計` | UI/UX 設計、設計規範 |
|
|
135
|
-
| Developer | - | 前端開發(React/TypeScript) |
|
|
136
|
-
| Backend Engineer | `/後端` | 後端開發(Python/FastAPI) |
|
|
137
|
-
| Sunny | `/sunny` | 內部系統開發(特權模式) |
|
|
138
|
-
|
|
139
|
-
### Lead vs Worker 模式
|
|
140
|
-
|
|
141
|
-
- **Lead Agent(溝通者)**:理解需求、調度執行、匯報結果(不直接寫代碼)
|
|
142
|
-
- **Worker Agent(執行者)**:接收明確任務、執行技術工作、返回結果
|
|
143
|
-
- **混合 Agent**:既可協調也可執行(如 Dev Agent)
|
|
144
|
-
|
|
145
|
-
### 使用方式
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
# 在 Claude Code 中輸入斜線指令觸發 Agent
|
|
149
|
-
/產品 # 啟動 Product Manager
|
|
150
|
-
/dev # 啟動 Dev Agent
|
|
151
|
-
|
|
152
|
-
# 新增 Agent
|
|
153
|
-
1. 建立 .claude/skills/<agent_name>/SKILL.md
|
|
154
|
-
2. 建立 .claude/commands/<指令名>.md
|
|
155
|
-
3. 更新 CLAUDE.md 註冊 Agent
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**詳細文檔**:請參閱 [`agent-skills/README.md`](./agent-skills/README.md)
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Sunny - 內部系統開發 Agent
|
|
163
|
-
|
|
164
|
-
Sunny 是專門處理 Kenaz AI **內部系統開發**的特權 Agent。
|
|
165
|
-
|
|
166
|
-
### 為什麼需要 Sunny?
|
|
167
|
-
|
|
168
|
-
正常開發流程(PM → Design → Dev → QA)適用於產品功能開發,但當需要修改**系統本身**(如 `.collaboration/`、`.rule/`、`.formation/`)時,流程規則會產生矛盾。Sunny 解決這個 bootstrapping 問題。
|
|
169
|
-
|
|
170
|
-
### 規則優先級
|
|
171
|
-
|
|
172
|
-
```
|
|
173
|
-
1. .rule/* ← 絕對遵守(GEN-007, SEC-*, DATA-*)
|
|
174
|
-
2. .system/sunny/* ← Sunny 專屬規則
|
|
175
|
-
3. CLAUDE.md ← 可選擇性忽略
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### 能力範圍
|
|
179
|
-
|
|
180
|
-
| 允許 | 禁止 |
|
|
181
|
-
|------|------|
|
|
182
|
-
| 直接修改系統目錄 | 違反 `.rule/` 規則 |
|
|
183
|
-
| 使用 Task 工具(跳過 TEAM-003) | 在專案目錄外輸出(GEN-007) |
|
|
184
|
-
| 跳過展示計劃、用戶確認 | 違反安全/資料完整性規則 |
|
|
185
|
-
| 不遵循標準開發流程 | |
|
|
186
|
-
|
|
187
|
-
### 子系統
|
|
188
|
-
|
|
189
|
-
| 路徑 | 說明 |
|
|
190
|
-
|------|------|
|
|
191
|
-
| `sunny/README.md` | 完整系統文檔與運作機制 |
|
|
192
|
-
| `sunny/RULES.json` | 規則定義 |
|
|
193
|
-
| `sunny/tools.json` | 工具註冊表 |
|
|
194
|
-
| `sunny/knowledge/` | Claude Code 官方功能知識庫 |
|
|
195
|
-
| `sunny/teammates/` | Agent Teams 啟動器(實驗性) |
|
|
196
|
-
|
|
197
|
-
### 使用方式
|
|
198
|
-
|
|
199
|
-
在 Claude Code 中輸入 `/sunny` 啟動,說「退出」結束。
|
|
200
|
-
|
|
201
|
-
**詳細文檔**:請參閱 [`sunny/README.md`](./sunny/README.md)
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Failure - 失敗學習系統
|
|
206
|
-
|
|
207
|
-
`.failure/` 是專案的**失敗經驗學習系統**,記錄開發過程中的失敗模式並提供預防措施。
|
|
208
|
-
|
|
209
|
-
### 核心理念
|
|
210
|
-
|
|
211
|
-
**從失敗中學習,將錯誤轉化為規則**:
|
|
212
|
-
```
|
|
213
|
-
失敗 → 記錄到 .failure/ → 分析根因 → 如重複發生(>2 次)→ 提升為 .rule/
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### 失敗分類
|
|
217
|
-
|
|
218
|
-
| 分類 | 圖標 | 說明 |
|
|
219
|
-
|------|------|------|
|
|
220
|
-
| `agent-execution/` | 🤖 | Agent 執行失敗(空跑、無輸出、錯誤邏輯) |
|
|
221
|
-
| `code-quality/` | 💻 | 代碼品質問題(bug、性能、可讀性) |
|
|
222
|
-
| `architecture/` | 🏗️ | 架構決策失敗(設計缺陷、技術選型錯誤) |
|
|
223
|
-
| `pipeline/` | ⚙️ | Pipeline 系統失敗(任務管理、佇列污染) |
|
|
224
|
-
| `data-integrity/` | 📊 | 數據完整性問題(JSON 損壞、編碼錯誤) |
|
|
225
|
-
|
|
226
|
-
### 核心規則
|
|
227
|
-
|
|
228
|
-
**AGT-005**:失敗時必須查閱失敗經驗(定義於 `.rule/general/agent-workflow.yaml`)
|
|
229
|
-
|
|
230
|
-
### 可用工具
|
|
231
|
-
|
|
232
|
-
| 工具 | 用途 |
|
|
233
|
-
|------|------|
|
|
234
|
-
| `check_failures.ps1` | 任務開始前檢查相關失敗模式 |
|
|
235
|
-
| `log_failure.ps1` | 任務失敗後記錄失敗經驗 |
|
|
236
|
-
| `validate_json.js` | 驗證 JSON 文件完整性 |
|
|
237
|
-
| `fix_json.js` | 一鍵修復 JSON(移除 BOM + 驗證 + 格式化) |
|
|
238
|
-
|
|
239
|
-
### 使用方式
|
|
240
|
-
|
|
241
|
-
```powershell
|
|
242
|
-
# 任務開始前:檢查失敗模式
|
|
243
|
-
.\.failure\tools\check_failures.ps1 -TaskID "TASK_XXX"
|
|
244
|
-
|
|
245
|
-
# 任務執行中:驗證 JSON
|
|
246
|
-
node .failure/tools/fix_json.js dev/pipeline/TASK_QUEUE.json
|
|
247
|
-
|
|
248
|
-
# 任務失敗後:記錄經驗
|
|
249
|
-
.\.failure\tools\log_failure.ps1 -Interactive
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**詳細文檔**:請參閱 [`failure/README.md`](./failure/README.md)
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Memory - 記憶系統
|
|
257
|
-
|
|
258
|
-
`.memory/` 是 Kenaz AI 的**智能記憶系統**,模擬人腦記憶機制,提供持久化知識儲存與檢索。
|
|
259
|
-
|
|
260
|
-
### 核心理念
|
|
261
|
-
|
|
262
|
-
**自動化記憶、語義檢索、雙層架構**:
|
|
263
|
-
```
|
|
264
|
-
Agent 工作流程
|
|
265
|
-
↓
|
|
266
|
-
1. 任務開始前 → 查詢相關記憶(避免重複踩坑)
|
|
267
|
-
2. 任務執行中 → 實時存取知識(模式、解決方案)
|
|
268
|
-
3. 任務完成後 → 自動評估是否需要記憶
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### 雙層架構
|
|
272
|
-
|
|
273
|
-
| 層級 | 位置 | 性質 | 內容 |
|
|
274
|
-
|------|------|------|------|
|
|
275
|
-
| **主記憶** | `.kenaz/main-memory/` | 唯讀、全局 | Kenaz 系統知識、通用最佳實踐 |
|
|
276
|
-
| **專案記憶** | `.memory/` | 讀寫、專案專屬 | 決策、失敗經驗、模式、洞察 |
|
|
277
|
-
|
|
278
|
-
### 記憶類型
|
|
279
|
-
|
|
280
|
-
| 類型 | 說明 |
|
|
281
|
-
|------|------|
|
|
282
|
-
| **decision** | 決策記錄(架構選型、技術決策) |
|
|
283
|
-
| **failure** | 失敗經驗(Bug、錯誤、踩坑) |
|
|
284
|
-
| **pattern** | 可複用模式(程式碼片段、流程範本) |
|
|
285
|
-
| **insight** | 洞察理解(對系統的新認識) |
|
|
286
|
-
| **context** | 狀態快照(專案當前進度) |
|
|
287
|
-
| **reference** | 外部資源(文檔連結、API 參考) |
|
|
288
|
-
|
|
289
|
-
### 使用方式
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
# 搜尋相關記憶
|
|
293
|
-
node .memory/tools/memory-tools.js search "團隊調用"
|
|
294
|
-
|
|
295
|
-
# 新增記憶
|
|
296
|
-
node .memory/tools/memory-tools.js add \
|
|
297
|
-
--type decision \
|
|
298
|
-
--title "選擇 React 框架" \
|
|
299
|
-
--summary "因為生態系成熟、團隊熟悉度高"
|
|
300
|
-
|
|
301
|
-
# 列出所有記憶
|
|
302
|
-
node .memory/tools/memory-tools.js list
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
**詳細文檔**:請參閱 [`memory/README.md`](./memory/README.md)
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
## Kenaz - 主記憶與文檔工具
|
|
310
|
-
|
|
311
|
-
`.kenaz/` 是 Kenaz AI 的**系統級核心配置目錄**,提供跨專案共享的知識庫與文檔管理工具。
|
|
312
|
-
|
|
313
|
-
### 核心組件
|
|
314
|
-
|
|
315
|
-
| 組件 | 說明 |
|
|
316
|
-
|------|------|
|
|
317
|
-
| `main-memory/` | 跨專案共享的主記憶系統(唯讀) |
|
|
318
|
-
| `docs/` | 系統文檔與索引工具 |
|
|
319
|
-
| `cortex.yaml` | Kenaz Cortex RAG 引擎配置 |
|
|
320
|
-
|
|
321
|
-
### 主記憶特性
|
|
322
|
-
|
|
323
|
-
- **跨專案共享**:所有 Kenaz 專案共用的知識庫
|
|
324
|
-
- **唯讀繼承**:專案可讀取但不可修改(由開發者維護)
|
|
325
|
-
- **優先級繼承**:專案記憶 > 主記憶 > 系統預設
|
|
326
|
-
|
|
327
|
-
### 文檔工具
|
|
328
|
-
|
|
329
|
-
| 工具 | 用途 |
|
|
330
|
-
|------|------|
|
|
331
|
-
| `docs/build-index.js` | 自動生成系統文檔索引 |
|
|
332
|
-
| `docs/update-all.ps1` | 批量更新所有文檔 |
|
|
333
|
-
|
|
334
|
-
**詳細文檔**:請參閱 [`kenaz/README.md`](./kenaz/README.md)
|
|
335
|
-
|
|
336
|
-
---
|
|
337
|
-
|
|
338
|
-
## Collaboration - 新任務系統
|
|
339
|
-
|
|
340
|
-
`.collaboration/` 是 Kenaz AI 的**第二代任務管理系統**(v3.x),採用「目錄即狀態」架構。
|
|
341
|
-
|
|
342
|
-
### 核心設計
|
|
343
|
-
|
|
344
|
-
**設計理念**:
|
|
345
|
-
- **目錄即狀態**:任務狀態由檔案所在目錄決定
|
|
346
|
-
- **YAML 格式**:人類可讀,支援多行文字
|
|
347
|
-
- **雙層 API**:task-api.js(完整功能)+ task-api-json.js(JSON 輸出)
|
|
348
|
-
- **向後相容**:與舊 TASK_QUEUE.json 格式相容
|
|
349
|
-
|
|
350
|
-
### 目錄結構
|
|
351
|
-
|
|
352
|
-
```
|
|
353
|
-
.collaboration/
|
|
354
|
-
├── core/ # 核心 API
|
|
355
|
-
│ ├── task-api.js # 主 API(CLI)
|
|
356
|
-
│ └── task-api-json.js # JSON 輸出(Dashboard 用)
|
|
357
|
-
├── tasks/ # 任務儲存
|
|
358
|
-
│ ├── active/ # 進行中
|
|
359
|
-
│ ├── done/ # 已完成
|
|
360
|
-
│ ├── blocked/ # 已阻塞
|
|
361
|
-
│ └── archived/ # 已封存
|
|
362
|
-
└── config/ # 配置與模板
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
### 使用方式
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
# 建立任務
|
|
369
|
-
node .collaboration/core/task-api.js create \
|
|
370
|
-
--title "實作功能 X" \
|
|
371
|
-
--priority P1 \
|
|
372
|
-
--role developer
|
|
373
|
-
|
|
374
|
-
# 查詢任務
|
|
375
|
-
node .collaboration/core/task-api.js get TASK_XXX
|
|
376
|
-
|
|
377
|
-
# 更新狀態
|
|
378
|
-
node .collaboration/core/task-api.js update TASK_XXX --status done
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
**詳細文檔**:請參閱 [`collaboration/README.md`](./collaboration/README.md)
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
## Pipeline - 舊任務系統 ⚠️ LEGACY
|
|
386
|
-
|
|
387
|
-
`dev/pipeline/` 是 Kenaz AI 的**第一代任務管理系統**,採用 JSON + YAML 雙格式設計。
|
|
388
|
-
|
|
389
|
-
### ⚠️ 系統狀態
|
|
390
|
-
|
|
391
|
-
| 狀態 | 說明 |
|
|
392
|
-
|------|------|
|
|
393
|
-
| **Legacy** | 傳統系統,保留供排程器使用 |
|
|
394
|
-
| **相容支援** | 目前仍可使用,但功能凍結 |
|
|
395
|
-
| **逐步淘汰** | 未來將全面遷移到 `.collaboration/` |
|
|
396
|
-
|
|
397
|
-
### 關鍵差異(vs 新系統)
|
|
398
|
-
|
|
399
|
-
| 特性 | 新系統 | 舊系統 |
|
|
400
|
-
|------|--------|--------|
|
|
401
|
-
| **格式** | YAML + 目錄 | JSON + YAML |
|
|
402
|
-
| **路徑鎖定** | ❌ 無 | ✅ lock_manager.py |
|
|
403
|
-
| **依賴解析** | ⚠️ 基礎 | ✅ 完整(拓撲排序) |
|
|
404
|
-
| **並行衝突檢測** | ❌ 無 | ✅ 自動 |
|
|
405
|
-
|
|
406
|
-
### 適用場景
|
|
407
|
-
|
|
408
|
-
- Multi-Agent 並行開發(需路徑鎖定)
|
|
409
|
-
- 排程器自動化(需依賴解析)
|
|
410
|
-
|
|
411
|
-
**詳細文檔**:請參閱 [`pipeline/README.md`](./pipeline/README.md)
|
|
412
|
-
|
|
413
|
-
---
|
|
414
|
-
|
|
415
|
-
## Formation - 多陣型調度系統
|
|
416
|
-
|
|
417
|
-
`.formation/` 是 Kenaz AI 的 **Agent 部署陣型系統**,根據任務規模動態選擇最佳調度策略。
|
|
418
|
-
|
|
419
|
-
### 核心理念
|
|
420
|
-
|
|
421
|
-
**「合適的陣型 = 最佳的效率與成本平衡」**
|
|
422
|
-
|
|
423
|
-
### 5 種陣型
|
|
424
|
-
|
|
425
|
-
| 陣型 | 說明 | 適用場景 | Agent 數量 |
|
|
426
|
-
|------|------|----------|-----------|
|
|
427
|
-
| **unit** | 單人執行 | 簡單任務、不需協作 | 1 |
|
|
428
|
-
| **solo** | 分段執行(輪次制)| 中等任務、多步驟 | 1-3(輪流) |
|
|
429
|
-
| **squad** | 輕量團隊(委派制)| 複雜任務、低耦合 | 2-5 |
|
|
430
|
-
| **legion** | 重火力團隊(即時協作)| 高耦合、需即時溝通 | 2-10 |
|
|
431
|
-
| **legacy** | 排程器模式(舊系統)| Pipeline 自動化 | N(排程器調度) |
|
|
432
|
-
|
|
433
|
-
### Formation Lead
|
|
434
|
-
|
|
435
|
-
透過 `/lead` 指令啟動 Formation Lead Agent:
|
|
436
|
-
- 自動分析任務規模
|
|
437
|
-
- 選擇最佳陣型
|
|
438
|
-
- 調度 Agent 執行
|
|
439
|
-
- 追蹤結果與回報
|
|
440
|
-
|
|
441
|
-
**詳細文檔**:請參閱 [`formation/README.md`](./formation/README.md)
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## Dashboard - Tauri 後端架構
|
|
446
|
-
|
|
447
|
-
`dashboard/src-tauri/` 是 **Kenaz AI Desktop Application** 的核心服務層。
|
|
448
|
-
|
|
449
|
-
### 技術棧
|
|
450
|
-
|
|
451
|
-
- **Rust + Tauri**:桌面應用框架
|
|
452
|
-
- **Axum**:HTTP Server(Web 模式)
|
|
453
|
-
- **Portable-Pty**:終端會話管理
|
|
454
|
-
- **State Management**:Tauri State + Axum Shared State
|
|
455
|
-
|
|
456
|
-
### 核心功能
|
|
457
|
-
|
|
458
|
-
| 功能 | 說明 |
|
|
459
|
-
|------|------|
|
|
460
|
-
| **Tauri Commands** | 桌面應用 IPC(前端呼叫 Rust) |
|
|
461
|
-
| **HTTP Server** | Web 模式 API |
|
|
462
|
-
| **PTY Server** | 終端會話管理 |
|
|
463
|
-
| **Scheduler 協調** | Multi-Agent 排程器管理 |
|
|
464
|
-
| **自動更新** | 應用版本檢查與安裝 |
|
|
465
|
-
|
|
466
|
-
### Feature Modules
|
|
467
|
-
|
|
468
|
-
| 模組 | 路徑 | 職責 |
|
|
469
|
-
|------|------|------|
|
|
470
|
-
| **Script Manager** | `features/script/` | Tauri Commands |
|
|
471
|
-
| **HTTP Server** | `features/http/` | Axum Web API |
|
|
472
|
-
| **PTY Server** | `features/pty/` | 終端管理 |
|
|
473
|
-
| **Scheduler** | `features/scheduler/` | 排程器協調 |
|
|
474
|
-
|
|
475
|
-
**詳細文檔**:請參閱 [`dashboard/README.md`](./dashboard/README.md)
|
|
476
|
-
|
|
477
|
-
---
|
|
478
|
-
|
|
479
|
-
## CLI Tools - 開發工具集
|
|
480
|
-
|
|
481
|
-
`dev/scripts/` 是 Kenaz AI 的**開發與維護工具集**,提供初始化、排程、維護三大類工具。
|
|
482
|
-
|
|
483
|
-
### 工具分類
|
|
484
|
-
|
|
485
|
-
| 類別 | 工具 | 說明 |
|
|
486
|
-
|------|------|------|
|
|
487
|
-
| **初始化** | `INIT_PROJECT.bat` | 初始化新專案(清理 Pipeline) |
|
|
488
|
-
| | `INIT_GIT.bat` | 初始化 Git 倉庫與配置 |
|
|
489
|
-
| | `SETUP_RAG.bat` | 設置 RAG 引擎(kenaz-cortex) |
|
|
490
|
-
| | `SETUP_MCP.bat` | 設置 MCP Server(Claude Code 整合) |
|
|
491
|
-
| | `SETUP_GIT_HOOKS.bat` | 設置 Git Hooks |
|
|
492
|
-
| **排程** | `START_DEV_AGENT.bat` | 單 Agent 開發(自我增強模式) |
|
|
493
|
-
| | `START_MULTI_AGENT.bat` | 多 Agent 並行開發 |
|
|
494
|
-
| | `RUN_ONCE.bat` | 單次執行(不含自我增強) |
|
|
495
|
-
| **維護** | `check_queue.ps1` | 檢查任務佇列狀態 |
|
|
496
|
-
| | `clean_logs.ps1` | 清理執行日誌 |
|
|
497
|
-
|
|
498
|
-
### 使用方式
|
|
499
|
-
|
|
500
|
-
```powershell
|
|
501
|
-
# 初始化新專案(首次執行)
|
|
502
|
-
.\dev\scripts\INIT_PROJECT.bat
|
|
503
|
-
|
|
504
|
-
# 啟動單 Agent 開發
|
|
505
|
-
.\dev\scripts\START_DEV_AGENT.bat
|
|
506
|
-
|
|
507
|
-
# 啟動多 Agent 並行開發
|
|
508
|
-
.\dev\scripts\START_MULTI_AGENT.bat
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
**詳細文檔**:請參閱 [`cli-tools/README.md`](./cli-tools/README.md)
|
|
512
|
-
|
|
513
|
-
---
|
|
514
|
-
|
|
515
|
-
## Git Hooks - 自動化系統
|
|
516
|
-
|
|
517
|
-
`.githooks/` 是 Kenaz AI 的 **Git Hooks 自動化系統**,透過 Git 生命週期鉤子自動執行任務。
|
|
518
|
-
|
|
519
|
-
### 核心功能
|
|
520
|
-
|
|
521
|
-
| Hook | 觸發時機 | 功能 |
|
|
522
|
-
|------|----------|------|
|
|
523
|
-
| **post-commit** | commit 後 | RAG 引擎增量索引 |
|
|
524
|
-
| **pre-commit** | commit 前 | 路徑鎖定檢查、代碼品質檢查 |
|
|
525
|
-
| **post-merge** | merge 後 | RAG 索引重建 |
|
|
526
|
-
|
|
527
|
-
### 雙平台支援
|
|
528
|
-
|
|
529
|
-
| 平台 | 語言 | 路徑 |
|
|
530
|
-
|------|------|------|
|
|
531
|
-
| **Windows** | PowerShell | `.githooks/hooks-ps1/*.ps1` |
|
|
532
|
-
| **Unix/Linux** | Bash | `.githooks/hooks-sh/*.sh` |
|
|
533
|
-
|
|
534
|
-
### 使用方式
|
|
535
|
-
|
|
536
|
-
```powershell
|
|
537
|
-
# 設置 Git Hooks(自動偵測平台)
|
|
538
|
-
.\dev\scripts\SETUP_GIT_HOOKS.bat
|
|
539
|
-
|
|
540
|
-
# 或手動設置
|
|
541
|
-
git config core.hooksPath .githooks/hooks-ps1 # Windows
|
|
542
|
-
git config core.hooksPath .githooks/hooks-sh # Unix/Linux
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
### RAG 引擎整合
|
|
546
|
-
|
|
547
|
-
- **增量索引**:只索引變更的檔案(節省時間)
|
|
548
|
-
- **自動重建**:merge 後自動重建索引(確保一致性)
|
|
549
|
-
- **背景執行**:不阻塞 commit 流程
|
|
550
|
-
|
|
551
|
-
**詳細文檔**:請參閱 [`githooks/README.md`](./githooks/README.md)
|
|
552
|
-
|
|
553
|
-
---
|
|
554
|
-
|
|
555
|
-
*建立日期: 2026-02-13 | 更新: 2026-02-19 | 文檔版本: v3.1*
|
|
14
|
+
Retired and removed (2026-10): memory system (Synapse/Hippocampus/Cortex/Alaya), Formation unit/squad/legion dispatch (subagent dispatch only: `node .formation/tools/dispatch.js`), desktop Dashboard and Next.js frontend, `dev/pipeline/TASK_QUEUE.json` pipeline, Sunny.
|