Prompt Skill Runtime v1
# Prompt Skill Runtime V1 Implementation Plan
> Historical note: this plan documents the original v1 bootstrap. The current external positioning is Briefsmith as an AI coding request preflight tool, so old `prompt ...` command examples here should be read as implementation history, not current CLI usage.
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Build a lightweight TypeScript-based prompt skill runtime that imports local prompt history, supports search/favorites/profile management, compiles vague user input into stronger prompts, and exposes host/framework adapter seams for Claude Code, Codex, Superpowers, Gstack, and GSD.
**Architecture:** Use a single-package Node.js CLI with a local SQLite store, file-based importer adapters, a profile/clarifier/compiler core, and installable host templates for Claude Code and Codex. Keep GUI out of scope for v1; prioritize local-only data flow, project/global policy controls, and deterministic CLI-driven verification.
**Tech Stack:** TypeScript, Node.js 22.13+, built-in `node:sqlite`, `node:test`, Markdown/YAML/JSON templates, shell installer scripts.
---
## File Structure
- `package.json`
- CLI package metadata, scripts, Node engine floor.
- `tsconfig.json`
- TypeScript compiler options.
- `src/cli/index.ts`
- Main `prompt` command router.
- `src/cli/commands/import.ts`
- `prompt import` command.
- `src/cli/commands/reindex.ts`
- `prompt reindex` command.
- `src/cli/commands/find.ts`
- `prompt find` command.
- `src/cli/commands/show.ts`
- `prompt show` command.
- `src/cli/commands/star.ts`
- `prompt star` / `prompt unstar`.
- `src/cli/commands/compile.ts`
- `prompt compile` debug path.
- `src/cli/commands/profile.ts`
- `prompt profile show` / `refresh`.
- `src/cli/commands/policy.ts`
- `prompt start` / `prompt stop`.
- `src/cli/commands/doctor.ts`
- Environment and adapter health checks.
- `src/core/types.ts`
- Shared domain models.
- `src/config/paths.ts`
- Global/project path resolution.
- `src/config/project-policy.ts`
- Project enable/disable policy loading and writing.
- `src/storage/database.ts`
- SQLite connection and migrations.
- `src/storage/migrations.ts`
- Schema setup.
- `src/storage/prompt-repository.ts`
- Prompt CRUD/search/favorite operations.
- `src/storage/profile-repository.ts`
- Profile read/write operations.
- `src/importers/base.ts`
- Importer contract.
- `src/importers/claude.ts`
- Claude local history importer.
- `src/importers/codex.ts`
- Codex local history importer.
- `src/importers/opencode.ts`
- OpenCode local history importer.
- `src/importers/gemini.ts`
- Gemini local history importer.
- `src/profile/profile-service.ts`
- Confirmed/inferred/signals orchestration.
- `src/compiler/slot-detector.ts`
- Missing-slot detection.
- `src/compiler/history-retriever.ts`
- Similar prompt lookup.
- `src/compiler/clarifier.ts`
- Follow-up question generation policy.
- `src/compiler/compiler.ts`
- Structured prompt compilation.
- `src/host/base.ts`
- Host adapter contract.
- `src/host/claude/install.ts`
- Claude template installer.
- `src/host/claude/doctor.ts`
- Claude integration checks.
- `src/host/codex/install.ts`
- Codex template installer.
- `src/host/codex/doctor.ts`
- Codex integration checks.
- `src/frameworks/base.ts`
- Framework adapter contract.
- `src/frameworks/gsd.ts`
- GSD renderer.
- `src/frameworks/superpowers.ts`
- Superpowers renderer.
- `src/frameworks/gstack.ts`
- Gstack renderer.
- `templates/claude/SKILL.md`
- Claude-facing prompt skill template.
- `templates/claude/hooks.json`
- Claude hook wiring template.
- `templates/codex/AGENTS.snippet.md`
- Codex AGENTS guidance snippet.
- `templates/codex/SKILL.md`
- Codex-facing skill template.
- `tests/storage/database.test.ts`
- Database and migration tests.
- `tests/importers/*.test.ts`
- Fixture-driven importer tests.
- `tests/compiler/*.test.ts`
- Slot detection, clarifier, compiler tests.
- `tests/cli/*.test.ts`
- Command tests.
- `tests/frameworks/*.test.ts`
- Framework renderer tests.
- `tests/host/*.test.ts`
- Host installer/doctor tests.
- `tests/fixtures/...`
- Sanitized host history samples and template expectations.
### Task 1: Bootstrap the TypeScript CLI Skeleton
**Files:**
- Create: `package.json`
- Create: `tsconfig.json`
- Create: `src/cli/index.ts`
- Create: `src/core/types.ts`
- Test: `tests/cli/index.test.ts`
- [ ] **Step 1: Write the failing CLI bootstrap test**when to use it
Community prompt sourced from the open-source GitHub repo piklen/briefsmith (MIT). A "Prompt Skill Runtime v1" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
piklen/briefsmith · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar