Add parent Plan-and-Move: CALL/READ tools and quiet I/O capture.

Give the plan loop actionable observation (source excerpts, stderr/stdout tails) and short stop rules so the parent can inspect children and use stdlib helpers instead of inventing long patches.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-11 09:11:15 +08:00
1 parent 7e3b193d49
commit dbb2765553
14 files changed
+932 -130

No files matched your search

+27
View File
@@ -31,6 +31,33 @@ description: extract_plan_decision/summary; dual skeleton contains research+writ
*`r5` = > agent.extract_plan_decision reply=`d5` *
> print text=`r5`
*`act_call` = CALL:lib_catalog *
*`a1` = > agent.extract_plan_act reply=`act_call` *
*`a1k` = > json.get value=`a1` key=kind *
*`a1n` = > json.get value=`a1` key=name *
> print text=`a1k`
> print text=`a1n`
*`act_read` = READ:stderr *
*`a2` = > agent.extract_plan_act reply=`act_read` *
*`a2k` = > json.get value=`a2` key=kind *
*`a2n` = > json.get value=`a2` key=name *
> print text=`a2k`
> print text=`a2n`
*`act_dec` = > json.get value=`samples` key=done *
*`a3` = > agent.extract_plan_act reply=`act_dec` *
*`a3k` = > json.get value=`a3` key=kind *
> print text=`a3k`
*`cat` = > agent.lib_catalog *
*`files` = > json.get value=`cat` key=files *
*`nf` = > len value=`files` *
1. `nf` > 5
> print text=catalog-ok
2. *
> print text=catalog-bad
*`dual` = > agent.render_workbook_skeleton goal=demo skeleton=dual *
*`has_r` = > split value=`dual` sep=research *
*`n_r` = > len value=`has_r` *
+37
View File
@@ -0,0 +1,37 @@
---
title: parent observation excerpt + deepen (offline)
> ext/ai/agent.mq.md
> lib/json.mq.md
> lib/fs.mq.md
---
# main
*`paths` = > json.parse text={"p":".marqdo/agent-runs/observe-fixture.mq.md"} *
*`path` = > json.get value=`paths` key=p *
*`seed` = > json.parse text={"t":"---\ntitle: fixture\n---\n\n# main\n\n<!-- marqdo-out ok\nHUGE_BODY_SHOULD_BE_STRIPPED\n-->\n\n**ok**\n"} *
*`text` = > json.get value=`seed` key=t *
> fs.write_text path=`path` text=`text`
*`obs` = > agent.inspect_workbook path=`path` exit_code=0 value=ok *
*`compact` = > agent.compact_plan_observation observation=`obs` *
*`ex` = > json.get value=`compact` key=source_excerpt *
*`parts` = > split value=`ex` sep=HUGE_BODY *
*`n` = > len value=`parts` *
1. `n` == 1
> print text=excerpt-stripped
2. *
> print text=excerpt-leak
*`has` = > json.get value=`compact` key=has_value *
1. `has`
> print text=has-value-ok
2. *
> print text=has-value-bad
*`deep` = > agent.plan_read_deepen observation=`obs` kind=source path=`path` *
*`ex2` = > json.get value=`deep` key=source_excerpt *
1. `ex2`
> print text=read-source-ok
2. *
> print text=read-source-bad