Skip to content

Commit 60812f8

Browse files
Merge branch '032-quickstart-skill-usage-guide' - quickstart SKILL & USAGE.md offline guide
2 parents ec85d16 + 06de52e commit 60812f8

File tree

23 files changed

+1534
-4
lines changed

23 files changed

+1534
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Added
11+
- `spectra-quickstart` SKILL (12th bundled SKILL) — workflow-oriented onboarding for Copilot Chat. Triggered by phrases like "help me get started", "tutorial", "walk me through". Presents 12 SPECTRA workflows with example conversations.
12+
- `USAGE.md` — offline workflow reference written to the project root by `spectra init`. Mirrors the quickstart SKILL content in a format suitable for async onboarding, code review, and CI documentation. Hash-tracked by `update-skills` so customizations are preserved.
13+
- `ProfileFormatLoader.LoadEmbeddedUsageGuide()` for resolving the bundled `USAGE.md` content.
14+
- Generation and execution agent prompts now defer onboarding requests to the `spectra-quickstart` SKILL.
15+
816
## [1.35.0] - 2026-04-10
917

1018
### Added

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ spectra config list-automation-dirs # List dirs with existence s
209209
- **Tests:** xUnit with structured results (never throw on validation errors)
210210

211211
## Recent Changes
212+
- 032-quickstart-skill-usage-guide: ✅ COMPLETE - Quickstart SKILL & USAGE.md offline guide. New `spectra-quickstart` SKILL (12th bundled SKILL) — workflow-oriented onboarding that responds to "help me get started", "tutorial", "walk me through" with 12 workflow walkthroughs and example conversations. Teaching-only (no CLI execution); delegates actual workflow execution to the corresponding workflow SKILLs. New `USAGE.md` bundled doc written to project root by `spectra init` (offline mirror of the quickstart SKILL, free of in-chat tool references). Both artifacts hash-tracked by the existing `update-skills` system. New `ProfileFormatLoader.LoadEmbeddedUsageGuide()` method. New `InitHandler.CreateUsageGuideAsync` (gated by `--skip-skills`). Generation and execution agent prompts gain a `**QUICKSTART**` delegation line directing onboarding intents to the new SKILL. Updated SKILL count test (11→12). 7 new tests (quickstart SKILL content, USAGE.md content + offline-clean assertions, init creates both files, --skip-skills skips both files, both agents reference quickstart). 1434 total tests passing.
212213
- 030-prompt-templates: ✅ COMPLETE - Customizable root prompt templates. Introduced `.spectra/prompts/` directory with 5 markdown templates (behavior-analysis, test-generation, criteria-extraction, critic-verification, test-update) controlling all AI operations. Templates use `{{placeholder}}`, `{{#if}}`, `{{#each}}` syntax with built-in defaults as embedded resources. New `PlaceholderResolver`, `PromptTemplateParser`, `PromptTemplateLoader`, `BuiltInTemplates` in `Spectra.CLI/Prompts/`. Replaced hardcoded prompts in `BehaviorAnalyzer`, `CopilotGenerationAgent`, `CriteriaExtractor`, `CriticPromptBuilder` with template-driven approach (legacy fallback preserved). New `analysis.categories` config section with 6 default categories (happy_path, negative, edge_case, boundary, error_handling, security). New `spectra prompts list/show/reset/validate` CLI commands with JSON output. New `spectra-prompts` SKILL (11th bundled SKILL). Init creates `.spectra/prompts/` with defaults. `update-skills` tracks template hashes for safe updates. 65+ new tests. 1417 total tests passing.
213214
- 029-spectra-update-skill: ✅ COMPLETE - Added spectra-update SKILL (10th bundled SKILL) for test update workflow via Copilot Chat. SKILL wraps `spectra ai update` with progress page, result file, classification breakdown (UP_TO_DATE, OUTDATED, ORPHANED, REDUNDANT). Agent delegation tables updated (both generation and execution agents delegate update requests to SKILL). Extended `UpdateResult` with `success`, `totalTests`, `testsFlagged`, `flaggedTests`, `duration` fields. Generation agent inline update section replaced with delegation row. 6 new tests (SKILL content, step format, do-NOTHING instruction, tools list, agent delegation). Documentation updated (SKILL count 9→10). Version 1.35.0.
214215
- 028-coverage-criteria-fix: ✅ COMPLETE - Coverage semantics fix & criteria-generation pipeline. Fixed `TestCaseParser` to propagate `Criteria` field from frontmatter to `TestCase` (was missing). Wired criteria loading into `GenerateHandler`: loads per-doc `.criteria.yaml` files matching suite name and component, formats as context string, passes to `CopilotGenerationAgent.BuildFullPrompt()` via new `criteriaContext` parameter on `GenerateTestsAsync()`. `TestFileWriter` now always writes `criteria: []` field (even when empty) for visibility. Audit confirmed coverage analyzers already correct: `DocumentationCoverageAnalyzer` checks test existence via `source_refs`, `AcceptanceCriteriaCoverageAnalyzer` reads both `criteria` and legacy `requirements` fields. 4 new regression tests. 1354 total tests passing.

