Skip to content

Research/specclaw - #195

Closed
crispyberry wants to merge 2 commits into
memovai:mainfrom
crispyberry:research/specclaw
Closed

Research/specclaw#195
crispyberry wants to merge 2 commits into
memovai:mainfrom
crispyberry:research/specclaw

Conversation

@crispyberry

@crispyberry crispyberry commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added Chinese and English technical reports describing MimiClaw’s embedded agent runtime, architecture, safety controls, autonomy, fault recovery, resource usage, and evaluation plans.
    • Added research proposals for guarded speculative execution, including execution semantics, safety checks, metrics, experiments, and implementation milestones.
    • Added a complete thesis structure covering background, system design, methodology, evaluation, context compaction, skills, speculative execution, and conclusions.
    • Expanded the bibliography with references on agent systems, embedded runtimes, speculative execution, and related research.

crispyberry and others added 2 commits July 15, 2026 14:33
…on plan (EN/ZH)

Research documents for the MCU-hosted agent loop work:
- mimiclaw-system-report(.md/-zh.md): system report with evaluation plan
- specclaw-research-proposal(.md/-zh.md): guarded speculative execution proposal
- proposal-speculative-execution.md: engineering implementation plan

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds MimiClaw system reports, SpecClaw guarded-speculation proposals, and a LaTeX thesis scaffold with chapter structures, document wiring, appendices, and bibliography entries.

Changes

MimiClaw system reports

Layer / File(s) Summary
Runtime constraints and embedded architecture
docs/mimiclaw-system-report.md, docs/mimiclaw-system-report-zh.md
Documents MimiClaw’s bare-metal constraints, dual-core message bus, memory tiering, file-based memory, deterministic tools, autonomy, and fault recovery.
Resource accounting and evaluation plan
docs/mimiclaw-system-report.md, docs/mimiclaw-system-report-zh.md
Defines resource ledgers, workloads, baselines, metrics, ablations, experimental schedules, and run procedures.
System positioning and stated boundaries
docs/mimiclaw-system-report.md, docs/mimiclaw-system-report-zh.md
Adds comparisons, design principles, limitations, and source-code reference mappings.

SpecClaw research proposals

Layer / File(s) Summary
Speculation protocol and guarded commit semantics
docs/proposal-speculative-execution.md, docs/specclaw-research-proposal.md, docs/specclaw-research-proposal-zh.md
Defines speculation scripts, deterministic guards, guarded commits, irreversibility limits, repredict state, and research terminology.
Research questions and experimental design
docs/proposal-speculative-execution.md, docs/specclaw-research-proposal.md, docs/specclaw-research-proposal-zh.md
Specifies hypotheses, task suites, substrates, baselines, metrics, ablations, milestones, risks, and dissemination plans.
MimiClaw implementation plan
docs/proposal-speculative-execution.md
Maps planned implementation modules, bench infrastructure, instrumentation, milestones, and the opt-in build switch.

Thesis document scaffold

Layer / File(s) Summary
Thesis document assembly
docs/thesis/main.tex
Defines thesis metadata, formatting, front matter, chapter inclusion, bibliography wiring, and appendices.
Introduction and background chapters
docs/thesis/chapters/ch1-introduction.tex, docs/thesis/chapters/ch2-background.tex
Adds structured chapters for motivation, research questions, contributions, related work, agent runtimes, embedded systems, and evaluation gaps.
System and methodology chapters
docs/thesis/chapters/ch3-system.tex, docs/thesis/chapters/ch4-methodology.tex, docs/thesis/chapters/ch5-characterization.tex
Adds chapter scaffolds for MimiClaw architecture, methodology, measurements, resource characterization, and reliability.
Context, skills, and speculation chapters
docs/thesis/chapters/ch6-context-compaction.tex, docs/thesis/chapters/ch7-skills.tex, docs/thesis/chapters/ch8-speculative-execution.tex
Adds structural chapters for context compaction, OS-less skills, and guarded speculative execution.
Conclusion and appendix structure
docs/thesis/chapters/ch9-conclusion.tex, docs/thesis/chapters/appendix.tex
Defines conclusion sections, limitations, future work, closing remarks, and four appendix chapters.
Bibliography records
docs/thesis/references.bib
Adds BibTeX references covering agent systems, speculative execution, evaluation, embedded runtimes, and related projects.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague and only names the branch, so it does not clearly summarize the change. Rename it to describe the main change, such as adding the SpecClaw research proposal and thesis documentation.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

