Skip to content

docs: CLI specification trifecta and engineering workflow#142

Merged
Alan-Jowett merged 1 commit intomicrosoft:mainfrom
Alan-Jowett:docs/cli-specs
Mar 30, 2026
Merged

docs: CLI specification trifecta and engineering workflow#142
Alan-Jowett merged 1 commit intomicrosoft:mainfrom
Alan-Jowett:docs/cli-specs

Conversation

@Alan-Jowett
Copy link
Copy Markdown
Member

Summary

Adds structured specifications for the PromptKit CLI, extracted from existing code using PromptKit's own spec-extraction-workflow. These specs establish a semantic baseline for the CLI ahead of planned refactoring.

Files

File Content
cli/specs/requirements.md 82 requirements (REQ-CLI-NNN) — assembly, manifest resolution, launch, bundling, distribution
cli/specs/design.md Module architecture, data flow, interface contracts, 11 known gaps
cli/specs/validation.md 62 test cases (TC-CLI-NNN) with full traceability matrix
cli/specs/engineering-workflow.md Assembled evolve prompt (software-architect + 10 protocols, verbatim)

How these were produced

  • Spec trifecta (requirements, design, validation): Extracted by executing PromptKit's spec-extraction-workflow against the CLI source code. The LLM agent read all 4 source files, the package.json, bootstrap.md, and the CLI analysis identifying redundancies.

  • Engineering workflow: Assembled programmatically by the CLI's own assemble command (node -e with assemble()), validating that assemble.js produces correct verbatim output. The CLI assembled 10 protocols + persona + taxonomy + template in under 1 second.

Key findings from the spec extraction

  • 11 known design gaps documented, including:
    • Assembly engine duplicates bootstrap.md's logic (divergence risk)
    • No support for format: null templates or parameterized personas
    • No pipeline support, no Non-Goals section generation
    • Launch system's temp-dir-copy is fragile
  • All 82 requirements have testable acceptance criteria
  • Every test case traces to at least one requirement

Context

These specs will serve as the baseline for CLI refactoring work. The engineering-workflow prompt is ready to use for propagating changes through the spec → design → validation → implementation chain.

Extract structured specifications from the existing CLI code using
PromptKit's own spec-extraction-workflow:

- requirements.md: 82 functional/non-functional requirements (REQ-CLI-NNN)
  covering assembly, manifest resolution, launch, content bundling, and
  npm distribution
- design.md: Module architecture, data flow, interface contracts, key
  design decisions, and 11 known gaps (including redundancy with
  bootstrap.md identified in the CLI analysis)
- validation.md: 62 test cases (TC-CLI-NNN) with traceability matrix
  mapping each test to its requirement
- engineering-workflow.md: Assembled evolve prompt (software-architect
  persona, 10 protocols verbatim) for future CLI changes

The spec trifecta was extracted by executing PromptKit's
spec-extraction-workflow against the CLI source. The engineering
workflow was assembled programmatically by the CLI's own assemble
command, validating that assemble.js produces correct verbatim output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 30, 2026 20:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a structured “spec trifecta” (requirements, design, validation) for the PromptKit CLI plus a verbatim assembled engineering-workflow prompt, establishing a semantic baseline to guide upcoming CLI refactoring.

Changes:

  • Added CLI requirements specification with REQ-CLI-* items, constraints, and assumptions.
  • Added CLI design specification describing module architecture, data flow, and known gaps.
  • Added CLI validation plan with TC-CLI-* cases and a requirements traceability matrix.
  • Added a verbatim assembled engineering-workflow prompt artifact produced by the CLI assembly engine.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
cli/specs/requirements.md Introduces structured, traceable functional/non-functional requirements for the CLI.
cli/specs/design.md Documents current CLI architecture, module responsibilities, data flows, and identified gaps.
cli/specs/validation.md Defines test strategy + test cases and maps requirements to planned validation coverage.
cli/specs/engineering-workflow.md Checks in a verbatim assembled workflow prompt to validate assembly output and enable propagation workflows.

@Alan-Jowett Alan-Jowett merged commit 23c7fea into microsoft:main Mar 30, 2026
5 checks passed
@Alan-Jowett Alan-Jowett deleted the docs/cli-specs branch March 30, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants