-
Implements the §P1 acceptance gate from plan-migration.md: a single POST /api/devloop/projects produces a runnable todo-demo project with multi-page PRD/SDD sites, units.json, integration spec, agent-state, and history snapshots — all via mock agents (no real Claude CLI cost). Code additions: - packages/acp-core/protocol/ClaudeCliProtocol.js * mock mode now emits an extra `mock/files` acp_event when the fixture contains a files[] array. LoopController applies it to the project root, letting mock agents produce real outputs. - server/src/core/devloop/loop-controller.js (now ~280 lines) * callAgent(pid, agentName, prompt, opts) — single-agent invocation: reads system/templates/{agent}/prompt.md, runs mock protocol, applies fixture files[], timeline-logs, auto-commits. * runDocsPhase(pid, requirement) — orchestrates PM → Architect with `docs.complete` timeline marker. * getProjectState(pid) — returns project.json + units + prd_rev/sdd_rev + timeline tail for the GET /state endpoint. - server/routes/devloop.js (new) * POST /api/devloop/projects — createProject + runDocsPhase * GET /api/devloop/projects * GET /api/devloop/projects/:pid/state - server/index.js / server/agent-server.js — mount /api/devloop. Mock fixtures (drive the full acceptance file tree): - fixtures/devloop-mock/devloop-pm.json * 14 files: prd/{index,reading-guide,product/*,feature/*,flow/*,prototype/*}.html, prd/assets/{shell.css,shell.js,search-index.json}, agent-state/{pm.json,pm-todo.json}, history/prd-rev-001.html. - fixtures/devloop-mock/devloop-architect.json * 13 files: sdd/{index,mvcp/*}.html, sdd/assets/*, units.json (3 units, DAG), integration/spec.json, agent-state/{architect.json,architect-todo.json}, history/sdd-rev-001.html. Acceptance: - scripts/phase1-verify.js — spins ephemeral express app, POSTs the todo-demo project, asserts 23 expected paths exist + 3 units with l2_rounds/l2_budget + git ≥4 commits + timeline events. Tests (12 new cases): - server/tests/devloop/loop-controller.test.js (7) — callAgent + runDocsPhase + state. - server/tests/devloop/routes.test.js (5) — POST validation, full POST, GET state, 404 on unknown pid. Results: - phase0-verify: 8/8 - phase0-test-call: 7/7 - phase1-verify: 7/7 - vitest devloop+acp-core: 174/174 (was 162 → +12) Specs: docs/prd/newfunction/_spec/plan-migration.md · P1 Docs MVP Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> -
Final P0 deliverables to make the system bootable in mock mode and pass `scripts/phase0-verify.js` + `scripts/phase0-test-call.js` end-to-end. ClaudeCliProtocol (mock mode): - LEMONBOSS_CLAUDE_MODE=mock or { mock: true } in constructor enables mock mode. connect() becomes a no-op; sendPrompt reads fixtures from fixtures/devloop-mock/{agentName}.json and emits scripted session_update chunks + session/result(mock=true). Falls back to default.json. Agent registry: - 6 entries added to system/templates/_registry.json (devloop-pm, devloop-architect, devloop-coder, devloop-tester, devloop-integrator, devloop-triager). - Per-agent dirs system/templates/devloop-{role}/ with: * prompt.md — auto-extracted from agents-{role}.html §2.2 * config.json — cli.toolPolicy.allowedTools + sandbox.writeAllowList Tooling: - scripts/extract-agent-prompts.js — regex-extracts §2.2 system prompts from 6 agent HTML pages to system/templates/devloop-{role}/prompt.md. - server/src/tools/devloop/index.js — central export (tools Map, bashHooks, dispatch). - server/src/core/devloop/loop-controller.js (P0 skeleton) — exposes createProject (sandbox alloc + git init + first commit + timeline) and commitAfterAgent (per-agent kind-routed git commit + timeline event). Mock fixtures: - fixtures/devloop-mock/default.json + devloop-pm.json Acceptance scripts: - scripts/phase0-verify.js — 8 static checks (35 tools loadable, 6 agents registered, prompt+config wired, bash guard exported, services require, fixtures present, git-vault interface, loop-controller). - scripts/phase0-test-call.js — 7 end-to-end steps under mock mode (createProject → CLI connect → sendPrompt chunks → no-op commit returns null → real write commits → git log ≥2 → timeline has both events). vitest.config.js: include packages/**/*.test.js so the mock smoke test runs in the suite. Results: - 162/162 devloop + acp-core tests pass (up from 159). - phase0-verify: 8/8. - phase0-test-call: 7/7. Specs: docs/prd/newfunction/_spec/plan-migration.md · Quick-Start step 7 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> -
Adds the DevLoop Agent tool layer (CommonJS) under server/src/tools/devloop: - _errors.js / _sandbox.js — shared infra (3 error classes + path allow-list w/ {unitId}) - tool-registry.js — loadAllTools / dispatch / listToolNames / getDevLoopTools - persistence-tools.js (5) — write_todolist · update_todo_item · update_runtime_state · timeline_append · record_memory - doc-tools.js (12) — bootstrap_prd_site · bootstrap_sdd_site · write_chapter · write_mvcp_page · archive_doc · diff_html · diff_units · echo_diff · update_search_index · validate_prd_site · validate_sdd_consistency · hash_contract - coder-tools.js (3) — contract_bridge · sandbox_check · append_coder_log (retry fields required) - tester-tools.js (5) — parse_vitest · hint_builder · bug_open · bug_transition · bug_list - integrator-tools.js (6) — port_picker · spawn_units · health_wait · run_case · parse_placeholder · collect_stderr - triager-tools.js (4) — extract_evidence · category_classifier · diff_contract_vs_impl · find_similar_bug - bash-json-guard.js — preExecute hook blocking inline JSON in Bash (CLAUDE.md L91-99) Total: 35 callable devloop tools. Tests: 88 cases across 9 files, all passing; combined with P0.0 services suite the project now has 159 green tests. Specs: - docs/prd/newfunction/_spec/arch-tool-registry.md - docs/prd/newfunction/_spec/agents-{pm,architect,coder,tester,integrator,triager}.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
- Moved data/system/ → system/ (agents, templates, skills, data, workspace) - Updated all server route/service path references - Updated all script path references - Updated all documentation references - Restructured .gitignore for cleaner system/ vs data/ boundary system/ = platform-shared assets (system agents, template library) data/ = tenant-specific company instance data
-
- System agents: 只保留 master (data/system/agents/master) - Templates: 所有可复用 agent 模板 (data/system/templates/) - Companies: 公司创建时自动部署 5 个元 Agent (innovator/hunter/digester/evolver/agent-creator) 路径修复: - agent-chat.js: /list 扫描路径修正 (system/agents + companies/*/agents) - agent-manager.js: 动态 agent 查找路径修正 - skill-config-loader.js: 修正 agents root - pipeline-service.js: pipelines 输出到 companies/{id}/pipelines/ - billing.log: 移至 companies/{id}/logs/ 下 Skills 标准化: - 所有 template agent 建立 .claude/skills/main_skill/SKILL.md - company-service._copyTemplate() 新增 .claude/ 目录复制 - innovator SKILL.md v3.0: 移除旧 l3-hunt/l2-digest 命名 - 清理重复 agent_creator, 统一为 agent-creator 清理: - 移除 data/agents, data/workspace, data/logs, data/goals 旧目录 - 清除所有未使用的 DATA_DIR 声明 - 清除 template 中的 conversations/logs/memory 运行态数据 -
The plugin bootstrap was calling resolveOpenclawDist() synchronously at module load time, which crashed the entire server if the optional @mas/openclaw-dist package wasn't installed. Now all three call sites defer resolution to runtime with try/catch graceful fallback.
-
…ter Agent cognitive auto-recovery loop - Refactored CompanyDashboard into read-only Observer UI - Enforced strict companyId:roleId namespacing across Node APIs and AgentManager - Added dynamic <env_status> injection to PromptBuilder for robust context - Introduced bin/lemon.js CLI for structured LLM tool execution - Implemented in-stream error interceptors for implicit silent retry loop
-
- Implement OKR GoalsService with hierarchical node tracking - Add /api/goals routes and integrate with dispatch/report APIs - Create Innovator agent with Hunt→Digest→Evolving pipeline - Create Hunter (l3-hunt), Digester (l2-digest), Evolver (evolving) meta agents - Copy L1/L2 dependency skills into each agent's .claude/skills/ - Fix buildSystemPrompt to scan ALL skill subdirectories (critical) - Fix agent list sorting: master pinned top, rest by lastActiveAt - Rename master-001→master, innovator-001→innovator - Establish meta agent output convention: write to target agent dir - Add CXO agent base class for management agents - Update CEO agent with delegation-first management model
-
- Agent as Micro-Container: each agent lives in data/agents/{id}/ with full encapsulation - Persona vs Capability split: agent.md (identity) + .claude/skills/main_skill/SKILL.md (workflow) - Conversations co-located: data/agents/{id}/conversations/ replaces global dir - Meta Skills renamed: meta_hunt, meta_digest, meta_creator, meta_evolving, meta_benchmark, meta_research - Dynamic Hot-Reload: AgentManager.getAgentConfig() falls back to filesystem scan - Parallel Sub-Agent orchestration via Promise.all with multi-terminal UI - Removed SQLite dependency, global skills/ directory, and legacy conversations/ - Full architecture docs: 18-local-filesystem-first-agent-encapsulation.md