🧹 Nitpick comments (2)
docs/specclaw-research-proposal.md (1)

97-103: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy lift

Specify how “matched task success” is enforced.

B2 and unsafe guard configurations may have materially different success rates. State whether configurations are tuned to a common success target, compared on a success–cost frontier, or evaluated with success as a constraint; otherwise the headline comparison is not reproducible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/specclaw-research-proposal.md` around lines 97 - 103, Clarify in RQ1 how
“matched task success” is enforced across B2 and unsafe guard configurations.
Specify whether configurations are tuned to a common success target, compared on
a success–cost frontier, or evaluated with success as a constraint, and use that
policy consistently for the headline comparison.
docs/specclaw-research-proposal-zh.md (1)

99-105: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy lift

明确“成功率持平”的实验匹配方法。

不同 baseline 可能具有不同任务成功率。请说明是调参到共同成功率、比较成功率—成本前沿,还是将成功率作为约束;否则该比较难以复现。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/specclaw-research-proposal-zh.md` around lines 99 - 105, 在 RQ1
的实验设计中明确“成功率持平”的匹配方法:规定如何处理不同 baseline
的成功率,例如调参至共同成功率、比较成功率—成本前沿,或将成功率设为约束。说明具体采用的方案及匹配标准,确保云调用、能耗和延迟比较可复现。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/mimiclaw-system-report.md`:
- Line 80: The RAM ledger is inconsistent with the reconciled task count. Update
the RAM summary in docs/mimiclaw-system-report.md (line 80) and its
corresponding Chinese passage in docs/mimiclaw-system-report-zh.md (line 79) to
use the corrected total and revise the “under 60 KB” claim consistently in both
documents.
- Line 11: The OS terminology is inaccurate in both reports:
docs/mimiclaw-system-report.md:11-11 and docs/mimiclaw-system-report-zh.md:10-10
must describe MimiClaw as a FreeRTOS-based embedded runtime without a
general-purpose OS or process model. Replace the English “bare-metal” and “no
operating system” wording and the Chinese “裸机” and “没有操作系统” wording accordingly,
while preserving the surrounding claims.
- Line 172: Clarify the per-call overhead wording in the report’s ReAct cost
description: in docs/mimiclaw-system-report.md:172-172, replace “fixed cost
independent of tokens” with wording that specifies fixed latency and energy
overhead; apply the equivalent wording correction in
docs/mimiclaw-system-report-zh.md:171-171.

In `@docs/proposal-speculative-execution.md`:
- Around line 59-81: Define the canonical timeout field and its scope in the
structured script contract, ensuring it matches the parser/evaluator behavior.
Update the corresponding schema examples and descriptions in
docs/proposal-speculative-execution.md (59-81),
docs/specclaw-research-proposal.md (64-83), and
docs/specclaw-research-proposal-zh.md (66-85) so all three remain semantically
identical.
- Around line 165-167: Update the “6.5 Ablations” section’s D_irrev list to
explicitly label D_irrev = ∞ as an unsafe, safety-off control. Clarify that this
condition disables the irreversible-action safeguard and must be excluded from
any safety-guarantee claims, while retaining it only for the ablation
comparison.
- Line 85: Update every fenced code block in
docs/proposal-speculative-execution.md, including the pseudocode, state
snapshot, and directory tree sections, to specify an appropriate language such
as text after the opening fence. Apply the same change to the additional fences
at the referenced locations while preserving their contents.
- Around line 85-98: Qualify the protocol’s “never mis-executed” guarantee and
define recovery behavior when a post-guard fails after an action has executed:
specify safe-stop, compensation, or operator intervention before replanning.
Apply the same recovery semantics and guarantee boundaries in
docs/proposal-speculative-execution.md lines 85-98,
docs/specclaw-research-proposal.md lines 87-93, and
docs/specclaw-research-proposal-zh.md lines 89-95, preserving the existing
pre-guard, D_irrev, and gpio_policy requirements.
- Around line 123-128: Update the RQ1 hypothesis in
docs/proposal-speculative-execution.md at lines 123-128 to use the ideal ceil(n
/ L) call baseline instead of 1/L, while reporting measured calls and replans
separately. Apply the same correction in docs/specclaw-research-proposal.md at
lines 20-22 and docs/specclaw-research-proposal-zh.md at lines 22-24, explicitly
noting that failed scripts add calls beyond the ideal ceil(n / L).
- Around line 64-74: Update the protocol examples and guidance so
irreversibility is determined on-device from trusted tool metadata, with unknown
classifications rejected rather than accepted from the cloud-provided
irreversible field. Apply this rule in docs/proposal-speculative-execution.md
(lines 64-74), docs/specclaw-research-proposal.md (lines 70-75) to prevent
malformed values bypassing D_irrev, and docs/specclaw-research-proposal-zh.md
(lines 72-77) using the equivalent device-side authority wording.

In `@docs/specclaw-research-proposal-zh.md`:
- Around line 123-125: 在“消融”段落的 D_irrev 配置说明中,明确将 D_irrev = ∞
标记为关闭安全阀的对照组。说明该配置仅用于对照,不属于安全运行配置,且不得用于支持守卫安全性的结论;其余消融设置保持不变。

In `@docs/specclaw-research-proposal.md`:
- Around line 121-123: Update the Ablations section’s D_irrev comparison to
explicitly label D_irrev = ∞ as a safety-off baseline for unbounded irreversible
speculation. Separate it from the protocol’s safe operating envelope and exclude
it from guarded-safety claims.

In `@docs/thesis/chapters/ch1-introduction.tex`:
- Around line 24-27: Update the RQ-to-chapter mapping statement in the
introduction comments to allow each research question to map to one or more
results chapters, consistent with RQ1’s mapping to Chapters 3 and 5.

In `@docs/thesis/chapters/ch2-background.tex`:
- Around line 2-3: Update the Chapter 2 header’s stated literature count to
match the seven literature sections, including “Evaluating Agent Systems,” while
preserving the existing chapter structure.

In `@docs/thesis/main.tex`:
- Around line 70-72: Update the word-count declaration near the contents-page
setup to use the actual final word count instead of “XX,XXX”, and place it at
the bottom of the contents page. Remove the \cleardoublepage and standalone-page
behavior while preserving the existing formatting.
- Around line 103-128: Update the four copyright notes in the itemize block to
exactly match the mandated March 2026 University of Manchester policy wording,
including the required pronoun wording and capitalization/article in the final
note. Preserve the existing four-item structure and do not paraphrase the
official text.
- Around line 75-76: Insert \phantomsection immediately before each
\addcontentsline command for the unnumbered Abstract, Declaration, Copyright
Statement, and Acknowledgements entries, preserving their existing chapter and
ToC entries.
- Around line 153-154: Update the bibliography setup using \bibliographystyle
and \bibliography so the unnumbered bibliography is added to the table of
contents. Use the project’s existing TOC-aware package or add an equivalent
hyperlink-safe \addcontentsline wrapper, preserving the current natbib
bibliography behavior.
- Around line 46-61: Adjust the title-page flow after \end{titlepage} so the
following page begins at page 2, preserving continuous thesis pagination with
the title page counted as page 1. Add the page-counter update immediately after
the titlepage environment.

In `@docs/thesis/references.bib`:
- Line 13: Normalize the author metadata in docs/thesis/references.bib at lines
13-13, 43-44, and 180-180: use Xueyu Hu for the AAAI proceedings entry, replace
Anonymous with Jabbarvaziri, Faramarz, and replace the remaining placeholder
with Hu, Yuanzhe, Wang, Yu, and McAuley, Julian.

---

Nitpick comments:
In `@docs/specclaw-research-proposal-zh.md`:
- Around line 99-105: 在 RQ1 的实验设计中明确“成功率持平”的匹配方法:规定如何处理不同 baseline
的成功率,例如调参至共同成功率、比较成功率—成本前沿,或将成功率设为约束。说明具体采用的方案及匹配标准,确保云调用、能耗和延迟比较可复现。

In `@docs/specclaw-research-proposal.md`:
- Around line 97-103: Clarify in RQ1 how “matched task success” is enforced
across B2 and unsafe guard configurations. Specify whether configurations are
tuned to a common success target, compared on a success–cost frontier, or
evaluated with success as a constraint, and use that policy consistently for the
headline comparison.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7a7d050-c48e-4c59-b16e-656c3d7568fa

📥 Commits

Reviewing files that changed from the base of the PR and between bb10ea0 and 8d10936.

📒 Files selected for processing (17)
  • docs/mimiclaw-system-report-zh.md
  • docs/mimiclaw-system-report.md
  • docs/proposal-speculative-execution.md
  • docs/specclaw-research-proposal-zh.md
  • docs/specclaw-research-proposal.md
  • docs/thesis/chapters/appendix.tex
  • docs/thesis/chapters/ch1-introduction.tex
  • docs/thesis/chapters/ch2-background.tex
  • docs/thesis/chapters/ch3-system.tex
  • docs/thesis/chapters/ch4-methodology.tex
  • docs/thesis/chapters/ch5-characterization.tex
  • docs/thesis/chapters/ch6-context-compaction.tex
  • docs/thesis/chapters/ch7-skills.tex
  • docs/thesis/chapters/ch8-speculative-execution.tex
  • docs/thesis/chapters/ch9-conclusion.tex
  • docs/thesis/main.tex
  • docs/thesis/references.bib


## Abstract

LLM agent runtimes have been shrinking steadily: from OpenClaw's 400,000+ lines of TypeScript, to nanobot's 4,000 lines of Python, to sub-10 MB Go and Rust implementations such as PicoClaw and ZeroClaw. This trajectory stops, collectively, at one boundary: all of these systems require Linux — processes, a hierarchical filesystem, a dynamic language runtime, a package manager. MimiClaw crosses that boundary. It implements a complete agent runtime in roughly 8,300 lines of C on a bare-metal ESP32-S3 with no operating system, no processes, and 512 KB of on-chip SRAM: a ReAct tool loop, persistent memory managed by the model itself, an extensible skill system, multi-channel messaging, scheduled and heartbeat-driven autonomous behavior, and deterministic safety guards for hardware actuation, with reasoning delegated to a cloud LLM API. This report argues for the central claim this system demonstrates: **the essence of an agent runtime does not depend on an operating system.** We show how each Linux-era agent primitive is rebuilt on embedded primitives — processes become FreeRTOS tasks, async frameworks become message queues, plugin systems become Markdown data files, vector memory stores become plain-text files the model reads and writes itself — and we provide a complete resource ledger for this reconstruction, four engineering principles that recur throughout the design, and an honest account of the open problems it exposes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Correct the OS terminology in both reports. The implementation is FreeRTOS-based, not OS-less; describe it as an embedded runtime without a general-purpose OS or process model.

  • docs/mimiclaw-system-report.md#L11-L11: revise “no operating system” and “bare-metal” wording.
  • docs/mimiclaw-system-report-zh.md#L10-L10: revise “没有操作系统” and “裸机” wording.
📍 Affects 2 files
  • docs/mimiclaw-system-report.md#L11-L11 (this comment)
  • docs/mimiclaw-system-report-zh.md#L10-L10
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/mimiclaw-system-report.md` at line 11, The OS terminology is inaccurate
in both reports: docs/mimiclaw-system-report.md:11-11 and
docs/mimiclaw-system-report-zh.md:10-10 must describe MimiClaw as a
FreeRTOS-based embedded runtime without a general-purpose OS or process model.
Replace the English “bare-metal” and “no operating system” wording and the
Chinese “裸机” and “没有操作系统” wording accordingly, while preserving the surrounding
claims.


