kc-beta 0.7.5 → 0.8.1

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.
Files changed (40) hide show
  1. package/README.md +47 -0
  2. package/package.json +3 -2
  3. package/src/agent/engine.js +390 -100
  4. package/src/agent/pipelines/_advance-hints.js +92 -0
  5. package/src/agent/pipelines/_milestone-derive.js +247 -13
  6. package/src/agent/pipelines/skill-authoring.js +30 -1
  7. package/src/agent/tools/agent-tool.js +2 -2
  8. package/src/agent/tools/consult-skill.js +15 -0
  9. package/src/agent/tools/dashboard-render.js +48 -1
  10. package/src/agent/tools/document-parse.js +31 -2
  11. package/src/agent/tools/phase-advance.js +17 -13
  12. package/src/agent/tools/release.js +250 -7
  13. package/src/agent/tools/sandbox-exec.js +65 -8
  14. package/src/agent/tools/worker-llm-call.js +95 -15
  15. package/src/agent/workspace.js +25 -4
  16. package/src/cli/components.js +4 -1
  17. package/src/cli/index.js +97 -1
  18. package/src/config.js +19 -2
  19. package/src/marathon/driver.js +217 -0
  20. package/src/marathon/prompts.js +93 -0
  21. package/template/.env.template +16 -0
  22. package/template/skills/en/bootstrap-workspace/SKILL.md +14 -0
  23. package/template/skills/en/quality-control/SKILL.md +9 -0
  24. package/template/skills/en/skill-authoring/SKILL.md +39 -0
  25. package/template/skills/en/skill-to-workflow/SKILL.md +53 -0
  26. package/template/skills/en/work-decomposition/SKILL.md +34 -0
  27. package/template/skills/phase_skills.yaml +5 -0
  28. package/template/skills/zh/bootstrap-workspace/SKILL.md +14 -0
  29. package/template/skills/zh/compliance-judgment/SKILL.md +37 -37
  30. package/template/skills/zh/document-chunking/SKILL.md +21 -14
  31. package/template/skills/zh/document-parsing/SKILL.md +65 -65
  32. package/template/skills/zh/entity-extraction/SKILL.md +68 -68
  33. package/template/skills/zh/quality-control/SKILL.md +9 -0
  34. package/template/skills/zh/skill-authoring/SKILL.md +39 -0
  35. package/template/skills/zh/skill-creator/SKILL.md +204 -200
  36. package/template/skills/zh/skill-to-workflow/SKILL.md +53 -0
  37. package/template/skills/zh/tree-processing/SKILL.md +67 -63
  38. package/template/skills/zh/work-decomposition/SKILL.md +34 -0
  39. package/template/workflows/common/llm_client.py +168 -0
  40. package/template/workflows/common/utils.py +132 -0
package/README.md CHANGED
@@ -21,12 +21,59 @@ npm install -g kc-beta
21
21
  kc-beta onboard # configure provider + API key
22
22
  cd my-project # a folder containing rules/ and samples/
23
23
  kc-beta # launch the agent
24
+
25
+ # v0.8.1+ unattended runs: type the slash command inside the kc-beta TUI
26
+ > /marathon Verify the new regulation against samples/. Iterate twice. If
27
+ most workflows work with regex, build another version using tier1+tier2
28
+ worker LLMs more aggressively.
29
+ # Marathon mode chains turns automatically. /marathon off disengages.
30
+ # /marathon status shows the driver state.
24
31
  ```
25
32
 
26
33
  Requires **Node.js 20+**. See [QUICKSTART.md](./QUICKSTART.md) for the full setup walkthrough.
27
34
 
28
35
  ---
29
36
 
37
+ ## v0.8 Highlights
38
+
39
+ - **`/marathon <goal>` slash command** (v0.8.1; replaces the v0.8.0
40
+ separate-process `kc-marathon` CLI). Activates an inline driver inside
41
+ the running kc-beta TUI. Goal embedded in the command. `/marathon off`
42
+ to disengage manually; `/marathon status` to inspect. F5
43
+ one-phase-per-prompt stays enabled for interactive sessions and
44
+ bypasses cleanly when marathon is active. Status-bar shows
45
+ `🏃 MARATHON` only when active — no clutter in normal mode. v0.8.0's
46
+ separate-process driver was scrapped after E2E #11 found drivers
47
+ died silently when their parent terminal closed (SIGHUP unhandled).
48
+ - **Skill usage counter** — passive Layer-B measurement of which skills
49
+ the engine actually ships to the LLM. `skill_byte_send` events go to
50
+ events.jsonl; the audit script aggregates per-phase × per-skill.
51
+ Agent-blind by design.
52
+ - **`worker_llm_call` batch mode** — `prompts: [...]` array input with
53
+ concurrency control (default 5, max 10). Pairs with a canonical
54
+ `workflows/common/llm_client.py` shim (taught in `skill-to-workflow`)
55
+ so distilled workflows route through the engine where possible and
56
+ log to `output/llm_ledger.jsonl` when they don't.
57
+ - **`sandbox_exec` timeout model** — default 120s (was 30s); per-call
58
+ `timeout_ms` up to 600s for known-slow commands. Configurable via
59
+ `KC_EXEC_DEFAULT_TIMEOUT_MS` + `KC_EXEC_MAX_TIMEOUT_MS`.
60
+ - **Prescriptive phase-advance hints** — refusal messages now name
61
+ concrete next-action artifacts (`workflows/<rule_id>/workflow_v1.py`,
62
+ `output/results/production_qc_results.json`, etc.) instead of
63
+ descriptive `engineCounts` only.
64
+ - **`check.py` substantiveness audit** — engine detects stub-shaped
65
+ rule_skills/<id>/check.py files (NOT_APPLICABLE-only returns with no
66
+ workflow delegation). Surfaced in milestones; opt-in enforcement via
67
+ `KC_ENFORCE_CHECK_PY_SUBSTANTIVE=1`.
68
+
69
+ Plus engine-fix carryover from the v0.7.5 audit cycle: H3 calibration
70
+ aggregator schema, milestone-derivation gaps (review_001.json + multi-
71
+ path coverage_report.md), VLM runtime hardcode (workspace .env overlay),
72
+ heap_mb periodic-write fix, stale release detection, taskboard skill
73
+ availability in every phase. Full list: see DEV_LOG v0.8 entry.
74
+
75
+ ---
76
+
30
77
  ## What It Does
31
78
 
32
79
  KC drives a single coding agent through seven phases:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kc-beta",
3
- "version": "0.7.5",
3
+ "version": "0.8.1",
4
4
  "description": "KC Agent — LLM document verification agent (pure Node.js CLI). Dual-licensed: PolyForm Noncommercial 1.0.0 for personal/noncommercial use; commercial license required for enterprise production. See LICENSE and LICENSE-COMMERCIAL.md.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,8 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build:meme": "node scripts/build-meme.js",
21
- "prepublishOnly": "node scripts/build-meme.js"
21
+ "prepublishOnly": "node scripts/build-meme.js",
22
+ "test": "node scripts/run-tests.js"
22
23
  },
23
24
  "homepage": "https://github.com/kitchen-engineer42/kc-cli",
24
25
  "repository": {