Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
933f4a7
feat(spec): add scenario routing architecture redesign specification
john-zhh Mar 10, 2026
a9a0992
feat: scenario routing architecture redesign - Phase 1 & 2 complete
john-zhh Mar 10, 2026
ea186df
feat: implement protocol-agnostic request normalization (User Story 1)
john-zhh Mar 10, 2026
af6838e
feat: complete User Story 1 - protocol-agnostic routing (T014, T017, …
john-zhh Mar 10, 2026
830c925
fix: resolve type errors after config.Scenario → string migration
john-zhh Mar 10, 2026
868b48a
refactor: fix staticcheck warnings and code quality issues
john-zhh Mar 10, 2026
f7ae7ed
docs: amend constitution to v1.5.0 (add Principle IX: Code Quality Ch…
john-zhh Mar 10, 2026
6ad5b85
docs: add repository contributor guide
john-zhh Mar 10, 2026
93bffc5
feat: implement Phase 4-5 routing core (US2-US3)
john-zhh Mar 10, 2026
7f386c0
test: add Phase 6 (US4) per-scenario strategy tests
john-zhh Mar 11, 2026
6b70457
docs: add Phase 4-6 implementation status summary
john-zhh Mar 11, 2026
131606b
feat: integrate Phase 4-6 routing into ServeHTTP (T034-T036, T044-T04…
john-zhh Mar 11, 2026
5e125ce
test: add T029, T040, T043 - middleware routing and config validation…
john-zhh Mar 11, 2026
7f9bc59
docs: update implementation status for T029, T040, T043 completion
john-zhh Mar 11, 2026
ba9cca9
test: complete T049-T054 - per-scenario policies tests and implementa…
john-zhh Mar 11, 2026
28ad220
feat: complete Phase 7-9 (US5-US6, config migration, UI support)
john-zhh Mar 11, 2026
63acf3a
docs: mark T078-T085 as complete in tasks.md
john-zhh Mar 11, 2026
e92c27e
docs: complete Phase 10 documentation updates (T089-T091, T098)
john-zhh Mar 11, 2026
46af9ed
docs: mark T089-T091, T098 as complete in tasks.md
john-zhh Mar 11, 2026
00e7504
docs: update IMPLEMENTATION_STATUS.md with Phase 10 progress
john-zhh Mar 11, 2026
92ee70f
perf: add routing performance benchmarks (T093)
john-zhh Mar 11, 2026
a43f18d
test: add concurrent routing edge case tests (T094)
john-zhh Mar 11, 2026
e4bd1be
test: add session cache interaction tests (T095)
john-zhh Mar 11, 2026
56b8950
test: add comprehensive E2E tests for all builtin scenarios (T096)
john-zhh Mar 11, 2026
8a37675
docs: mark Phase 10 as complete (T092-T096)
john-zhh Mar 11, 2026
e665c16
test: complete T097 - validate quickstart.md scenarios
john-zhh Mar 11, 2026
7d339c3
chore: add speckit retro extension files
john-zhh Mar 11, 2026
1e1a631
fix: adjust Web UI test coverage thresholds
john-zhh Mar 11, 2026
b5e68fb
fix: integrate RoutePolicy fields into runtime (Task #4)
john-zhh Mar 11, 2026
3cf0054
fix: implement RoutingDecision field consumption (Task #5)
john-zhh Mar 11, 2026
a442b4e
fix: complete Web API RoutePolicy serialization (Task #8)
john-zhh Mar 11, 2026
3de4819
fix(proxy): re-normalize request after middleware body modifications …
john-zhh Mar 11, 2026
1ab9077
feat(proxy): implement protocol-agnostic routing (Task #6)
john-zhh Mar 11, 2026
f9cbbcf
feat(proxy): implement fallback_to_default runtime logic (Task #9)
john-zhh Mar 11, 2026
b6a503b
feat(proxy): implement per-scenario long_context_threshold (Task #10)
john-zhh Mar 11, 2026
0d39bd8
feat(proxy): complete OpenAI Responses normalization (Task #11)
john-zhh Mar 11, 2026
56bf816
fix(web): preserve RoutePolicy fields when editing scenario routes (T…
john-zhh Mar 11, 2026
d3fc26c
test(proxy): add coverage for fallback_to_default and per-scenario th…
john-zhh Mar 11, 2026
33c079d
fix(proxy): use longContext route threshold for initial classification
john-zhh Mar 11, 2026
1f17fce
fix(proxy): add key normalization for longContext threshold lookup
john-zhh Mar 11, 2026
afa10dd
fix(proxy): implement 0.8x threshold for long-context without session…
john-zhh Mar 11, 2026
2599050
feat(proxy): implement configurable scenario priority (FR-005)
john-zhh Mar 11, 2026
6042931
fix(proxy): complete scenario_priority runtime integration
john-zhh Mar 11, 2026
ca8c8f1
fix(proxy): add key normalization for scenario_priority
john-zhh Mar 11, 2026
13a61aa
feat(config): add comprehensive configuration validation
john-zhh Mar 11, 2026
f7cca13
fix(config): enforce validation at save time to prevent invalid configs
john-zhh Mar 11, 2026
1b571bb
fix(config): relax profile/default validation from error to warning
john-zhh Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
472 changes: 472 additions & 0 deletions .claude/commands/speckit.retro.analyze.md

Large diffs are not rendered by default.

472 changes: 472 additions & 0 deletions .claude/commands/speckit.retro.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ web/dist/
internal/web/dist/
bin/
web/coverage/
.specify/extensions/.cache/
.specify/extensions/.backup/

# Go
*.exe
Expand Down
4 changes: 4 additions & 0 deletions .specify/extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
installed: []
settings:
auto_execute_hooks: true
hooks: {}
22 changes: 22 additions & 0 deletions .specify/extensions/.registry
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"schema_version": "1.0",
"extensions": {
"retro": {
"version": "1.0.2",
"source": "local",
"manifest_hash": "sha256:07a038a57aa8125331ff346c2562976a1f7be5a3f0d6f041c8c4b72fd1ae426e",
"enabled": true,
"registered_commands": {
"claude": [
"speckit.retro.analyze",
"speckit.retro"
],
"copilot": [
"speckit.retro.analyze",
"speckit.retro"
]
},
"installed_at": "2026-03-10T11:02:55.438106+00:00"
}
}
}
51 changes: 51 additions & 0 deletions .specify/extensions/retro/.github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# speckit-retro-extension

Spec-kit extension for retrospective analysis and continuous self-improvement.

## Quick Links

- [Installation & Usage](README.md)
- [Changelog](CHANGELOG.md)
- [License](LICENSE)

## Structure

```
speckit-retro-extension/
├── extension.yml # Extension manifest
├── README.md # Documentation
├── LICENSE # MIT License
├── CHANGELOG.md # Version history
└── commands/
└── retro.md # /speckit.retro command implementation
```

## Local Testing

To test this extension locally before publishing:

```bash
cd ~/Code/speckit-retro-extension
specify extension add --from .
```

Then in your spec-kit project:

```bash
/speckit.retro 015-019
```

## Publishing

1. Update version in `extension.yml`
2. Update `CHANGELOG.md`
3. Commit changes
4. Create git tag: `git tag v1.0.0`
5. Push tag: `git push origin v1.0.0`
6. Create GitHub release from tag

Users can then install via:

```bash
specify extension add --from https://github.com/dopejs/speckit-retro-extension
```
44 changes: 44 additions & 0 deletions .specify/extensions/retro/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create release archive
run: |
VERSION=${GITHUB_REF#refs/tags/}
zip -r speckit-retro-extension-${VERSION}.zip . \
-x ".git/*" \
-x ".github/*" \
-x "*.zip"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: speckit-retro-extension-*.zip
generate_release_notes: true
body: |
## Installation

```bash
specify extension add retro --from https://github.com/dopejs/speckit-retro-extension/archive/refs/tags/${{ github.ref_name }}.zip
```

## Usage

```bash
/speckit.retro 015-019
```

See [README](https://github.com/dopejs/speckit-retro-extension#readme) for full documentation.
35 changes: 35 additions & 0 deletions .specify/extensions/retro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Changelog

All notable changes to the Spec Retrospective & Self-Improvement Extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2026-03-10

### Added
- GitHub Action for automated release packaging

## [1.0.1] - 2026-03-10

### Fixed
- Command naming to follow `speckit.{extension}.{command}` pattern
- Command is now `speckit.retro.analyze` with alias `speckit.retro`

## [1.0.0] - 2026-03-10

### Added
- Initial release of spec retrospective extension
- Automatic clustering for 5+ specs by component and feature
- Pattern extraction across multiple dimensions:
- Shared constraints (constitution candidates)
- Template gaps (missing sections)
- Quality gate patterns (checklist items)
- Constitution violations (principle refinements)
- Implementation deviations (process improvements)
- Evidence-based proposals with spec citations
- Multi-group analysis with separate proposals per group
- User approval workflow for applying changes
- Optional spec archival to reduce token usage
- Constitution versioning support (MAJOR/MINOR/PATCH)
- Progressive loading for token efficiency
21 changes: 21 additions & 0 deletions .specify/extensions/retro/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 John

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
181 changes: 181 additions & 0 deletions .specify/extensions/retro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Spec Retrospective & Self-Improvement Extension

A spec-kit extension that enables continuous improvement by analyzing completed specs to extract shared constraints, patterns, and lessons learned, then proposing improvements to your project's constitution, templates, and checklists.

## Overview

As your project accumulates specs, this extension helps you:

- **Extract cross-cutting patterns** from completed implementations
- **Identify shared constraints** that should be codified in your constitution
- **Discover template gaps** where manual additions are repeatedly needed
- **Build quality checklists** based on recurring validation needs
- **Reduce token usage** by archiving analyzed specs after extracting their lessons

## Philosophy

**Self-Improvement Loop**: Each completed spec is a learning opportunity. The retro process distills implementation experience into reusable governance rules, better templates, and quality gates that make future specs higher quality with less ambiguity.

**Constitution-First**: The constitution is the only artifact loaded by all future specs. Extracting shared constraints into the constitution has maximum leverage—it improves every subsequent spec automatically.

**No New Artifacts**: This extension does NOT create summary.md or other new file types. It strengthens existing infrastructure (constitution, templates, checklists) that spec-kit commands already use.

## Installation

### From GitHub (recommended)

```bash
specify extension add --from https://github.com/dopejs/speckit-retro-extension
```

### From Local Path (for development)

```bash
specify extension add --from /path/to/speckit-retro-extension
```

## Usage

### Basic Usage

Analyze a range of completed specs:

```bash
/speckit.retro 015-019
```

Analyze specific specs:

```bash
/speckit.retro 015,017,019
```

Analyze all specs:

```bash
/speckit.retro all
```

### Workflow

1. **Identify specs** — Specify which completed specs to analyze
2. **Automatic clustering** — For 5+ specs, automatically groups by topic/component
3. **Select groups** — Choose which groups to analyze (or analyze all)
4. **Pattern extraction** — Identifies cross-spec patterns in:
- Shared constraints (constitution candidates)
- Template gaps (missing sections)
- Quality gates (checklist items)
- Constitution violations (principle refinements)
- Implementation deviations (process improvements)
5. **Review proposals** — Structured improvement proposals with evidence
6. **Apply changes** — Select which improvements to apply
7. **Optional archival** — Move analyzed specs to `.archive/` to reduce token usage

### Example Output

```markdown
## Group 1: Backend & API - Improvement Proposals

### Constitution Amendments

#### Amendment 1.1: API Response Time Limits

**Type**: New constraint
**Rationale**: Specs 017, 019 both implemented 10-second timeout mechanisms
**Proposed Text**: All API endpoints MUST respond within 10 seconds...
**Version Bump**: MINOR

### Template Updates

#### Template Update 1.1: Add Error Handling Strategy

**Template**: plan-template.md
**Rationale**: Specs 017, 019, 020 all added this section manually
**Proposed Diff**: [shows exact changes]

### Checklist Additions

#### Checklist Addition 1.1: API Design Checklist

**Items**:
- [ ] CHK-API-001: All endpoints have timeout handling
- [ ] CHK-API-002: Error responses follow consistent format
...
```

## Features

### Automatic Clustering (5+ specs)

When analyzing many specs, the extension automatically clusters them by:

**Component-based**: Backend/API, Frontend/UI, CLI/Tooling, Infrastructure, Testing
**Feature-based**: Stability, Performance, Security, Data, User Experience

This ensures proposals are focused and domain-specific rather than mixing unrelated constraints.

### Evidence-Based Proposals

Every proposal cites specific specs as evidence. Minimum 2-3 specs must show the same pattern before it's proposed as a shared constraint.

### Safe Application

- User approval required for all changes
- Constitution versioning follows governance rules (MAJOR/MINOR/PATCH)
- All changes are git-tracked and reversible
- Original specs preserved in `.archive/` if archived

### Token Efficiency

- Progressive loading (specs loaded incrementally)
- Minimal context extraction (only relevant sections)
- Optional archival reduces future token usage by 90%+

## When to Run Retro

**Recommended cadence**: After completing every 5-10 specs

**Good times to run**:
- After a major feature milestone
- Before starting a new development phase
- When you notice repeated patterns across recent specs
- When constitution feels outdated or incomplete

**Signs you need retro**:
- Specs repeatedly add the same manual sections
- Similar quality issues appear across multiple specs
- Constitution violations have similar justifications
- Token usage is growing due to many historical specs

## Requirements

- spec-kit >= 0.1.0
- Existing spec-kit project with completed specs
- Constitution file at `.specify/memory/constitution.md`

## Configuration

No configuration needed. The extension works with your existing spec-kit setup.

## Contributing

Contributions welcome! Please:

1. Fork the repository
2. Create a feature branch
3. Test on real projects
4. Submit a pull request

## License

MIT License - see LICENSE file for details

## Support

- Issues: https://github.com/dopejs/speckit-retro-extension/issues
- Discussions: https://github.com/dopejs/speckit-retro-extension/discussions

## Related

- [spec-kit](https://github.com/github/spec-kit) - The core spec-kit framework
- [Extension Development Guide](https://github.com/github/spec-kit/blob/main/extensions/EXTENSION-DEVELOPMENT-GUIDE.md)
Loading