mia-code 0.2.0 → 0.3.0
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.
- package/.miette/260321.md +1 -0
- package/.miette/260323.md +9 -0
- package/.miette/260331.md +2 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--d3417f2c-df12-4f0f-8a1b-d88e7968f822/d3417f2c-df12-4f0f-8a1b-d88e7968f822.md +63 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--e6c3fc5d-4a70-4523-ba7d-a3250da4c235/e6c3fc5d-4a70-4523-ba7d-a3250da4c235.md +72 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--efeb00a2-b17a-4d32-b1f0-b90c37a8d24e/efeb00a2-b17a-4d32-b1f0-b90c37a8d24e.md +62 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.json +302 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.md +149 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/AGENTS.md +31 -0
- package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/meta-decomposition-3-children.md +67 -0
- package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/61f9dd4d-7aa6-45e6-a58b-e480b1aa6737--from-mia-openclaw-workspace.md +125 -0
- package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/STATUS.md +1 -0
- package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.json +177 -0
- package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.md +77 -0
- package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.json +222 -0
- package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.md +99 -0
- package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.json +111 -0
- package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.md +67 -0
- package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.json +349 -0
- package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.md +147 -0
- package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.json +118 -0
- package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.md +64 -0
- package/GUILLAUME.md +8 -0
- package/KINSHIP.md +9 -0
- package/MIA_CODE_ARCHITECTURE_REPORT.md +718 -0
- package/contextual_research/260119-MIA-CODE--98090899-8aff-4e11-9dc3-8b99466d1.md +1101 -0
- package/contextual_research/MIA.md +38 -0
- package/contextual_research/MIAWAPASCONE.md +59 -0
- package/contextual_research/MIETTE.md +38 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2504.00218v2.pdf +7483 -12
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2505.00212v3.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/CONTENT.md +1014 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/DESIGN.gemini.md +242 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/INDEX.md +45 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.md +2025 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.pdf +7483 -12
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.md +1755 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_12_decomposed_prompting.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_19_hugginggpt_planning.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.md +766 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.pdf +3431 -4
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.md +260 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.md +558 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_34_hierarchical_multi_agent.pdf +0 -0
- package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_5_open_intent_extraction.pdf +0 -0
- package/contextual_research/PODCAST.md +109 -0
- package/contextual_research/langchain-principles-roadmap.md +157 -0
- package/contextual_research/persona-to-narrative-character-inquiry_260201.md +50 -0
- package/dist/cli.js +35 -11
- package/dist/geminiHeadless.js +8 -2
- package/dist/index.js +2 -1
- package/dist/mcp/miaco-server.js +10 -1
- package/dist/mcp/miatel-server.js +10 -1
- package/dist/mcp/miawa-server.js +10 -1
- package/dist/mcp/utils.d.ts +6 -1
- package/dist/mcp/utils.js +24 -3
- package/dist/sessionStore.d.ts +8 -2
- package/dist/sessionStore.js +39 -3
- package/dist/types.d.ts +1 -0
- package/miaco/README.md +124 -0
- package/miaco/dist/commands/chart.d.ts +6 -0
- package/miaco/dist/commands/chart.d.ts.map +1 -0
- package/miaco/dist/commands/chart.js +222 -0
- package/miaco/dist/commands/chart.js.map +1 -0
- package/miaco/dist/commands/decompose.d.ts +6 -0
- package/miaco/dist/commands/decompose.d.ts.map +1 -0
- package/miaco/dist/commands/decompose.js +98 -0
- package/miaco/dist/commands/decompose.js.map +1 -0
- package/miaco/dist/commands/schema.d.ts +6 -0
- package/miaco/dist/commands/schema.d.ts.map +1 -0
- package/miaco/dist/commands/schema.js +66 -0
- package/miaco/dist/commands/schema.js.map +1 -0
- package/miaco/dist/commands/stc.d.ts +11 -0
- package/miaco/dist/commands/stc.d.ts.map +1 -0
- package/miaco/dist/commands/stc.js +590 -0
- package/miaco/dist/commands/stc.js.map +1 -0
- package/miaco/dist/commands/trace.d.ts +6 -0
- package/miaco/dist/commands/trace.d.ts.map +1 -0
- package/miaco/dist/commands/trace.js +83 -0
- package/miaco/dist/commands/trace.js.map +1 -0
- package/miaco/dist/commands/validate.d.ts +6 -0
- package/miaco/dist/commands/validate.d.ts.map +1 -0
- package/miaco/dist/commands/validate.js +58 -0
- package/miaco/dist/commands/validate.js.map +1 -0
- package/miaco/dist/decompose.d.ts +93 -0
- package/miaco/dist/decompose.d.ts.map +1 -0
- package/miaco/dist/decompose.js +562 -0
- package/miaco/dist/decompose.js.map +1 -0
- package/miaco/dist/index.d.ts +18 -0
- package/miaco/dist/index.d.ts.map +1 -0
- package/miaco/dist/index.js +83 -0
- package/miaco/dist/index.js.map +1 -0
- package/miaco/dist/storage.d.ts +60 -0
- package/miaco/dist/storage.d.ts.map +1 -0
- package/miaco/dist/storage.js +100 -0
- package/miaco/dist/storage.js.map +1 -0
- package/miaco/package-lock.json +4103 -0
- package/miaco/package.json +40 -0
- package/miaco/tsconfig.json +18 -0
- package/miaco/version-patch-commit-and-publish.sh +1 -0
- package/miatel/MISSION_251231.md +3 -0
- package/miatel/README.md +107 -0
- package/miatel/dist/commands/analyze.d.ts +6 -0
- package/miatel/dist/commands/analyze.d.ts.map +1 -0
- package/miatel/dist/commands/analyze.js +100 -0
- package/miatel/dist/commands/analyze.js.map +1 -0
- package/miatel/dist/commands/arc.d.ts +6 -0
- package/miatel/dist/commands/arc.d.ts.map +1 -0
- package/miatel/dist/commands/arc.js +71 -0
- package/miatel/dist/commands/arc.js.map +1 -0
- package/miatel/dist/commands/beat.d.ts +6 -0
- package/miatel/dist/commands/beat.d.ts.map +1 -0
- package/miatel/dist/commands/beat.js +165 -0
- package/miatel/dist/commands/beat.js.map +1 -0
- package/miatel/dist/commands/theme.d.ts +6 -0
- package/miatel/dist/commands/theme.d.ts.map +1 -0
- package/miatel/dist/commands/theme.js +54 -0
- package/miatel/dist/commands/theme.js.map +1 -0
- package/miatel/dist/index.d.ts +18 -0
- package/miatel/dist/index.d.ts.map +1 -0
- package/miatel/dist/index.js +80 -0
- package/miatel/dist/index.js.map +1 -0
- package/miatel/dist/storage.d.ts +55 -0
- package/miatel/dist/storage.d.ts.map +1 -0
- package/miatel/dist/storage.js +100 -0
- package/miatel/dist/storage.js.map +1 -0
- package/miatel/package-lock.json +4103 -0
- package/miatel/package.json +35 -0
- package/miatel/src/commands/analyze.ts +109 -0
- package/miatel/src/commands/arc.ts +78 -0
- package/miatel/src/commands/beat.ts +176 -0
- package/miatel/src/commands/theme.ts +60 -0
- package/miatel/src/index.ts +94 -0
- package/miatel/src/storage.ts +156 -0
- package/miatel/tsconfig.json +18 -0
- package/miawa/MISSION_251231.md +144 -0
- package/miawa/README.md +133 -0
- package/miawa/dist/commands/beat.d.ts +6 -0
- package/miawa/dist/commands/beat.d.ts.map +1 -0
- package/miawa/dist/commands/beat.js +69 -0
- package/miawa/dist/commands/beat.js.map +1 -0
- package/miawa/dist/commands/ceremony.d.ts +6 -0
- package/miawa/dist/commands/ceremony.d.ts.map +1 -0
- package/miawa/dist/commands/ceremony.js +239 -0
- package/miawa/dist/commands/ceremony.js.map +1 -0
- package/miawa/dist/commands/circle.d.ts +6 -0
- package/miawa/dist/commands/circle.d.ts.map +1 -0
- package/miawa/dist/commands/circle.js +75 -0
- package/miawa/dist/commands/circle.js.map +1 -0
- package/miawa/dist/commands/eva.d.ts +6 -0
- package/miawa/dist/commands/eva.d.ts.map +1 -0
- package/miawa/dist/commands/eva.js +73 -0
- package/miawa/dist/commands/eva.js.map +1 -0
- package/miawa/dist/commands/wound.d.ts +6 -0
- package/miawa/dist/commands/wound.d.ts.map +1 -0
- package/miawa/dist/commands/wound.js +74 -0
- package/miawa/dist/commands/wound.js.map +1 -0
- package/miawa/dist/index.d.ts +19 -0
- package/miawa/dist/index.d.ts.map +1 -0
- package/miawa/dist/index.js +91 -0
- package/miawa/dist/index.js.map +1 -0
- package/miawa/dist/storage.d.ts +73 -0
- package/miawa/dist/storage.d.ts.map +1 -0
- package/miawa/dist/storage.js +100 -0
- package/miawa/dist/storage.js.map +1 -0
- package/miawa/package-lock.json +4103 -0
- package/miawa/package.json +36 -0
- package/miawa/src/commands/beat.ts +74 -0
- package/miawa/src/commands/ceremony.ts +256 -0
- package/miawa/src/commands/circle.ts +83 -0
- package/miawa/src/commands/eva.ts +84 -0
- package/miawa/src/commands/wound.ts +79 -0
- package/miawa/src/index.ts +108 -0
- package/miawa/src/storage.ts +179 -0
- package/miawa/tsconfig.json +18 -0
- package/package.json +7 -5
- package/references/acp/CLAUDE.md +7 -0
- package/references/acp/agent-plan.md +84 -0
- package/references/acp/clients.md +31 -0
- package/references/acp/extensibility.md +137 -0
- package/references/acp/initialization.md +225 -0
- package/references/acp/prompt-turn.md +321 -0
- package/references/acp/proxy-chains.md +562 -0
- package/references/acp/schema.md +3171 -0
- package/references/acp/session-list.md +334 -0
- package/references/acp/session-modes.md +170 -0
- package/references/acp/slash-commands.md +99 -0
- package/references/acp/terminals.md +281 -0
- package/references/acp/tool-calls.md +311 -0
- package/references/acp/typescript.md +29 -0
- package/references/claude/agent-teams.md +399 -0
- package/references/claude/chrome.md +231 -0
- package/references/claude/headless.md +158 -0
- package/references/claude/hooks-guide.md +708 -0
- package/references/claude/output-styles.md +112 -0
- package/references/claude/plugins.md +432 -0
- package/references/claude/skills.md +693 -0
- package/references/claude/sub-agents.md +816 -0
- package/references/copilot/acp/agents.md +32 -0
- package/references/copilot/acp/architecture.md +37 -0
- package/references/copilot/acp/clients.md +31 -0
- package/references/copilot/acp/introduction.md +42 -0
- package/references/copilot/acp/registry.md +339 -0
- package/references/copilot/acp-server.md +117 -0
- package/references/copilot/create-copilot-instructions.md +840 -0
- package/references/langchain/llms.txt +833 -0
- package/references/langchain/python/agents.md +677 -0
- package/references/langchain/python/context-engineering.md +1195 -0
- package/references/langchain/python/human-in-the-loop.md +326 -0
- package/references/langchain/python/long-term-memory.md +168 -0
- package/references/langchain/python/mcp.md +949 -0
- package/references/langchain/python/multi-agents/custom-workflow.md +187 -0
- package/references/langchain/python/multi-agents/handoffs.md +436 -0
- package/references/langchain/python/multi-agents/overview.md +295 -0
- package/references/langchain/python/multi-agents/router.md +150 -0
- package/references/langchain/python/multi-agents/skills.md +92 -0
- package/references/langchain/python/multi-agents/subagents.md +486 -0
- package/references/langchain/python/retrieval.md +320 -0
- package/references/langchain/python/runtime.md +141 -0
- package/references/langchain/python/short-term-memory.md +658 -0
- package/references/langchain/python/structured-output.md +712 -0
- package/references/langfuse/llms.txt +148 -0
- package/references/langgraph/javascript/llms.txt +275 -0
- package/references/skills/home.md +259 -0
- package/references/skills/integrate-skills.md +103 -0
- package/references/skills/specification.md +254 -0
- package/references/skills/what-are-skills.md +74 -0
- package/rispecs/README.md +164 -0
- package/rispecs/_sync_/miadi-code/SPEC.md +313 -0
- package/rispecs/_sync_/miadi-code/STATUS.md +177 -0
- package/rispecs/_sync_/miadi-code/dashboard/SPEC.md +465 -0
- package/rispecs/_sync_/miadi-code/dashboard/STATUS.md +212 -0
- package/rispecs/_sync_/miadi-code/multiline-input/SPEC.md +232 -0
- package/rispecs/_sync_/miadi-code/multiline-input/STATUS.md +108 -0
- package/rispecs/_sync_/miadi-code/pde/SPEC.md +253 -0
- package/rispecs/_sync_/miadi-code/pde/STATUS.md +56 -0
- package/rispecs/_sync_/miadi-code/stc/SPEC.md +397 -0
- package/rispecs/_sync_/miadi-code/stc/STATUS.md +70 -0
- package/rispecs/ava-langstack/inquiry-routing-upgrade.spec.md +119 -0
- package/rispecs/borrowed_from_opencode/001-client-server-architecture.rispec.md +98 -0
- package/rispecs/borrowed_from_opencode/002-event-bus-system.rispec.md +125 -0
- package/rispecs/borrowed_from_opencode/003-instance-state-pattern.rispec.md +136 -0
- package/rispecs/borrowed_from_opencode/004-namespace-module-pattern.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/005-zod-schema-validation.rispec.md +139 -0
- package/rispecs/borrowed_from_opencode/006-named-error-system.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/007-structured-logging.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/008-lazy-initialization.rispec.md +127 -0
- package/rispecs/borrowed_from_opencode/009-multi-agent-system.rispec.md +97 -0
- package/rispecs/borrowed_from_opencode/010-agent-definition-config.rispec.md +135 -0
- package/rispecs/borrowed_from_opencode/011-agent-permission-rulesets.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/012-agent-prompt-templates.rispec.md +141 -0
- package/rispecs/borrowed_from_opencode/013-agent-generation.rispec.md +142 -0
- package/rispecs/borrowed_from_opencode/014-plan-build-mode-toggle.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/015-subagent-task-delegation.rispec.md +146 -0
- package/rispecs/borrowed_from_opencode/016-agent-model-selection.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/017-compaction-agent.rispec.md +150 -0
- package/rispecs/borrowed_from_opencode/018-session-persistence.rispec.md +125 -0
- package/rispecs/borrowed_from_opencode/019-session-compaction.rispec.md +132 -0
- package/rispecs/borrowed_from_opencode/020-session-forking.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/021-session-revert-snapshot.rispec.md +135 -0
- package/rispecs/borrowed_from_opencode/022-session-sharing.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/023-session-summary-diffs.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/024-child-sessions.rispec.md +164 -0
- package/rispecs/borrowed_from_opencode/025-session-title-generation.rispec.md +162 -0
- package/rispecs/borrowed_from_opencode/026-message-parts-model.rispec.md +201 -0
- package/rispecs/borrowed_from_opencode/027-streaming-message-deltas.rispec.md +212 -0
- package/rispecs/borrowed_from_opencode/028-multi-provider-architecture.rispec.md +184 -0
- package/rispecs/borrowed_from_opencode/029-provider-authentication.rispec.md +225 -0
- package/rispecs/borrowed_from_opencode/030-model-registry.rispec.md +222 -0
- package/rispecs/borrowed_from_opencode/031-cost-tracking.rispec.md +243 -0
- package/rispecs/borrowed_from_opencode/032-provider-transform-pipeline.rispec.md +282 -0
- package/rispecs/borrowed_from_opencode/033-provider-sdk-abstraction.rispec.md +338 -0
- package/rispecs/borrowed_from_opencode/034-tool-registry.rispec.md +110 -0
- package/rispecs/borrowed_from_opencode/035-tool-context-injection.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/036-tool-output-truncation.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/037-batch-tool.rispec.md +129 -0
- package/rispecs/borrowed_from_opencode/038-multi-edit-tool.rispec.md +167 -0
- package/rispecs/borrowed_from_opencode/039-apply-patch-tool.rispec.md +161 -0
- package/rispecs/borrowed_from_opencode/040-code-search-tool.rispec.md +143 -0
- package/rispecs/borrowed_from_opencode/041-web-fetch-tool.rispec.md +131 -0
- package/rispecs/borrowed_from_opencode/042-web-search-tool.rispec.md +159 -0
- package/rispecs/borrowed_from_opencode/043-todo-tool.rispec.md +156 -0
- package/rispecs/borrowed_from_opencode/044-plan-mode-tool.rispec.md +139 -0
- package/rispecs/borrowed_from_opencode/045-task-tool.rispec.md +146 -0
- package/rispecs/borrowed_from_opencode/046-question-tool.rispec.md +170 -0
- package/rispecs/borrowed_from_opencode/047-external-directory-tool.rispec.md +166 -0
- package/rispecs/borrowed_from_opencode/048-file-read-write-tools.rispec.md +205 -0
- package/rispecs/borrowed_from_opencode/049-lsp-server-management.rispec.md +104 -0
- package/rispecs/borrowed_from_opencode/050-lsp-hover-completion.rispec.md +102 -0
- package/rispecs/borrowed_from_opencode/051-lsp-diagnostics.rispec.md +86 -0
- package/rispecs/borrowed_from_opencode/052-lsp-root-detection.rispec.md +109 -0
- package/rispecs/borrowed_from_opencode/053-remote-mcp-servers.rispec.md +119 -0
- package/rispecs/borrowed_from_opencode/054-mcp-oauth-flow.rispec.md +107 -0
- package/rispecs/borrowed_from_opencode/055-mcp-tool-conversion.rispec.md +118 -0
- package/rispecs/borrowed_from_opencode/056-mcp-connection-monitoring.rispec.md +106 -0
- package/rispecs/borrowed_from_opencode/057-local-mcp-servers.rispec.md +116 -0
- package/rispecs/borrowed_from_opencode/058-rich-tui.rispec.md +108 -0
- package/rispecs/borrowed_from_opencode/059-streaming-display.rispec.md +116 -0
- package/rispecs/borrowed_from_opencode/060-permission-prompts.rispec.md +130 -0
- package/rispecs/borrowed_from_opencode/061-session-navigation.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/062-syntax-highlighting.rispec.md +151 -0
- package/rispecs/borrowed_from_opencode/063-keybinding-system.rispec.md +181 -0
- package/rispecs/borrowed_from_opencode/064-multi-level-config.rispec.md +155 -0
- package/rispecs/borrowed_from_opencode/065-jsonc-config.rispec.md +190 -0
- package/rispecs/borrowed_from_opencode/066-config-env-variables.rispec.md +153 -0
- package/rispecs/borrowed_from_opencode/067-config-deep-merging.rispec.md +178 -0
- package/rispecs/borrowed_from_opencode/068-remote-org-config.rispec.md +183 -0
- package/rispecs/borrowed_from_opencode/069-config-markdown-frontmatter.rispec.md +206 -0
- package/rispecs/borrowed_from_opencode/070-managed-config-directory.rispec.md +232 -0
- package/rispecs/borrowed_from_opencode/071-plugin-architecture.rispec.md +104 -0
- package/rispecs/borrowed_from_opencode/072-plugin-hooks.rispec.md +123 -0
- package/rispecs/borrowed_from_opencode/073-plugin-auto-install.rispec.md +115 -0
- package/rispecs/borrowed_from_opencode/074-permission-system.rispec.md +133 -0
- package/rispecs/borrowed_from_opencode/075-git-worktree-management.rispec.md +126 -0
- package/rispecs/borrowed_from_opencode/076-snapshot-system.rispec.md +124 -0
- package/rispecs/borrowed_from_opencode/077-snapshot-diff.rispec.md +117 -0
- package/rispecs/borrowed_from_opencode/078-snapshot-restore.rispec.md +128 -0
- package/rispecs/borrowed_from_opencode/079-worktree-branch-naming.rispec.md +122 -0
- package/rispecs/borrowed_from_opencode/080-sqlite-storage.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/081-database-migrations.rispec.md +148 -0
- package/rispecs/borrowed_from_opencode/082-database-transactions.rispec.md +138 -0
- package/rispecs/borrowed_from_opencode/083-deferred-effects.rispec.md +148 -0
- package/rispecs/borrowed_from_opencode/084-permission-rules.rispec.md +123 -0
- package/rispecs/borrowed_from_opencode/085-permission-glob-patterns.rispec.md +113 -0
- package/rispecs/borrowed_from_opencode/086-permission-merging.rispec.md +134 -0
- package/rispecs/borrowed_from_opencode/087-permission-modes.rispec.md +145 -0
- package/rispecs/borrowed_from_opencode/088-http-api-server.rispec.md +165 -0
- package/rispecs/borrowed_from_opencode/089-openapi-spec-generation.rispec.md +164 -0
- package/rispecs/borrowed_from_opencode/090-websocket-support.rispec.md +136 -0
- package/rispecs/borrowed_from_opencode/091-sse-streaming.rispec.md +168 -0
- package/rispecs/borrowed_from_opencode/092-mdns-discovery.rispec.md +145 -0
- package/rispecs/borrowed_from_opencode/093-javascript-sdk.rispec.md +200 -0
- package/rispecs/borrowed_from_opencode/094-skill-system.rispec.md +187 -0
- package/rispecs/borrowed_from_opencode/095-skill-discovery.rispec.md +182 -0
- package/rispecs/borrowed_from_opencode/096-desktop-remote-driving.rispec.md +175 -0
- package/rispecs/borrowed_from_opencode/INDEX.md +255 -0
- package/rispecs/core.rispecs.md +261 -0
- package/rispecs/engines.rispecs.md +241 -0
- package/rispecs/formatting.rispecs.md +252 -0
- package/rispecs/living-specifications.rispecs.md +361 -0
- package/rispecs/mcp.rispecs.md +197 -0
- package/rispecs/pde.rispecs.md +399 -0
- package/rispecs/pi-mono-envisionning/ENVISIONING.md +366 -0
- package/rispecs/pi-mono-envisionning/storytelling-horizon.rispecs.md +76 -0
- package/rispecs/pi-mono-envisionning/widget.rispecs.md +2 -0
- package/rispecs/relation-to-mcp-structural-thinking.kin.md +72 -0
- package/rispecs/research-for-better-framework/CLAUDE.md +7 -0
- package/rispecs/research-for-better-framework/survey-pi-openclaw-opencode-openhands.md +210 -0
- package/rispecs/session.rispecs.md +277 -0
- package/rispecs/stc.rispecs.md +138 -0
- package/rispecs/unifier.rispecs.md +317 -0
- package/scripts/LAUNCH--mcp-mia-code--testing--2603141315--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +2 -0
- package/scripts/RESUME--mia-code--mcps--260313--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +1 -0
- package/scripts/install-widget-in-home-pi-agent-extensions.sh +4 -0
- package/scripts/sample-decompose--2604011535-prompt.sh +1 -0
- package/skills/deep-search/AGENTS.md +17 -0
- package/skills/deep-search/SKILL.md +281 -0
- package/skills/deep-search/agent-templates.md +224 -0
- package/skills/deep-search/orchestration-patterns.md +95 -0
- package/skills/miaco-pde-inquiry-routing-deep-search/AGENTS.md +13 -0
- package/skills/miaco-pde-inquiry-routing-deep-search/SKILL.md +136 -0
- package/skills/miaco-pde-inquiry-routing-internal-external-relationship/AGENTS.md +4 -0
- package/skills/miaco-pde-inquiry-routing-internal-external-relationship/SKILL.md +157 -0
- package/skills/miaco-pde-inquiry-routing-local-qmd/AGENTS.md +42 -0
- package/skills/miaco-pde-inquiry-routing-local-qmd/SKILL.md +135 -0
- package/skills/qmd/AGENTS.md +3 -0
- package/skills/qmd/SKILL.md +144 -0
- package/skills/qmd/references/mcp-setup.md +102 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/SKILL.md +234 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/agent-templates.md +436 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/orchestration-patterns.md +197 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/ceremonial-technology.md +102 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/creative-orientation.md +99 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/prompt-decomposition.md +73 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/rise-framework.md +74 -0
- package/skills/rise-pde-inquiry-session-multi-agents-v3/references/structural-tension.md +82 -0
- package/src/cli.ts +35 -11
- package/src/geminiHeadless.ts +7 -2
- package/src/index.ts +2 -1
- package/src/mcp/miaco-server.ts +13 -1
- package/src/mcp/miatel-server.ts +13 -1
- package/src/mcp/miawa-server.ts +13 -1
- package/src/mcp/utils.ts +41 -8
- package/src/sessionStore.ts +44 -4
- package/src/types.ts +2 -1
- package/widget/mia-ceremony/README.md +36 -0
- package/widget/mia-ceremony/index.ts +143 -0
- package/widget/mia-interceptor/README.md +39 -0
- package/widget/mia-interceptor/index.ts +221 -0
- package/widget/mia-tools/README.md +37 -0
- package/widget/mia-tools/index.ts +569 -0
- package/widget/miette-echo/README.md +44 -0
- package/widget/miette-echo/index.ts +164 -0
- package/.claude/settings.local.json +0 -9
- package/.hch/issue_.env +0 -4
- package/.hch/issue_add__2601211715.json +0 -77
- package/.hch/issue_add__2601211715.md +0 -4
- package/.hch/issue_add__2602242020.json +0 -78
- package/.hch/issue_add__2602242020.md +0 -7
- package/.hch/issues.json +0 -2312
- package/.hch/issues.md +0 -30
- package/WS__mia-code__260214__IAIP_PDE.code-workspace +0 -29
- package/WS__mia-code__src332__260122.code-workspace +0 -23
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/checkpoints/index.md +0 -6
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/events.jsonl +0 -213
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/plan.md +0 -243
- package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/workspace.yaml +0 -5
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# RISE-023: Session Summary Diffs
|
|
2
|
+
|
|
3
|
+
> RISE Framework Specification — Borrowed from OpenCode for mia-code
|
|
4
|
+
> Document: rispecs/borrowed_from_opencode/023-session-summary-diffs.rispec.md
|
|
5
|
+
|
|
6
|
+
## Creative Intent
|
|
7
|
+
|
|
8
|
+
mia-code automatically generates a concise summary of all file changes when a session ends or is archived. Developers see at a glance what the agent accomplished — files modified, lines added, lines deleted, and a diff-by-diff breakdown. The summary answers the question every developer asks after an agent session: "What exactly did it change?" Session summaries make agent work reviewable, auditable, and comparable.
|
|
9
|
+
|
|
10
|
+
## Structural Tension Analysis
|
|
11
|
+
|
|
12
|
+
**Current Reality:**
|
|
13
|
+
- When a session ends, there is no summary of what changed
|
|
14
|
+
- Developers must manually run `git diff` or review their version control to understand the agent's impact
|
|
15
|
+
- If the session involved multiple rounds of edits to the same file, the intermediate states are invisible
|
|
16
|
+
- There is no way to compare the productivity or scope of different sessions
|
|
17
|
+
- Session listings show only metadata (time, model) — not outcomes
|
|
18
|
+
- Code review of agent-assisted work requires reconstructing the timeline from git history
|
|
19
|
+
|
|
20
|
+
**Desired State:**
|
|
21
|
+
- Every session ending (close, archive, timeout) triggers automatic summary generation
|
|
22
|
+
- The summary captures: total files modified, lines added, lines deleted, per-file breakdown
|
|
23
|
+
- Diffs are computed between session start snapshot and current file state
|
|
24
|
+
- Summary is stored in session metadata and visible in session listings
|
|
25
|
+
- Summary generation leverages the snapshot system for accurate before/after comparison
|
|
26
|
+
- Summaries are structured data, queryable and renderable in different formats
|
|
27
|
+
|
|
28
|
+
## Desired Outcome Definition
|
|
29
|
+
|
|
30
|
+
A developer works through a 30-message session modifying 8 files. When the session ends, a summary is automatically generated and stored. Running `/sessions` shows: "8 files changed, +142 -67." Viewing the session detail shows per-file breakdown with status (added/modified/deleted), line counts, and optional inline diffs.
|
|
31
|
+
|
|
32
|
+
## Natural Language Functional Description
|
|
33
|
+
|
|
34
|
+
### Summary Generation Trigger
|
|
35
|
+
|
|
36
|
+
Summary generation occurs when:
|
|
37
|
+
1. **Session archive:** user types `/archive` or session auto-archives after inactivity
|
|
38
|
+
2. **Session close:** user exits mia-code with an active session
|
|
39
|
+
3. **On demand:** user types `/summary` to generate or refresh the summary
|
|
40
|
+
4. **Session share:** summary is computed as part of the share payload (RISE-022)
|
|
41
|
+
|
|
42
|
+
### Summary Computation Process
|
|
43
|
+
|
|
44
|
+
1. **Retrieve start snapshot:** find the earliest snapshot in the session's snapshot chain (RISE-021). If no snapshots exist (no file modifications), the summary is empty.
|
|
45
|
+
|
|
46
|
+
2. **Compute current state:** read the current versions of all files that appear in any snapshot during the session.
|
|
47
|
+
|
|
48
|
+
3. **Generate per-file diffs:** for each file that was touched:
|
|
49
|
+
- Compare the start-snapshot version to the current version
|
|
50
|
+
- Compute unified diff text
|
|
51
|
+
- Count additions and deletions
|
|
52
|
+
- Determine status: `added` (file didn't exist at start), `modified` (file changed), `deleted` (file no longer exists)
|
|
53
|
+
|
|
54
|
+
4. **Aggregate statistics:**
|
|
55
|
+
- Total files changed
|
|
56
|
+
- Total lines added across all files
|
|
57
|
+
- Total lines deleted across all files
|
|
58
|
+
- Files grouped by status (added/modified/deleted)
|
|
59
|
+
|
|
60
|
+
5. **Store summary** in the session record as structured metadata.
|
|
61
|
+
|
|
62
|
+
### Summary Data Structure
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"summary": {
|
|
67
|
+
"generated_at": 1706000000000,
|
|
68
|
+
"total_files": 8,
|
|
69
|
+
"additions": 142,
|
|
70
|
+
"deletions": 67,
|
|
71
|
+
"files_added": 2,
|
|
72
|
+
"files_modified": 5,
|
|
73
|
+
"files_deleted": 1,
|
|
74
|
+
"diffs": [
|
|
75
|
+
{
|
|
76
|
+
"path": "src/auth.ts",
|
|
77
|
+
"status": "modified",
|
|
78
|
+
"additions": 35,
|
|
79
|
+
"deletions": 12,
|
|
80
|
+
"patch": "@@ -1,12 +1,35 @@\n-old line\n+new line\n..."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"path": "src/types.ts",
|
|
84
|
+
"status": "added",
|
|
85
|
+
"additions": 45,
|
|
86
|
+
"deletions": 0,
|
|
87
|
+
"patch": "@@ -0,0 +1,45 @@\n+export interface User {\n..."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "src/legacy.ts",
|
|
91
|
+
"status": "deleted",
|
|
92
|
+
"additions": 0,
|
|
93
|
+
"deletions": 38,
|
|
94
|
+
"patch": "@@ -1,38 +0,0 @@\n-export class Legacy {\n..."
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Display in Session List
|
|
102
|
+
|
|
103
|
+
The `/sessions` command includes summary data when available:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Sessions for /projects/myapp:
|
|
107
|
+
abc123 Fix auth middleware 2025-01-23 10:00 45 msgs 8 files +142 -67
|
|
108
|
+
def456 Add user profile page 2025-01-24 09:00 20 msgs 3 files +89 -5
|
|
109
|
+
ghi789 Refactor database 2025-01-25 14:00 60 msgs 12 files +203 -156
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Display in Session Detail
|
|
113
|
+
|
|
114
|
+
The `/session abc123` command shows the full breakdown:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Session: Fix auth middleware (abc123)
|
|
118
|
+
Started: 2025-01-23 10:00 | Messages: 45 | Model: claude-sonnet
|
|
119
|
+
|
|
120
|
+
File Changes:
|
|
121
|
+
M src/auth.ts +35 -12
|
|
122
|
+
M src/middleware.ts +22 -8
|
|
123
|
+
M src/routes.ts +15 -20
|
|
124
|
+
M src/utils.ts +10 -5
|
|
125
|
+
M src/config.ts +5 -2
|
|
126
|
+
A src/types.ts +45
|
|
127
|
+
A src/validators.ts +10
|
|
128
|
+
D src/legacy.ts -38
|
|
129
|
+
|
|
130
|
+
Total: 8 files | +142 -67
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Summary Without Snapshots
|
|
134
|
+
|
|
135
|
+
If the snapshot system (RISE-021) is not available or no snapshots were taken:
|
|
136
|
+
- Summary generation falls back to scanning session messages for tool calls that modified files
|
|
137
|
+
- Additions and deletions are estimated from tool call arguments (edit content, file writes)
|
|
138
|
+
- A flag `"estimated": true` is set in the summary metadata
|
|
139
|
+
- The summary is less accurate but still useful
|
|
140
|
+
|
|
141
|
+
### Incremental Summary
|
|
142
|
+
|
|
143
|
+
During a long session, `/summary` can be called at any time to see a running summary. This computes the diff between the session start and the current state, without waiting for the session to end. Useful for mid-session progress checks.
|
|
144
|
+
|
|
145
|
+
## Supporting Structures
|
|
146
|
+
|
|
147
|
+
- **Session Revert/Snapshot (RISE-021)** provides the before-state for accurate diff computation
|
|
148
|
+
- **Session Persistence (RISE-018)** stores summary metadata in the sessions table
|
|
149
|
+
- **Session Sharing (RISE-022)** includes the summary in shared session views
|
|
150
|
+
- **Structured Logging (RISE-007)** logs summary generation events and timing
|
|
151
|
+
- **Named Error System (RISE-006)** provides SummaryGenerationError, SnapshotMissingError
|
|
152
|
+
|
|
153
|
+
## Creative Advancement Scenarios
|
|
154
|
+
|
|
155
|
+
**Scenario 1 — Daily Standup Review:**
|
|
156
|
+
A developer starts their day by running `/sessions --since yesterday`. They see three sessions from the previous day with summary data: one session changed 5 files (+80 -20), another changed 12 files (+200 -150). The summaries give an instant overview of yesterday's agent-assisted work.
|
|
157
|
+
|
|
158
|
+
**Scenario 2 — Code Review Preparation:**
|
|
159
|
+
Before submitting a PR, the developer reviews the session summary to ensure the agent's changes are complete. The per-file breakdown shows `src/test.ts` was modified but `src/test.spec.ts` was not — reminding them to add tests.
|
|
160
|
+
|
|
161
|
+
**Scenario 3 — Session Comparison:**
|
|
162
|
+
Two forked sessions (RISE-020) explored different approaches. Their summaries show: fork A changed 3 files (+50 -10), fork B changed 8 files (+200 -90). The developer chooses fork A for its smaller, more focused changeset.
|
|
163
|
+
|
|
164
|
+
**Scenario 4 — Team Metrics:**
|
|
165
|
+
Over time, session summaries provide aggregate data: how many files does the agent typically modify per session? What's the ratio of additions to deletions? These metrics help teams calibrate their agent usage and identify sessions that may need human review.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# RISE-024: Child Sessions
|
|
2
|
+
|
|
3
|
+
> RISE Framework Specification — Borrowed from OpenCode for mia-code
|
|
4
|
+
> Document: rispecs/borrowed_from_opencode/024-child-sessions.rispec.md
|
|
5
|
+
|
|
6
|
+
## Creative Intent
|
|
7
|
+
|
|
8
|
+
mia-code supports nested conversation branches where subagents and explicit user branches create child sessions within a parent context. A child session is a focused conversation with its own message history that inherits the parent's project context and flows results back when complete. This mirrors how developers naturally decompose work: a main task spawns subtasks, each with its own scope, and results roll up to the parent. The session tree becomes a map of how complex problems were decomposed and solved.
|
|
9
|
+
|
|
10
|
+
## Structural Tension Analysis
|
|
11
|
+
|
|
12
|
+
**Current Reality:**
|
|
13
|
+
- Subagent invocations (RISE-015) execute within the parent session's message history, creating noise
|
|
14
|
+
- Long tool outputs from subagent work clutter the parent conversation
|
|
15
|
+
- There is no isolation between the main task and delegated subtasks
|
|
16
|
+
- When a subagent explores a tangent, all of its messages consume parent context window budget
|
|
17
|
+
- No mechanism exists to track which parts of a session were "main work" vs "delegated exploration"
|
|
18
|
+
- Subagent results are inlined as tool results, losing their conversational structure
|
|
19
|
+
|
|
20
|
+
**Desired State:**
|
|
21
|
+
- Subagent invocations create child sessions with `parent_id` linking back to the parent
|
|
22
|
+
- Child sessions have their own message history, compaction, and snapshot chains
|
|
23
|
+
- When a child completes, a summary of its results flows back to the parent as a single message
|
|
24
|
+
- The parent's context window is preserved — only the child's result summary consumes tokens
|
|
25
|
+
- Child sessions can themselves spawn children (bounded depth)
|
|
26
|
+
- The full session tree is navigable and visualizable
|
|
27
|
+
|
|
28
|
+
## Desired Outcome Definition
|
|
29
|
+
|
|
30
|
+
The agent encounters a complex subtask (e.g., "research the best pagination library") and spawns a child session. The child session runs its own conversation with the research agent, evaluating options across 15 messages. When complete, the parent receives a single message: "Research complete: recommend cursor-based pagination using Prisma's built-in support." The parent's context window spent only 1 message instead of 15.
|
|
31
|
+
|
|
32
|
+
## Natural Language Functional Description
|
|
33
|
+
|
|
34
|
+
### Child Session Creation
|
|
35
|
+
|
|
36
|
+
Child sessions are created by:
|
|
37
|
+
1. **Subagent invocation (RISE-015):** when a subagent is delegated a task, a child session is automatically created
|
|
38
|
+
2. **Explicit command:** `/branch [title]` creates a child of the current session
|
|
39
|
+
3. **Programmatic:** `sessionDB.createChildSession(parentId, opts)` for API-driven creation
|
|
40
|
+
|
|
41
|
+
The creation process:
|
|
42
|
+
1. Create a new session row with `parent_id` set to the current session's ID
|
|
43
|
+
2. Copy project context: `directory`, `project_id`, `version`
|
|
44
|
+
3. Add an initial system message with the parent context: current task state, relevant files, active constraints
|
|
45
|
+
4. If created by subagent: include the delegation prompt as the first user message
|
|
46
|
+
5. Return the child session ID
|
|
47
|
+
|
|
48
|
+
### Parent-Child Communication
|
|
49
|
+
|
|
50
|
+
**Downward (parent → child):**
|
|
51
|
+
- Initial context: project state, relevant files, task description
|
|
52
|
+
- The child receives enough context to work independently
|
|
53
|
+
- No ongoing message sync — the child operates autonomously
|
|
54
|
+
|
|
55
|
+
**Upward (child → parent):**
|
|
56
|
+
- When the child session completes (or is manually closed), a result message is generated
|
|
57
|
+
- The result message is a structured summary: outcome, files changed, key findings
|
|
58
|
+
- This message is inserted into the parent's message history as a `tool_result` part
|
|
59
|
+
- The parent agent continues with full knowledge of what the child accomplished
|
|
60
|
+
|
|
61
|
+
### Result Flow
|
|
62
|
+
|
|
63
|
+
When a child session completes:
|
|
64
|
+
1. Generate a session summary (RISE-023) capturing file changes
|
|
65
|
+
2. Create a result summary: concise narrative of what was accomplished
|
|
66
|
+
3. Insert into parent session as a message with parts:
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"role": "system",
|
|
70
|
+
"parts": [
|
|
71
|
+
{
|
|
72
|
+
"type": "tool_result",
|
|
73
|
+
"title": "Child session: Research pagination library",
|
|
74
|
+
"content": "Evaluated 3 libraries. Recommend cursor-based pagination...",
|
|
75
|
+
"metadata": {
|
|
76
|
+
"child_session_id": "child-abc",
|
|
77
|
+
"message_count": 15,
|
|
78
|
+
"files_changed": 2,
|
|
79
|
+
"duration_ms": 45000
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
4. Mark the child session as archived
|
|
86
|
+
|
|
87
|
+
### Tree Navigation
|
|
88
|
+
|
|
89
|
+
**`/sessions --tree`** shows the full hierarchy:
|
|
90
|
+
```
|
|
91
|
+
Session Tree for /projects/myapp:
|
|
92
|
+
● implement-auth (active) — 30 messages
|
|
93
|
+
├─ research-jwt-libs (complete) — 12 messages, 0 files
|
|
94
|
+
├─ implement-middleware (complete) — 25 messages, 3 files
|
|
95
|
+
│ └─ fix-token-refresh (complete) — 8 messages, 1 file
|
|
96
|
+
└─ write-auth-tests (active) — 5 messages, 2 files
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**`/children`** lists direct children of the current session:
|
|
100
|
+
```
|
|
101
|
+
Child sessions:
|
|
102
|
+
research-jwt-libs complete 12 msgs 0 files
|
|
103
|
+
implement-middleware complete 25 msgs 3 files +89 -12
|
|
104
|
+
write-auth-tests active 5 msgs 2 files +34 -0
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**`/parent`** navigates to the parent session.
|
|
108
|
+
|
|
109
|
+
### Shared Resources
|
|
110
|
+
|
|
111
|
+
Child sessions share with their parent:
|
|
112
|
+
- **Project directory:** same working directory, same files
|
|
113
|
+
- **Snapshot state (RISE-021):** children create their own snapshots but operate on the same filesystem
|
|
114
|
+
- **Configuration:** model, permissions, and preferences inherited from parent
|
|
115
|
+
|
|
116
|
+
Child sessions have independently:
|
|
117
|
+
- **Message history:** completely separate conversation
|
|
118
|
+
- **Compaction (RISE-019):** child sessions compact independently
|
|
119
|
+
- **Context window:** each child has its own full context budget
|
|
120
|
+
|
|
121
|
+
### Promotion
|
|
122
|
+
|
|
123
|
+
**`/promote`** converts a child session into a top-level session:
|
|
124
|
+
- Sets `parent_id` to null
|
|
125
|
+
- Preserves all messages and history
|
|
126
|
+
- The session no longer appears in the parent's tree
|
|
127
|
+
- Useful when a "subtask" grows into its own significant body of work
|
|
128
|
+
|
|
129
|
+
### Depth Limits
|
|
130
|
+
|
|
131
|
+
- Maximum child depth: 5 levels (configurable via `sessions.maxChildDepth`)
|
|
132
|
+
- Each level adds overhead for result flow — deep nesting is discouraged
|
|
133
|
+
- Attempting to create a child beyond the limit produces a ChildDepthExceededError
|
|
134
|
+
|
|
135
|
+
### Lifecycle
|
|
136
|
+
|
|
137
|
+
Child session states:
|
|
138
|
+
- `active` — currently receiving messages
|
|
139
|
+
- `completing` — generating result summary for parent
|
|
140
|
+
- `complete` — result has been sent to parent, session is archived
|
|
141
|
+
- `abandoned` — child was closed without completing (no result flows to parent)
|
|
142
|
+
|
|
143
|
+
## Supporting Structures
|
|
144
|
+
|
|
145
|
+
- **Session Persistence (RISE-018)** provides `parent_id` column and session tree queries
|
|
146
|
+
- **Subagent Task Delegation (RISE-015)** triggers child session creation for delegated work
|
|
147
|
+
- **Session Summary Diffs (RISE-023)** generates the file change summary for completed children
|
|
148
|
+
- **Session Compaction (RISE-019)** — each child compacts independently to manage its context
|
|
149
|
+
- **Session Forking (RISE-020)** — forks and children both use `parent_id` but serve different purposes: forks diverge, children delegate
|
|
150
|
+
- **Named Error System (RISE-006)** provides ChildDepthExceededError, ChildResultFlowError
|
|
151
|
+
|
|
152
|
+
## Creative Advancement Scenarios
|
|
153
|
+
|
|
154
|
+
**Scenario 1 — Parallel Research:**
|
|
155
|
+
The agent needs to choose between three database options. It spawns three child sessions, each researching one option. All three complete with recommendations. The parent receives three concise result messages and makes an informed decision — without 45 messages of research cluttering the main conversation.
|
|
156
|
+
|
|
157
|
+
**Scenario 2 — Delegated Bug Fix:**
|
|
158
|
+
While building a feature, the agent encounters a failing test. It spawns a child session to investigate and fix the test. The child session resolves the issue in 8 messages. The parent receives: "Fixed test: missing mock for database connection. Modified test/db.spec.ts (+5 -2)." Feature development continues uninterrupted.
|
|
159
|
+
|
|
160
|
+
**Scenario 3 — Human-Initiated Branch:**
|
|
161
|
+
A developer types `/branch explore-caching` to create a focused subtask. They work with the agent on caching strategies in the child session. When satisfied, they close the child. The parent session receives the result and the developer continues the main task with caching decisions made.
|
|
162
|
+
|
|
163
|
+
**Scenario 4 — Deep Decomposition:**
|
|
164
|
+
A complex migration task spawns children for each subsystem: auth, billing, profiles. The auth child spawns its own child for token migration. The tree visualizes the entire decomposition, making the migration's structure visible and auditable.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# RISE-025: Session Title Generation
|
|
2
|
+
|
|
3
|
+
> RISE Framework Specification — Borrowed from OpenCode for mia-code
|
|
4
|
+
> Document: rispecs/borrowed_from_opencode/025-session-title-generation.rispec.md
|
|
5
|
+
|
|
6
|
+
## Creative Intent
|
|
7
|
+
|
|
8
|
+
mia-code automatically generates concise, descriptive titles for sessions so developers can identify and navigate their work at a glance. Instead of sessions labeled by timestamp or UUID, each session gets a human-readable title like "Fix JWT token refresh bug" or "Add user profile page." Titles are generated by a lightweight agent on the first user message, updated if scope shifts significantly, and manually overridable. The session list becomes a readable changelog of developer-agent interactions.
|
|
9
|
+
|
|
10
|
+
## Structural Tension Analysis
|
|
11
|
+
|
|
12
|
+
**Current Reality:**
|
|
13
|
+
- Sessions are identified only by UUID and timestamps — meaningless to human readers
|
|
14
|
+
- The session list (`/sessions`) shows opaque identifiers that require opening each session to understand its purpose
|
|
15
|
+
- Developers cannot quickly locate a past session without scrolling through all of them
|
|
16
|
+
- No automated labeling exists — if a title field exists, it remains empty or requires manual entry
|
|
17
|
+
- Finding "that session where I fixed the auth bug last Tuesday" requires opening multiple sessions
|
|
18
|
+
|
|
19
|
+
**Desired State:**
|
|
20
|
+
- Every session receives an automatic title within seconds of the first user message
|
|
21
|
+
- Titles are concise (5-8 words), descriptive, and actionable
|
|
22
|
+
- Title generation uses a lightweight, fast agent call — minimal latency and cost
|
|
23
|
+
- Titles can be manually overridden via `/title` command
|
|
24
|
+
- If the session's scope changes significantly, the title updates automatically
|
|
25
|
+
- Session listings are immediately scannable and meaningful
|
|
26
|
+
|
|
27
|
+
## Desired Outcome Definition
|
|
28
|
+
|
|
29
|
+
A developer sends their first message: "The login page throws a 500 error when using Google OAuth." Within 2 seconds, the session title updates to "Fix Google OAuth login 500 error." The `/sessions` list shows this title alongside the session, making it instantly identifiable days later.
|
|
30
|
+
|
|
31
|
+
## Natural Language Functional Description
|
|
32
|
+
|
|
33
|
+
### Title Generation Trigger
|
|
34
|
+
|
|
35
|
+
Title generation occurs when:
|
|
36
|
+
1. **First user message:** the primary trigger — generates the initial title
|
|
37
|
+
2. **Scope change detection:** after every Nth message (configurable, default: 15), the system checks if the session scope has shifted significantly
|
|
38
|
+
3. **Manual override:** `/title <new title>` sets the title directly, disabling auto-updates
|
|
39
|
+
|
|
40
|
+
### Title Agent
|
|
41
|
+
|
|
42
|
+
The title generation uses a dedicated lightweight agent with a focused prompt:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
You are a session title generator. Given the user's message(s) from a coding
|
|
46
|
+
assistant session, generate a concise title that describes the session's purpose.
|
|
47
|
+
|
|
48
|
+
Rules:
|
|
49
|
+
- 5 to 8 words maximum
|
|
50
|
+
- Use action verbs: "Fix", "Add", "Refactor", "Debug", "Implement", "Update"
|
|
51
|
+
- Be specific: mention the feature, file, or system involved
|
|
52
|
+
- No punctuation at the end
|
|
53
|
+
- No articles at the start ("The", "A")
|
|
54
|
+
|
|
55
|
+
Examples:
|
|
56
|
+
- "Fix JWT token refresh race condition"
|
|
57
|
+
- "Add pagination to user list API"
|
|
58
|
+
- "Refactor database connection pooling"
|
|
59
|
+
- "Debug memory leak in worker threads"
|
|
60
|
+
- "Implement webhook retry with backoff"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The agent receives:
|
|
64
|
+
- For initial title: the first user message
|
|
65
|
+
- For scope change: the first user message plus the most recent 3 messages
|
|
66
|
+
|
|
67
|
+
### Title Generation Process
|
|
68
|
+
|
|
69
|
+
1. User sends first message in a new session
|
|
70
|
+
2. After the message is stored, an async title generation task fires
|
|
71
|
+
3. The title agent processes the message and returns a title string
|
|
72
|
+
4. The title is stored in `sessions.title` via `sessionDB.updateSession(id, {title})`
|
|
73
|
+
5. The UI updates to show the new title (via event bus if client-server architecture is active)
|
|
74
|
+
|
|
75
|
+
Title generation is non-blocking — it runs asynchronously and does not delay the agent's response to the user's actual message.
|
|
76
|
+
|
|
77
|
+
### Scope Change Detection
|
|
78
|
+
|
|
79
|
+
Every 15 messages, the system compares the current conversation direction to the title:
|
|
80
|
+
1. Extract the latest 3 messages (user + assistant)
|
|
81
|
+
2. Send to the title agent with the current title and instruction: "Does this title still accurately describe the session? If the session has significantly changed focus, generate a new title. If it still fits, respond with 'KEEP'."
|
|
82
|
+
3. If the agent returns a new title, update the session
|
|
83
|
+
4. If "KEEP", do nothing
|
|
84
|
+
|
|
85
|
+
Scope change detection is disabled when:
|
|
86
|
+
- The title was manually set via `/title`
|
|
87
|
+
- The session has been compacted (compaction summary may not reflect current direction)
|
|
88
|
+
|
|
89
|
+
### Manual Override
|
|
90
|
+
|
|
91
|
+
**`/title <new title>`** — sets the title manually:
|
|
92
|
+
```
|
|
93
|
+
/title Migrate database from MySQL to PostgreSQL
|
|
94
|
+
```
|
|
95
|
+
Response: "Session title updated to: Migrate database from MySQL to PostgreSQL"
|
|
96
|
+
|
|
97
|
+
Manual titles set a `title_manual` flag in session metadata, preventing automatic updates.
|
|
98
|
+
|
|
99
|
+
**`/title`** (no argument) — shows the current title and how it was generated:
|
|
100
|
+
```
|
|
101
|
+
Title: Fix Google OAuth login 500 error
|
|
102
|
+
Generated: automatically from first message
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Title in Session Listings
|
|
106
|
+
|
|
107
|
+
The `/sessions` command prominently displays titles:
|
|
108
|
+
```
|
|
109
|
+
Recent sessions:
|
|
110
|
+
abc123 Fix Google OAuth login 500 error Jan 23 10:00 45 msgs 8 files
|
|
111
|
+
def456 Add user profile page with avatar Jan 24 09:00 20 msgs 3 files
|
|
112
|
+
ghi789 Refactor database connection pool Jan 25 14:00 60 msgs 12 files
|
|
113
|
+
jkl012 Debug CI pipeline timeout issues Jan 26 11:00 15 msgs 0 files
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Model Selection for Title Agent
|
|
117
|
+
|
|
118
|
+
The title agent uses the cheapest available model to minimize cost:
|
|
119
|
+
- Default: the fastest/cheapest model configured in the system
|
|
120
|
+
- Title generation typically consumes < 100 tokens
|
|
121
|
+
- Cost per title generation should be negligible (< $0.001)
|
|
122
|
+
- Model can be overridden via `titleGeneration.model` config
|
|
123
|
+
|
|
124
|
+
### Configuration
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"titleGeneration": {
|
|
129
|
+
"enabled": true,
|
|
130
|
+
"model": "auto",
|
|
131
|
+
"scopeCheckInterval": 15,
|
|
132
|
+
"maxLength": 60
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- `enabled`: toggle title generation on/off
|
|
138
|
+
- `model`: model to use, or `"auto"` for cheapest available
|
|
139
|
+
- `scopeCheckInterval`: messages between scope change checks
|
|
140
|
+
- `maxLength`: maximum character length for generated titles
|
|
141
|
+
|
|
142
|
+
## Supporting Structures
|
|
143
|
+
|
|
144
|
+
- **Session Persistence (RISE-018)** stores the title in the `sessions.title` column
|
|
145
|
+
- **Agent Definition Config (RISE-010)** defines the title agent configuration
|
|
146
|
+
- **Event Bus (RISE-002)** broadcasts title updates to connected clients
|
|
147
|
+
- **Structured Logging (RISE-007)** logs title generation events and model usage
|
|
148
|
+
- **Multi-Agent System (RISE-009)** provides the infrastructure for running the lightweight title agent
|
|
149
|
+
|
|
150
|
+
## Creative Advancement Scenarios
|
|
151
|
+
|
|
152
|
+
**Scenario 1 — Instant Identification:**
|
|
153
|
+
A developer returns from lunch and runs `/sessions`. Instead of five UUIDs, they see: "Fix signup form validation," "Add dark mode toggle," "Debug WebSocket disconnects," "Refactor user service tests," "Update deployment config." They immediately find the session they want to continue.
|
|
154
|
+
|
|
155
|
+
**Scenario 2 — Scope Change Detection:**
|
|
156
|
+
A session starts as "Fix login page CSS" but the developer discovers the real issue is a backend API problem. After 15 messages of API debugging, the title updates to "Fix login API response format." The title reflects the actual work being done.
|
|
157
|
+
|
|
158
|
+
**Scenario 3 — Team Session Review:**
|
|
159
|
+
A team lead reviews shared sessions (RISE-022). Titles provide an instant overview of what each team member worked on with the agent, without opening every session. The titles serve as a natural activity log.
|
|
160
|
+
|
|
161
|
+
**Scenario 4 — Search and Discovery:**
|
|
162
|
+
In the future, session search can match against titles. A developer searching for "OAuth" finds their old session "Fix Google OAuth login 500 error" instantly, rather than searching through message content.
|