**Flash (16 MB):** 2 × 2 MB OTA application partitions + 12 MB SPIFFS (memory/sessions/skills/config). The firmware itself is about 2 MB — a complete agent runtime in the code footprint of a mid-sized npm dependency.

**RAM:** static task stacks total about 56 KB of on-chip SRAM (agent 24 KB; three channel/dispatch tasks at 12 KB each; CLI 4 KB); the agent's 56 KB of working buffers (16 + 32 + 8 KB) reside entirely in PSRAM. Roughly stated: **the architectural part of an agent runs in under 60 KB of on-chip memory**, leaving the rest to the network stack and TLS.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the inconsistent RAM totals.

  • docs/mimiclaw-system-report.md#L80-L80: update the 56 KB total and “under 60 KB” claim after reconciling the task count.
  • docs/mimiclaw-system-report-zh.md#L79-L79: apply the same corrected ledger.
📍 Affects 2 files
  • docs/mimiclaw-system-report.md#L80-L80 (this comment)
  • docs/mimiclaw-system-report-zh.md#L79-L79
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/mimiclaw-system-report.md` at line 80, The RAM ledger is inconsistent
with the reconciled task count. Update the RAM summary in
docs/mimiclaw-system-report.md (line 80) and its corresponding Chinese passage
in docs/mimiclaw-system-report-zh.md (line 79) to use the corrected total and
revise the “under 60 KB” claim consistently in both documents.


## 8. Limitations and Next Steps

Honest boundaries matter as much as claims. **First**, the device currently depends on the cloud at every step: ReAct issues one API call per step, each paying a fixed cost independent of tokens (radio wake-up, TLS handshake, round trip), and during an outage the loop survives but reasoning halts. This is the direct motivation for our follow-up work on guarded speculative execution (see `specclaw-research-proposal.md`), for which the bus, tool allowlist, and file persistence described here are precisely the prerequisites. **Second**, this report provides a design and a static ledger; the measurement plan in Section 6 is specified but not yet executed, and carrying it out is the work required to move from a systems report to a systems paper. **Third**, session slimming and fixed budgets control context volume, but growth of the memory files themselves still relies on the model's discipline; there is no firmware-enforced compaction.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify that the fixed cost is per-call overhead, not token-independent billing.

  • docs/mimiclaw-system-report.md#L172-L172: replace “fixed cost independent of tokens” with fixed latency/energy overhead.
  • docs/mimiclaw-system-report-zh.md#L171-L171: apply the equivalent wording correction.
📍 Affects 2 files
  • docs/mimiclaw-system-report.md#L172-L172 (this comment)
  • docs/mimiclaw-system-report-zh.md#L171-L171
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/mimiclaw-system-report.md` at line 172, Clarify the per-call overhead
wording in the report’s ReAct cost description: in
docs/mimiclaw-system-report.md:172-172, replace “fixed cost independent of
tokens” with wording that specifies fixed latency and energy overhead; apply the
equivalent wording correction in docs/mimiclaw-system-report-zh.md:171-171.

