Skip to content

feat(001): tiered prompt & workflow engine - create-spec / execute-plan / suggest-improvement - #49

Merged
markhazleton merged 771 commits into
mainfrom
001-interactive-analyze-flow
Jun 5, 2026
Merged

feat(001): tiered prompt & workflow engine - create-spec / execute-plan / suggest-improvement#49
markhazleton merged 771 commits into
mainfrom
001-interactive-analyze-flow

Conversation

@markhazleton

Copy link
Copy Markdown
Owner

Summary

Re-platforms DevSpark from a prompt library with implicit orchestration into a fully tiered
workflow system. Ships three flagship alias entrypoints (create-spec, execute-plan,
suggest-improvement), a Python workflow runner with autonomy enforcement and step-level
telemetry, 28 backward-compatible atomic prompt shims, a shared review resolution contract
across five review commands, and the required architecture/adoption documentation.

  • Introduces templates/prompts/atomic/, templates/workflows/, templates/aliases/ resolved
    through the existing 3-tier override chain
  • Adds devspark run, devspark resume, devspark workflows, devspark runs, and
    devspark help subcommands
  • Implements autonomy levels (assisted / autonomous) with guardrail enforcement and
    pause-state persistence
  • Emits OS-lock-safe JSON Lines telemetry for every workflow step
  • Updates clarify, analyze, critic, pr-review, address-pr-review to emit the Shared
    Review Resolution Contract shape
  • Adds Getting Started, Architecture, Autonomy Model, and Improvement Loop documentation

Changes

26 files changed, 3679 insertions

Status Path
A .documentation/specs/001-interactive-analyze-flow/spec.md
A .documentation/specs/001-interactive-analyze-flow/plan.md
A .documentation/specs/001-interactive-analyze-flow/tasks.md
A .documentation/specs/001-interactive-analyze-flow/checklists/requirements.md
A .documentation/specs/001-interactive-analyze-flow/gates/analyze.md
A .documentation/specs/001-interactive-analyze-flow/gates/critic.md
A .documentation/specs/001-interactive-analyze-flow/gates/quickstart-validation.md
A .documentation/specs/001-interactive-analyze-flow/contracts/ (6 contract files)
A .documentation/specs/001-interactive-analyze-flow/data-model.md
A .documentation/specs/001-interactive-analyze-flow/quickstart.md
A .documentation/specs/001-interactive-analyze-flow/research.md
A .documentation/specs/002-harness-runtime/ (5 artifacts)
A .documentation/specs/pr-review/pr-28.md
A .documentation/copilot/harvest-2026-04-14.md
A .documentation/docs-audit-2026-04-11.md
A .documentation/docs-audit-2026-04-12.md

Task Completion

78/78 tasks complete across 10 phases (Setup -> Polish).

Checklist: requirements.md - 37/37

Quality Gates

Gate Status Summary
analyze PASS 12 prior findings all remediated. 0 CRITICAL. 100% FR+SC coverage (48/48).
critic PASS 16 prior risks all remediated. 0 SHOWSTOPPERS. Risk posture GREEN.
checklist PASS 37/37 items checked.

Gate Acknowledgements

At task-generation time, analyze and critic gate artifacts had not yet been produced.
Both are now present and passing. Historical acknowledgement preserved for audit trail.

Spec Reference

.documentation/specs/001-interactive-analyze-flow/spec.md
Classification: full-spec | Risk: high | Status: Complete

Notes

  • All existing slash commands remain fully functional (backward-compatible shim layer in place)
  • The merge(main): integrate main via --allow-unrelated-histories commit at branch tip
    reflects the initial base sync; all feature commits precede it in the log
  • Recommend /devspark.pr-review after merge approval

localden and others added 30 commits December 1, 2025 21:41
fix the incorrect task-template file path
fix: use global maximum for branch numbering to prevent collisions
Add commands for initializing Spec Kit in existing projects directly
in the installation section. Shows both `specify init .` and
`specify init --here` options to make brownfield usage immediately
discoverable.

Fixes #1285
docs: Add existing project initialization to getting started
- Add pr-review command template with comprehensive review workflow
- Implement get-pr-context scripts (bash and PowerShell) for GitHub CLI integration
- Create pr-review-usage.md with detailed user guide
- Create pr-review-implementation-plan.md with technical specification
- Update README.md with PR review section and usage examples
- Update AGENTS.md with PR review command documentation
- Update spec-driven.md with command documentation

