How deepractice/promptx works
Project type and purpose
• PromptX is an open-source, file-based prompt-engineering framework (a library/tool), not a client/server web app.
• Its purpose is to provide a structured, modular way to build and manage AI prompts (“DPML” protocol, roles, thought/execution/memory modules).
File structure
• Top-level files:
• bootstrap.md – the entry point (system prompt template)
• promptx.js – the loader/initializer script
• core/ – core engine modules (execution pipeline & memory pipeline)
• domain/ – built-in roles (assistant, copywriter, prompt-developer, scrum, test) each with subfolders: role, thought, execution, practice
• protocol/ – DPML language definitions and tag semantics
• resource/ – common resource descriptions (execution, memory, thought)
• assets/ – demo images, docs
• Pattern: file-based plugin architecture. Markdown files define behavior, loaded at runtime by promptx.js.
• No database or network service; state is persisted to a .memory directory.
Extract insights from README
• Workflow:
1. Copy PromptX into a host project
2. Edit bootstrap.md to reference one or more domain role files
3. Invoke promptx.js (or copy bootstrap.md into your AI system)
4. The AI engine uses DPML protocol to orchestrate Thought → Execution → Memory cycles
• Key features: Thought, Execution, Memory modules; built-in roles; DPML protocol.
• Client / Host Application – invokes the loader or pastes system prompt
• Loader (promptx.js) – reads bootstrap.md, resolves @file:// URIs, assembles the system prompt
• File Module Repository
– Core Modules (core/execution, core/memory)
– Domain Modules (domain/*)
– Protocol Definitions (protocol/*.protocol.md, protocol/tag/*.tag.md)
– Resources (resource/*.resource.md)
• AI Engine – receives assembled prompt, runs DPML-driven pipeline
• Memory Store – file-based .memory folder for read/write
• User Interaction / Output
1. Host App → Loader: “load bootstrap.md”
2. Loader → File Repo: “fetch & parse modules”
3. Loader → AI Engine: “deliver system prompt (DPML)”
4. AI Engine ↔ Memory Store: “recall & store memories”
5. AI Engine → Output → Host App or user
c. Architectural patterns & design principles:
– Modular plugin architecture (each role/thought/execution/memory unit is a Markdown plugin)
– Separation of concerns:
• Protocol (DPML)
• Thought → Execution → Memory pipelines
• Domain-specific roles
– File-first configuration, no hardcoded code modules
d. Key technologies/frameworks:
– Node.js (promptx.js loader)
– Markdown as DSL for DPML
– Custom DPML protocol definitions (in protocol/…)
– File-system persistence for memory