|
8 | 8 | [](https://crates.io/crates/specsync) |
9 | 9 | [](LICENSE) |
10 | 10 |
|
11 | | -**Bidirectional spec-to-code validation with cross-project references, dependency graphs, and AI-powered generation.** Written in Rust. Single binary. 11 languages. VS Code extension. |
| 11 | +**Bidirectional spec-to-code validation with cross-project references, dependency graphs, and AI-powered generation.** Written in Rust. Single binary. 12 languages. VS Code extension. |
12 | 12 |
|
13 | 13 | [Quick Start](#quick-start) • [Spec Format](#spec-format) • [CLI](#cli-reference) • [VS Code Extension](#vs-code-extension) • [Cross-Project Refs](#cross-project-references) • [GitHub Action](#github-action) • [Config](#configuration) • [Docs Site](https://corvidlabs.github.io/spec-sync) |
14 | 14 |
|
@@ -48,6 +48,7 @@ Auto-detected from file extensions. Same spec format for all. |
48 | 48 | | **Dart** | Top-level (no `_` prefix), class/mixin/enum/typedef | `*_test.dart` | |
49 | 49 | | **PHP** | `class/interface/trait/enum`, `public` function/const, skips `private/protected` and `__` magic methods | `*Test.php` | |
50 | 50 | | **Ruby** | `class`/`module`, `public` methods with visibility tracking, `attr_accessor`/`attr_reader`/`attr_writer`, constants | `*_test.rb`, `*_spec.rb` | |
| 51 | +| **YAML** | Top-level mapping keys (anchors, aliases supported) | — | |
51 | 52 |
|
52 | 53 | --- |
53 | 54 |
|
@@ -293,7 +294,7 @@ specsync [command] [flags] |
293 | 294 | | `report` | Per-module coverage report with stale and incomplete detection | |
294 | 295 | | `generate` | Scaffold specs for modules missing one (`--provider` for AI-powered content) | |
295 | 296 | | `scaffold <name>` | Scaffold spec + auto-detect source files + register in registry | |
296 | | -| `add-spec <name>` | Scaffold a single spec + companion files (`requirements.md`, `tasks.md`, `context.md`) | |
| 297 | +| `add-spec <name>` | Scaffold a single spec + companion files (`requirements.md`, `tasks.md`, `context.md`, `testing.md`, and `design.md` if enabled) | |
297 | 298 | | `deps` | Validate cross-module dependency graph (cycles, missing deps, undeclared imports) | |
298 | 299 | | `changelog <range>` | Generate changelog of spec changes between two git refs | |
299 | 300 | | `comment` | Post spec-sync check summary as a PR comment (same validation pipeline as `check`). `--pr N` to post, omit to print | |
@@ -399,14 +400,23 @@ Remote resolution fetches `specsync-registry.toml` from each referenced repo and |
399 | 400 |
|
400 | 401 | ## Companion Files |
401 | 402 |
|
402 | | -When you run `specsync generate` or `specsync add-spec`, three companion files are created alongside each spec: |
| 403 | +When you run `specsync generate` or `specsync add-spec`, four companion files are created alongside each spec, plus one opt-in: |
403 | 404 |
|
404 | 405 | | File | Author | Validated? | Purpose | |
405 | 406 | |------|--------|-----------|---------| |
406 | 407 | | `{module}.spec.md` | Dev/Architect | Yes — against code | Technical contract | |
407 | 408 | | `tasks.md` | Anyone | No | Work coordination | |
408 | 409 | | `context.md` | Dev/Agent | No | Architecture notes | |
409 | 410 | | `requirements.md` | Product/Design | No | The ask, acceptance criteria | |
| 411 | +| `testing.md` | QA/Dev | No | Test strategy, edge cases, manual checklists | |
| 412 | +| `design.md` *(opt-in)* | Design/Frontend | No | Layout, component hierarchy, design tokens | |
| 413 | + |
| 414 | +`design.md` is opt-in — enable it in `.specsync/config.toml`: |
| 415 | + |
| 416 | +```toml |
| 417 | +[companions] |
| 418 | +design = true |
| 419 | +``` |
410 | 420 |
|
411 | 421 | All scaffolded by SpecSync, all human-filled. Only the spec gets bidirectional validation. |
412 | 422 |
|
@@ -472,6 +482,43 @@ spec: auth.spec.md |
472 | 482 | <!-- Free-form notes, links, context --> |
473 | 483 | ``` |
474 | 484 |
|
| 485 | +**`testing.md`** — Test strategy and QA checklist: |
| 486 | + |
| 487 | +```markdown |
| 488 | +--- |
| 489 | +spec: auth.spec.md |
| 490 | +--- |
| 491 | +
|
| 492 | +## Automated Tests |
| 493 | +<!-- Test file locations and what they cover --> |
| 494 | +
|
| 495 | +## Manual QA Checklist |
| 496 | +- [ ] <!-- Manual verification steps --> |
| 497 | +
|
| 498 | +## Edge Cases |
| 499 | +<!-- Boundary conditions, race conditions, unusual inputs --> |
| 500 | +``` |
| 501 | + |
| 502 | +**`design.md`** *(opt-in)* — Design and layout documentation: |
| 503 | + |
| 504 | +```markdown |
| 505 | +--- |
| 506 | +spec: auth.spec.md |
| 507 | +--- |
| 508 | +
|
| 509 | +## Layout |
| 510 | +<!-- Page/component layout, responsive breakpoints, positioning --> |
| 511 | +
|
| 512 | +## Components |
| 513 | +<!-- Component tree, props, slots --> |
| 514 | +
|
| 515 | +## Tokens |
| 516 | +<!-- Design token overrides from global design system --> |
| 517 | +
|
| 518 | +## Assets |
| 519 | +<!-- Icons, images, illustrations needed --> |
| 520 | +``` |
| 521 | + |
475 | 522 | These files are designed for team coordination and AI agent context — they give any contributor (human or AI) the full picture of where a module stands. |
476 | 523 |
|
477 | 524 | --- |
|
858 | 905 | ├── csharp.rs C# public items |
859 | 906 | ├── dart.rs Dart public items |
860 | 907 | ├── php.rs PHP public items |
861 | | - └── ruby.rs Ruby public items |
| 908 | + ├── ruby.rs Ruby public items |
| 909 | + └── yaml.rs YAML top-level keys |
862 | 910 | ``` |
863 | 911 |
|
864 | 912 | **Design:** Single binary, no runtime deps. Frontmatter parsed with regex (no YAML library). Language backends use regex, not ASTs — works without compilers installed. Release builds use LTO + strip + opt-level 3. |
|
0 commit comments