Comment on lines +59 to +81
Each cloud call returns (enforced via structured output):

```json
{
"state_update": "relay=on; last_temp=27.3; goal_phase=cooling",
"script": [
{
"step": 1,
"action": {"tool": "gpio", "args": {"pin": 5, "level": 1}},
"irreversible": false,
"guard": {
"pre": [{"var": "temp_c", "op": "gt", "val": 26.0}],
"post": [{"var": "temp_c", "op": "lt", "val": 26.5, "within_s": 120},
{"var": "relay_current_ma", "op": "in", "lo": 80, "hi": 200, "within_s": 2}]
},
"on_fail": "replan"
}
],
"done_when": [{"var": "temp_c", "op": "lt", "val": 25.0}]
}
```

Guard language (deliberately minimal in v1): numeric comparisons `gt/lt/in`, discrete equality `eq`, rate-of-change `delta_lt`, time bounds `within_s`, AND composition only (no OR). The limited expressiveness is a feature, not a bug — decidable, evaluable in ~100 lines of C, statically auditable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

The documented script contract omits its promised timeout field.

  • docs/proposal-speculative-execution.md#L59-L81: define a canonical timeout field and its scope.
  • docs/specclaw-research-proposal.md#L64-L83: align the structured-output example with the parser/evaluator contract.
  • docs/specclaw-research-proposal-zh.md#L66-L85: keep the Chinese schema description semantically identical.
