@bolloon/bolloon-agent 0.1.36 → 0.1.38
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/package.json +2 -2
- package/.auto-evolve-calls +0 -1
- package/.last-auto-evolve-baseline +0 -1
- package/.playwright-mcp/page-2026-06-16T07-51-45-706Z.yml +0 -130
- package/.playwright-mcp/page-2026-06-16T07-56-44-116Z.yml +0 -131
- package/Bolloon.md +0 -144
- package/Dive-into/CITATION.cff +0 -17
- package/Dive-into/LICENSE +0 -25
- package/Dive-into/README.md +0 -598
- package/Dive-into/README_zh.md +0 -599
- package/Dive-into/assets/context.png +0 -0
- package/Dive-into/assets/extensibility.png +0 -0
- package/Dive-into/assets/iteration.png +0 -0
- package/Dive-into/assets/layered_architecture.png +0 -0
- package/Dive-into/assets/main_structure.png +0 -0
- package/Dive-into/assets/permission.png +0 -0
- package/Dive-into/assets/session_compact.png +0 -0
- package/Dive-into/assets/subagent.png +0 -0
- package/Dive-into/paper/Dive_into_Claude_Code.pdf +0 -0
- package/dist/agents/constraint-layer.js.map +0 -1
- package/dist/agents/pi-sdk.js.map +0 -1
- package/dist/agents/workflow-engine.js.map +0 -1
- package/dist/bollharness/src/index.js +0 -5
- package/dist/bollharness/src/scripts/checks/check_adr_plan_numbering.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_api_types.js +0 -45
- package/dist/bollharness/src/scripts/checks/check_artifact_link.js +0 -146
- package/dist/bollharness/src/scripts/checks/check_bridge_deps.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_bugfix_binding.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_bugfix_binding_ci.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_doc_file_references.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_doc_freshness.js +0 -135
- package/dist/bollharness/src/scripts/checks/check_doc_links.js +0 -31
- package/dist/bollharness/src/scripts/checks/check_file_existence_claims.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_fragment_integrity.js +0 -34
- package/dist/bollharness/src/scripts/checks/check_hook_installed.js +0 -63
- package/dist/bollharness/src/scripts/checks/check_issue_closure.js +0 -41
- package/dist/bollharness/src/scripts/checks/check_mcp_parity.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_security.js +0 -48
- package/dist/bollharness/src/scripts/checks/check_skill_parity.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_versions.js +0 -6
- package/dist/bollharness/src/scripts/checks/finding.js +0 -13
- package/dist/bollharness/src/scripts/checks/next_decision_number.js +0 -20
- package/dist/bollharness/src/scripts/checks/regenerate_magic_docs.js +0 -6
- package/dist/bollharness/src/scripts/ci/detect_rebaseline_triggers.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_subprocess_cfg.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_verify_artifacts.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_yaml_schema.js +0 -8
- package/dist/bollharness/src/scripts/context_router.js +0 -67
- package/dist/bollharness/src/scripts/deploy-guard.js +0 -157
- package/dist/bollharness/src/scripts/guard-feedback.js +0 -192
- package/dist/bollharness/src/scripts/guard_router.js +0 -158
- package/dist/bollharness/src/scripts/hooks/_hook_output.js +0 -6
- package/dist/bollharness/src/scripts/hooks/auto-python3.js +0 -6
- package/dist/bollharness/src/scripts/hooks/deploy-progress-on-session-end.js +0 -6
- package/dist/bollharness/src/scripts/hooks/failure-analyzer.js +0 -6
- package/dist/bollharness/src/scripts/hooks/gate-judgment-inject.js +0 -92
- package/dist/bollharness/src/scripts/hooks/gate-transition-judgment.js +0 -63
- package/dist/bollharness/src/scripts/hooks/inbox-ack.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-inject-on-start.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-validate.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-write-ledger.js +0 -6
- package/dist/bollharness/src/scripts/hooks/initializer-agent.js +0 -6
- package/dist/bollharness/src/scripts/hooks/loop-detection.js +0 -73
- package/dist/bollharness/src/scripts/hooks/owner-guard.js +0 -6
- package/dist/bollharness/src/scripts/hooks/precompact.js +0 -6
- package/dist/bollharness/src/scripts/hooks/review-agent-gatekeeper.js +0 -6
- package/dist/bollharness/src/scripts/hooks/risk-tracker.js +0 -108
- package/dist/bollharness/src/scripts/hooks/sanitize-on-read.js +0 -6
- package/dist/bollharness/src/scripts/hooks/session-reflection.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-magic-docs.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-reset-risk.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-toolkit-reminder.js +0 -7
- package/dist/bollharness/src/scripts/hooks/stop-evaluator.js +0 -157
- package/dist/bollharness/src/scripts/hooks/tool-call-counter.js +0 -6
- package/dist/bollharness/src/scripts/hooks/trace-analyzer.js +0 -10
- package/dist/bollharness/src/scripts/install/install-trust-token.js +0 -7
- package/dist/bollharness/src/scripts/install/multi_project_registry.js +0 -9
- package/dist/bollharness/src/scripts/install/phase2_auto.js +0 -21
- package/dist/bollharness/src/scripts/install/pre_commit_installer.js +0 -6
- package/dist/bollharness/src/scripts/install/tier_selector.js +0 -7
- package/dist/bollharness/src/scripts/install/transcript_miner.js +0 -7
- package/dist/bollharness/src/scripts/lib/claim_patterns.js +0 -10
- package/dist/bollharness/src/scripts/lib/sanitize_patterns.js +0 -12
- package/dist/bollharness/src/scripts/sanitize.js +0 -6
- package/dist/bollharness-integration/context-router-judgment.js.map +0 -1
- package/dist/bollharness-integration/context-router.js.map +0 -1
- package/dist/bollharness-integration/gate-state-machine.js.map +0 -1
- package/dist/bollharness-integration/gate-transition-hooks.js.map +0 -1
- package/dist/bollharness-integration/guard-checker.js.map +0 -1
- package/dist/bollharness-integration/index.js.map +0 -1
- package/dist/bollharness-integration/integration.js.map +0 -1
- package/dist/bollharness-integration/llm/pi-ai.d.ts +0 -60
- package/dist/bollharness-integration/pi-ecosystem-colony/index.d.ts +0 -153
- package/dist/bollharness-integration/pi-ecosystem-goals/index.d.ts +0 -136
- package/dist/bollharness-integration/pi-ecosystem-judgment/decision.d.ts +0 -117
- package/dist/bollharness-integration/pi-ecosystem-judgment/distillation.d.ts +0 -78
- package/dist/bollharness-integration/pi-ecosystem-judgment/index.d.ts +0 -139
- package/dist/bollharness-integration/pi-ecosystem-mcp/index.d.ts +0 -127
- package/dist/bollharness-integration/pi-ecosystem-subagents/index.d.ts +0 -95
- package/dist/bollharness-integration/skill-adapter.js.map +0 -1
- package/dist/constraint-runtime/src/_archive_helper.js +0 -9
- package/dist/constraint-runtime/src/agent/coordinator.js +0 -48
- package/dist/constraint-runtime/src/agent/index.js +0 -1
- package/dist/constraint-runtime/src/assistant/index.js +0 -12
- package/dist/constraint-runtime/src/bootstrap/index.js +0 -12
- package/dist/constraint-runtime/src/bootstrap_graph.js +0 -13
- package/dist/constraint-runtime/src/bridge/index.js +0 -12
- package/dist/constraint-runtime/src/buddy/index.js +0 -12
- package/dist/constraint-runtime/src/cli/index.js +0 -12
- package/dist/constraint-runtime/src/command_graph.js +0 -10
- package/dist/constraint-runtime/src/commands.js +0 -60
- package/dist/constraint-runtime/src/components/index.js +0 -12
- package/dist/constraint-runtime/src/constants/index.js +0 -12
- package/dist/constraint-runtime/src/constraint/budget.js +0 -22
- package/dist/constraint-runtime/src/constraint/budget.js.map +0 -1
- package/dist/constraint-runtime/src/constraint/index.js +0 -2
- package/dist/constraint-runtime/src/constraint/permission.js +0 -20
- package/dist/constraint-runtime/src/constraint/permission.js.map +0 -1
- package/dist/constraint-runtime/src/context.js +0 -30
- package/dist/constraint-runtime/src/coordinator/index.js +0 -12
- package/dist/constraint-runtime/src/cost_hook.js +0 -4
- package/dist/constraint-runtime/src/cost_tracker.js +0 -8
- package/dist/constraint-runtime/src/deferred_init.js +0 -10
- package/dist/constraint-runtime/src/direct_modes.js +0 -6
- package/dist/constraint-runtime/src/dynamic-tool-loader.js +0 -85
- package/dist/constraint-runtime/src/entrypoints/index.js +0 -12
- package/dist/constraint-runtime/src/execution_registry.js +0 -44
- package/dist/constraint-runtime/src/history.js +0 -9
- package/dist/constraint-runtime/src/hooks/index.js +0 -12
- package/dist/constraint-runtime/src/index.js +0 -26
- package/dist/constraint-runtime/src/ink.js +0 -4
- package/dist/constraint-runtime/src/keybindings/index.js +0 -12
- package/dist/constraint-runtime/src/memdir/index.js +0 -12
- package/dist/constraint-runtime/src/migrations/index.js +0 -12
- package/dist/constraint-runtime/src/models.js +0 -1
- package/dist/constraint-runtime/src/models.js.map +0 -1
- package/dist/constraint-runtime/src/moreright/index.js +0 -12
- package/dist/constraint-runtime/src/native_ts/index.js +0 -12
- package/dist/constraint-runtime/src/output_styles/index.js +0 -12
- package/dist/constraint-runtime/src/parity_audit.js +0 -12
- package/dist/constraint-runtime/src/plugins/index.js +0 -12
- package/dist/constraint-runtime/src/port_manifest.js +0 -11
- package/dist/constraint-runtime/src/prefetch.js +0 -9
- package/dist/constraint-runtime/src/query.js +0 -1
- package/dist/constraint-runtime/src/remote/index.js +0 -12
- package/dist/constraint-runtime/src/remote_runtime.js +0 -9
- package/dist/constraint-runtime/src/runtime/index.js +0 -1
- package/dist/constraint-runtime/src/runtime/session.js +0 -35
- package/dist/constraint-runtime/src/schemas/index.js +0 -12
- package/dist/constraint-runtime/src/screens/index.js +0 -12
- package/dist/constraint-runtime/src/server/index.js +0 -12
- package/dist/constraint-runtime/src/services/index.js +0 -12
- package/dist/constraint-runtime/src/session_store.js +0 -22
- package/dist/constraint-runtime/src/setup.js +0 -30
- package/dist/constraint-runtime/src/skills/index.js +0 -1
- package/dist/constraint-runtime/src/skills/skill-registry.js +0 -28
- package/dist/constraint-runtime/src/state/index.js +0 -12
- package/dist/constraint-runtime/src/system_init.js +0 -20
- package/dist/constraint-runtime/src/thinking/engine.js +0 -42
- package/dist/constraint-runtime/src/thinking/index.js +0 -1
- package/dist/constraint-runtime/src/tool_pool.js +0 -8
- package/dist/constraint-runtime/src/tools/OpenCLI/execAdapter.js +0 -7
- package/dist/constraint-runtime/src/tools/OpenCLI/listAdapters.js +0 -7
- package/dist/constraint-runtime/src/tools/OpenCLI/runCommand.js +0 -7
- package/dist/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/createOrder.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/getMarket.js +0 -5
- package/dist/constraint-runtime/src/tools/PolymarketSDK/getOrders.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/listMarkets.js +0 -4
- package/dist/constraint-runtime/src/tools/SafeSDK/confirmTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/createTransaction.js +0 -8
- package/dist/constraint-runtime/src/tools/SafeSDK/deploySafe.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/executeTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/getBalance.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/getPendingTransactions.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/proposeTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/WalletTools/autoPay.js +0 -29
- package/dist/constraint-runtime/src/tools/WalletTools/createWallet.js +0 -10
- package/dist/constraint-runtime/src/tools/WalletTools/getBalance.js +0 -13
- package/dist/constraint-runtime/src/tools/WalletTools/importWallet.js +0 -22
- package/dist/constraint-runtime/src/tools/WalletTools/sendTransaction.js +0 -25
- package/dist/constraint-runtime/src/tools/WalletTools/signMessage.js +0 -10
- package/dist/constraint-runtime/src/tools/WalletTools/transferToken.js +0 -25
- package/dist/constraint-runtime/src/tools.js +0 -80
- package/dist/constraint-runtime/src/transcript.js +0 -19
- package/dist/constraint-runtime/src/types/index.js +0 -12
- package/dist/constraint-runtime/src/upstream_proxy/index.js +0 -12
- package/dist/constraint-runtime/src/utils/index.js +0 -12
- package/dist/constraint-runtime/src/vim/index.js +0 -12
- package/dist/constraint-runtime/src/voice/index.js +0 -12
- package/dist/constraints/index.js.map +0 -1
- package/dist/documents/reader.js.map +0 -1
- package/dist/llm/config-store.js.map +0 -1
- package/dist/llm/pi-ai.js.map +0 -1
- package/dist/network/agent-network.js.map +0 -1
- package/dist/network/iroh-integration.js.map +0 -1
- package/dist/network/iroh-transport.js.map +0 -1
- package/dist/network/p2p.js.map +0 -1
- package/dist/network/storage/adapters/json-adapter.js.map +0 -1
- package/dist/pi-ecosystem-colony/index.js.map +0 -1
- package/dist/pi-ecosystem-goals/index.js.map +0 -1
- package/dist/pi-ecosystem-judgment/decision.js.map +0 -1
- package/dist/pi-ecosystem-judgment/distillation.js.map +0 -1
- package/dist/pi-ecosystem-judgment/human-value-store.js.map +0 -1
- package/dist/pi-ecosystem-judgment/index.js.map +0 -1
- package/dist/pi-ecosystem-judgment/value-injection.js.map +0 -1
- package/dist/pi-ecosystem-mcp/index.js.map +0 -1
- package/dist/pi-ecosystem-subagents/index.js.map +0 -1
- package/dist/social/ant-colony/AdaptiveHeartbeat.js.map +0 -1
- package/dist/social/ant-colony/PheromoneEngine.js.map +0 -1
- package/dist/social/ant-colony/types.js.map +0 -1
- package/dist/social/channels/ChannelManager.js.map +0 -1
- package/dist/social/channels/DiapChannelBridge.js.map +0 -1
- package/dist/social/channels/InterestMatcher.js.map +0 -1
- package/dist/social/channels/types.js.map +0 -1
- package/dist/social/global-shared-context.js.map +0 -1
- package/dist/social/heartbeat.js.map +0 -1
- package/lefthook.yml +0 -33
- package/scripts/auto-evolve-loop.ts +0 -481
- package/scripts/build-web.ts +0 -116
- package/scripts/diff-reviewer.ts +0 -159
- package/scripts/validate-system-prompt.ts +0 -142
- package/scripts/weekly-report.ts +0 -364
- package/src/agents/agent-manifest-protocol.ts +0 -117
- package/src/agents/constraint-layer.ts +0 -309
- package/src/agents/iroh-secret.ts +0 -32
- package/src/agents/p2p-chat-tools.ts +0 -383
- package/src/agents/p2p-document-tools.ts +0 -347
- package/src/agents/permission-mode.ts +0 -127
- package/src/agents/pi-sdk.ts +0 -2895
- package/src/agents/pre-tool-validator.ts +0 -213
- package/src/agents/protocol.ts +0 -398
- package/src/agents/shell-guard.ts +0 -417
- package/src/agents/shell-tool.ts +0 -103
- package/src/agents/skill-loader.ts +0 -202
- package/src/agents/subagent-manager.ts +0 -553
- package/src/agents/workflow-engine.ts +0 -332
- package/src/agents/workflow-pivot-loop.ts +0 -766
- package/src/bollharness/.sanitize-report.json +0 -13
- package/src/bollharness/CLAUDE.md +0 -73
- package/src/bollharness/LICENSE +0 -21
- package/src/bollharness/README.md +0 -143
- package/src/bollharness/README.zh-CN.md +0 -131
- package/src/bollharness/package.json +0 -20
- package/src/bollharness/reference/SOURCE-COMMIT.txt +0 -3
- package/src/bollharness/reference/boll-reference/scripts/hooks/.sanitize-report.json +0 -12
- package/src/bollharness/reference/boll-reference/scripts/hooks/find-boll-root.sh +0 -27
- package/src/bollharness/reference/boll-reference/scripts/hooks/precompact.sh +0 -57
- package/src/bollharness/reference/boll-reference/scripts/hooks/stop-evaluator.md +0 -57
- package/src/bollharness/schemas/metrics-jsonl-allowlist.json +0 -67
- package/src/bollharness/scripts/checks/next_decision_number.sh +0 -48
- package/src/bollharness/scripts/ci/count-components.sh +0 -65
- package/src/bollharness/scripts/context-fragments/artifact-linkage.md +0 -14
- package/src/bollharness/scripts/context-fragments/auth-consumers.md +0 -17
- package/src/bollharness/scripts/context-fragments/bridge-constitution.md +0 -13
- package/src/bollharness/scripts/context-fragments/catalyst-distributed.md +0 -18
- package/src/bollharness/scripts/context-fragments/closure-checklist.md +0 -13
- package/src/bollharness/scripts/context-fragments/contract-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/db-shared-structures.md +0 -15
- package/src/bollharness/scripts/context-fragments/fixed-three-layers.md +0 -19
- package/src/bollharness/scripts/context-fragments/general-dev-principles.md +0 -11
- package/src/bollharness/scripts/context-fragments/issue-first.md +0 -8
- package/src/bollharness/scripts/context-fragments/mcp-parity.md +0 -16
- package/src/bollharness/scripts/context-fragments/pi-agent-operations.md +0 -108
- package/src/bollharness/scripts/context-fragments/protocol-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/run-events-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/scene-fidelity.md +0 -13
- package/src/bollharness/scripts/context-fragments/truth-source-hierarchy.md +0 -15
- package/src/bollharness/scripts/context-fragments/two-language.md +0 -15
- package/src/bollharness/scripts/context-fragments/version-sources.md +0 -14
- package/src/bollharness/scripts/hooks/find-project-root.sh +0 -47
- package/src/bollharness/scripts/hooks/inbox-poll.sh +0 -78
- package/src/bollharness/scripts/hooks/precompact.sh +0 -56
- package/src/bollharness/scripts/hooks/stop-evaluator.md +0 -83
- package/src/bollharness/scripts/sync-from-upstream.sh +0 -281
- package/src/bollharness/src/index.ts +0 -5
- package/src/bollharness/src/scripts/checks/check_adr_plan_numbering.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_api_types.ts +0 -52
- package/src/bollharness/src/scripts/checks/check_artifact_link.ts +0 -156
- package/src/bollharness/src/scripts/checks/check_bridge_deps.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_bugfix_binding.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_bugfix_binding_ci.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_doc_file_references.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_doc_freshness.ts +0 -141
- package/src/bollharness/src/scripts/checks/check_doc_links.ts +0 -36
- package/src/bollharness/src/scripts/checks/check_file_existence_claims.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_fragment_integrity.ts +0 -40
- package/src/bollharness/src/scripts/checks/check_hook_installed.ts +0 -70
- package/src/bollharness/src/scripts/checks/check_issue_closure.ts +0 -51
- package/src/bollharness/src/scripts/checks/check_mcp_parity.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_security.ts +0 -54
- package/src/bollharness/src/scripts/checks/check_skill_parity.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_versions.ts +0 -11
- package/src/bollharness/src/scripts/checks/finding.ts +0 -35
- package/src/bollharness/src/scripts/checks/next_decision_number.ts +0 -24
- package/src/bollharness/src/scripts/checks/regenerate_magic_docs.ts +0 -11
- package/src/bollharness/src/scripts/ci/detect_rebaseline_triggers.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_subprocess_cfg.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_verify_artifacts.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_yaml_schema.ts +0 -14
- package/src/bollharness/src/scripts/context_router.ts +0 -76
- package/src/bollharness/src/scripts/deploy-guard.ts +0 -182
- package/src/bollharness/src/scripts/guard-feedback.ts +0 -215
- package/src/bollharness/src/scripts/guard_router.ts +0 -194
- package/src/bollharness/src/scripts/hooks/_hook_output.js +0 -3
- package/src/bollharness/src/scripts/hooks/_hook_output.ts +0 -11
- package/src/bollharness/src/scripts/hooks/auto-python3.ts +0 -10
- package/src/bollharness/src/scripts/hooks/deploy-progress-on-session-end.ts +0 -10
- package/src/bollharness/src/scripts/hooks/failure-analyzer.ts +0 -10
- package/src/bollharness/src/scripts/hooks/gate-judgment-inject.ts +0 -111
- package/src/bollharness/src/scripts/hooks/gate-transition-judgment.ts +0 -74
- package/src/bollharness/src/scripts/hooks/inbox-ack.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-inject-on-start.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-validate.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-write-ledger.ts +0 -10
- package/src/bollharness/src/scripts/hooks/initializer-agent.ts +0 -10
- package/src/bollharness/src/scripts/hooks/loop-detection.ts +0 -83
- package/src/bollharness/src/scripts/hooks/owner-guard.ts +0 -10
- package/src/bollharness/src/scripts/hooks/precompact.ts +0 -10
- package/src/bollharness/src/scripts/hooks/review-agent-gatekeeper.ts +0 -10
- package/src/bollharness/src/scripts/hooks/risk-tracker.ts +0 -121
- package/src/bollharness/src/scripts/hooks/sanitize-on-read.ts +0 -10
- package/src/bollharness/src/scripts/hooks/session-reflection.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-magic-docs.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-reset-risk.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-toolkit-reminder.ts +0 -12
- package/src/bollharness/src/scripts/hooks/stop-evaluator.ts +0 -164
- package/src/bollharness/src/scripts/hooks/tool-call-counter.ts +0 -10
- package/src/bollharness/src/scripts/hooks/trace-analyzer.ts +0 -14
- package/src/bollharness/src/scripts/install/install-trust-token.ts +0 -13
- package/src/bollharness/src/scripts/install/multi_project_registry.ts +0 -13
- package/src/bollharness/src/scripts/install/phase2_auto.ts +0 -28
- package/src/bollharness/src/scripts/install/pre_commit_installer.ts +0 -10
- package/src/bollharness/src/scripts/install/tier_selector.ts +0 -10
- package/src/bollharness/src/scripts/install/transcript_miner.ts +0 -13
- package/src/bollharness/src/scripts/lib/claim_patterns.ts +0 -11
- package/src/bollharness/src/scripts/lib/sanitize_patterns.ts +0 -13
- package/src/bollharness/src/scripts/sanitize.ts +0 -9
- package/src/bollharness/templates/persona/default.json +0 -19
- package/src/bollharness/templates/scaffold/.gitignore.append +0 -16
- package/src/bollharness/templates/scaffold/CLAUDE.md +0 -89
- package/src/bollharness-integration/channel-judgment-engine.ts +0 -634
- package/src/bollharness-integration/context-chain-router.ts +0 -474
- package/src/bollharness-integration/context-router-judgment.ts +0 -339
- package/src/bollharness-integration/context-router.ts +0 -583
- package/src/bollharness-integration/gate-state-machine.ts +0 -444
- package/src/bollharness-integration/gate-transition-hooks.ts +0 -137
- package/src/bollharness-integration/guard-checker.ts +0 -451
- package/src/bollharness-integration/index.ts +0 -195
- package/src/bollharness-integration/integration.ts +0 -538
- package/src/bollharness-integration/judgment-prompts.yaml +0 -535
- package/src/bollharness-integration/llm-judgment-engine.ts +0 -712
- package/src/bollharness-integration/skill-adapter.ts +0 -646
- package/src/bootstrap/bootstrap.ts +0 -135
- package/src/bootstrap/context-collector.ts +0 -371
- package/src/bootstrap/context-hierarchy.ts +0 -283
- package/src/bootstrap/lifecycle-hooks.ts +0 -289
- package/src/bootstrap/project-context.ts +0 -171
- package/src/cli/interface.ts +0 -211
- package/src/cli-entry.ts +0 -304
- package/src/constraints/index.ts +0 -6
- package/src/context-compaction/auto-compact.ts +0 -153
- package/src/context-compaction/budget-gate.ts +0 -32
- package/src/context-compaction/budget-reduce.ts +0 -37
- package/src/context-compaction/context-collapse.ts +0 -72
- package/src/context-compaction/index.ts +0 -24
- package/src/context-compaction/microcompact.ts +0 -54
- package/src/context-compaction/pipeline.ts +0 -133
- package/src/context-compaction/snip.ts +0 -51
- package/src/context-compaction/token-estimator.ts +0 -36
- package/src/context-compaction/types.ts +0 -99
- package/src/documents/reader.ts +0 -85
- package/src/documents/store.ts +0 -252
- package/src/electron-preload.ts +0 -25
- package/src/electron.ts +0 -200
- package/src/heartbeat/DaemonManager.ts +0 -283
- package/src/heartbeat/HealthMonitor.ts +0 -317
- package/src/heartbeat/StartupVerifier.ts +0 -223
- package/src/heartbeat/Watchdog.ts +0 -208
- package/src/heartbeat/index.ts +0 -109
- package/src/heartbeat/self-improve-bus.ts +0 -110
- package/src/heartbeat/types.ts +0 -82
- package/src/index.ts +0 -1724
- package/src/llm/audio-config-store.ts +0 -246
- package/src/llm/config-store.ts +0 -400
- package/src/llm/llm-judgment-client.ts +0 -471
- package/src/llm/pi-ai.ts +0 -653
- package/src/llm/system-prompt/health.ts +0 -159
- package/src/llm/system-prompt/layers/channel/local.md +0 -14
- package/src/llm/system-prompt/layers/channel/p2p-agent.md +0 -18
- package/src/llm/system-prompt/layers/channel/p2p-visitor.md +0 -19
- package/src/llm/system-prompt/layers/core/artifacts_storage.md +0 -89
- package/src/llm/system-prompt/layers/core/evenhandedness.md +0 -21
- package/src/llm/system-prompt/layers/core/hibs_reminders.md +0 -15
- package/src/llm/system-prompt/layers/core/identity.md +0 -37
- package/src/llm/system-prompt/layers/core/knowledge.md +0 -17
- package/src/llm/system-prompt/layers/core/memory_system.md +0 -12
- package/src/llm/system-prompt/layers/core/network_filesystem.md +0 -28
- package/src/llm/system-prompt/layers/core/refusal.md +0 -37
- package/src/llm/system-prompt/layers/core/tone.md +0 -31
- package/src/llm/system-prompt/layers/core/tools.thin.md +0 -13
- package/src/llm/system-prompt/layers/core/wellbeing.md +0 -41
- package/src/llm/system-prompt/layers/role/architect.md +0 -20
- package/src/llm/system-prompt/layers/role/expert.md +0 -19
- package/src/llm/system-prompt/layers/role/implementer.md +0 -15
- package/src/llm/system-prompt/layers/role/security.md +0 -15
- package/src/llm/system-prompt/layers/tool/artifacts.md +0 -72
- package/src/llm/system-prompt/layers/tool/bash.md +0 -25
- package/src/llm/system-prompt/layers/tool/hibs_api.md +0 -171
- package/src/llm/system-prompt/layers/tool/image_search.md +0 -70
- package/src/llm/system-prompt/layers/tool/manifest.md +0 -89
- package/src/llm/system-prompt/layers/tool/mcp_apps.md +0 -53
- package/src/llm/system-prompt/layers/tool/web_search.md +0 -83
- package/src/llm/system-prompt/registry.ts +0 -325
- package/src/llm/system-prompt/strip-hibsml.ts +0 -52
- package/src/llm/tool-manifest/ask_user_input.ts +0 -37
- package/src/llm/tool-manifest/bash.ts +0 -25
- package/src/llm/tool-manifest/create_file.ts +0 -26
- package/src/llm/tool-manifest/fetch_sports_data.ts +0 -28
- package/src/llm/tool-manifest/image_search.ts +0 -26
- package/src/llm/tool-manifest/index.ts +0 -88
- package/src/llm/tool-manifest/mcp.ts +0 -46
- package/src/llm/tool-manifest/message_compose.ts +0 -33
- package/src/llm/tool-manifest/places.ts +0 -86
- package/src/llm/tool-manifest/present_files.ts +0 -23
- package/src/llm/tool-manifest/recipe.ts +0 -42
- package/src/llm/tool-manifest/recommend_apps.ts +0 -25
- package/src/llm/tool-manifest/str_replace.ts +0 -29
- package/src/llm/tool-manifest/types.ts +0 -52
- package/src/llm/tool-manifest/view.ts +0 -26
- package/src/llm/tool-manifest/weather.ts +0 -29
- package/src/llm/tool-manifest/web.ts +0 -54
- package/src/llm/video-config-store.ts +0 -257
- package/src/network/agent-network.ts +0 -800
- package/src/network/hybrid-messenger.ts +0 -199
- package/src/network/iroh-bootstrap.ts +0 -57
- package/src/network/iroh-discovery.ts +0 -208
- package/src/network/iroh-integration.ts +0 -158
- package/src/network/iroh-transport.ts +0 -637
- package/src/network/known-peers.ts +0 -102
- package/src/network/p2p-direct.ts +0 -262
- package/src/network/p2p-secret.ts +0 -153
- package/src/network/p2p.ts +0 -964
- package/src/network/source-intent-broadcaster.ts +0 -242
- package/src/network/source-intent.ts +0 -167
- package/src/network/storage/adapters/json-adapter.ts +0 -454
- package/src/network/storage/index.ts +0 -203
- package/src/network/storage/types.ts +0 -166
- package/src/security/builtin-guards.ts +0 -162
- package/src/security/context-router-tool.ts +0 -122
- package/src/security/input-scanner.ts +0 -287
- package/src/security/react-harness.ts +0 -177
- package/src/security/tool-gate.ts +0 -294
- package/src/social/ant-colony/index.js +0 -19
- package/src/social/channels/ChannelManager.ts +0 -485
- package/src/social/channels/DiapChannelBridge.ts +0 -501
- package/src/social/channels/InterestMatcher.ts +0 -189
- package/src/social/channels/agent-workflow-config.json +0 -214
- package/src/social/channels/agent-workflow-config.yaml +0 -334
- package/src/social/channels/channel-agent-session.ts +0 -407
- package/src/social/channels/channel-heartbeat-agent.ts +0 -622
- package/src/social/channels/diap-doc-parser.ts +0 -282
- package/src/social/channels/harness-workflow-integrator.ts +0 -594
- package/src/social/channels/index.ts +0 -22
- package/src/social/channels/types.ts +0 -115
- package/src/social/global-shared-context.ts +0 -506
- package/src/social/heartbeat.ts +0 -1057
- package/src/social/persona/enhanced-persona.ts +0 -359
- package/src/types.d.ts +0 -12
- package/src/utils/auto-evolve-policy.ts +0 -138
- package/src/utils/auto-update.ts +0 -482
- package/src/utils/clamp.ts +0 -5
- package/src/web/agent-delegate-server.ts +0 -148
- package/src/web/api-config.html +0 -520
- package/src/web/client.js +0 -2352
- package/src/web/client.ts +0 -4326
- package/src/web/components/p2p/P2PModal.tsx +0 -416
- package/src/web/components/p2p/index.ts +0 -566
- package/src/web/components/p2p/index.tsx +0 -297
- package/src/web/components/p2p/p2p-connection.ts +0 -338
- package/src/web/components/p2p/p2p-identity.ts +0 -92
- package/src/web/components/p2p/p2p-manager.ts +0 -147
- package/src/web/components/p2p/p2p-messages.ts +0 -219
- package/src/web/components/p2p/p2p-modal.ts +0 -685
- package/src/web/components/p2p/p2p-store-memory.ts +0 -162
- package/src/web/components/p2p/p2p-tools.ts +0 -315
- package/src/web/components/p2p/types.ts +0 -170
- package/src/web/components/wallet-viem.mjs +0 -118
- package/src/web/design.md +0 -99
- package/src/web/icons/apple-touch-icon.png +0 -0
- package/src/web/icons/favicon-16x16.png +0 -0
- package/src/web/icons/favicon-192x192.png +0 -0
- package/src/web/icons/favicon-32x32.png +0 -0
- package/src/web/icons/favicon-48x48.png +0 -0
- package/src/web/icons/favicon-512x512.png +0 -0
- package/src/web/icons/favicon.icns +0 -0
- package/src/web/icons/favicon.ico +0 -0
- package/src/web/icons/icon.png +0 -0
- package/src/web/icons/image.png +0 -0
- package/src/web/index.html +0 -373
- package/src/web/iroh-delegate-transport.ts +0 -139
- package/src/web/manifest.json +0 -21
- package/src/web/server.ts +0 -5731
- package/src/web/style.css +0 -4737
- package/src/web/ui/message-renderer.ts +0 -540
- package/src/web/ui/step-timeline.ts +0 -394
- package/staging/auto-evolve/clean-001/.review-verdict +0 -9
- package/staging/auto-evolve/clean-001/clean-001.patch +0 -14
- package/staging/auto-evolve/e2e-001/.patch-id +0 -1
- package/staging/auto-evolve/e2e-001/.review-verdict +0 -12
- package/staging/auto-evolve/e2e-001/e2e-001.patch +0 -11
- package/staging/auto-evolve/test-bad/.review-verdict +0 -12
- package/staging/auto-evolve/test-bad/test-bad.patch +0 -11
- package/test-results/.last-run.json +0 -6
- package/test-results/src-test-web-loop-status-b-5734c-atus-bar-/346/230/276/347/244/272-spinner-/344/270/215/346/230/276/347/244/272/345/276/252/347/216/257/350/256/241/346/225/260/error-context.md +0 -285
- package/tsconfig.cli.json +0 -16
- package/tsconfig.electron.json +0 -20
- package/tsconfig.json +0 -18
|
@@ -1,646 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skill Adapter - Bridge between Bollharness skills and Bolloon's SkillRegistry
|
|
3
|
-
*
|
|
4
|
-
* Loads skills from src/bollharness/.claude/skills/ and adapts them for Bolloon.
|
|
5
|
-
*
|
|
6
|
-
* Skill structure (from bollharness):
|
|
7
|
-
* - arch: Project architect (architecture decisions, boundary freezing)
|
|
8
|
-
* - lead: Development workflow commander (fail-closed state machine)
|
|
9
|
-
* - task-arch: Task decomposition
|
|
10
|
-
* - harness-eng: Engineering execution
|
|
11
|
-
* - harness-dev: Development execution
|
|
12
|
-
* - harness-eng-test: Engineering testing
|
|
13
|
-
* - harness-ops: Operations and truth maintenance
|
|
14
|
-
* - harness-bridge: Bridge agent coordination
|
|
15
|
-
* - crystal-learn: Failure pattern extraction
|
|
16
|
-
* - bug-triage: Bug classification
|
|
17
|
-
* - bug-pipeline: Bug fix pipeline
|
|
18
|
-
* - guardian-fixer: Issue-to-fix workflow
|
|
19
|
-
* - plan-lock: Plan freezing
|
|
20
|
-
* - skill-discovery: Skill discovery and recommendation
|
|
21
|
-
* - toolkit: Toolkit management
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
import { SkillRegistry, Skill } from '@bolloon/constraint-runtime';
|
|
25
|
-
import * as fs from 'fs';
|
|
26
|
-
import * as path from 'path';
|
|
27
|
-
|
|
28
|
-
export const BOLLHARNESS_SKILLS_DIR = path.join('src', 'bollharness', '.claude', 'skills');
|
|
29
|
-
|
|
30
|
-
export interface HarnessSkillMetadata {
|
|
31
|
-
name: string;
|
|
32
|
-
description: string;
|
|
33
|
-
status: 'active' | 'deprecated' | 'experimental';
|
|
34
|
-
tier: 'entry' | 'intermediate' | 'advanced' | 'meta' | 'execution';
|
|
35
|
-
owner?: string;
|
|
36
|
-
last_audited?: string;
|
|
37
|
-
triggers?: string[];
|
|
38
|
-
outputs?: string[];
|
|
39
|
-
truth_policy?: string[];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function parseYamlFrontmatter(content: string): { metadata: HarnessSkillMetadata; body: string } {
|
|
43
|
-
const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
44
|
-
if (!match) {
|
|
45
|
-
return { metadata: { name: '', description: '', status: 'active', tier: 'entry' }, body: content };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const yamlStr = match[1];
|
|
49
|
-
const body = match[2];
|
|
50
|
-
const metadata: Record<string, unknown> = {};
|
|
51
|
-
|
|
52
|
-
for (const line of yamlStr.split('\n')) {
|
|
53
|
-
const colonIndex = line.indexOf(':');
|
|
54
|
-
if (colonIndex === -1) continue;
|
|
55
|
-
const key = line.slice(0, colonIndex).trim();
|
|
56
|
-
let value: unknown = line.slice(colonIndex + 1).trim();
|
|
57
|
-
if (value === 'true') value = true;
|
|
58
|
-
else if (value === 'false') value = false;
|
|
59
|
-
else if (!isNaN(Number(value)) && value !== '') value = Number(value);
|
|
60
|
-
metadata[key] = value;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
metadata: metadata as unknown as HarnessSkillMetadata,
|
|
65
|
-
body,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function loadHarnessSkill(skillPath: string): HarnessSkillMetadata | null {
|
|
70
|
-
try {
|
|
71
|
-
const skillDir = path.dirname(skillPath);
|
|
72
|
-
const skillName = path.basename(skillDir);
|
|
73
|
-
const content = fs.readFileSync(skillPath, 'utf-8');
|
|
74
|
-
const { metadata } = parseYamlFrontmatter(content);
|
|
75
|
-
metadata.name = skillName;
|
|
76
|
-
return metadata;
|
|
77
|
-
} catch {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function loadAllHarnessSkills(): HarnessSkillMetadata[] {
|
|
83
|
-
const skills: HarnessSkillMetadata[] = [];
|
|
84
|
-
|
|
85
|
-
if (!fs.existsSync(BOLLHARNESS_SKILLS_DIR)) {
|
|
86
|
-
console.warn(`[SkillAdapter] Bollharness skills dir not found: ${BOLLHARNESS_SKILLS_DIR}`);
|
|
87
|
-
return skills;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
const entries = fs.readdirSync(BOLLHARNESS_SKILLS_DIR, { withFileTypes: true });
|
|
91
|
-
for (const entry of entries) {
|
|
92
|
-
if (!entry.isDirectory()) continue;
|
|
93
|
-
const skillPath = path.join(BOLLHARNESS_SKILLS_DIR, entry.name, 'SKILL.md');
|
|
94
|
-
if (fs.existsSync(skillPath)) {
|
|
95
|
-
const metadata = loadHarnessSkill(skillPath);
|
|
96
|
-
if (metadata) {
|
|
97
|
-
skills.push(metadata);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return skills;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface SkillTriggers {
|
|
106
|
-
keywords: string[];
|
|
107
|
-
patterns: RegExp[];
|
|
108
|
-
contexts: string[];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface AdaptedSkill {
|
|
112
|
-
name: string;
|
|
113
|
-
description: string;
|
|
114
|
-
triggers: SkillTriggers;
|
|
115
|
-
execute: (params: Record<string, unknown>) => Promise<string>;
|
|
116
|
-
getGatePack?: () => Record<string, unknown>;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface SkillMetadata {
|
|
120
|
-
name: string;
|
|
121
|
-
tier: 'entry' | 'intermediate' | 'advanced';
|
|
122
|
-
status: 'active' | 'deprecated' | 'experimental';
|
|
123
|
-
owner?: string;
|
|
124
|
-
last_audited?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Base skill class for bollharness-compatible skills
|
|
129
|
-
*/
|
|
130
|
-
export abstract class BaseSkill implements Skill {
|
|
131
|
-
abstract name: string;
|
|
132
|
-
abstract description: string;
|
|
133
|
-
|
|
134
|
-
abstract execute(params: Record<string, unknown>): Promise<string>;
|
|
135
|
-
|
|
136
|
-
protected log(message: string, level: 'info' | 'warn' | 'error' = 'info'): void {
|
|
137
|
-
const prefix = level === 'error' ? '❌' : level === 'warn' ? '⚠️' : 'ℹ️';
|
|
138
|
-
console.log(`${prefix} [${this.name}] ${message}`);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
protected formatOutput(output: Record<string, unknown>): string {
|
|
142
|
-
return JSON.stringify(output, null, 2);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Architecture Skill - Project architect for architecture decisions
|
|
148
|
-
*/
|
|
149
|
-
export class ArchSkill extends BaseSkill {
|
|
150
|
-
name = 'arch';
|
|
151
|
-
description = 'Project architect. Responsible for architecture decisions, scheme comparison, and boundary freezing.';
|
|
152
|
-
|
|
153
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
154
|
-
const task = params.task as string || params.description as string;
|
|
155
|
-
|
|
156
|
-
this.log('Analyzing architecture task');
|
|
157
|
-
|
|
158
|
-
// Extract essence
|
|
159
|
-
const essence = this.extractEssence(task);
|
|
160
|
-
|
|
161
|
-
// Find tensions
|
|
162
|
-
const tensions = this.identifyTensions(task);
|
|
163
|
-
|
|
164
|
-
// Compare alternatives
|
|
165
|
-
const alternatives = this.compareAlternatives(task);
|
|
166
|
-
|
|
167
|
-
// Identify boundaries to freeze
|
|
168
|
-
const boundaries = this.identifyBoundaries(task);
|
|
169
|
-
|
|
170
|
-
return this.formatOutput({
|
|
171
|
-
essence,
|
|
172
|
-
tensions,
|
|
173
|
-
alternatives,
|
|
174
|
-
boundaries,
|
|
175
|
-
recommendation: this.makeRecommendation(task, alternatives),
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
private extractEssence(task: string): string {
|
|
180
|
-
// Simplified essence extraction
|
|
181
|
-
return `The core challenge is: ${task}`;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
private identifyTensions(task: string): string[] {
|
|
185
|
-
return [
|
|
186
|
-
'Simplicity vs Flexibility',
|
|
187
|
-
'Performance vs Maintainability',
|
|
188
|
-
'Coupling vs Cohesion',
|
|
189
|
-
];
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
private compareAlternatives(task: string): Array<{name: string; tradeoffs: string[]; recommendation: string}> {
|
|
193
|
-
return [
|
|
194
|
-
{
|
|
195
|
-
name: 'Option A: Direct Implementation',
|
|
196
|
-
tradeoffs: ['Fast to implement', 'May not scale'],
|
|
197
|
-
recommendation: 'Suitable for MVP',
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
name: 'Option B: Abstraction Layer',
|
|
201
|
-
tradeoffs: ['More upfront work', 'Better for extension'],
|
|
202
|
-
recommendation: 'Suitable for long-term',
|
|
203
|
-
},
|
|
204
|
-
];
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
private identifyBoundaries(task: string): string[] {
|
|
208
|
-
return [
|
|
209
|
-
'API contract boundaries',
|
|
210
|
-
'Data format boundaries',
|
|
211
|
-
'Capability boundaries',
|
|
212
|
-
];
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
private makeRecommendation(task: string, alternatives: Array<{name: string; recommendation: string}>): string {
|
|
216
|
-
return alternatives[1]?.recommendation || 'Consider abstraction layer for long-term maintainability';
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Lead Skill - Development workflow commander (fail-closed state machine)
|
|
222
|
-
*/
|
|
223
|
-
export class LeadSkill extends BaseSkill {
|
|
224
|
-
name = 'lead';
|
|
225
|
-
description = 'Development workflow commander. Fail-closed state machine from idea to production code.';
|
|
226
|
-
|
|
227
|
-
private currentGate = 0;
|
|
228
|
-
|
|
229
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
230
|
-
const action = params.action as string;
|
|
231
|
-
|
|
232
|
-
this.log('Processing lead action');
|
|
233
|
-
|
|
234
|
-
switch (action) {
|
|
235
|
-
case 'get_gate':
|
|
236
|
-
return this.getGatePack();
|
|
237
|
-
case 'transition':
|
|
238
|
-
return this.handleTransition(params);
|
|
239
|
-
case 'classify':
|
|
240
|
-
return this.classifyChange(params);
|
|
241
|
-
default:
|
|
242
|
-
return this.getGatePack();
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
getGatePack(): string {
|
|
247
|
-
const gates = [
|
|
248
|
-
{ gate: 0, name: 'Problem Lock', required: 'Problem statement + Change Classification' },
|
|
249
|
-
{ gate: 1, name: 'Architecture Design', required: 'ADR draft + Consumer list' },
|
|
250
|
-
{ gate: 2, name: 'Architecture Review', required: 'Review report (PASS/BLOCK)' },
|
|
251
|
-
{ gate: 3, name: 'Plan', required: 'PLAN document + Coverage matrix' },
|
|
252
|
-
{ gate: 4, name: 'Plan Review', required: 'Review report + plan-lock' },
|
|
253
|
-
{ gate: 5, name: 'Task Architecture', required: 'WP split + TASK.md' },
|
|
254
|
-
{ gate: 6, name: 'Task Review', required: 'Review report (PASS/BLOCK)' },
|
|
255
|
-
{ gate: 7, name: 'Execution', required: 'Code + LOG.md' },
|
|
256
|
-
{ gate: 8, name: 'Final Review', required: 'Review report + Acceptance' },
|
|
257
|
-
];
|
|
258
|
-
|
|
259
|
-
const current = gates[this.currentGate];
|
|
260
|
-
|
|
261
|
-
return this.formatOutput({
|
|
262
|
-
current_gate: this.currentGate,
|
|
263
|
-
gate_name: current.name,
|
|
264
|
-
entry_satisfied: true,
|
|
265
|
-
blockers: [],
|
|
266
|
-
required_artifact: current.required,
|
|
267
|
-
required_next_skill: 'arch',
|
|
268
|
-
available_actions: ['get_gate', 'transition', 'classify'],
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
private handleTransition(params: Record<string, unknown>): string {
|
|
273
|
-
const reviewResult = params.reviewResult as { verdict: string } | undefined;
|
|
274
|
-
|
|
275
|
-
// Check if review gate needs PASS
|
|
276
|
-
if (this.currentGate === 2 || this.currentGate === 4 || this.currentGate === 6 || this.currentGate === 8) {
|
|
277
|
-
if (!reviewResult || reviewResult.verdict !== 'PASS') {
|
|
278
|
-
return this.formatOutput({
|
|
279
|
-
transition: 'BLOCKED',
|
|
280
|
-
reason: 'Review gate requires PASS verdict from independent reviewer',
|
|
281
|
-
current_gate: this.currentGate,
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
this.currentGate = Math.min(8, this.currentGate + 1);
|
|
287
|
-
|
|
288
|
-
return this.formatOutput({
|
|
289
|
-
transition: 'SUCCESS',
|
|
290
|
-
from_gate: this.currentGate - 1,
|
|
291
|
-
to_gate: this.currentGate,
|
|
292
|
-
gate_pack: this.getGatePack(),
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
private classifyChange(params: Record<string, unknown>): string {
|
|
297
|
-
const description = params.description as string || '';
|
|
298
|
-
|
|
299
|
-
// Simplified classification
|
|
300
|
-
const isPolicy = description.includes('policy') || description.includes('boundary');
|
|
301
|
-
const isContract = description.includes('API') || description.includes('contract') || description.includes('schema');
|
|
302
|
-
const isImplementation = !isPolicy && !isContract;
|
|
303
|
-
|
|
304
|
-
return this.formatOutput({
|
|
305
|
-
classification: isPolicy ? 'policy' : isContract ? 'contract' : 'implementation',
|
|
306
|
-
description,
|
|
307
|
-
minimum_gate_path: isPolicy ? '0→8 (full)' : isContract ? '0→8 (full + consumers)' : '0→7 (fast track eligible)',
|
|
308
|
-
fast_track_eligible: isImplementation,
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Task Architecture Skill - Task decomposition
|
|
315
|
-
*/
|
|
316
|
-
export class TaskArchSkill extends BaseSkill {
|
|
317
|
-
name = 'task-arch';
|
|
318
|
-
description = 'Task decomposition. Breaks down PLAN into parallelizable work packages (WP).';
|
|
319
|
-
|
|
320
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
321
|
-
const plan = params.plan as string;
|
|
322
|
-
|
|
323
|
-
this.log('Decomposing plan into work packages');
|
|
324
|
-
|
|
325
|
-
// Extract work packages
|
|
326
|
-
const workPackages = this.extractWorkPackages(plan);
|
|
327
|
-
|
|
328
|
-
// Identify seams
|
|
329
|
-
const seams = this.identifySeams(workPackages);
|
|
330
|
-
|
|
331
|
-
// Identify integration points
|
|
332
|
-
const integration = this.identifyIntegration(workPackages);
|
|
333
|
-
|
|
334
|
-
return this.formatOutput({
|
|
335
|
-
work_packages: workPackages,
|
|
336
|
-
seams,
|
|
337
|
-
integration,
|
|
338
|
-
seam_owners: this.assignSeamOwners(seams),
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
private extractWorkPackages(plan: string): Array<{id: string; description: string; files: string[]}> {
|
|
343
|
-
// Simplified WP extraction
|
|
344
|
-
return [
|
|
345
|
-
{ id: 'WP-1', description: 'Core implementation', files: ['src/agents/*.ts'] },
|
|
346
|
-
{ id: 'WP-2', description: 'Network layer', files: ['src/network/*.ts'] },
|
|
347
|
-
{ id: 'WP-3', description: 'Testing', files: ['src/test/*.ts'] },
|
|
348
|
-
];
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
private identifySeams(packages: Array<{id: string}>): Array<{from: string; to: string; interface: string}> {
|
|
352
|
-
return [
|
|
353
|
-
{ from: 'WP-1', to: 'WP-2', interface: 'P2PNetwork interface' },
|
|
354
|
-
{ from: 'WP-1', to: 'WP-3', interface: 'Test fixtures' },
|
|
355
|
-
];
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
private identifyIntegration(packages: Array<{id: string}>): string[] {
|
|
359
|
-
return ['Integration test at WP-1/WP-2 boundary'];
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
private assignSeamOwners(seams: Array<{from: string; to: string}>): Record<string, string> {
|
|
363
|
-
const owners: Record<string, string> = {};
|
|
364
|
-
for (const seam of seams) {
|
|
365
|
-
owners[`${seam.from}/${seam.to}`] = 'integration-owner';
|
|
366
|
-
}
|
|
367
|
-
return owners;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Harness Engineering Skill - Engineering execution
|
|
373
|
-
*/
|
|
374
|
-
export class HarnessEngSkill extends BaseSkill {
|
|
375
|
-
name = 'harness-eng';
|
|
376
|
-
description = 'Engineering execution. Implements code according to PLAN.';
|
|
377
|
-
|
|
378
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
379
|
-
const workPackage = params.workPackage as string;
|
|
380
|
-
const plan = params.plan as string;
|
|
381
|
-
|
|
382
|
-
this.log(`Executing work package: ${workPackage}`);
|
|
383
|
-
|
|
384
|
-
// Verify prerequisites
|
|
385
|
-
const prereqs = this.checkPrerequisites(workPackage);
|
|
386
|
-
|
|
387
|
-
// Execute implementation
|
|
388
|
-
const steps = this.planImplementation(workPackage, plan);
|
|
389
|
-
|
|
390
|
-
// Log execution
|
|
391
|
-
const log = this.createExecutionLog(steps);
|
|
392
|
-
|
|
393
|
-
return this.formatOutput({
|
|
394
|
-
work_package: workPackage,
|
|
395
|
-
prerequisites: prereqs,
|
|
396
|
-
steps,
|
|
397
|
-
log,
|
|
398
|
-
status: prereqs.met ? 'ready' : 'blocked',
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
private checkPrerequisites(workPackage: string): { met: boolean; missing: string[] } {
|
|
403
|
-
// Simplified check
|
|
404
|
-
return { met: true, missing: [] };
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
private planImplementation(workPackage: string, plan: string): string[] {
|
|
408
|
-
return [
|
|
409
|
-
'Step 1: Implement core logic',
|
|
410
|
-
'Step 2: Add error handling',
|
|
411
|
-
'Step 3: Write unit tests',
|
|
412
|
-
'Step 4: Update documentation',
|
|
413
|
-
];
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
private createExecutionLog(steps: string[]): string {
|
|
417
|
-
return `# Execution Log\n\n${steps.map((s, i) => `${i + 1}. ${s}`).join('\n')}`;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Harness Engineering Test Skill - Test strategy and execution
|
|
423
|
-
* Ported from src/bollharness/.claude/skills/harness-eng-test/SKILL.md
|
|
424
|
-
*/
|
|
425
|
-
export class HarnessEngTestSkill extends BaseSkill {
|
|
426
|
-
name = 'harness-eng-test';
|
|
427
|
-
description = 'Testing engineering specialist. Test strategy, test case design, test execution and quality verification. Scheduled by lead at Gate 8.';
|
|
428
|
-
|
|
429
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
430
|
-
const action = params.action as string;
|
|
431
|
-
const plan = params.plan as string;
|
|
432
|
-
const frozen = params.frozen as boolean;
|
|
433
|
-
|
|
434
|
-
this.log('Executing test engineering');
|
|
435
|
-
|
|
436
|
-
if (action === 'strategy') {
|
|
437
|
-
return this.createTestStrategy(plan);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
if (action === 'cases') {
|
|
441
|
-
return this.createTestCases(plan);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
if (action === 'execute') {
|
|
445
|
-
return this.executeTests();
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
return this.formatOutput({
|
|
449
|
-
skill: this.name,
|
|
450
|
-
description: this.description,
|
|
451
|
-
available_actions: ['strategy', 'cases', 'execute'],
|
|
452
|
-
gate_8_only: true,
|
|
453
|
-
truth_policy: [
|
|
454
|
-
'Tests must be independent from implementation',
|
|
455
|
-
'Test coverage does not equal test quality',
|
|
456
|
-
'Report test results honestly',
|
|
457
|
-
],
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
private createTestStrategy(plan: string): string {
|
|
462
|
-
const layers = [
|
|
463
|
-
{ layer: 'Unit tests', target: 'Fast feedback', tool: 'vitest' },
|
|
464
|
-
{ layer: 'Integration tests', target: 'Module interfaces', tool: 'supertest' },
|
|
465
|
-
{ layer: 'E2E tests', target: 'User journeys', tool: 'playwright' },
|
|
466
|
-
];
|
|
467
|
-
|
|
468
|
-
return this.formatOutput({
|
|
469
|
-
test_strategy: layers,
|
|
470
|
-
coverage_target: plan.includes('API') ? 'contract-focused' : 'function-focused',
|
|
471
|
-
fast_track_eligible: false,
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
private createTestCases(plan: string): string {
|
|
476
|
-
return this.formatOutput({
|
|
477
|
-
test_cases: [
|
|
478
|
-
{ id: 'TC-1', description: 'Core functionality', priority: 'P0' },
|
|
479
|
-
{ id: 'TC-2', description: 'Edge cases', priority: 'P1' },
|
|
480
|
-
{ id: 'TC-3', description: 'Error handling', priority: 'P1' },
|
|
481
|
-
],
|
|
482
|
-
requirements: plan,
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
private executeTests(): string {
|
|
487
|
-
return this.formatOutput({
|
|
488
|
-
execution_report: {
|
|
489
|
-
status: 'NOT_EXECUTED',
|
|
490
|
-
message: 'Test execution requires bollharness environment',
|
|
491
|
-
},
|
|
492
|
-
truth_policy: [
|
|
493
|
-
'"collect passed" ≠ "tests passed"',
|
|
494
|
-
'Failure is failure, do not downgrade',
|
|
495
|
-
'BLOCKED must be explicitly marked',
|
|
496
|
-
],
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Crystal Learn Skill - Failure pattern extraction
|
|
503
|
-
*/
|
|
504
|
-
export class CrystalLearnSkill extends BaseSkill {
|
|
505
|
-
name = 'crystal-learn';
|
|
506
|
-
description = 'Extracts failure patterns and maintains invariants.';
|
|
507
|
-
|
|
508
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
509
|
-
const task = params.task as string;
|
|
510
|
-
|
|
511
|
-
this.log('Extracting failure patterns');
|
|
512
|
-
|
|
513
|
-
// Identify failure modes
|
|
514
|
-
const failures = this.identifyFailures(task);
|
|
515
|
-
|
|
516
|
-
// Extract patterns
|
|
517
|
-
const patterns = this.extractPatterns(failures);
|
|
518
|
-
|
|
519
|
-
// Generate invariants
|
|
520
|
-
const invariants = this.generateInvariants(patterns);
|
|
521
|
-
|
|
522
|
-
return this.formatOutput({
|
|
523
|
-
failure_modes: failures,
|
|
524
|
-
patterns,
|
|
525
|
-
invariants,
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
private identifyFailures(task: string): string[] {
|
|
530
|
-
return [
|
|
531
|
-
'Truth source split',
|
|
532
|
-
'Verification decay',
|
|
533
|
-
'Orphaned seams',
|
|
534
|
-
];
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
private extractPatterns(failures: string[]): Array<{pattern: string; prevention: string}> {
|
|
538
|
-
return failures.map(f => ({
|
|
539
|
-
pattern: f,
|
|
540
|
-
prevention: `Implement guard to prevent ${f}`,
|
|
541
|
-
}));
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
private generateInvariants(patterns: Array<{pattern: string}>): string[] {
|
|
545
|
-
return patterns.map(p => `INV: ${p.pattern} must not occur`);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Skill Adapter - Registers all bollharness skills with Bolloon's SkillRegistry
|
|
551
|
-
*/
|
|
552
|
-
export class SkillAdapter {
|
|
553
|
-
private registry: SkillRegistry;
|
|
554
|
-
private harnessSkills: HarnessSkillMetadata[] = [];
|
|
555
|
-
|
|
556
|
-
constructor() {
|
|
557
|
-
this.registry = new SkillRegistry();
|
|
558
|
-
this.registerSkills();
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
private registerSkills(): void {
|
|
562
|
-
// Load harness skills from src/bollharness/.claude/skills/
|
|
563
|
-
this.harnessSkills = loadAllHarnessSkills();
|
|
564
|
-
this.log(`Loaded ${this.harnessSkills.length} skills from bollharness`);
|
|
565
|
-
|
|
566
|
-
// Register adapted skills for skills not yet fully adapted
|
|
567
|
-
const adaptedSkills: Skill[] = [
|
|
568
|
-
new ArchSkill(),
|
|
569
|
-
new LeadSkill(),
|
|
570
|
-
new TaskArchSkill(),
|
|
571
|
-
new HarnessEngSkill(),
|
|
572
|
-
new HarnessEngTestSkill(),
|
|
573
|
-
new CrystalLearnSkill(),
|
|
574
|
-
];
|
|
575
|
-
|
|
576
|
-
for (const skill of adaptedSkills) {
|
|
577
|
-
try {
|
|
578
|
-
this.registry.register(skill);
|
|
579
|
-
this.log(`Registered adapted skill: ${skill.name}`);
|
|
580
|
-
} catch (error) {
|
|
581
|
-
this.log(`Failed to register ${skill.name}: ${error}`, 'error');
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
// Register harness-native skills (metadata only, execution delegated)
|
|
586
|
-
for (const harnessMeta of this.harnessSkills) {
|
|
587
|
-
const adaptedNames = adaptedSkills.map(s => s.name);
|
|
588
|
-
if (!adaptedNames.includes(harnessMeta.name)) {
|
|
589
|
-
try {
|
|
590
|
-
const proxySkill = createHarnessProxySkill(harnessMeta);
|
|
591
|
-
this.registry.register(proxySkill);
|
|
592
|
-
this.log(`Registered harness proxy skill: ${harnessMeta.name}`);
|
|
593
|
-
} catch (error) {
|
|
594
|
-
this.log(`Failed to register harness skill ${harnessMeta.name}: ${error}`, 'error');
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
getRegistry(): SkillRegistry {
|
|
601
|
-
return this.registry;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
getSkill(name: string): Skill | undefined {
|
|
605
|
-
return this.registry.get(name);
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
listSkills(): Skill[] {
|
|
609
|
-
return this.registry.list();
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
listHarnessSkills(): HarnessSkillMetadata[] {
|
|
613
|
-
return this.harnessSkills;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
async executeSkill(name: string, params: Record<string, unknown>): Promise<string> {
|
|
617
|
-
return this.registry.execute(name, params);
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
private log(message: string, level: 'info' | 'warn' | 'error' = 'info'): void {
|
|
621
|
-
const prefix = level === 'error' ? '❌' : level === 'warn' ? '⚠️' : 'ℹ️';
|
|
622
|
-
console.log(`${prefix} [SkillAdapter] ${message}`);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
function createHarnessProxySkill(meta: HarnessSkillMetadata): Skill {
|
|
627
|
-
return {
|
|
628
|
-
name: meta.name,
|
|
629
|
-
description: meta.description,
|
|
630
|
-
async execute(params: Record<string, unknown>): Promise<string> {
|
|
631
|
-
return JSON.stringify({
|
|
632
|
-
skill: meta.name,
|
|
633
|
-
description: meta.description,
|
|
634
|
-
tier: meta.tier,
|
|
635
|
-
status: meta.status,
|
|
636
|
-
outputs: meta.outputs || [],
|
|
637
|
-
message: `Harness skill '${meta.name}' requires bollharness environment for full execution`,
|
|
638
|
-
params_received: params,
|
|
639
|
-
}, null, 2);
|
|
640
|
-
},
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
export const createSkillAdapter = (): SkillAdapter => {
|
|
645
|
-
return new SkillAdapter();
|
|
646
|
-
};
|