Features:
- Constitution-only requirement (no spec/plan/tasks needed)
- Works for any PR in any branch (main, develop, feature, etc.)
- Auto-detects PR number from environment/branch
- Persistent reviews in /specs/pr-review/pr-{id}.md
- Tracks commit SHA and timestamps for version tracking
- Handles review updates with history preservation
- Severity classification (Critical/High/Medium/Low)
- Line-specific actionable recommendations
- Updated release notes in PowerShell and Bash scripts to reflect the new branding as "Spec Kit Spark" and revised feature descriptions.
- Changed versioning scheme in scripts to use "spark" instead of "markhazleton" for distinguishing releases.
- Enhanced the CHANGELOG with new features and changes related to the rebranding.
- Updated README, installation, and quick start documentation to align with the new branding and added guidance for using the new `/speckit.discover-constitution` command.
- Introduced a new command template for `/speckit.discover-constitution` to facilitate constitution drafting from existing codebases.
- Adjusted documentation to clarify the differences between greenfield and brownfield project setups.
- Incremented version number in pyproject.toml to 0.0.24 and updated descriptions to match the new branding.
…ic commands

- Bump version to 0.0.25 in pyproject.toml
- Update repository references from github/spec-kit to MarkHazleton/spec-kit
- Rebrand template packages with 'spec-kit-spark-template-*' naming
- Add missing shai agent support to PowerShell packaging script
- Update release scripts to target MarkHazleton/spec-kit repository
- Add CHANGELOG entry documenting new features:
  * /speckit.pr-review - Constitution-aware PR review command
  * /speckit.site-audit - Comprehensive codebase audit command
  * /speckit.critic - Adversarial risk analysis command
- All 34 template packages built and released (17 agents × 2 script types)
…oposing amendments

- Introduced a new command to facilitate constitution evolution by analyzing PR review findings and generating amendment proposals.
- Implemented actions for analyzing, suggesting, approving, and rejecting proposals.
- Added detailed error handling and compliance checks against existing principles.

feat: implement quickfix command for rapid lightweight fixes

- Created a command to enable quick fixes for bugs and small features without full spec creation.
- Included validation against constitution compliance and generated quickfix records.
- Added options for listing and completing quickfixes.

feat: create release command for archiving artifacts and generating release documentation

- Developed a command to archive development artifacts, distill key decisions into ADRs, and prepare for the next development cycle.
- Implemented CHANGELOG generation and release notes creation.
- Added support for dry-run previews to review changes before committing.
- Updated index.md to reflect the new vision and features of Spec Kit Spark, emphasizing AI-driven lifecycle management and adaptive workflows.
- Revised README.md to introduce the ASLCD vision and improve clarity on project goals and features.
- Created adaptive-lifecycle.md to provide a comprehensive overview of the Adaptive System Life Cycle Development approach, including problem statements, design principles, and command references.
- Established roadmap.md detailing current implementations, near-term and medium-term goals, and long-term vision for the Spec Kit Spark project.
…usability

- Updated `.documentation/why-i-forked-spec-kit.md` to clarify key design decisions and solutions.
- Refined branch protection rules in `.github/BRANCH_PROTECTION.md` for better guidance.
- Improved output formatting in `.github/workflows/scripts/README.md` for consistency.
- Adjusted markdown linting rules in `.markdownlint-cli2.jsonc` to disable MD060.
- Enhanced descriptions and features in `AGENTS.md` for clarity on command functionalities.
- Updated `README.md` to improve feature descriptions and usage instructions.
- Refined `git-spark-report.md` for better presentation of repository health metrics.
- Enhanced `spec-driven.md` with clearer command usage and feature descriptions.
- Improved command templates for `critic.md`, `discover-constitution.md`, `evolve-constitution.md`, `pr-review.md`, `quickfix.md`, and `release.md` for better user guidance and consistency.
- Updated all templates, scripts, and documentation to use .documentation/
- Modified CLI to create .documentation/ directory instead of .specify/
- Updated build scripts to output .documentation/ in release packages
- This distinguishes Spec Kit Spark from upstream GitHub spec-kit
- Consolidates all AI agent output in .documentation/ separate from code
- Introduced a comprehensive roadmap for the Governance Phase (v1.2-1.5) of the ASLCD Toolkit.
- Detailed implementation steps for the Landmark System, Harvest Command, Library Structure, and supporting infrastructure.
- Established scalability configurations to accommodate various project sizes.
- Specified command usage and flow for `/speckit.landmark` and `/speckit.status`.
- Outlined the Harvest System, including command specifications and decision trees for knowledge extraction.
- Included configuration examples for different project profiles and a new script for context gathering.
- Documented the incremental adoption strategy for brownfield projects and compliance scoring for legacy code.
DevSpark Test and others added 28 commits April 17, 2026 15:56
27 agent shims in .github/agents/, each resolving directly to
templates/commands/{name}.md. 6 commands have guard clauses:
upgrade, personalize, add-application, list-applications,
archive, discover-constitution.
27 Claude Code commands, each resolving to templates/commands/{name}.md.
Same 6 guard clauses as Copilot shims: upgrade, personalize,
add-application, list-applications, archive, discover-constitution.
4 new commands added: create-pr, add-application, list-applications,
validate-registry.
…, contributor dynamics, and technical analysis
Agent-Logs-Url: https://github.com/markhazleton/devspark/sessions/ea5e0752-fa97-4b4d-a5db-be72e77bb12c