📍 Affects 3 files
  • docs/proposal-speculative-execution.md#L59-L81 (this comment)
  • docs/specclaw-research-proposal.md#L64-L83
  • docs/specclaw-research-proposal-zh.md#L66-L85
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/proposal-speculative-execution.md` around lines 59 - 81, Define the
canonical timeout field and its scope in the structured script contract,
ensuring it matches the parser/evaluator behavior. Update the corresponding
schema examples and descriptions in docs/proposal-speculative-execution.md
(59-81), docs/specclaw-research-proposal.md (64-83), and
docs/specclaw-research-proposal-zh.md (66-85) so all three remain semantically
identical.

Comment on lines +64 to +74
"script": [
{
"step": 1,
"action": {"tool": "gpio", "args": {"pin": 5, "level": 1}},
"irreversible": false,
"guard": {
"pre": [{"var": "temp_c", "op": "gt", "val": 26.0}],
"post": [{"var": "temp_c", "op": "lt", "val": 26.5, "within_s": 120},
{"var": "relay_current_ma", "op": "in", "lo": 80, "hi": 200, "within_s": 2}]
},
"on_fail": "replan"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Irreversibility must be determined locally, not by the cloud script.

  • docs/proposal-speculative-execution.md#L64-L74: derive the safety class from trusted tool metadata or reject unknown classifications.
  • docs/specclaw-research-proposal.md#L70-L75: prevent a malformed irreversible value from bypassing D_irrev.
  • docs/specclaw-research-proposal-zh.md#L72-L77: apply the same device-side authority rule in the Chinese protocol.
📍 Affects 3 files
  • docs/proposal-speculative-execution.md#L64-L74 (this comment)
  • docs/specclaw-research-proposal.md#L70-L75
  • docs/specclaw-research-proposal-zh.md#L72-L77
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/proposal-speculative-execution.md` around lines 64 - 74, Update the
protocol examples and guidance so irreversibility is determined on-device from
trusted tool metadata, with unknown classifications rejected rather than
accepted from the cloud-provided irreversible field. Apply this rule in
docs/proposal-speculative-execution.md (lines 64-74),
docs/specclaw-research-proposal.md (lines 70-75) to prevent malformed values
bypassing D_irrev, and docs/specclaw-research-proposal-zh.md (lines 72-77) using
the equivalent device-side authority wording.

