Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion research/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Version: v1
Status: Implemented(隔离分支的本地功能验收;未启用真实求解)
Updated: 2026-11-27
Updated: 2026-12-01

## 已确认的目标

Expand Down Expand Up @@ -33,6 +33,8 @@ Updated: 2026-11-27

默认协作取向是围绕当前共同证明路线解决互补缺口,必要时短时探索备选路线;Lead 根据实际证据自主改变分解和路线。这不规定证明方法、固定专家顺序或每题必须启动的成员数。成员默认不独立重复研究整个原题;每项工作的价值在于其结果能改变研究判断、补足所需输入或推进原始目标。

需要拆解的原题,由 Lead 从冻结目标倒推,在 `RESEARCH.md` 保存证明蓝图及关键缺口,并让未参与该步骤设计的原生成员独立复核。蓝图标出每条拟议引理的用途、假设、适用范围和待证条件。条件检查核对这些条件能否推出原题,条件本身仍须证明。复核未能决定路线时可以继续探索。有清楚的直接证明时可直接验算。路线判断由原生团队负责,整题通过仍由宿主独立验收。见[决策 0011](decisions/0011-native-proof-route-design.md)。

这一取向现已进入固定 Skill 的协作和工作职责指引;运行时保留 Lead 专属派工/采纳和成员直接消息,并加入共同研究摘要、固定版本研究成果引用及单任务撤销/替换。指引和接口的存在不证明模型已能合理分解、互补选角、去重或调整路线,预算、并发值和效果评测标准继续按既有约定。

## 已确认的下一轮改进目标(待实现)
Expand Down
14 changes: 14 additions & 0 deletions research/decisions/0011-native-proof-route-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
id: "0011"
title: 需要拆解的证明先由原生团队设计路线并复核
status: accepted
date: "2026-12-01"
decided_by: 用户(路线设计 Q1)
related:
- research/PROTOCOL.md
- research/decisions/0010-native-team-runtime-only.md
---

# 0011 — 需要拆解的证明先由原生团队设计路线并复核

用户选择把证明蓝图和独立复核放进原生团队的 Lead 工作流程。对需要拆解的原题,Lead 先确认关键引理的精确条件、应用位置及其如何推出冻结目标,并由另一位成员复核最脆弱的推论,再派正式引理任务。结论未定时继续研究关键缺口,直接证明已清楚时可以直接验算。路线可行性需要数学判断,由团队根据证据调整。宿主继续根据冻结原题和固定源码验收最终证明。
6 changes: 3 additions & 3 deletions scripts/test-codex-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ const server = createServer(async (request, response) => {
'A cold resume or full-history fork must not inherit Lead authority as its current mode.');
} else {
assert.match(mode, /You are the Lead of an explicitly requested flat team\./u);
assert.match(mode, /Proactively delegate useful complementary work/u);
assert.match(mode, /concrete gaps with a consumer and first usable result/u);
assert.match(mode, /instead of competing for the same deliverable/u);
assert.match(mode, /Use native delegation for distinct gaps/u);
assert.match(mode, /Follow the pinned Lead charter for scouting, review and formal assignments/u);
assert.match(mode, /Only Lead dispatches or interrupts members/u);
}
const modeChecks = observations.modeChecks ??= {};
modeChecks[member ?? 'lead'] = (modeChecks[member ?? 'lead'] ?? 0) + 1;
Expand Down
40 changes: 12 additions & 28 deletions skills/theoremos-research/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,20 @@ description: Conduct sustained mathematical research in a TheoremOS workspace, u

# TheoremOS research

Work toward the frozen original statement. Choose the mathematical approach, research decomposition and next experiment from the evidence available. Read the actual owned sources and relevant definitions early. Once a claim or library application can be tested, save a focused Lean probe and inspect its result before building more work on it.
Work toward the frozen original statement. Read owned sources and relevant definitions early. Use focused Lean probes to test claims or library applications before relying on them. Find commands and delivery formats in `.scratch/theoremos-help.md`.

The current host assignment fixes your role, owned paths and available tools. Use native editing, shell and search within its permissions; delegation also requires an exposed, permitted tool. Choose a tool when its answer would change the next step. A direct proof can go straight to the supplied Lean check. For an experiment, look up the relevant command in this run's `.scratch/theoremos-help.md`, which also gives the delivery interface.
Follow the host's role and file permissions. Preserve original declarations and add independent helpers only in editable Lean files. Keep experiments in the documented scratch paths. In `RESEARCH.md`, save established results, assumptions, evidence, and the first open step so another session can continue.