PROJECT-KNOWLEDGE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ User → VS Code Copilot Chat → MCP Server → Test Execution → Reports
2525
| Component | Purpose |
2626
|-----------|---------|
2727
| **dashboard-site/** | Static HTML/JS dashboard template with D3.js visualizations |
28-
| **SKILLs** (10 files) | VS Code Copilot Chat integration — each SKILL wraps CLI commands |
28+
| **SKILLs** (12 files) | VS Code Copilot Chat integration — each SKILL wraps CLI commands or guides users |
2929
| **Agents** (2 files) | Copilot Chat agent prompts for generation and execution workflows |
3030

3131
## Technology Stack
@@ -187,7 +187,7 @@ criteria:
187187

188188
## VS Code Copilot Chat Integration
189189

190-
### 10 Bundled SKILLs
190+
### 12 Bundled SKILLs
191191
| SKILL | Purpose |
192192
|-------|---------|
193193
| `spectra-generate` | Test generation (analyze → approve → generate flow) |
@@ -197,9 +197,17 @@ criteria:
197197
| `spectra-validate` | Test validation |
198198
| `spectra-list` | Test listing and browsing |
199199
| `spectra-init-profile` | Generation profile setup |
200-
| `spectra-help` | Command reference |
200+
| `spectra-help` | Command reference (terse, flag-oriented) |
201201
| `spectra-criteria` | Criteria extraction, import, listing |
202202
| `spectra-docs` | Documentation indexing with progress page |
203+
| `spectra-prompts` | Prompt template management (list/show/reset/validate) |
204+
| `spectra-quickstart` | Workflow-oriented onboarding & walkthroughs (12 workflows with example conversations) |
205+
206+
### Bundled Project-Root Docs
207+
- `CUSTOMIZATION.md` — configuration & customization reference (profiles, prompts, branding).
208+
- `USAGE.md` — workflow guide for Copilot Chat usage (offline mirror of `spectra-quickstart`).
209+
210+
Both are written by `spectra init` and tracked by the SKILL manifest hash system so `spectra update-skills` refreshes unmodified copies and preserves user edits.
203211

204212
### 2 Agent Prompts (Delegation Model)
205213
| Agent | Purpose |

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ spectra validate --output-format json --no-interaction
134134

135135
See [Getting Started](docs/getting-started.md) for auth setup and detailed instructions.
136136

137+
### Using SPECTRA from VS Code Copilot Chat
138+
139+
After `spectra init`, the bundled `spectra-quickstart` SKILL turns Copilot Chat into a guided onboarding entry point. Open Copilot Chat in VS Code and ask:
140+
141+
> "Help me get started"
142+
143+
The assistant walks you through every workflow (test generation, criteria extraction, coverage, dashboard, execution, customization) with copyable example prompts. For an offline reference covering the same workflows, see the auto-generated [`USAGE.md`](USAGE.md) at your project root.
144+
137145
## Architecture
138146

139147
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Specification Quality Checklist: Quickstart SKILL & Usage Guide
2+
3+
**Purpose**: Validate specification completeness and quality before proceeding to planning
4+
**Created**: 2026-04-10
5+
**Feature**: [spec.md](../spec.md)
6+
7+
## Content Quality
8+
9+
- [x] No implementation details (languages, frameworks, APIs)
10+
- [x] Focused on user value and business needs
11+
- [x] Written for non-technical stakeholders
12+
- [x] All mandatory sections completed
13+
14+
## Requirement Completeness
15+
16+
- [x] No [NEEDS CLARIFICATION] markers remain
17+
- [x] Requirements are testable and unambiguous
18+
- [x] Success criteria are measurable
19+
- [x] Success criteria are technology-agnostic (no implementation details)
20+
- [x] All acceptance scenarios are defined
21+
- [x] Edge cases are identified
22+
- [x] Scope is clearly bounded
23+
- [x] Dependencies and assumptions identified
24+
25+
## Feature Readiness
26+
27+
- [x] All functional requirements have clear acceptance criteria
28+
- [x] User scenarios cover primary flows
29+
- [x] Feature meets measurable outcomes defined in Success Criteria
30+
- [x] No implementation details leak into specification
31+
32+
## Notes
33+
34+
- All checklist items pass on first iteration.
35+
- File paths (`.github/skills/spectra-quickstart/SKILL.md`, `USAGE.md`) are referenced as user-visible artifacts, not implementation details — they're the *deliverable* the user finds on disk after `init`.
36+
- Ready to proceed to `/speckit.plan`.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Contract: `spectra init` and `spectra update-skills` output for feature 032
2+
3+
This document captures the user-visible contract changes introduced by this feature. There are no new commands or flags — only new files produced by existing commands.
4+
5+
## `spectra init`
6+
7+
### New artifacts written
8+
9+
After a successful `spectra init` (without `--skip-skills`), the following NEW files MUST exist on disk:
10+
11+
| Path | Purpose |
12+
|------|---------|
13+
| `.github/skills/spectra-quickstart/SKILL.md` | Quickstart SKILL (workflow-oriented onboarding for Copilot Chat) |
14+
| `USAGE.md` | Offline workflow reference (project-root markdown doc) |
15+
16+
### Manifest updates
17+
18+
The `.spectra/skills-manifest.json` file MUST contain SHA-256 hashes for both new files:
19+
20+
```json
21+
{
22+
"version": "1.0",
23+
"files": {
24+
"...existing entries...": "...",
25+
".github/skills/spectra-quickstart/SKILL.md": "<sha256-hex>",
26+
"USAGE.md": "<sha256-hex>"
27+
}
28+
}
29+
```
30+
31+
### `--skip-skills` behavior
32+
33+
When `spectra init --skip-skills` is invoked, NEITHER new file is created and NEITHER manifest entry is added. This matches the existing `--skip-skills` semantics for the other 11 SKILLs and for `CUSTOMIZATION.md`.
34+
35+
### `--force` behavior
36+
37+
When `spectra init --force` is invoked on a project that already has these files, both files are overwritten with the latest bundled content (matching existing `--force` semantics for `CUSTOMIZATION.md` and other bundled files).
38+
39+
## `spectra update-skills`
40+
41+
### Refresh behavior
42+
43+
For each of the two new manifest entries:
44+
45+
1. Compute the SHA-256 of the on-disk file.
46+
2. Compare against the manifest hash.
47+
3. **If equal** → file is unmodified by the user; overwrite with the current embedded content; update the manifest hash.
48+
4. **If not equal** → file has been customized; skip; do not touch the manifest.
49+
5. **If file missing** → write fresh from the embedded content; record hash.
50+
51+
This is identical to the existing `update-skills` behavior for `CUSTOMIZATION.md` and the other SKILLs.
52+
53+
### Output / reporting
54+
55+
The existing `update-skills` summary table MUST include rows for the two new files showing one of: `created`, `updated`, `skipped (customized)`, `up-to-date`.
56+
57+
## Quickstart SKILL frontmatter contract
58+
59+
The bundled `spectra-quickstart.md` file MUST begin with a YAML frontmatter block:
60+
61+
```yaml
62+
---
63+
name: SPECTRA Quickstart
64+
description: Guided onboarding and workflow walkthroughs for SPECTRA via Copilot Chat.
65+
---
66+
```
67+
68+
The `name` and `description` fields are consumed by Copilot Chat to surface the SKILL to the user. The description MUST clearly identify it as an onboarding/walkthrough SKILL so the LLM picks it for "help me get started"-style intents.
69+
70+
## Quickstart SKILL content contract
71+
72+
The body of `spectra-quickstart.md` MUST contain (verifiable by tests):
73+
74+
1. The literal string `## Available tools`.
75+
2. A workflow overview listing 11 distinct workflow names.
76+
3. A `## Workflow N:` header for each of the 11 workflows (N = 1..11).
77+
4. A `## Quick Troubleshooting` section.
78+
5. A `## Example user requests that trigger this SKILL` section with at least 10 trigger phrases.
79+
80+
## USAGE.md content contract
81+
82+
The body of `USAGE.md` MUST contain (verifiable by tests):
83+
84+
1. The literal heading `# SPECTRA Usage Guide — VS Code Copilot Chat` (or similar — the existence of "SPECTRA Usage Guide" is sufficient).
85+
2. A `## Prerequisites` section.
86+
3. Sections covering all 11 workflows (verified by counting heading occurrences for the 11 workflow names: `Generating Test Cases`, `Extracting Acceptance Criteria`, `Importing Criteria`, `Coverage Analysis`, `Generating Dashboard`, `Validating Tests`, `Updating Tests`, `Executing Tests`, `Creating a Custom Profile`, `Indexing Documentation`, `Customizing SPECTRA`).
87+
4. A `## Troubleshooting` section.
88+
5. A "Complete Pipeline" or "Start to Finish" section describing the end-to-end flow.
89+
6. NO references to in-chat tool names (`runInTerminal`, `awaitTerminal`, `readFile`, `browser/openBrowserPage`).
90+
91+
## Agent prompt contract
92+
93+
After this feature lands, both `spectra-generation.agent.md` and `spectra-execution.agent.md` MUST contain a textual reference to `spectra-quickstart` (verifiable by tests with a substring assertion).
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Phase 1 — Data Model: Quickstart SKILL & Usage Guide
2+
3+
This feature has no runtime data model — it ships static content. The "entities" are the artifacts produced and the manifest entries that track them.
4+
5+
## Entities
6+
7+
### 1. Quickstart SKILL file
8+
9+
| Field | Value |
10+
|-------|-------|
11+
| **Embedded resource id** | `Spectra.CLI.Skills.Content.Skills.spectra-quickstart.md` |
12+
| **Source path** | `src/Spectra.CLI/Skills/Content/Skills/spectra-quickstart.md` |
13+
| **Output path** | `.github/skills/spectra-quickstart/SKILL.md` (in user project) |
14+
| **Manifest key** | `.github/skills/spectra-quickstart/SKILL.md` |
15+
| **Auto-loaded** | Yes — by `SkillResourceLoader.LoadAllSkills()` |
16+
| **Typed accessor** | `SkillContent.Quickstart` |
17+
| **Frontmatter** | `name: SPECTRA Quickstart`, `description: Guided onboarding and workflow walkthroughs for SPECTRA via Copilot Chat.` |
18+
| **Required content sections** | Tools list, workflow overview (11 workflows), per-workflow detail with example conversations, troubleshooting, trigger phrases |
19+
20+
### 2. USAGE.md doc file
21+
22+
| Field | Value |
23+
|-------|-------|
24+
| **Embedded resource id** | `Spectra.CLI.Skills.Content.Docs.USAGE.md` |
25+
| **Source path** | `src/Spectra.CLI/Skills/Content/Docs/USAGE.md` |
26+
| **Output path** | `USAGE.md` (project root) |
27+
| **Manifest key** | `USAGE.md` |
28+
| **Loader** | `ProfileFormatLoader.LoadEmbeddedUsageGuide()` (new method, mirrors `LoadEmbeddedCustomizationGuide`) |
29+
| **Required content sections** | Prerequisites, getting started, 11 workflows in offline form, troubleshooting, complete pipeline walk-through |
30+
31+
### 3. SkillsManifest entries (existing entity, two new keys)
32+
33+
The existing `SkillsManifest.Files` dictionary gains two new entries on init:
34+
35+
```json
36+
{
37+
"files": {
38+
".github/skills/spectra-quickstart/SKILL.md": "<sha256>",
39+
"USAGE.md": "<sha256>"
40+
}
41+
}
42+
```
43+
44+
`update-skills` consults this manifest: if the user's on-disk file hash matches the manifest hash, the file is unmodified and may be refreshed; if it differs, the user has customized it and the file is skipped.
45+
46+
### 4. Agent prompt files (existing entities, edited)
47+
48+
| File | Change |
49+
|------|--------|
50+
| `src/Spectra.CLI/Skills/Content/Agents/spectra-generation.agent.md` | Add one delegation line: onboarding intents → spectra-quickstart SKILL |
51+
| `src/Spectra.CLI/Skills/Content/Agents/spectra-execution.agent.md` | Add one delegation line: onboarding intents → spectra-quickstart SKILL |
52+
53+
## Relationships
54+
55+
```
56+
spectra init
57+
58+
├── writes ──► .github/skills/spectra-quickstart/SKILL.md (from EmbeddedResource)
59+
│ │
60+
│ └── tracked by ──► SkillsManifest.Files[".github/skills/spectra-quickstart/SKILL.md"]
61+
62+
└── writes ──► USAGE.md (from EmbeddedResource)
63+
64+
└── tracked by ──► SkillsManifest.Files["USAGE.md"]
65+
66+
spectra update-skills
67+
68+
├── for each manifest entry, compare on-disk hash vs stored hash
69+
├── if unchanged: refresh from EmbeddedResource, update stored hash
70+
└── if changed: skip (user customization preserved)
71+
72+
Copilot Chat (user types "help me get started")
73+
74+
├── generation agent receives intent
75+
│ │
76+
│ └── delegates to ──► spectra-quickstart SKILL
77+
78+
└── quickstart SKILL presents 11-workflow overview + example conversations
79+
```
80+
81+
## State / lifecycle
82+
83+
- **Created** by `spectra init` (or by `spectra update-skills` when missing).
84+
- **Updated** by `spectra update-skills` only when the user has not modified the file.
85+
- **Deleted** by manual user action (not managed by SPECTRA).
86+
- **No runtime mutation** — content is static between releases.

0 commit comments

Comments
 (0)