Comment thread docs/thesis/main.tex
Comment on lines +70 to +72
% Word count: policy requires it declared; put it on the contents page or here.
\cleardoublepage
\noindent Word count: \texttt{XX,XXX}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Place the final word count at the bottom of the contents page.

This currently creates a separate page and leaves XX,XXX as a placeholder. The current University of Manchester policy requires the final word count at the bottom of the contents page. (documents.manchester.ac.uk)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/thesis/main.tex` around lines 70 - 72, Update the word-count declaration
near the contents-page setup to use the actual final word count instead of
“XX,XXX”, and place it at the bottom of the contents page. Remove the
\cleardoublepage and standalone-page behavior while preserving the existing
formatting.

Source: MCP tools

Comment thread docs/thesis/main.tex
Comment on lines +75 to +76
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the thesis file around the cited lines
wc -l docs/thesis/main.tex
sed -n '1,180p' docs/thesis/main.tex

# Locate hyperref usage in the thesis docs
rg -n "\\\\usepackage\\{hyperref\\}|\\\\phantomsection|\\\\addcontentsline\\{toc\\}" docs/thesis -S

Repository: memovai/mimiclaw

Length of output: 7293


Add \phantomsection before each unnumbered ToC entry. hyperref needs an explicit anchor here; otherwise the Abstract, Declaration, Copyright Statement, and Acknowledgements links can jump to the previous page/heading. Also apply this at lines 92-93, 99-100, and 132-133.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/thesis/main.tex` around lines 75 - 76, Insert \phantomsection
immediately before each \addcontentsline command for the unnumbered Abstract,
Declaration, Copyright Statement, and Acknowledgements entries, preserving their
existing chapter and ToC entries.

Source: MCP tools

