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,1014 @@
|
|
|
1
|
+
<img src="https://r2cdn.perplexity.ai/pplx-full-logo-primary-dark%402x.png" style="height:64px;margin-right:32px"/>
|
|
2
|
+
|
|
3
|
+
# PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464
|
|
4
|
+
|
|
5
|
+
Develop this intention:
|
|
6
|
+
<context>
|
|
7
|
+
\# 🔍 PDE - Prompt Decomposition Engine
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
When complex prompts arrive, JGT-Code needs to decompose them into actionable components rather
|
|
12
|
+
than missing implicit intentions. PDE helps agentic terminals evolve to handle multi-part requests.
|
|
13
|
+
|
|
14
|
+
## Problem Statement
|
|
15
|
+
|
|
16
|
+
Complex user inputs often contain:
|
|
17
|
+
- Multiple implicit intentions
|
|
18
|
+
- Nested requirements
|
|
19
|
+
- Action sequences
|
|
20
|
+
- Context that requires cross-referencing
|
|
21
|
+
- NCP entity relationships
|
|
22
|
+
|
|
23
|
+
Without decomposition, agents may:
|
|
24
|
+
- Ignore secondary intentions
|
|
25
|
+
- Miss implicit requirements
|
|
26
|
+
- Fail to track multi-step progress
|
|
27
|
+
- Lose context between actions
|
|
28
|
+
</context>
|
|
29
|
+
|
|
30
|
+
in such a way I would have a sets of steps that would use prompt layering (workflow or something) to decompose what I initially sent. also survey academic literature and produce a literature survey to accompagny this potential new library that will be part of our various terminal-agents (like claude-code, gemini-cli, copilot-cli) that we will create and that library will help them do an adequate job
|
|
31
|
+
|
|
32
|
+
I'll now develop a detailed implementation plan and literature survey for the PDE (Prompt Decomposition Engine) generalization, building on what you've started and incorporating relevant academic research.
|
|
33
|
+
|
|
34
|
+
# PDE Generalization: Implementation Strategy \& Academic Literature Survey
|
|
35
|
+
|
|
36
|
+
## Executive Summary
|
|
37
|
+
|
|
38
|
+
The Prompt Decomposition Engine (PDE) represents a critical infrastructure component for next-generation terminal agents (claude-code, gemini-cli, copilot-cli). By systematically decomposing complex, multi-intent prompts into executable workflows, PDE addresses fundamental limitations in current agentic systems: implicit intention blindness, context fragmentation, and sequential dependency failures.[^1_1][^1_2]
|
|
39
|
+
|
|
40
|
+
This document provides: (1) a layered implementation strategy using prompt chaining and workflow orchestration, (2) a literature survey grounding PDE in academic research on task decomposition, intent parsing, and multi-agent coordination, and (3) integration specifications for terminal-agent architectures.
|
|
41
|
+
|
|
42
|
+
***
|
|
43
|
+
|
|
44
|
+
## Part 1: Implementation Strategy - Layered Workflow Architecture
|
|
45
|
+
|
|
46
|
+
### Architecture Overview
|
|
47
|
+
|
|
48
|
+
The PDE system operates through **five progressive layers** that transform raw user input into executable agent workflows:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Layer 1: Intent Extraction & Classification
|
|
52
|
+
↓
|
|
53
|
+
Layer 2: Dependency Graph Construction
|
|
54
|
+
↓
|
|
55
|
+
Layer 3: Medicine Wheel Direction Assignment
|
|
56
|
+
↓
|
|
57
|
+
Layer 4: Workflow Template Generation
|
|
58
|
+
↓
|
|
59
|
+
Layer 5: Execution Plan with Checkpoints
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Layer 1: Intent Extraction \& Classification
|
|
64
|
+
|
|
65
|
+
**Purpose**: Parse raw prompt into structured intent objects using NLU techniques.[^1_3][^1_4][^1_5]
|
|
66
|
+
|
|
67
|
+
**Academic Foundation**:
|
|
68
|
+
|
|
69
|
+
- **Intent recognition** identifies user goals from natural language[^1_6][^1_5]
|
|
70
|
+
- **Entity recognition** extracts actionable objects and parameters[^1_4]
|
|
71
|
+
- Multi-intent parsing handles compound requests[^1_5]
|
|
72
|
+
|
|
73
|
+
**Implementation via Prompt Chaining**:[^1_7][^1_8]
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
// Sequential chaining for intent extraction
|
|
77
|
+
const intentExtractionChain = {
|
|
78
|
+
|
|
79
|
+
// Step 1: Explicit Action Identification
|
|
80
|
+
step1: {
|
|
81
|
+
prompt: `Analyze this user request and identify ALL explicit action verbs:
|
|
82
|
+
|
|
83
|
+
"${userPrompt}"
|
|
84
|
+
|
|
85
|
+
For each action, extract:
|
|
86
|
+
- Action verb (create, update, analyze, design, etc.)
|
|
87
|
+
- Target object (file, system, component, etc.)
|
|
88
|
+
- Implicit parameters or constraints
|
|
89
|
+
|
|
90
|
+
Output as JSON array of {action, target, constraints}`,
|
|
91
|
+
|
|
92
|
+
parser: (output) => parseJSON(output)
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
// Step 2: Implicit Intent Discovery
|
|
96
|
+
step2: {
|
|
97
|
+
prompt: `Given these explicit actions: ${step1.result}
|
|
98
|
+
|
|
99
|
+
Now identify IMPLICIT requirements in the original request:
|
|
100
|
+
|
|
101
|
+
"${userPrompt}"
|
|
102
|
+
|
|
103
|
+
Look for:
|
|
104
|
+
- "which I assume" → assumptions requiring validation
|
|
105
|
+
- "you will" → expectations without explicit instruction
|
|
106
|
+
- "somehow" → uncertainty markers
|
|
107
|
+
- "I expect" → unstated success criteria
|
|
108
|
+
- Dependencies on external context
|
|
109
|
+
|
|
110
|
+
Output as JSON array of {implicitIntent, triggerPhrase, priority}`,
|
|
111
|
+
|
|
112
|
+
parser: (output) => parseJSON(output)
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
// Step 3: Intent Classification
|
|
116
|
+
step3: {
|
|
117
|
+
prompt: `Classify each intent by type:
|
|
118
|
+
|
|
119
|
+
Explicit intents: ${step1.result}
|
|
120
|
+
Implicit intents: ${step2.result}
|
|
121
|
+
|
|
122
|
+
Categories:
|
|
123
|
+
- CREATION (generate new artifacts)
|
|
124
|
+
- MODIFICATION (update existing)
|
|
125
|
+
- ANALYSIS (investigate/understand)
|
|
126
|
+
- VALIDATION (verify/test)
|
|
127
|
+
- INTEGRATION (connect systems)
|
|
128
|
+
- COMMUNICATION (notifications/reports)
|
|
129
|
+
|
|
130
|
+
Output as JSON: {intentId, type, confidence}`,
|
|
131
|
+
|
|
132
|
+
parser: (output) => parseJSON(output)
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Key Techniques**:
|
|
138
|
+
|
|
139
|
+
- **Chain-of-Thought (CoT) prompting**: Forces step-by-step reasoning[^1_9][^1_10][^1_11]
|
|
140
|
+
- **Decomposed prompting**: Breaks complex analysis into modular sub-tasks[^1_12][^1_13]
|
|
141
|
+
- **ReAct pattern**: Alternates reasoning (Think) with action (Extract)[^1_14][^1_15][^1_16]
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### Layer 2: Dependency Graph Construction
|
|
146
|
+
|
|
147
|
+
**Purpose**: Map inter-intent dependencies to determine execution order and parallelization opportunities.
|
|
148
|
+
|
|
149
|
+
**Academic Foundation**:
|
|
150
|
+
|
|
151
|
+
- Hierarchical Task Networks (HTNs) for recursive decomposition[^1_17][^1_18]
|
|
152
|
+
- Task allocation via precedence constraints[^1_18]
|
|
153
|
+
- Agent-oriented planning with sub-task dependencies[^1_19]
|
|
154
|
+
|
|
155
|
+
**Implementation via Branching Chains**:[^1_8]
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
// Branching chain for dependency analysis
|
|
159
|
+
const dependencyAnalysisChain = {
|
|
160
|
+
|
|
161
|
+
// Primary analysis
|
|
162
|
+
step1: {
|
|
163
|
+
prompt: `Given these classified intents:
|
|
164
|
+
${JSON.stringify(classifiedIntents)}
|
|
165
|
+
|
|
166
|
+
Build a dependency graph:
|
|
167
|
+
|
|
168
|
+
For each intent, determine:
|
|
169
|
+
1. Prerequisites (which intents MUST complete first?)
|
|
170
|
+
2. Blockers (which intents CANNOT run in parallel?)
|
|
171
|
+
3. Enablers (which intents enable optional paths?)
|
|
172
|
+
4. Data flow (what outputs become inputs?)
|
|
173
|
+
|
|
174
|
+
Use directed graph notation: A -> B means B depends on A
|
|
175
|
+
Use parallel notation: [A, B] means can run simultaneously
|
|
176
|
+
|
|
177
|
+
Output as adjacency list JSON`,
|
|
178
|
+
|
|
179
|
+
parser: (output) => buildDependencyGraph(parseJSON(output))
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// Conditional branching based on graph complexity
|
|
183
|
+
step2: (graph) => {
|
|
184
|
+
if (graph.hasCycles) {
|
|
185
|
+
return cyclicGraphPrompt(graph); // Handle circular dependencies
|
|
186
|
+
} else if (graph.maxDepth > 5) {
|
|
187
|
+
return hierarchicalDecompPrompt(graph); // Further decompose deep graphs
|
|
188
|
+
} else {
|
|
189
|
+
return linearizeGraphPrompt(graph); // Simple topological sort
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Key Techniques**:
|
|
196
|
+
|
|
197
|
+
- **Tree-of-Thoughts (ToT)**: Explores multiple dependency interpretations[^1_20][^1_21][^1_22]
|
|
198
|
+
- **Least-to-Most prompting**: Solves simplest dependencies first, builds upward[^1_23]
|
|
199
|
+
- **Iterative refinement**: Validates graph correctness through multi-pass analysis[^1_24]
|
|
200
|
+
|
|
201
|
+
***
|
|
202
|
+
|
|
203
|
+
### Layer 3: Medicine Wheel Direction Assignment
|
|
204
|
+
|
|
205
|
+
**Purpose**: Map each intent to Etuaptmumk (Two-Eyed Seeing) epistemological framework for ceremony-aware processing.
|
|
206
|
+
|
|
207
|
+
**Conceptual Framework** (from PDE.md):
|
|
208
|
+
|
|
209
|
+
- **EAST**: Vision/inquiry - "What is being asked?"
|
|
210
|
+
- **SOUTH**: Growth/learning - "What needs analysis?"
|
|
211
|
+
- **WEST**: Integration/validation - "What needs reflection?"
|
|
212
|
+
- **NORTH**: Wisdom/action - "What completes the cycle?"
|
|
213
|
+
|
|
214
|
+
**Implementation**:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
const medicineWheelMapping = {
|
|
218
|
+
prompt: `Analyze each intent and assign Medicine Wheel direction:
|
|
219
|
+
|
|
220
|
+
Intents: ${JSON.stringify(intents)}
|
|
221
|
+
|
|
222
|
+
Direction criteria:
|
|
223
|
+
- EAST: Exploratory, question-forming, visioning, initial research
|
|
224
|
+
- SOUTH: Learning-focused, data gathering, skill building, analysis
|
|
225
|
+
- WEST: Integrative, validation, testing, reflection, refinement
|
|
226
|
+
- NORTH: Action-completing, implementation, deployment, finalization
|
|
227
|
+
|
|
228
|
+
For each intent, provide:
|
|
229
|
+
- Primary direction (main epistemological mode)
|
|
230
|
+
- Secondary direction (supporting mode, if applicable)
|
|
231
|
+
- Ceremony type: vision_inquiry, wave_counting, talking_circles, elder_council
|
|
232
|
+
- Rationale (why this direction fits)
|
|
233
|
+
|
|
234
|
+
Output as JSON array`,
|
|
235
|
+
|
|
236
|
+
ceremonyMap: {
|
|
237
|
+
east: 'vision_inquiry',
|
|
238
|
+
south: 'wave_counting',
|
|
239
|
+
west: 'talking_circles',
|
|
240
|
+
north: 'elder_council'
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
***
|
|
247
|
+
|
|
248
|
+
### Layer 4: Workflow Template Generation
|
|
249
|
+
|
|
250
|
+
**Purpose**: Generate structured, executable workflow templates using industry-standard orchestration patterns.[^1_25][^1_26]
|
|
251
|
+
|
|
252
|
+
**Academic Foundation**:
|
|
253
|
+
|
|
254
|
+
- Workflow-as-Code paradigms for multi-step processes[^1_26]
|
|
255
|
+
- Temporal workflow orchestration for distributed systems[^1_26]
|
|
256
|
+
- LLM-driven multi-agent workflow frameworks[^1_27][^1_28]
|
|
257
|
+
|
|
258
|
+
**Implementation with Nested Chaining**:[^1_8]
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
// Hybrid chain: sequential generation + iterative refinement
|
|
262
|
+
const workflowGeneration = {
|
|
263
|
+
|
|
264
|
+
// Sequential: Generate base workflow
|
|
265
|
+
phase1: {
|
|
266
|
+
step1: {
|
|
267
|
+
prompt: `Create workflow scaffold:
|
|
268
|
+
|
|
269
|
+
Dependency graph: ${JSON.stringify(dependencyGraph)}
|
|
270
|
+
Medicine Wheel mappings: ${JSON.stringify(wheelAssignments)}
|
|
271
|
+
|
|
272
|
+
Generate workflow with:
|
|
273
|
+
- Parallel execution blocks where dependencies allow
|
|
274
|
+
- Sequential chains where order matters
|
|
275
|
+
- Conditional branches for validation gates
|
|
276
|
+
- Retry logic for failure-prone steps
|
|
277
|
+
- Checkpoint markers for progress tracking
|
|
278
|
+
|
|
279
|
+
Use this structure:
|
|
280
|
+
{
|
|
281
|
+
"workflowId": "uuid",
|
|
282
|
+
"stages": [
|
|
283
|
+
{
|
|
284
|
+
"stageId": "stage-1",
|
|
285
|
+
"type": "parallel|sequential|conditional",
|
|
286
|
+
"tasks": [...],
|
|
287
|
+
"checkpointAfter": boolean
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}`,
|
|
291
|
+
|
|
292
|
+
parser: (output) => parseWorkflowTemplate(output)
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
// Iterative: Refine for each ceremony type
|
|
296
|
+
step2: (template) => {
|
|
297
|
+
return wheelAssignments.map(assignment => ({
|
|
298
|
+
prompt: `Adapt this workflow stage for ${assignment.ceremony}:
|
|
299
|
+
|
|
300
|
+
Stage: ${JSON.stringify(template.stages[assignment.stageId])}
|
|
301
|
+
|
|
302
|
+
${assignment.ceremony} ceremony requirements:
|
|
303
|
+
${getCeremonyRequirements(assignment.ceremony)}
|
|
304
|
+
|
|
305
|
+
Add ceremony-specific:
|
|
306
|
+
- Context requirements (files, relationships, tools)
|
|
307
|
+
- Validation checkpoints
|
|
308
|
+
- Communication protocols
|
|
309
|
+
|
|
310
|
+
Output enhanced stage JSON`,
|
|
311
|
+
|
|
312
|
+
parser: (output) => mergeStageEnhancements(output)
|
|
313
|
+
}));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Key Patterns**:
|
|
320
|
+
|
|
321
|
+
- **Prompt chaining reliability**: Multi-stage chains reduce failure rates (100% vs 50% single-shot)[^1_7]
|
|
322
|
+
- **Meta-prompting**: LLM generates optimized sub-prompts for workflow stages[^1_29][^1_30]
|
|
323
|
+
- **Orchestration with guardrails**: Validates outputs, recovers from errors[^1_28]
|
|
324
|
+
|
|
325
|
+
***
|
|
326
|
+
|
|
327
|
+
### Layer 5: Execution Plan with Checkpoints
|
|
328
|
+
|
|
329
|
+
**Purpose**: Convert workflow template into agent-executable plan with progress tracking and failure recovery.
|
|
330
|
+
|
|
331
|
+
**Implementation**:
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
const executionPlanGeneration = {
|
|
335
|
+
prompt: `Generate execution plan from workflow:
|
|
336
|
+
|
|
337
|
+
Workflow template: ${JSON.stringify(workflowTemplate)}
|
|
338
|
+
|
|
339
|
+
For each task, specify:
|
|
340
|
+
1. Agent command (jgt-code, claude-code, gemini-cli, copilot-cli)
|
|
341
|
+
2. Input parameters and context files
|
|
342
|
+
3. Expected outputs (artifacts, updates, communications)
|
|
343
|
+
4. Success criteria (how to verify completion)
|
|
344
|
+
5. Failure recovery (fallback strategy)
|
|
345
|
+
6. Progress checkpoint (what to report)
|
|
346
|
+
|
|
347
|
+
Output format:
|
|
348
|
+
- [ ] Task description
|
|
349
|
+
- Command: \`agent-cli command --flags\`
|
|
350
|
+
- Inputs: [file1, file2, context-key]
|
|
351
|
+
- Outputs: [artifact-path]
|
|
352
|
+
- Success: "Check if X exists and contains Y"
|
|
353
|
+
- Fallback: "If fails, try Z or prompt user"
|
|
354
|
+
- Checkpoint: "Report: Completed step N/M"
|
|
355
|
+
|
|
356
|
+
Generate complete checklist with all tasks`,
|
|
357
|
+
|
|
358
|
+
parser: (output) => {
|
|
359
|
+
const plan = parseExecutionPlan(output);
|
|
360
|
+
|
|
361
|
+
// Add metadata
|
|
362
|
+
plan.totalSteps = countTasks(plan);
|
|
363
|
+
plan.estimatedDuration = estimateTime(plan);
|
|
364
|
+
plan.requiredTools = extractToolDependencies(plan);
|
|
365
|
+
|
|
366
|
+
return plan;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
***
|
|
373
|
+
|
|
374
|
+
## Part 2: Integration with Terminal Agents
|
|
375
|
+
|
|
376
|
+
### Agent Architecture Enhancement
|
|
377
|
+
|
|
378
|
+
```typescript
|
|
379
|
+
// Enhanced agent interface with PDE integration
|
|
380
|
+
interface PDEEnabledAgent {
|
|
381
|
+
// Existing agent capabilities
|
|
382
|
+
executeCommand(cmd: string): Promise<Result>;
|
|
383
|
+
|
|
384
|
+
// New PDE integration
|
|
385
|
+
decomposePrompt(prompt: string): Promise<DecomposedPrompt>;
|
|
386
|
+
executeWorkflow(workflow: WorkflowTemplate): Promise<WorkflowResult>;
|
|
387
|
+
trackProgress(checkpointId: string): ProgressStatus;
|
|
388
|
+
recoverFromFailure(failureContext: FailureInfo): RecoveryStrategy;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Usage in terminal agents
|
|
392
|
+
class JGTCodeAgent implements PDEEnabledAgent {
|
|
393
|
+
async chat(userPrompt: string, options: { pde?: boolean }) {
|
|
394
|
+
if (options.pde) {
|
|
395
|
+
// PDE-enabled mode
|
|
396
|
+
const decomposed = await this.decomposePrompt(userPrompt);
|
|
397
|
+
|
|
398
|
+
console.log("📋 Decomposed prompt:");
|
|
399
|
+
console.log(visualizeDecomposition(decomposed));
|
|
400
|
+
|
|
401
|
+
const proceed = await confirmWithUser("Execute this plan?");
|
|
402
|
+
if (!proceed) return;
|
|
403
|
+
|
|
404
|
+
const result = await this.executeWorkflow(decomposed.workflow);
|
|
405
|
+
return result;
|
|
406
|
+
} else {
|
|
407
|
+
// Standard mode
|
|
408
|
+
return this.standardChat(userPrompt);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
### CLI Integration Examples
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
# New jgt-code commands with PDE
|
|
419
|
+
|
|
420
|
+
# 1. Decompose and preview (don't execute)
|
|
421
|
+
jgt-code decompose "Create user auth system with JWT, connect to PostgreSQL, \
|
|
422
|
+
write tests, and deploy to staging"
|
|
423
|
+
|
|
424
|
+
# Output:
|
|
425
|
+
# 📋 Decomposed Workflow:
|
|
426
|
+
#
|
|
427
|
+
# Stage 1 (EAST - Vision Inquiry): Requirements Analysis
|
|
428
|
+
# - [ ] Extract JWT requirements from request
|
|
429
|
+
# - [ ] Identify PostgreSQL schema needs
|
|
430
|
+
# - [ ] Map testing requirements
|
|
431
|
+
#
|
|
432
|
+
# Stage 2 (SOUTH - Wave Counting): Implementation
|
|
433
|
+
# [Parallel execution possible]
|
|
434
|
+
# - [ ] Create auth service with JWT
|
|
435
|
+
# - [ ] Design database schema
|
|
436
|
+
# - [ ] Setup test infrastructure
|
|
437
|
+
#
|
|
438
|
+
# Stage 3 (WEST - Talking Circles): Validation
|
|
439
|
+
# - [ ] Run test suite
|
|
440
|
+
# - [ ] Verify database connections
|
|
441
|
+
# - [ ] Security audit of JWT implementation
|
|
442
|
+
#
|
|
443
|
+
# Stage 4 (NORTH - Elder Council): Deployment
|
|
444
|
+
# - [ ] Deploy to staging environment
|
|
445
|
+
# - [ ] Smoke tests on staging
|
|
446
|
+
# - [ ] Generate deployment report
|
|
447
|
+
|
|
448
|
+
# 2. Execute with PDE enabled
|
|
449
|
+
jgt-code chat --pde "Same complex prompt..."
|
|
450
|
+
|
|
451
|
+
# 3. Resume from checkpoint (failure recovery)
|
|
452
|
+
jgt-code resume --checkpoint stage-2-task-3
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
***
|
|
457
|
+
|
|
458
|
+
## Part 3: Literature Survey - Academic Grounding
|
|
459
|
+
|
|
460
|
+
### 3.1 Task Decomposition Foundations
|
|
461
|
+
|
|
462
|
+
**Hierarchical Task Networks (HTNs)**[^1_17][^1_18]
|
|
463
|
+
|
|
464
|
+
- **Core principle**: Recursively decompose complex tasks into simpler subtasks until reaching primitive actions
|
|
465
|
+
- **Relevance to PDE**: Provides formal framework for intent → subtask → primitive action hierarchy
|
|
466
|
+
- **Implementation**: PDE Layer 2 (Dependency Graph) uses HTN-inspired recursive decomposition
|
|
467
|
+
|
|
468
|
+
**Top-Down vs. Bottom-Up Decomposition**[^1_17]
|
|
469
|
+
|
|
470
|
+
- **Top-down**: Start with high-level goals, break into specifics (PDE's primary approach)
|
|
471
|
+
- **Bottom-up**: Start with available capabilities, compose upward (useful for tool discovery)
|
|
472
|
+
- **Hybrid approaches**: Most successful autonomous agents combine both[^1_17]
|
|
473
|
+
|
|
474
|
+
**Goal-Oriented Decomposition**[^1_17]
|
|
475
|
+
|
|
476
|
+
- Focuses on desired outcomes rather than implementation details
|
|
477
|
+
- Provides flexibility in how subtasks are achieved
|
|
478
|
+
- Used by modern LLM agents (AutoGPT, BabyAGI)[^1_17]
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
### 3.2 Prompt Engineering for Decomposition
|
|
482
|
+
|
|
483
|
+
**Chain-of-Thought (CoT) Prompting**[^1_10][^1_11][^1_9]
|
|
484
|
+
|
|
485
|
+
- **Mechanism**: Guide LLMs to generate step-by-step reasoning traces before final answers
|
|
486
|
+
- **Emergent capability**: Only effective with ~100B+ parameter models[^1_10]
|
|
487
|
+
- **Application to PDE**: Each layer uses CoT to make decomposition decisions explicit and verifiable
|
|
488
|
+
- **Evidence**: CoT improves complex reasoning by 5-15% F1 score[^1_9]
|
|
489
|
+
|
|
490
|
+
**Decomposed Prompting (DecomP)**[^1_13][^1_12]
|
|
491
|
+
|
|
492
|
+
- **Method**: Break complex prompts into smaller, modular sub-prompts with clear dependencies
|
|
493
|
+
- **Benefits**: Reduces calculation errors, prevents missing steps, improves semantic understanding[^1_31]
|
|
494
|
+
- **PDE implementation**: Layer 4 (Workflow Generation) uses DecomP for ceremony-specific adaptations
|
|
495
|
+
|
|
496
|
+
**ReAct (Reasoning + Acting)**[^1_15][^1_16][^1_32][^1_14]
|
|
497
|
+
|
|
498
|
+
- **Paradigm**: Interleave reasoning steps with action execution
|
|
499
|
+
- **Pattern**: Thought → Action → Observation → Thought → ...
|
|
500
|
+
- **Relevance**: PDE's execution plan (Layer 5) mirrors ReAct's iterative reasoning-action cycle
|
|
501
|
+
- **Advantage**: Enables dynamic replanning based on intermediate results[^1_16]
|
|
502
|
+
|
|
503
|
+
**Tree-of-Thoughts (ToT)**[^1_21][^1_22][^1_20]
|
|
504
|
+
|
|
505
|
+
- **Structure**: Organize reasoning as branching tree where nodes = intermediate thoughts
|
|
506
|
+
- **Search algorithms**: BFS/DFS to explore multiple solution paths[^1_21]
|
|
507
|
+
- **Evaluation**: Each branch assessed for promise; weak paths pruned[^1_22]
|
|
508
|
+
- **PDE usage**: Layer 2 (Dependency Analysis) uses ToT to explore alternative dependency interpretations
|
|
509
|
+
|
|
510
|
+
**Least-to-Most Prompting**[^1_23]
|
|
511
|
+
|
|
512
|
+
- **Strategy**: Solve simplest subproblem first, feed answer into next layer, cascade upward
|
|
513
|
+
- **Hierarchy**: Creates natural scaffolding from easy → hard[^1_23]
|
|
514
|
+
- **Application**: PDE's dependency graph execution follows least-to-most ordering
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
### 3.3 Prompt Chaining \& Workflow Orchestration
|
|
518
|
+
|
|
519
|
+
**Prompt Chaining Fundamentals**[^1_33][^1_7][^1_8]
|
|
520
|
+
|
|
521
|
+
- **Definition**: Link multiple prompts sequentially where output of one becomes input to next
|
|
522
|
+
- **Types**:[^1_8]
|
|
523
|
+
- **Sequential chaining**: Linear, one step after another (PDE Layers 1-5)
|
|
524
|
+
- **Branching chaining**: Conditional paths based on intermediate outputs (PDE Layer 2)
|
|
525
|
+
- **Iterative chaining**: Repeat with refinement until criteria met (PDE Layer 4 refinement)
|
|
526
|
+
- **Nested/Hybrid chaining**: Combine multiple patterns (PDE overall architecture)
|
|
527
|
+
|
|
528
|
+
**Empirical Evidence**[^1_7]
|
|
529
|
+
|
|
530
|
+
- Multi-stage prompt chaining achieves **100% success rate** vs. **50% failure rate** for optimized single-shot prompts
|
|
531
|
+
- Higher ROUGE-L F1 scores (0.507 vs 0.486) with better precision[^1_7]
|
|
532
|
+
- Conclusion: "Prompt chaining is more dependable and effective for complex, multi-step generative tasks"[^1_7]
|
|
533
|
+
|
|
534
|
+
**Multi-Agent Workflow Orchestration**[^1_27][^1_28]
|
|
535
|
+
|
|
536
|
+
- **LLM-driven workflows**: Use LLMs as orchestrators that coordinate specialized agents[^1_27]
|
|
537
|
+
- **Guardrails**: Validate outputs, steer behavior, recover from errors[^1_28]
|
|
538
|
+
- **Relevance**: PDE's workflow templates map to multi-agent orchestration patterns
|
|
539
|
+
|
|
540
|
+
**Hierarchical Multi-Agent Workflows**[^1_34]
|
|
541
|
+
|
|
542
|
+
- LLMs construct prompts hierarchically: precise instructions → accurate wording → final answer
|
|
543
|
+
- Task-agnostic, requires no training, adjusts to task nuances[^1_34]
|
|
544
|
+
- **Direct parallel**: PDE's layered architecture (5 layers) mirrors hierarchical prompt construction
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
### 3.4 Intent Recognition \& NLU
|
|
548
|
+
|
|
549
|
+
**Intent Recognition Techniques**[^1_3][^1_4][^1_6]
|
|
550
|
+
|
|
551
|
+
- **Definition**: Identify the purpose/goal behind user language input[^1_6]
|
|
552
|
+
- **Methods**: Classification models, sequence labeling, semantic analysis[^1_3]
|
|
553
|
+
- **PDE application**: Layer 1 uses intent recognition to extract explicit and implicit user goals
|
|
554
|
+
|
|
555
|
+
**Entity Recognition**[^1_4][^1_6]
|
|
556
|
+
|
|
557
|
+
- **Complements intent**: Extract relevant objects, parameters, constraints from text[^1_4]
|
|
558
|
+
- **Named entities**: People, organizations, locations, dates, file paths, etc.[^1_3]
|
|
559
|
+
- **PDE usage**: Layer 1 extracts target objects and constraints for each intent
|
|
560
|
+
|
|
561
|
+
**Open Intent Extraction**[^1_5]
|
|
562
|
+
|
|
563
|
+
- **Challenge**: Discover intents without prior knowledge of possible intent classes
|
|
564
|
+
- **OPINE framework**: Uses BiLSTM + CRF to extract ACTION-OBJECT pairs from utterances[^1_5]
|
|
565
|
+
- **Performance**: 76% F1 score on real-world utterances[^1_5]
|
|
566
|
+
- **Relevance**: PDE handles open-ended prompts where intent classes are not predefined
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
### 3.5 Multi-Agent Systems Challenges
|
|
570
|
+
|
|
571
|
+
**Coordination Challenges**[^1_1]
|
|
572
|
+
|
|
573
|
+
- Optimizing task allocation across agents
|
|
574
|
+
- Managing layered context information
|
|
575
|
+
- Enhancing memory management for complex interactions[^1_1]
|
|
576
|
+
|
|
577
|
+
**Communication Vulnerabilities**[^1_35][^1_36][^1_37]
|
|
578
|
+
|
|
579
|
+
- **Prompt injection attacks**: Adversaries manipulate inter-agent messages[^1_36][^1_35]
|
|
580
|
+
- **Agent-in-the-Middle (AiTM)**: Intercept and modify messages between agents[^1_36]
|
|
581
|
+
- **Prompt infection**: Malicious prompts self-replicate across agents like computer viruses[^1_37]
|
|
582
|
+
- **Mitigation for PDE**: Layer 5 execution plans include validation checkpoints to detect anomalies
|
|
583
|
+
|
|
584
|
+
**Failure Attribution**[^1_38]
|
|
585
|
+
|
|
586
|
+
- Challenge: Identifying which agent and which step caused failures in multi-agent workflows
|
|
587
|
+
- Current performance: 53.5% accuracy for agent identification, only 14.2% for pinpointing steps[^1_38]
|
|
588
|
+
- **PDE solution**: Explicit checkpoints in Layer 5 enable precise failure localization
|
|
589
|
+
|
|
590
|
+
**Trust, Risk, Security Management (TRiSM)**[^1_39]
|
|
591
|
+
|
|
592
|
+
- Framework for agentic AI safety: explainability, security, privacy, governance[^1_39]
|
|
593
|
+
- **Component Synergy Score (CSS)**: Quantify inter-agent collaboration quality[^1_39]
|
|
594
|
+
- **Tool Utilization Efficacy (TUE)**: Evaluate tool usage efficiency[^1_39]
|
|
595
|
+
- **PDE integration**: Medicine Wheel ceremony mappings provide cultural-epistemological governance layer
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
### 3.6 Memory \& Context Management
|
|
599
|
+
|
|
600
|
+
**Agent Memory Architectures**[^1_40][^1_41][^1_42]
|
|
601
|
+
|
|
602
|
+
- **Challenge**: LLMs are stateless; each interaction isolated without memory carryover[^1_42]
|
|
603
|
+
- **MemGPT approach**: Hierarchical memory tiers (core memory = RAM, archival = disk)[^1_42]
|
|
604
|
+
- **Agentic memory (A-Mem)**: Autonomous memory evolution with dynamic linking[^1_40]
|
|
605
|
+
- **PDE relevance**: Context requirements in Layer 1 specify what must be retrieved from agent memory
|
|
606
|
+
|
|
607
|
+
**Contextual Retrieval**[^1_41][^1_40]
|
|
608
|
+
|
|
609
|
+
- **Zettelkasten-inspired**: Create interconnected knowledge networks through dynamic indexing[^1_40]
|
|
610
|
+
- **Memory evolution**: New memories trigger updates to existing memory representations[^1_40]
|
|
611
|
+
- **Mix-of-Experts gating**: Learned retrieval weights (semantic similarity, recency, importance)[^1_41]
|
|
612
|
+
|
|
613
|
+
**Long-Term Recall**[^1_43]
|
|
614
|
+
|
|
615
|
+
- Prompt chaining framework for extended conversations with context retention[^1_43]
|
|
616
|
+
- Multi-step reasoning for context-aware, personalized responses[^1_43]
|
|
617
|
+
- **Improvement**: Better sensibleness, consistency, personalization across LLM backends[^1_43]
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
### 3.7 Meta-Prompting \& Self-Optimization
|
|
621
|
+
|
|
622
|
+
**Meta-Prompting Definition**[^1_30][^1_44][^1_29]
|
|
623
|
+
|
|
624
|
+
- LLMs generate, modify, and optimize their own prompts iteratively[^1_30]
|
|
625
|
+
- "Prompt that creates prompts" - recursive approach[^1_45]
|
|
626
|
+
- **Three core components**:[^1_29]
|
|
627
|
+
|
|
628
|
+
1. Expert role definition (AI as prompt specialist)
|
|
629
|
+
2. Decomposition strategy (break tasks into parts)
|
|
630
|
+
3. Verification system (expert personas validate outputs)
|
|
631
|
+
|
|
632
|
+
**Structured Meta-Prompts**[^1_30]
|
|
633
|
+
|
|
634
|
+
- Provide scaffold for solutions (method + format) rather than concrete examples
|
|
635
|
+
- Guide LLM to produce well-organized, step-by-step outputs[^1_30]
|
|
636
|
+
- **Application to PDE**: Each layer includes meta-prompt that instructs LLM how to decompose at that level
|
|
637
|
+
|
|
638
|
+
**Automatic Prompt Optimization**[^1_46]
|
|
639
|
+
|
|
640
|
+
- **AMPO**: Multi-branched prompt optimization using failure cases as feedback[^1_46]
|
|
641
|
+
- **Pattern recognition**: Identify diverse patterns in complex tasks[^1_46]
|
|
642
|
+
- **PDE evolution path**: Future versions could auto-optimize layer prompts based on execution outcomes
|
|
643
|
+
|
|
644
|
+
***
|
|
645
|
+
|
|
646
|
+
## Part 4: Implementation Roadmap
|
|
647
|
+
|
|
648
|
+
### Phase 1: Core PDE Library (Weeks 1-4)
|
|
649
|
+
|
|
650
|
+
**Deliverables**:
|
|
651
|
+
|
|
652
|
+
1. **TypeScript/Python library** with 5-layer decomposition pipeline
|
|
653
|
+
2. **Prompt templates** for each layer (CoT, ReAct, ToT patterns)
|
|
654
|
+
3. **Unit tests** with synthetic complex prompts
|
|
655
|
+
4. **Benchmark dataset**: 100 hand-crafted complex prompts with ground truth decompositions
|
|
656
|
+
|
|
657
|
+
**Key files to create**:
|
|
658
|
+
|
|
659
|
+
```
|
|
660
|
+
pde-lib/
|
|
661
|
+
├── src/
|
|
662
|
+
│ ├── layers/
|
|
663
|
+
│ │ ├── intent-extraction.ts # Layer 1
|
|
664
|
+
│ │ ├── dependency-graph.ts # Layer 2
|
|
665
|
+
│ │ ├── wheel-assignment.ts # Layer 3
|
|
666
|
+
│ │ ├── workflow-generation.ts # Layer 4
|
|
667
|
+
│ │ └── execution-plan.ts # Layer 5
|
|
668
|
+
│ ├── chains/
|
|
669
|
+
│ │ ├── sequential.ts
|
|
670
|
+
│ │ ├── branching.ts
|
|
671
|
+
│ │ ├── iterative.ts
|
|
672
|
+
│ │ └── hybrid.ts
|
|
673
|
+
│ ├── prompts/
|
|
674
|
+
│ │ ├── cot-templates.ts
|
|
675
|
+
│ │ ├── react-templates.ts
|
|
676
|
+
│ │ └── tot-templates.ts
|
|
677
|
+
│ └── index.ts
|
|
678
|
+
├── tests/
|
|
679
|
+
└── benchmarks/
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
### Phase 2: Terminal Agent Integration (Weeks 5-8)
|
|
684
|
+
|
|
685
|
+
**Deliverables**:
|
|
686
|
+
|
|
687
|
+
1. **JGT-Code integration**: `jgt-code decompose`, `jgt-code chat --pde`
|
|
688
|
+
2. **Claude-Code adapter**: Map PDE workflows to Claude API
|
|
689
|
+
3. **Gemini-CLI adapter**: Map PDE workflows to Gemini API
|
|
690
|
+
4. **Copilot-CLI adapter**: Map PDE workflows to GitHub Copilot
|
|
691
|
+
5. **CLI visualization**: ASCII art dependency graphs, progress bars, checkpoints
|
|
692
|
+
|
|
693
|
+
**Example integration**:
|
|
694
|
+
|
|
695
|
+
```typescript
|
|
696
|
+
// In jgt-code/src/commands/chat.ts
|
|
697
|
+
import { PDEEngine } from '@jgt/pde-lib';
|
|
698
|
+
|
|
699
|
+
export async function chatCommand(prompt: string, options: ChatOptions) {
|
|
700
|
+
if (options.pde) {
|
|
701
|
+
const pde = new PDEEngine({
|
|
702
|
+
modelProvider: 'openai-gpt4', // or gemini, claude
|
|
703
|
+
medicineWheelEnabled: true
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
const decomposed = await pde.decompose(prompt);
|
|
707
|
+
console.log(visualizeWorkflow(decomposed));
|
|
708
|
+
|
|
709
|
+
if (await confirmExecution()) {
|
|
710
|
+
return executeWorkflow(decomposed);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
// ... standard chat logic
|
|
714
|
+
}
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
### Phase 3: Evaluation \& Refinement (Weeks 9-12)
|
|
719
|
+
|
|
720
|
+
**Metrics to track**:
|
|
721
|
+
|
|
722
|
+
1. **Decomposition accuracy**: Ground truth vs. PDE output (intent coverage, dependency correctness)
|
|
723
|
+
2. **Execution success rate**: % of workflows completing without errors
|
|
724
|
+
3. **Checkpoint recovery**: % of failures successfully resumed from checkpoint
|
|
725
|
+
4. **User satisfaction**: Survey terminal users on PDE helpfulness
|
|
726
|
+
|
|
727
|
+
**Benchmark datasets**:
|
|
728
|
+
|
|
729
|
+
- **Synthetic**: 100 complex prompts (academic literature examples)
|
|
730
|
+
- **Real-world**: Collect 50 actual user prompts from JGT-Code sessions
|
|
731
|
+
- **Edge cases**: 25 adversarial/ambiguous prompts
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
### Phase 4: Publication \& Open Source (Week 13+)
|
|
735
|
+
|
|
736
|
+
**Deliverables**:
|
|
737
|
+
|
|
738
|
+
1. **Academic paper**: "PDE: Prompt Decomposition Engine for Agentic Terminal Systems"
|
|
739
|
+
- Submit to NeurIPS, EMNLP, or ICLR
|
|
740
|
+
2. **GitHub repository**: Open source PDE library with documentation
|
|
741
|
+
3. **Blog post series**: Explaining PDE architecture and integration
|
|
742
|
+
4. **Tutorial videos**: Demonstrating PDE with terminal agents
|
|
743
|
+
|
|
744
|
+
***
|
|
745
|
+
|
|
746
|
+
## Part 5: Research Contributions
|
|
747
|
+
|
|
748
|
+
### Novelty Claims
|
|
749
|
+
|
|
750
|
+
1. **Cultural-Epistemological Integration**: First prompt decomposition system grounding task assignment in indigenous epistemology (Medicine Wheel/Etuaptmumk)[^1_47]
|
|
751
|
+
2. **Hybrid Decomposition Strategy**: Combines HTN planning, CoT reasoning, and prompt chaining in unified 5-layer architecture[^1_10][^1_7][^1_17]
|
|
752
|
+
3. **Ceremony-Aware Workflows**: Novel concept of mapping computational tasks to ceremonial practices for context-appropriate processing
|
|
753
|
+
4. **Checkpoint-Based Recovery**: Explicit failure localization and recovery mechanisms addressing multi-agent attribution challenge[^1_38]
|
|
754
|
+
5. **Terminal-Agent Specialization**: First decomposition engine designed specifically for developer terminal interfaces (vs. general chatbots)
|
|
755
|
+
|
|
756
|
+
### Comparison to Prior Work
|
|
757
|
+
|
|
758
|
+
| System | Decomposition Method | Workflow Generation | Multi-Agent Support | Cultural Grounding |
|
|
759
|
+
| :-- | :-- | :-- | :-- | :-- |
|
|
760
|
+
| **ReAct**[^1_16] | Iterative reasoning-action | Manual prompt design | No | No |
|
|
761
|
+
| **DecomP**[^1_12] | Modular sub-prompts | Static sub-tasks | No | No |
|
|
762
|
+
| **ToT**[^1_20] | Tree search over thoughts | No workflows | No | No |
|
|
763
|
+
| **HuggingGPT**[^1_19] | ChatGPT decomposes tasks | Model selection | Yes | No |
|
|
764
|
+
| **LMW**[^1_27] | LLM-driven | Multi-agent coordination | Yes | No |
|
|
765
|
+
| **PDE (ours)** | 5-layer HTN+CoT+ToT | Ceremony-aware templates | Yes (terminal agents) | **Yes (Medicine Wheel)** |
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
***
|
|
769
|
+
|
|
770
|
+
## Part 6: Expected Outcomes
|
|
771
|
+
|
|
772
|
+
### Quantitative Improvements
|
|
773
|
+
|
|
774
|
+
Based on literature evidence:[^1_9][^1_10][^1_7]
|
|
775
|
+
|
|
776
|
+
- **Decomposition reliability**: 100% (vs. 50% single-shot baseline)[^1_7]
|
|
777
|
+
- **Complex reasoning accuracy**: +15% improvement (CoT effect)[^1_9]
|
|
778
|
+
- **Execution success rate**: 85%+ for multi-step workflows
|
|
779
|
+
- **Checkpoint recovery**: 90%+ of failures resumable without full restart
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
### Qualitative Benefits
|
|
783
|
+
|
|
784
|
+
1. **Transparency**: Users see explicit decomposition before execution
|
|
785
|
+
2. **Control**: Approve/modify workflow before agent proceeds
|
|
786
|
+
3. **Debuggability**: Checkpoint markers enable precise failure diagnosis
|
|
787
|
+
4. **Learnability**: Terminal agents "explain their thinking" via decomposition
|
|
788
|
+
5. **Cultural coherence**: Indigenous knowledge systems integrated into AI workflows
|
|
789
|
+
|
|
790
|
+
***
|
|
791
|
+
|
|
792
|
+
## References
|
|
793
|
+
|
|
794
|
+
[Complete list generated from web sources 1-99 with proper academic formatting]
|
|
795
|
+
|
|
796
|
+
Key seminal works:
|
|
797
|
+
|
|
798
|
+
- Wei et al. (2022). "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models"[^1_10]
|
|
799
|
+
- Yao et al. (2023). "Tree of Thoughts: Deliberate Problem Solving with Large Language Models"[^1_20]
|
|
800
|
+
- Khot et al. (2023). "Decomposed Prompting: A Modular Approach for Solving Complex Tasks"[^1_12]
|
|
801
|
+
- Navigating Complexity: Orchestrated Problem Solving with Multi-Agent LLMs (2024)[^1_2]
|
|
802
|
+
- Prompt Chaining in Practice (2024)[^1_7]
|
|
803
|
+
|
|
804
|
+
***
|
|
805
|
+
|
|
806
|
+
## Conclusion
|
|
807
|
+
|
|
808
|
+
The Prompt Decomposition Engine represents a critical evolution in agentic AI architecture, addressing fundamental limitations in how autonomous systems handle complex, multi-intent requests. By synthesizing academic advances in task decomposition, prompt engineering, and workflow orchestration with indigenous epistemological frameworks (Medicine Wheel/Etuaptmumk), PDE provides terminal agents with structured, transparent, and culturally-grounded decomposition capabilities.[^1_18][^1_16][^1_20][^1_27][^1_10][^1_17][^1_7]
|
|
809
|
+
|
|
810
|
+
The 5-layer architecture—Intent Extraction, Dependency Graphing, Wheel Assignment, Workflow Generation, and Execution Planning—operationalizes prompt chaining and meta-prompting research into a production-ready library. Integration with JGT-Code, Claude-Code, Gemini-CLI, and Copilot-CLI terminal agents will demonstrate real-world applicability.
|
|
811
|
+
|
|
812
|
+
This work contributes both to AI systems engineering (practical decomposition infrastructure) and to AI ethics/epistemology (indigenous knowledge integration), positioning PDE as a bridge between computational efficiency and cultural responsibility in agentic AI development.
|
|
813
|
+
<span style="display:none">[^1_48][^1_49][^1_50][^1_51][^1_52][^1_53][^1_54][^1_55][^1_56][^1_57][^1_58][^1_59][^1_60][^1_61][^1_62][^1_63][^1_64][^1_65][^1_66][^1_67][^1_68][^1_69][^1_70][^1_71][^1_72][^1_73][^1_74][^1_75][^1_76][^1_77][^1_78][^1_79][^1_80][^1_81][^1_82][^1_83][^1_84][^1_85][^1_86][^1_87][^1_88][^1_89][^1_90][^1_91][^1_92][^1_93][^1_94][^1_95][^1_96][^1_97][^1_98][^1_99]</span>
|
|
814
|
+
|
|
815
|
+
<div align="center">⁂</div>
|
|
816
|
+
|
|
817
|
+
[^1_1]: https://arxiv.org/abs/2402.03578
|
|
818
|
+
|
|
819
|
+
[^1_2]: http://arxiv.org/pdf/2402.16713.pdf
|
|
820
|
+
|
|
821
|
+
[^1_3]: https://www.searchunify.com/resource-center/blog/demystify-user-intent-context-with-natural-language-processing
|
|
822
|
+
|
|
823
|
+
[^1_4]: https://www.qualtrics.com/articles/customer-experience/natural-language-understanding/
|
|
824
|
+
|
|
825
|
+
[^1_5]: https://www.ijcai.org/proceedings/2021/0663.pdf
|
|
826
|
+
|
|
827
|
+
[^1_6]: https://forethought.ai/blog/natural-language-understanding-what-is-it
|
|
828
|
+
|
|
829
|
+
[^1_7]: https://ieeexplore.ieee.org/document/11302303/
|
|
830
|
+
|
|
831
|
+
[^1_8]: https://bronson.ai/resources/prompt-chaining/
|
|
832
|
+
|
|
833
|
+
[^1_9]: https://aclanthology.org/2024.semeval-1.196
|
|
834
|
+
|
|
835
|
+
[^1_10]: https://research.google/blog/language-models-perform-reasoning-via-chain-of-thought/
|
|
836
|
+
|
|
837
|
+
[^1_11]: https://learnprompting.org/docs/intermediate/chain_of_thought
|
|
838
|
+
|
|
839
|
+
[^1_12]: https://arxiv.org/pdf/2210.02406.pdf
|
|
840
|
+
|
|
841
|
+
[^1_13]: https://relevanceai.com/prompt-engineering/break-down-your-prompts-for-better-ai-results
|
|
842
|
+
|
|
843
|
+
[^1_14]: https://www.geeksforgeeks.org/artificial-intelligence/react-reasoning-acting-prompting/
|
|
844
|
+
|
|
845
|
+
[^1_15]: https://huggingface.co/learn/agents-course/en/unit1/thoughts
|
|
846
|
+
|
|
847
|
+
[^1_16]: https://www.promptingguide.ai/techniques/react
|
|
848
|
+
|
|
849
|
+
[^1_17]: https://www.linkedin.com/pulse/task-decomposition-autonomous-ai-agents-principles-andre-9nmee
|
|
850
|
+
|
|
851
|
+
[^1_18]: https://www.emergentmind.com/topics/hierarchical-task-decomposition
|
|
852
|
+
|
|
853
|
+
[^1_19]: https://arxiv.org/html/2410.02189v2
|
|
854
|
+
|
|
855
|
+
[^1_20]: https://promptengineering.org/tree-of-thought-prompting-walking-the-path-of-unique-approach-to-problem-solving/
|
|
856
|
+
|
|
857
|
+
[^1_21]: https://www.geeksforgeeks.org/artificial-intelligence/tree-of-thought-tot-prompting/
|
|
858
|
+
|
|
859
|
+
[^1_22]: https://learnprompting.org/docs/advanced/decomposition/tree_of_thoughts
|
|
860
|
+
|
|
861
|
+
[^1_23]: https://galileo.ai/blog/chain-of-thought-prompting-techniques
|
|
862
|
+
|
|
863
|
+
[^1_24]: https://www.semanticscholar.org/paper/7e1091661aa42bad1071fce02d192bdb49328cc2
|
|
864
|
+
|
|
865
|
+
[^1_25]: https://dl.acm.org/doi/10.1145/3711896.3737221
|
|
866
|
+
|
|
867
|
+
[^1_26]: https://journalwjarr.com/node/1880
|
|
868
|
+
|
|
869
|
+
[^1_27]: https://ieeexplore.ieee.org/document/11343649/
|
|
870
|
+
|
|
871
|
+
[^1_28]: https://arxiv.org/pdf/2410.21784.pdf
|
|
872
|
+
|
|
873
|
+
[^1_29]: https://publish.obsidian.md/followtheidea/Content/Prompt/Meta-Prompt+strategy+NOTES
|
|
874
|
+
|
|
875
|
+
[^1_30]: https://intuitionlabs.ai/articles/meta-prompting-llm-self-optimization
|
|
876
|
+
|
|
877
|
+
[^1_31]: https://learnprompting.org/docs/advanced/decomposition/introduction
|
|
878
|
+
|
|
879
|
+
[^1_32]: https://www.mercity.ai/blog-post/react-prompting-and-react-based-agentic-systems
|
|
880
|
+
|
|
881
|
+
[^1_33]: https://www.refontelearning.com/blog/prompt-chaining-and-advanced-orchestration-methods
|
|
882
|
+
|
|
883
|
+
[^1_34]: https://arxiv.org/pdf/2405.20252.pdf
|
|
884
|
+
|
|
885
|
+
[^1_35]: https://arxiv.org/abs/2504.00218
|
|
886
|
+
|
|
887
|
+
[^1_36]: https://arxiv.org/abs/2502.14847
|
|
888
|
+
|
|
889
|
+
[^1_37]: https://arxiv.org/abs/2410.07283
|
|
890
|
+
|
|
891
|
+
[^1_38]: https://arxiv.org/abs/2505.00212
|
|
892
|
+
|
|
893
|
+
[^1_39]: https://arxiv.org/abs/2506.04133
|
|
894
|
+
|
|
895
|
+
[^1_40]: https://arxiv.org/html/2502.12110v11
|
|
896
|
+
|
|
897
|
+
[^1_41]: https://www.emergentmind.com/topics/memory-mechanisms-in-llm-based-agents
|
|
898
|
+
|
|
899
|
+
[^1_42]: https://www.letta.com/blog/agent-memory
|
|
900
|
+
|
|
901
|
+
[^1_43]: https://dl.acm.org/doi/10.1145/3708359.3712117
|
|
902
|
+
|
|
903
|
+
[^1_44]: https://arxiv.org/abs/2311.11482
|
|
904
|
+
|
|
905
|
+
[^1_45]: https://publish.obsidian.md/followtheidea/Content/Prompt/Meta-Prompt+using+Roles,+Decomposition,+Verification
|
|
906
|
+
|
|
907
|
+
[^1_46]: http://arxiv.org/pdf/2410.08696.pdf
|
|
908
|
+
|
|
909
|
+
[^1_47]: PDE.md
|
|
910
|
+
|
|
911
|
+
[^1_48]: https://ieeexplore.ieee.org/document/11178379/
|
|
912
|
+
|
|
913
|
+
[^1_49]: https://arxiv.org/abs/2502.11127
|
|
914
|
+
|
|
915
|
+
[^1_50]: https://arxiv.org/abs/2502.11098
|
|
916
|
+
|
|
917
|
+
[^1_51]: https://arxiv.org/abs/2505.20824
|
|
918
|
+
|
|
919
|
+
[^1_52]: https://arxiv.org/pdf/2501.18645.pdf
|
|
920
|
+
|
|
921
|
+
[^1_53]: https://arxiv.org/pdf/2311.07076.pdf
|
|
922
|
+
|
|
923
|
+
[^1_54]: https://arxiv.org/pdf/2310.16730.pdf
|
|
924
|
+
|
|
925
|
+
[^1_55]: https://aclanthology.org/2023.emnlp-main.225.pdf
|
|
926
|
+
|
|
927
|
+
[^1_56]: https://arxiv.org/pdf/2406.11132.pdf
|
|
928
|
+
|
|
929
|
+
[^1_57]: https://arxiv.org/pdf/2504.00218.pdf
|
|
930
|
+
|
|
931
|
+
[^1_58]: https://apxml.com/courses/prompt-engineering-agentic-workflows/chapter-4-prompts-agent-planning-task-management/breaking-down-problems-prompts
|
|
932
|
+
|
|
933
|
+
[^1_59]: https://www.tencentcloud.com/techpedia/126570
|
|
934
|
+
|
|
935
|
+
[^1_60]: https://apxml.com/courses/agentic-llm-memory-architectures/chapter-4-complex-planning-tool-integration/task-decomposition-strategies
|
|
936
|
+
|
|
937
|
+
[^1_61]: https://www.redhat.com/en/blog/understanding-ai-agent-types-simple-complex
|
|
938
|
+
|
|
939
|
+
[^1_62]: https://apxml.com/courses/prompt-engineering-agentic-workflows/chapter-4-prompts-agent-planning-task-management/prompt-strategies-hierarchical-tasks
|
|
940
|
+
|
|
941
|
+
[^1_63]: https://www.emergentmind.com/topics/ensemble-and-multi-agent-prompting
|
|
942
|
+
|
|
943
|
+
[^1_64]: https://trailhead.salesforce.com/content/learn/modules/natural-language-processing-basics/learn-about-natural-language-parsing
|
|
944
|
+
|
|
945
|
+
[^1_65]: https://arxiv.org/abs/2504.21801
|
|
946
|
+
|
|
947
|
+
[^1_66]: https://arxiv.org/abs/2407.02352
|
|
948
|
+
|
|
949
|
+
[^1_67]: https://arxiv.org/abs/2502.03080
|
|
950
|
+
|
|
951
|
+
[^1_68]: https://arxiv.org/abs/2505.02576
|
|
952
|
+
|
|
953
|
+
[^1_69]: https://www.semanticscholar.org/paper/87167c8c8c98aa03a01a056e51dbd9ae3d364b79
|
|
954
|
+
|
|
955
|
+
[^1_70]: https://dl.acm.org/doi/10.1145/3677389.3702587
|
|
956
|
+
|
|
957
|
+
[^1_71]: https://arxiv.org/abs/2403.14982
|
|
958
|
+
|
|
959
|
+
[^1_72]: https://arxiv.org/abs/2506.04521
|
|
960
|
+
|
|
961
|
+
[^1_73]: http://arxiv.org/pdf/2501.13122.pdf
|
|
962
|
+
|
|
963
|
+
[^1_74]: https://arxiv.org/pdf/2211.12588.pdf
|
|
964
|
+
|
|
965
|
+
[^1_75]: http://arxiv.org/pdf/2203.11171v4.pdf
|
|
966
|
+
|
|
967
|
+
[^1_76]: https://aclanthology.org/2023.emnlp-main.263.pdf
|
|
968
|
+
|
|
969
|
+
[^1_77]: https://arxiv.org/abs/2306.03872
|
|
970
|
+
|
|
971
|
+
[^1_78]: https://arxiv.org/html/2403.14312
|
|
972
|
+
|
|
973
|
+
[^1_79]: https://arxiv.org/html/2412.06975v1
|
|
974
|
+
|
|
975
|
+
[^1_80]: http://arxiv.org/pdf/2306.06427.pdf
|
|
976
|
+
|
|
977
|
+
[^1_81]: https://www.prompthub.us/blog/chain-of-thought-prompting-guide
|
|
978
|
+
|
|
979
|
+
[^1_82]: https://latitudellms.mintlify.app/examples/techniques/re-act-prompting
|
|
980
|
+
|
|
981
|
+
[^1_83]: https://www.prompthub.us/blog/how-tree-of-thoughts-prompting-works
|
|
982
|
+
|
|
983
|
+
[^1_84]: https://zerotomastery.io/blog/tree-of-thought-prompting/
|
|
984
|
+
|
|
985
|
+
[^1_85]: https://www.mdpi.com/1999-5903/17/8/363
|
|
986
|
+
|
|
987
|
+
[^1_86]: https://academic.oup.com/bioinformaticsadvances/article/doi/10.1093/bioadv/vbaf308/8346364
|
|
988
|
+
|
|
989
|
+
[^1_87]: https://arxiv.org/abs/2510.00326
|
|
990
|
+
|
|
991
|
+
[^1_88]: https://arxiv.org/abs/2510.18551
|
|
992
|
+
|
|
993
|
+
[^1_89]: https://www.semanticscholar.org/paper/2425b927c4f653685cfc1f6f1addddeb43602f0d
|
|
994
|
+
|
|
995
|
+
[^1_90]: https://arxiv.org/pdf/2203.06566.pdf
|
|
996
|
+
|
|
997
|
+
[^1_91]: http://arxiv.org/pdf/2502.13298.pdf
|
|
998
|
+
|
|
999
|
+
[^1_92]: https://arxiv.org/abs/2203.08383
|
|
1000
|
+
|
|
1001
|
+
[^1_93]: http://arxiv.org/pdf/2210.00720v2.pdf
|
|
1002
|
+
|
|
1003
|
+
[^1_94]: https://docs.aws.amazon.com/prescriptive-guidance/latest/agentic-ai-patterns/workflow-for-prompt-chaining.html
|
|
1004
|
+
|
|
1005
|
+
[^1_95]: https://maxbraglia.substack.com/p/prompt-chaining-building-multi-step-workflows
|
|
1006
|
+
|
|
1007
|
+
[^1_96]: https://supermemory.ai/research
|
|
1008
|
+
|
|
1009
|
+
[^1_97]: https://www.ibm.com/think/tutorials/prompt-chaining-langchain
|
|
1010
|
+
|
|
1011
|
+
[^1_98]: https://techcommunity.microsoft.com/blog/educatordeveloperblog/the-hidden-memory-architecture-of-llms/4485367
|
|
1012
|
+
|
|
1013
|
+
[^1_99]: https://github.com/meta-prompting/meta-prompting
|
|
1014
|
+
|