Use the native collaboration tools for spawn, followup, messaging, waiting, listing and interruption. Use `theoremos_team` for mathematical evidence, source handoffs and adoption. If the host requires route approval, Lead calls `publish_plan` with a goal for each original target, then returns so the owner can review it.
Use native collaboration for assignments, messages and turn control, and `theoremos_team` for mathematical evidence, handoffs and adoption. Lead follows the injected [charter](references/team-roles.md#lead--organize-and-connect-the-work). If the host requires route approval, call `publish_plan` with a goal for each original target and return for review.

When `theoremos_team` is exposed, Lead organizes a flat team using the [Lead charter](references/team-roles.md#lead--organize-and-connect-the-work), which the host injects into Lead's stable instructions at startup and continuation. Assign concrete gaps with usable outputs and keep one owner per active obligation, including Lead's own work. While a member owns a gap, Lead advances its consumer or another gap and integrates findings. Follow [parallel-work.md](references/parallel-work.md) for the current operation contracts.
Members send the first usable finding, probe or blocker through `send_message` with the exact claim, assumptions and evidence. Save sources and notes, then `submit` for checking or `yield` for a dependency and return. Lead saves before requesting adoption. Preserve provenance when using peer results. Only independent host checks accept proofs or admit library results. Use the host's feedback to continue.

Choose expertise for the specific missing concept, assumption or formal interface. Use the [assignment format](references/parallel-work.md#identity-and-assignments) to select a member profile or tag work by route when useful. The host loads profile material for reading on demand. Give the member its gap, known inputs, intended consumer and first useful result. Say what work remains with you. The member chooses its proof approach.
Work without budgets by default and respect configured shared limits. Avoid fixed reporting intervals, task quotas and Lead reserves. Read the references relevant to the next step.

Members send the first usable finding, probe result or blocker through `send_message`, with the exact claim or question, assumptions and available evidence. Do not wait for every subgoal before reporting. Private reasoning is not a team update. These are research milestones, without fixed polling intervals, message counts or task quotas.

Use native `followup_task` for further instructions and `interrupt_agent` to stop a turn; drafts and history persist. Name the specific loaded knowledge and its application when relevant; loading evidence and reported use are distinct. Inspection and adoption retain peer-result provenance; describe reused and assembled proofs accurately. Read [parallel-work.md](references/parallel-work.md) for the operation contracts.

Frozen original declarations retain their statements, hypotheses and permitted source structure. Add independent helpers inside the exact editable Lean paths supplied by the host; the same filename in different members' worktrees denotes separate copies. Lead describes mathematical work while the host supplies file and delivery rules. Keep scratch experiments under the documented scratch paths; transfer useful helpers through the current owned-file delivery interface. Helpers may be checked while unrelated original goals remain open, but cannot depend on those holes or new axioms.

Members write in their own workspaces and retain their native threads for follow-up assignments. When a helper answers the assignment, save sources and RESEARCH.md, `submit` and return. The host checks the declarations and notifies Lead. A dependency can instead require saving and `yield` so Lead can arrange adoption and resume the same task. Lead saves before adoption and returns after saving the complete original proof for independent checking. Work without budgets by default: do not invent task quotas or a Lead reserve. Respect explicitly configured shared run limits and actual host deadlines.

Use these references when the work calls for them:

- [Literature](references/literature.md): when a proof idea or missing result may be found in external sources.
- [Lean work](references/lean.md): when finding, testing or delivering formal declarations.
- [Continuation](references/continuation.md): when starting from saved work or preparing durable research artifacts.
- [Portfolio exploration](references/portfolio.md) describes bounded route scouting and falsification before proof work.
- [HuggingMath](references/huggingmath.md): when asked to export a completed result or transfer it into private Hub drafts.
- [Parallel work](references/parallel-work.md): when `theoremos_team` is exposed or an independent investigation can usefully run alongside the current task.
- [Domain experts](references/domain-experts.md): when a question calls for specialized mathematical knowledge. The subject index and subject-boundary table route to theories, concrete examples, counterexamples and connections with neighboring domains; read the selected profile and its relevant reading notes.
- [Domain materials](references/domain-materials.md): when a specialist needs subject background. Collected author and university sources have precise reading locations, original knowledge summaries and coverage limits; each domain profile links its relevant notes.
- [Team roles](references/team-roles.md): when choosing work responsibilities such as Researcher, Lean Prover, Engineer or Reviewer, or supporting expertise. Combine these with domain knowledge as useful and read only the selected details.

Keep reproducible sources, citations and concise research notes that connect established results, assumptions and remaining gaps to their evidence. Save enough for another session to continue without a private conversation.

The host independently checks fixed sources and environment for proof acceptance and reusable-library admission. Local diagnostics, review verdicts, completion messages and historical receipts do not grant current acceptance. Deliver through the current assignment and use its feedback.
- [Lean work](references/lean.md) for formal interfaces, diagnostics and delivery.
- [Route design](references/portfolio.md#design-the-route) for proof blueprints and tests of fragile steps.
- [Parallel work](references/parallel-work.md) for assignments, collaboration and source handoffs.
- [Team roles](references/team-roles.md), [domain experts](references/domain-experts.md), and [domain materials](references/domain-materials.md) for expertise and source reading.
- [Literature](references/literature.md) for permitted external results.
- [Continuation](references/continuation.md) for saved work and durable research artifacts.
- [HuggingMath](references/huggingmath.md) for requested export or transfer of completed results.
6 changes: 3 additions & 3 deletions skills/theoremos-research/references/parallel-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Native followup supplies further instructions to a busy member, resumes a yielde

### Start and reassess

Use the [Lead charter](team-roles.md#lead--organize-and-connect-the-work) to identify useful complementary work from the statement and necessary definitions, before deriving the complete solution. Assign a concrete gap with an intended consumer and first usable output; the complete proof route or exact helper type need not be known. Identify what Lead retains so ownership includes Lead's own work. Use `spawn_agent` with a self-contained assignment. A catalogue survey is not a prerequisite.
Use the [Lead charter](team-roles.md#lead--organize-and-connect-the-work) to identify complementary work from the statement and definitions. Scouting and review can start while the route and helper types are open. For formal helper proofs, follow the charter's route check and review, then give the exact type. Name the consumer, the first usable output and the work Lead retains. Use `spawn_agent` with a self-contained assignment.

When no useful assignment is ready, inspect the relevant definitions, run a focused probe or check an already clear direct proof. Reconsider ownership when a finding, failed check, blocker or new gap creates a useful question. An accepted dispatch records delegation; whether the work is complementary depends on its question and intended consumer. Lead chooses the route, timing and team size within host capacity.

Expand Down Expand Up @@ -94,7 +94,7 @@ After an executed task's writer has stopped, the host saves a stable `sourceComm

### Source checking and adoption

Adopt by delivery ID when the checked interface fits. For a source review, `inspect` can page through a long frozen declaration using the same `deliveryId` and `changeIndex` with each `nextOffset`.
Adopt by delivery ID when the host notice confirms the expected signature from the assigned member. Use `inspect` if the signature is absent or you need to examine other changes. For a source review, page through a long frozen declaration with `deliveryId`, `changeIndex` and each `nextOffset`.

For a new auxiliary `def` or `abbrev`, add `"kind":"definition"` to that declaration in `submit`. Supply its full closed type and name in the existing editable file; omit `kind` for theorem/lemma declarations. A consumer adopts the checked implementation. Submit claims about its behavior as separate theorems. This does not allow replacing an existing definition or transferring new files, structures or instances.

Expand All @@ -106,7 +106,7 @@ A child submitting Lean work supplies 1–32 declarations, each with `file`, ful

Draft sources from a deferred or rejected delivery remain part of the next submission. List their changed declarations as well as the new corrections; only a successful delivery advances this source baseline. A stopped child may receive a checked peer adoption while retaining its own unfinished draft. The host preserves that draft and its delivery baseline, rechecks the integration and reports conflicts. Later submissions still list all of the child's own unpublished changes; adopted peer declarations are already tracked by the host and need not be manually resubmitted as new work.

For adoption into Lead, save current sources and RESEARCH.md, call `adopt` and return. A queued adoption also triggers an automatic handoff before the next model request: the current paid response and its tools finish, the writer stops, and only then does the host freeze sources, recheck and integrate the selected delivery. It continues the saved Lead thread with feedback; no polling for this integration or additional request is needed before the handoff. This scheduling step imposes no token, time or turn allowance. Adoption into a child requires that target to be idle, with no active writer, and returns a queued request. The host completes pending integration before dispatching its follow-up work, so Lead may send the consumer instructions after requesting adoption. Read the adoption status and feedback before treating the declarations as available. Native messages and interruption remain available while the host checks that adoption. A conflict or failed recheck is reported to Lead. Do not copy a peer's mutable files or edit another worktree or host state to bypass this protocol.
Before adopting into Lead, save current sources and record the consumer's next edit and draft path in RESEARCH.md. Call `adopt` and return. A queued adoption triggers an automatic handoff before the next model request. The current paid response and its tools finish, the writer stops, and the host freezes sources, rechecks and integrates the delivery. On confirmed adoption, resume from the saved draft and integrated source and check the completed proof. If the host reports a failure, address that diagnostic. Adoption into a child requires an idle target with no active writer. The host finishes the integration before dispatching the child's follow-up. Do not copy a peer's mutable files or edit another worktree or host state to bypass adoption.

Keep organizing useful work while children are active. On host recovery, an interrupted assignment retains its sources and thread but needs an explicit new assignment to continue. Pending checking and adoption retain their saved identities. An unconfirmed writer stop prevents further writing or acceptance in that workspace.

Expand Down
Loading
Loading