Comment thread docs/thesis/main.tex
Comment on lines +103 to +128
\begin{itemize}
\item[i.] The author of this thesis (including any appendices and/or
schedules to this thesis) owns certain copyright or related rights in it
(the ``Copyright'') and s/he has given The University of Manchester certain
rights to use such Copyright, including for administrative purposes.
\item[ii.] Copies of this thesis, either in full or in extracts and whether
in hard or electronic copy, may be made \emph{only} in accordance with the
Copyright, Designs and Patents Act 1988 (as amended) and regulations issued
under it or, where appropriate, in accordance with licensing agreements
which the University has from time to time. This page must form part of any
such copies made.
\item[iii.] The ownership of certain Copyright, patents, designs, trademarks
and other intellectual property (the ``Intellectual Property'') and any
reproductions of copyright works in the thesis, for example graphs and
tables (``Reproductions''), which may be described in this thesis, may not
be owned by the author and may be owned by third parties. Such Intellectual
Property and Reproductions cannot and must not be made available for use
without the prior written permission of the owner(s) of the relevant
Intellectual Property and/or Reproductions.
\item[iv.] Further information on the conditions under which disclosure,
publication and commercialisation of this thesis, the Copyright and any
Intellectual Property and/or Reproductions described in it may take place
is available in the University IP Policy, in any relevant Thesis
restriction declarations deposited in the University Library, the
University Library's regulations and in The University's policy on
Presentation of Theses.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Use the mandated copyright wording verbatim.

The current policy explicitly requires the four copyright notes “as written below.” The s/he wording and the final sentence’s capitalization/article differ from the March 2026 policy text; replace these passages with the official wording rather than paraphrasing it. (documents.manchester.ac.uk)