Co-authored-by: markhazleton <223906+markhazleton@users.noreply.github.com>
…-pr-review

Add `/devspark.address-pr-review` with enforced review-file commit isolation
…stency

Spec: Cross-stage review/remediation consistency (clarify, analyze, critic, pr-review)
Spec frontmatter status set to Complete. analyze and critic gates marked PASS.
…omy + contract tests)

- loader.py: parse/validate atomic prompts, workflows, aliases with restricted when-grammar
- executor.py: WorkflowRunner stub/live modes, pause-state with atomic write + SHA-256 checksum
- telemetry.py: JSONL writer with OS-level exclusive lock (fcntl/msvcrt), 4KB event cap
- autonomy.py: pre/post-step diff baseline, max_files / max_lines / restricted_paths guardrails
- 10 contract test files covering schema, runner, telemetry concurrency, pause/resume, autonomy enforcement, performance intent
…tomic prompts

Atomic shims have audience: expert, exposed: false, category: legacy-command and resolve to templates/commands/<id>.md. New improvement-loop prompts: capture-context, classify-improvement, create-issue, assign-agent.
…ases + workflow YAML

Three flagship workflows with pause_after gates and (where applicable) review_after lists. Run-workflow scripts forward to python -m devspark_cli run. Script parity test extended to cover run-workflow.* and generate-atomic-shims.*.
…mands; gh issue adapter

Issue adapter pipes JSON to gh api repos/markhazleton/devspark/issues -X POST --input - so model output never reaches argv (adversarial test included). Help command surfaces aliases first, supports --all/--category/--audience filters. Upgrade migration safety test extended to assert install/upgrade flows never write under .documentation/.
…ew commands

Findings now emit finding_id, severity, description, recommended_action, execution_mode, status, and outcome so /devspark.address-pr-review and downstream tools can act on them deterministically. Additive only - existing prose preserved. Divergence ledger lives at .documentation/architecture/review-stage-divergence.md.
…threat-model + entrypoint updates

New guides under .documentation/. Issue template and shim-drift CI workflow added. README, CLAUDE.md, and copilot quickstart now mention the three flagship aliases as the recommended entrypoints. .documentation/telemetry/.gitignore keeps workflow events and run state out of commits.
…d files

- Append trailing newline to 6 markdown files (MD047)

- Convert emphasis-as-heading in CLAUDE.md to ### (MD036)

- Promote ### Classification/Context to ## in issue template (MD001)

- Drop unused imports/locals across new runner + test files

- Replace stray f-string without placeholders in runner/loader.py
…cluding metadata, revision log, and executive summary
- H-01: remove stray pr26_diff.patch debris from repo root

- M-01: scripts/powershell/get-pr-context.ps1 spec_status regex now uses (?m) so it matches end-of-line, tolerating the spec template's <!-- Valid: ... --> helper

- M-02: src/devspark_cli/issues.py promotes ## headings (matching the issue template hierarchy); test_issue_adapter_contract.py updated

- M-04: AutonomyEnforcer.before_step short-circuits when no guardrails are declared; documented in autonomy-model.md

- L-01: telemetry.py drops dead heuristic and instead requires fromisoformat success + tzinfo presence

- L-03: wrap auto-generated DEVSPARK SHARED CONTEXT block in markdownlint-disable MD012 MD025 + trim trailing blank line

- CON-01: amend constitution III to allow runtime writes under gitignored .documentation/<subtree>/ with env-var override; bump to 1.2.0

- M-03: doc note in workflows/getting-started.md about template discovery and PR-scope splitting
H-01 + M-01..M-04 + L-01 + L-03 + CON-01 fixed in 900a499. L-02 deferred to docs (resolver chain is repo-root based; force-include alone would not benefit pip-install users).

Constitution bumped to 1.2.0 (CON-01 carve-out).
All rev-2 dispositions stand. Scoped pytest 114/1 skipped. markdownlint clean across 49 files. §VII isolation re-verified.
…tor to single backticks

spec.md: 3 tab characters replaced with 2 spaces (lines 51/54/57) — MD010 markdownlint failure on PR #28.

scripts/bash/generate-atomic-shims.sh: heredoc was emitting double backticks (\\...\\) around the canonical command path while scripts/powershell/generate-atomic-shims.ps1 emits single backticks; this caused the bash --check CI gate to report drift on all 28 atomic shims even though the in-repo files matched the PowerShell output. Aligned bash to single backticks; bash --check now clean.
Resolved 88 add/add conflicts by taking main's version (checkout --theirs).
Branch-specific .archive/ artifacts preserved as additions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@markhazleton
markhazleton merged commit 297b6ab into main Jun 5, 2026
13 checks passed
@markhazleton
markhazleton deleted the 001-interactive-analyze-flow branch June 5, 2026 13:30
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.

4 participants