aitp-runtime
Use after AITP routing has claimed the task; continue theory work through the runtime bundle instead of ad hoc browsing or free-form synthesis.
AITP Runtime
Environment gate (mandatory first step)
- Confirm the task already belongs inside AITP.
- If bootstrap already ran, continue from the generated runtime bundle.
- If bootstrap did not run, use
aitp session-start "<original user request>"to materialize routing and then return here. - Do not replace the original user request with a bare title or a compressed paraphrase when using that fallback.
Workflow
- Resume or materialize runtime state through
aitp session-start,aitp loop,aitp resume, oraitp bootstrapwhen needed. - Classification step: Before the first loop/resume call, load and apply the classification skills:
- Load
aitp-research-classifier→ reason about research mode → callaitp_record_classification(topic_slug, "research_mode", ...). - Load
aitp-load-profile-resolver→ reason about load profile → callaitp_record_classification(topic_slug, "load_profile", ...). - When the action queue is being materialized, load
aitp-action-classifier→ reason about action type → callaitp_record_classification(topic_slug, "action_type", ...). - When runtime mode is being selected, load
aitp-runtime-mode-selector→ reason about mode and submode → callaitp_record_classificationfor each.
- Load
- Read
runtime_protocol.generated.md. - Read the files listed under
Must read now. - Treat
session_start.generated.mdas a routing audit artifact when it exists; it is backend state, not a user ritual. - Keep the lightweight runtime minimum current even when the full runtime bundle is not present:
topic_state.jsonoperator_console.mdresearch_question.contract.jsoncontrol_note.md
- Keep
innovation_direction.mdandcontrol_note.mdcurrent before touching the active queue. - Before substantive work, check unresolved decision points. If any pending item is
blocking: true, stop and ask the human instead of continuing execution. - Emit a decision point when a real route choice appears and the active contract does not already settle it.
- After a non-trivial resolution, materialize a paired decision trace so later "why did AITP do this?" questions can be answered from durable records instead of chat memory.
- Maintain a session chronicle as the operator-facing narrative surface:
- reuse the current open chronicle or create one
- record notable actions, problems, and decision-trace refs during the session
- finalize the chronicle when the bounded session exits
- Expand consultation, promotion, capability, or deferred surfaces only when the runtime bundle names them.
- Register reusable operations with
aitp operation-init .... - Use
aitp baseline ...,aitp atomize ..., andaitp trust-audit ...before claiming reusable method progress. - Use
aitp request-promotion ...plus explicit approval for human-reviewedL2. - Use
aitp coverage-audit ...beforeaitp auto-promote ...for theory-formalL2_auto. - Close bounded work with
aitp audit --topic-slug <topic_slug> --phase exit. - report the current human-control posture in plain language before deeper work.
- If no active checkpoint is present, continue bounded execution instead of asking ritual permission again.
- If iterative verify is active, keep the L3-L4 loop moving until success, a real blocker, or a real human checkpoint appears.
- If bootstrap tooling fails, recover by rerunning the canonical CLI front door; do not hand-edit runtime artifacts or source-layer records just to simulate progress.
- For physics-style report writing and derivation-heavy topic communication, explicitly load the repo subskills:
aitp-problem-framingaitp-derivation-disciplineaitp-l3-l4-roundaitp-current-claims-auditoraitp-topic-report-author
- Treat those subskills as content-generation aids; keep Python/runtime responsible for durable state, gates, and notebook compilation.
Popup gate rule (all interactive sessions — mandatory)
When the AITP runtime hits a human gate (promotion approval, operator checkpoint, decision point, or H-plane steering), you MUST surface it as an interactive popup. You MUST NOT silently continue past a gate.
- Before every loop/resume/bootstrap call, call
aitp_get_popupfor the targettopic_slug. - If
needs_popupistrue:- STOP. Do not call
aitp_run_topic_loop,aitp_bootstrap_topic, oraitp_resume_topicyet. - Use the pre-built
ask_user_questionfield from the response.- Claude Code: Pass
ask_user_question.questionsdirectly to theAskUserQuestiontool. Map the 0-based response back viaask_user_question.choice_index_map. - Kimi Code CLI: Pass
ask_user_question.questionsto theAskUserQuestiontool. Map the 0-based response back viaask_user_question.choice_index_map.
- Claude Code: Pass
- If
ask_user_question.inspect_pathis non-empty and the user wants details, read that file and re-present the popup. - When the user chooses, call
aitp_resolve_popupwith the mappedchoice_index.
- STOP. Do not call
- After every loop/resume/bootstrap call, call
aitp_get_popupagain. The loop may have materialized a new gate. - Only proceed with deeper execution once
needs_popupisfalse. - Hard rule: You MUST NOT skip the popup check. You MUST NOT answer the research question instead of presenting the popup. A popup means AITP requires a human decision before any further automated work.
Conversation style rules
- Do not say things like
I am emitting a decision_pointorI am switching to the full load profile. - Surface checkpoints as ordinary research dialogue, for example:
There are two reasonable routes here. I can tighten the benchmark first, or I can push directly to the larger-system scan.
- Keep checkpoint questions short and route-changing.
- If the user says
you decide,just go, or直接做, treat that as authorization to proceed, then write the durable trace in the background. - Do not append protocol-compliance commentary to ordinary user-facing answers unless the user explicitly asks for protocol state.
Hard rules
- Missing conformance means the work does not count as AITP work.
- Current-topic routing, steering updates, trust gates, and promotion gates are durable state, not optional reminders.
- Do not silently upgrade exploratory output into reusable knowledge.
- Do not bypass the runtime bundle with ad hoc file browsing once AITP has claimed the task.
- "AITP pause" means the agent asks the human in chat and records the decision point; it does not mean a background controller or hidden event loop exists.
- Decision traces and chronicles are first-class runtime records, not optional prose summaries.
Common commands
aitp session-start "<task>"
aitp loop --topic-slug <topic_slug> --human-request "<task>"
aitp resume --topic-slug <topic_slug> --human-request "<task>"
aitp bootstrap --topic "<topic>" --statement "<statement>"
aitp emit-decision --topic-slug <topic_slug> --question "<question>" --options "<json>" --blocking false
aitp resolve-decision --topic-slug <topic_slug> --decision-id <dp_id> --option <index>
aitp list-decisions --topic-slug <topic_slug> --pending-only
aitp trace-decision --topic-slug <topic_slug> --summary "<summary>" --chosen "<choice>" --rationale "<why>"
aitp chronicle --topic-slug <topic_slug>
aitp operation-init --topic-slug <topic_slug> --run-id <run_id> --title "<operation>" --kind numerical
aitp trust-audit --topic-slug <topic_slug> --run-id <run_id>
aitp request-promotion --topic-slug <topic_slug> --candidate-id <candidate_id> --backend-id backend:theoretical-physics-knowledge-network
aitp approve-promotion --topic-slug <topic_slug> --candidate-id <candidate_id>
aitp coverage-audit --topic-slug <topic_slug> --candidate-id <candidate_id> --source-section <section> --covered-section <section>
aitp auto-promote --topic-slug <topic_slug> --candidate-id <candidate_id> --target-backend-root <tpkn_root>
aitp audit --topic-slug <topic_slug> --phase exit