Representative corrections
-  (``Copyright'') and s/he has given The University of Manchester certain
+  (``Copyright'') and they have given the University of Manchester certain
...
-  is available in the University IP Policy, ... and in The University's policy on
-  Presentation of Theses.
+  is available in the University IP Policy, ... and in the University's policy on
+  the Presentation of Theses.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
\begin{itemize}
\item[i.] The author of this thesis (including any appendices and/or
schedules to this thesis) owns certain copyright or related rights in it
(the ``Copyright'') and s/he has given The University of Manchester certain
rights to use such Copyright, including for administrative purposes.
\item[ii.] Copies of this thesis, either in full or in extracts and whether
in hard or electronic copy, may be made \emph{only} in accordance with the
Copyright, Designs and Patents Act 1988 (as amended) and regulations issued
under it or, where appropriate, in accordance with licensing agreements
which the University has from time to time. This page must form part of any
such copies made.
\item[iii.] The ownership of certain Copyright, patents, designs, trademarks
and other intellectual property (the ``Intellectual Property'') and any
reproductions of copyright works in the thesis, for example graphs and
tables (``Reproductions''), which may be described in this thesis, may not
be owned by the author and may be owned by third parties. Such Intellectual
Property and Reproductions cannot and must not be made available for use
without the prior written permission of the owner(s) of the relevant
Intellectual Property and/or Reproductions.
\item[iv.] Further information on the conditions under which disclosure,
publication and commercialisation of this thesis, the Copyright and any
Intellectual Property and/or Reproductions described in it may take place
is available in the University IP Policy, in any relevant Thesis
restriction declarations deposited in the University Library, the
University Library's regulations and in The University's policy on
Presentation of Theses.
\begin{itemize}
\item[i.] The author of this thesis (including any appendices and/or
schedules to this thesis) owns certain copyright or related rights in it
(the ``Copyright'') and they have given the University of Manchester certain
rights to use such Copyright, including for administrative purposes.
\item[ii.] Copies of this thesis, either in full or in extracts and whether
in hard or electronic copy, may be made \emph{only} in accordance with the
Copyright, Designs and Patents Act 1988 (as amended) and regulations issued
under it or, where appropriate, in accordance with licensing agreements
which the University has from time to time. This page must form part of any
such copies made.
\item[iii.] The ownership of certain Copyright, patents, designs, trademarks
and other intellectual property (the ``Intellectual Property'') and any
reproductions of copyright works in the thesis, for example graphs and
tables (``Reproductions''), which may be described in this thesis, may not
be owned by the author and may be owned by third parties. Such Intellectual
Property and Reproductions cannot and must not be made available for use
without the prior written permission of the owner(s) of the relevant
Intellectual Property and/or Reproductions.
\item[iv.] Further information on the conditions under which disclosure,
publication and commercialisation of this thesis, the Copyright and any
Intellectual Property and/or Reproductions described in it may take place
is available in the University IP Policy, in any relevant Thesis
restriction declarations deposited in the University Library, the
University Library's regulations and in the University's policy on
the Presentation of Theses.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/thesis/main.tex` around lines 103 - 128, Update the four copyright notes
in the itemize block to exactly match the mandated March 2026 University of
Manchester policy wording, including the required pronoun wording and
capitalization/article in the final note. Preserve the existing four-item
structure and do not paraphrase the official text.

Source: MCP tools

Comment thread docs/thesis/main.tex
Comment on lines +153 to +154
\bibliographystyle{plainnat}
\bibliography{references}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the thesis file and related LaTeX setup.
git ls-files docs/thesis/main.tex docs/thesis/*.tex docs/thesis/*.cls docs/thesis/*.sty docs/thesis/*.cfg docs/thesis/*.bib

echo
echo "== main.tex outline =="
ast-grep outline docs/thesis/main.tex --view expanded || true

echo
echo "== Search for bibliography / TOC hooks =="
rg -n --hidden --glob 'docs/thesis/*' -e 'tocbibind|tableofcontents|addcontentsline|bibliography|bibliographystyle|phantomsection|hyperref|natbib|biblatex' docs/thesis

Repository: memovai/mimiclaw

Length of output: 837


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,180p' docs/thesis/main.tex | nl -ba | sed -n '1,180p'

Repository: memovai/mimiclaw

Length of output: 194


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== top of docs/thesis/main.tex =="
awk 'NR<=120 { printf "%4d  %s\n", NR, $0 }' docs/thesis/main.tex

echo
echo "== bibliography section =="
awk 'NR>=140 && NR<=160 { printf "%4d  %s\n", NR, $0 }' docs/thesis/main.tex

Repository: memovai/mimiclaw

Length of output: 7032


Add the bibliography to the table of contents. The report/natbib bibliography here is unnumbered, so it won’t appear in the TOC unless you add a TOC-aware hook/package such as tocbibind or an equivalent hyperlink-safe \addcontentsline wrapper.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/thesis/main.tex` around lines 153 - 154, Update the bibliography setup
using \bibliographystyle and \bibliography so the unnumbered bibliography is
added to the table of contents. Use the project’s existing TOC-aware package or
add an equivalent hyperlink-safe \addcontentsline wrapper, preserving the
current natbib bibliography behavior.

Source: MCP tools


@inproceedings{yi2025ecoagent,
title = {{EcoAgent}: An Efficient Device-Cloud Collaborative Multi-Agent Framework for Mobile Automation},
author = {Yi, Biao and Hu, Xavier and Chen, Yurun and Zhang, Shengyu and Yang, Hongxia and Wu, Fan},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Normalize author metadata against canonical records.

These entries currently produce incorrect or placeholder author attributions in the compiled thesis. (ojs.aaai.org)

  • docs/thesis/references.bib#L13-L13: use Xueyu Hu for the AAAI proceedings entry.
  • docs/thesis/references.bib#L43-L44: replace Anonymous with Jabbarvaziri, Faramarz.
  • docs/thesis/references.bib#L180-L180: replace the placeholder with Hu, Yuanzhe and Wang, Yu and McAuley, Julian.
📍 Affects 1 file
  • docs/thesis/references.bib#L13-L13 (this comment)
  • docs/thesis/references.bib#L43-L44
  • docs/thesis/references.bib#L180-L180
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/thesis/references.bib` at line 13, Normalize the author metadata in
docs/thesis/references.bib at lines 13-13, 43-44, and 180-180: use Xueyu Hu for
the AAAI proceedings entry, replace Anonymous with Jabbarvaziri, Faramarz, and
replace the remaining placeholder with Hu, Yuanzhe, Wang, Yu, and McAuley,
Julian.

@crispyberry
crispyberry deleted the research/specclaw branch July 22, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant