Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fcd8390
Sync living-doc glossary with canonical definitions, update project p…
miroslavpojer Sep 15, 2026
3351f4f
fix: align living-doc-update description with schema (Features no sta…
miroslavpojer Sep 15, 2026
d3d4d43
fix: clarify stale AC update location in gherkin-living-doc-sync
miroslavpojer Sep 15, 2026
fc9711a
feat: add standard artifact locations for BDD automation in copilot i…
miroslavpojer Sep 15, 2026
c609578
fix: update living-doc BDD schemas and related documentation for clar…
miroslavpojer Sep 16, 2026
c095dff
fix: update expected output formatting in evals and enhance deprecati…
miroslavpojer Sep 16, 2026
429db05
fix: update surface type validation to only allow UI and API, and adj…
miroslavpojer Sep 16, 2026
f525f3f
fix: refine expected output for Notifications Service feature and upd…
miroslavpojer Sep 16, 2026
c6c9d48
fix: update glossary sync script to use environment variable for refe…
miroslavpojer Sep 16, 2026
96c58bd
fix: enhance living-doc BDD schemas and documentation for clarity, ad…
miroslavpojer Sep 16, 2026
7607373
fix: update expected output and validation details in evals for livin…
miroslavpojer Sep 16, 2026
377c154
fix: update descoped scenario handling in documentation and evals, cl…
miroslavpojer Sep 16, 2026
5a02872
fix: enhance validation for ac_states in profile, ensuring schema com…
miroslavpojer Sep 16, 2026
22f3404
fix: add validation to prevent duplicate ac_states in profile and enh…
miroslavpojer Sep 16, 2026
822aad2
fix: enhance validation for profile ac_states to reject non-string it…
miroslavpojer Sep 16, 2026
e7a8e00
fix: add tests to reject duplicate values in profile ac_states and up…
miroslavpojer Sep 16, 2026
602a738
fix: update living doc guidelines to clarify API surface types and en…
miroslavpojer Sep 16, 2026
d5187ca
fix: enhance living doc guidelines for AC versioning and improve vali…
miroslavpojer Sep 16, 2026
2378d51
fix: update living doc guidelines and improve validation for user sto…
miroslavpojer Sep 16, 2026
748b767
fix: enhance error handling in profile loading to catch malformed YAML
miroslavpojer Sep 16, 2026
1ae73b5
fix: update documentation and tests for validation and coverage impro…
miroslavpojer Sep 17, 2026
d1ec392
fix: enforce error handling for unrecognized AC states in validation …
miroslavpojer Sep 17, 2026
0318a13
fix: update living doc guidelines and JSON structure for User Stories…
miroslavpojer Sep 17, 2026
ff2e547
fix: enhance validation for deprecated features to include deprecated…
miroslavpojer Sep 17, 2026
4b46118
fix: update living doc guidelines and JSON structure for Feature and …
miroslavpojer Sep 17, 2026
fad91af
Updated from consistency review.
miroslavpojer Sep 26, 2026
412a098
feat: generate both canon copies from one SHA-pinned sync mechanism
miroslavpojer Sep 28, 2026
89f0eb6
Updated to introduce news from canon.
miroslavpojer Sep 28, 2026
2ef9ff0
feat: add dependency update path and feature_dependencies checks; ali…
miroslavpojer Sep 29, 2026
5d356b3
feat: add dependency update path and feature_dependencies checks; ali…
miroslavpojer Sep 29, 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
22 changes: 13 additions & 9 deletions .github/agents/evals/living-doc-bdd-copilot/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
"id": 3,
"category": "happy-path",
"prompt": "Generate Gherkin scenarios for US-007 — Place an Online Order. ACs: (1) active — happy path: customer places order with saved payment. (2) active — error: order rejected when card declined.",
"expected_output": "Agent generates a .feature file named us-007-place-an-online-order.feature. Feature header uses the As-a/I-can/so-that narrative from US-007. Two scenarios generated — one per active AC. Each Scenario: is immediately preceded by a '# AC: US-007-0n (v1.0.0 – active) — ...' traceability tag. Step text uses domain language (no HTTP calls, selectors, or DB). For steps without a matching step definition, generates stubs: Case A (PageObject method exists) = full stub; Case B (no PageObject method) = stub with NotImplementedError and flag to extend the PageObject.",
"expected_output": "Agent generates a .feature file named us-007-place-an-online-order.feature. Feature header uses the As-a/I-can/so-that narrative from US-007. Two scenarios generated - one per active AC. Each Scenario: is immediately preceded by a '# AC:US-007-0n (v1.0.0 - active) - ...' comment AND carries the matching '@AC:US-007-0n' tag directly above the Scenario: line — the agent contract requires both the human-readable comment and the machine-readable tag on every scenario. Step text uses domain language (no HTTP calls, selectors, or DB). For steps without a matching step definition, generates stubs: Case A (PageObject method exists) = full stub; Case B (no PageObject method) = stub with NotImplementedError and flag to extend the PageObject.",
"files": [],
"expectations": [
"Feature file named us-007-place-an-online-order.feature",
"Each Scenario: immediately preceded by a # AC: traceability comment",
"Each Scenario: also carries the matching @AC: tag — comment alone is not sufficient",
"Skips planned and deprecated ACs — only active ACs drive generation",
"Step text in domain language — no implementation details",
"Case A stubs delegate to PageObject methods",
Expand Down Expand Up @@ -160,13 +161,14 @@
"id": 12,
"category": "output-format",
"prompt": "After scanning /login and generating a LoginPage, show me what the manifest.json entry for /login looks like.",
"expected_output": "The manifest.json entry for /login includes: pageobject_path (path to the generated LoginPage file), feature_id (FEAT-<nnn> or FEAT-UNKNOWN if unlinked), last_scanned (ISO timestamp), elements (list of discovered elements with data_cy and tag), coverage_gaps (empty list initially), and navigation_context with prerequisites, navigation_steps, data_requirements, auth_role, and notes. The feature_id is FEAT-UNKNOWN if no matching Feature entity exists in the living doc — flag this route as 'needs Feature entity' and load `living-doc-create-feature` skill to create it.",
"expected_output": "The manifest.json entry for /login includes: pageobject_path (path to the generated LoginPage file), feature_id (FEAT-<nnn> or FEAT-UNKNOWN if unlinked), last_scanned (ISO timestamp), elements (list of discovered elements, each with the normalized test_id key and tag — not data_cy), coverage_gaps (empty list initially), and navigation_context as a prose STRING describing how to reach the route (e.g. prerequisites, navigation steps, auth role) — not an object. The feature_id is FEAT-UNKNOWN if no matching Feature entity exists in the living doc — flag this route as 'needs Feature entity' and load `living-doc-create-feature` skill to create it.",
"files": [],
"expectations": [
"manifest.json entry has: pageobject_path, feature_id, last_scanned, elements, coverage_gaps, navigation_context",
"feature_id is FEAT-UNKNOWN if no matching Feature entity exists",
"last_scanned is an ISO timestamp",
"navigation_context includes prerequisites, navigation_steps, auth_role",
"elements use the normalized 'test_id' key, not 'data_cy'",
"navigation_context is a prose string (not an object) describing prerequisites, navigation steps, and auth role",
"Missing Feature entity triggers living-doc-create-feature skill load"
]
},
Expand Down Expand Up @@ -215,7 +217,7 @@
"id": 16,
"category": "skill-dispatch",
"prompt": "The @AC: traceability tags in checkout.feature are out of sync with the living doc. Sync them.",
"expected_output": "Agent loads the `gherkin-living-doc-sync` skill. Runs scan_ac_links.py to audit the @AC: tags and # AC: comments across checkout.feature. For each scenario: (1) verifies the @AC: tag matches a live AC in the catalog; (2) checks the # AC: comment format is canonical; (3) flags stale or missing links. Produces a sync diff showing what changed. Does not generate new scenarios — routes new-scenario requests to living-doc-scenario-creator.",
"expected_output": "Agent loads the `gherkin-living-doc-sync` skill. Runs scan_ac_links.py to audit the @AC: tags and # AC: comments across checkout.feature. For each scenario: (1) verifies the @AC: tag matches a live AC in the catalog; (2) checks the # AC: comment format is canonical; (3) flags stale or missing links. Produces a sync diff showing what changed. Does not generate new scenarios - routes new-scenario requests to living-doc-scenario-creator.",
"files": [],
"expectations": [
"Loads gherkin-living-doc-sync skill",
Expand Down Expand Up @@ -257,11 +259,11 @@
"id": 19,
"category": "skill-dispatch",
"prompt": "Delete all BDD artifacts linked to the deprecated FEAT-012 feature — clean up feature files, step definitions, and PageObjects.",
"expected_output": "Agent loads the `bdd-maintain` skill in REMOVE mode. Identifies all .feature file scenarios whose # AC: tags reference FEAT-012 User Stories. Runs find_unused_steps.py to find step definitions only used by those scenarios. Runs find_unused_po_methods.py and find_unused_po_components.py to identify exclusively-used PageObject artifacts. Presents the full deletion list to the user for confirmation before touching any file. Also checks fixtures.ts for PageObject imports to remove. After confirmation, removes the identified files.",
"expected_output": "Agent loads the `bdd-maintain` skill in REMOVE mode. Identifies all .feature file scenarios whose @AC: tags reference FEAT-012 User Stories. Runs find_unused_steps.py to find step definitions only used by those scenarios. Runs find_unused_po_methods.py and find_unused_po_components.py to identify exclusively-used PageObject artifacts. Presents the full deletion list to the user for confirmation before touching any file. Also checks fixtures.ts for PageObject imports to remove. After confirmation, removes the identified files.",
"files": [],
"expectations": [
"Loads bdd-maintain skill",
"REMOVE mode — identifies scenarios via # AC: tags linked to deprecated Feature",
"REMOVE mode - identifies scenarios via @AC: tags linked to deprecated Feature",
"Runs all three audit scripts to identify exclusively-used artifacts",
"Checks fixtures.ts for PageObject imports",
"Presents deletion list for confirmation before touching any file"
Expand All @@ -271,12 +273,13 @@
"id": 20,
"category": "skill-dispatch",
"prompt": "Document the Notifications Service as a Feature entity in the living doc — it exposes a REST API at /api/notifications.",
"expected_output": "Agent loads the `living-doc-create-feature` skill. Assigns the next sequential FEAT-nnn ID using next_id.py. Creates a Feature entity JSON with: id, name ('Notifications Service'), type ('api'), route ('/api/notifications'), status ('active'), owners (asks user), and empty functionalities and user_stories arrays. Adds the Feature to feature_registry.json. Prompts: 'Do you want to create Functionality entities for specific behaviors of this service?'",
"expected_output": "Agent loads the `living-doc-create-feature` skill. Assigns the next sequential FEAT-nnn ID using next_id.py. Creates a Feature entity JSON with: id, name ('Notifications Service'), surface_type ('API'), purpose, owners (asks user), external_dependencies, and empty `functionalities`/`user_stories` arrays since the prompt supplies no relationships — no `status` field, since a Feature's state is derived from its Functionalities. Repeats the orphan warning outside the JSON (no traceable business value until linked to a User Story; reported as `ORPHAN_FEATURE` by living-doc-gap-finder) rather than fabricating placeholder IDs. Adds the Feature to feature_registry.json. Prompts: 'Do you want to create Functionality entities for specific behaviors of this service?'",
"files": [],
"expectations": [
"Loads living-doc-create-feature skill",
"Assigns next FEAT-nnn ID using next_id.py",
"Creates Feature entity JSON with required fields",
"Creates Feature entity JSON with required fields and empty functionalities/user_stories arrays — no fabricated placeholder IDs",
Comment thread
miroslavpojer marked this conversation as resolved.
"Repeats the ORPHAN_FEATURE warning outside the JSON",
"Adds entry to feature_registry.json",
"Prompts for Functionality creation as next step"
]
Expand Down Expand Up @@ -314,12 +317,13 @@
"id": 23,
"category": "skill-dispatch",
"prompt": "Generate BDD scenarios for US-007 — Place an Online Order. It has 3 active ACs and 1 planned AC.",
"expected_output": "Agent loads the `living-doc-scenario-creator` skill. Generates a .feature file for US-007 with 3 scenarios — one per active AC. The planned AC is skipped (not generated until active). Each scenario is preceded by a '# AC: US-007-0n (v1.0.0 – active)' traceability comment. Merge policy: if a scenario already exists for an AC, applies the 4-row decision table (skip if intent matches, update if GWT is stale, propose replacement if deprecated, flag if multiple scenarios exist per AC).",
"expected_output": "Agent loads the `living-doc-scenario-creator` skill. Generates a .feature file for US-007 with 3 scenarios - one per active AC. The planned AC is skipped (not generated until active). Each scenario is preceded by a '# AC:US-007-0n (v1.0.0 - active)' comment AND carries the matching '@AC:US-007-0n' tag directly above the Scenario: line — both are required. Merge policy: if a scenario already exists for an AC, applies the 4-row decision table (skip if intent matches, update if GWT is stale, propose replacement if deprecated, flag if multiple scenarios exist per AC).",
"files": [],
"expectations": [
"Loads living-doc-scenario-creator skill",
"Generates scenarios only for active ACs — skips planned",
"Each scenario preceded by # AC: traceability comment",
"Each scenario also carries the matching @AC: tag — comment alone is not sufficient",
"Applies merge policy decision table for existing scenarios",
"Output is a named .feature file: us-007-place-an-online-order.feature"
]
Expand Down
13 changes: 7 additions & 6 deletions .github/agents/living-doc-bdd-copilot.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Load **one** skill per session. Do not pre-load skills for modes not yet trigger
| Create Functionality (atomic behavior) | `living-doc-create-functionality` |
| Update / deprecate entity or AC | `living-doc-update` |
| Promote entity to ACTIVE | `living-doc-update` |
| Change a Feature's dependencies — add, drop, or promote an external dependency to a Feature | `living-doc-update` (it hands the new Feature's creation to `living-doc-create-feature`) |
| PR impact analysis / trace affected entities | `living-doc-impact-analysis` |
| Catalog gaps / AUDIT mode / PLAN mode | `living-doc-gap-finder` |

Expand Down Expand Up @@ -178,15 +179,15 @@ When a User Story or Feature is deprecated, three skills fire in sequence. Compl

| Step | Skill | Action |
|---|---|---|
| 1 | `living-doc-update` | Set entity `status: deprecated`; add `deprecated_at`, `deprecation_reason`, and optionally `superseded_by` |
| 1 | `living-doc-update` | For a User Story, set `status: deprecated`. A Feature has no `status` field — its state is derived from its Functionalities; deprecate the Feature by deprecating every Functionality it owns instead. A User Story or Functionality gets `deprecated_at`, `deprecation_reason`, and optionally `superseded_by`; the Feature itself gets only `deprecation_reason` and optionally `superseded_by` — its `deprecated_at` is derived with its state, never authored |
| 2 | `gherkin-living-doc-sync` | Find all scenarios tagged `@AC:<id>` for the deprecated entity's ACs; add `@deprecated` and `@review-needed` |
| 3 | `bdd-maintain` (REMOVE) | Confirm file deletion list with user; remove confirmed `.feature` files, PageObjects, and step definitions; update `manifest.json` |

Do not skip steps or run them out of order. Complete catalog changes (step 1) before touching any Gherkin or automation files.

**Manifest loading rule:** Use targeted line ranges for the current route(s). Load full manifest only for RE-SCAN. `seed.yaml`: always load in full. When PageObject generation discovers a route with no linked Feature entity, set `feature_id: FEAT-UNKNOWN`, flag the route as needing a Feature entity, and cross-load `living-doc-create-feature` to create it before continuing.

**living-doc-bdd-schemas:** Load [skills/shared/references/living-doc-bdd-schemas.md](skills/shared/references/living-doc-bdd-schemas.md) only when generating or validating feature file headers, PageObject headers, ExplorationFixture entries, seed.yaml form_fixtures, or manifest.json route entries.
**living-doc-bdd-schemas:** Load [skills/shared/references/living-doc-bdd-schemas.md](skills/shared/references/living-doc-bdd-schemas.md) only when generating or validating feature file headers, PageObject headers, seed.yaml form_fixtures, or manifest.json route entries.

---

Expand Down Expand Up @@ -275,20 +276,20 @@ Full model: [living-doc-glossary](skills/shared/references/living-doc-glossary.m

**Entity IDs:** `US-<nnn>` · `FEAT-<nnn>` · `FUNC-<nnn>`

**AC reference format:** `AC:<parent-id>-<nn> (v<version> – <state>) — <description>`
**AC reference format:** `AC:<parent-id>-<nn> (v<version> - <state>) - <description>`. A backlog AC with no target version yet uses `(planned)` instead of a version. A `deprecated` AC requires a removal note: `(v<version> - deprecated - removal planned v<version>)`.
State: `planned | in_review | active | deprecated`

**Gherkin traceability:** every scenario in the living-doc feature directories (`feature_dirs.user_story` and `feature_dirs.functionality` from the Project Profile, defaults `features/liv_doc_us/` and `features/liv_doc_func/`) requires:
```gherkin
# AC:US-1-01 (v1.0.0 - active) — <description>
# AC:US-1-01 (v1.0.0 - active) - <description>
@AC:US-1-01
Scenario: ...
```
Aspect variant: `@AC:US-1-01/aspect:username-input`. The `@AC:` tag is the single source of machine traceability.

**Surface types:** `UI` → PageObject (locators via `getByTestId()`, resolving to the profile `test_id_attribute`, default `data-cy`). `API` → contract test layer only.

**ACTIVE ACs** drive scenario generation. DEPRECATED ACs require `deprecated_at`, `deprecation_reason`, optionally `superseded_by`.
**ACTIVE ACs** drive scenario generation. A DEPRECATED AC carries the removal note above and no other deprecation fields — `deprecated_at`, `deprecation_reason`, and `superseded_by` belong to the owning User Story or Functionality when the entity itself is deprecated.

**Catalog layer healing boundary:** catalog changes (AC states, traceability links, entity deprecation) and automation changes (PageObjects, step definitions, Gherkin files) are separate steps — complete catalog changes before moving to automation updates in the same session.

Expand All @@ -303,7 +304,7 @@ Aspect variant: `@AC:US-1-01/aspect:username-input`. The `@AC:` tag is the singl
| `living-doc-create-user-story` | Create US with business-level ACs | `skills/living-doc-create-user-story/SKILL.md` | New US or narrative request |
| `living-doc-create-feature` | Document a system surface | `skills/living-doc-create-feature/SKILL.md` | New Feature or inbound surface from EXPLORE mode |
| `living-doc-create-functionality` | Define an atomic, testable behaviour | `skills/living-doc-create-functionality/SKILL.md` | New Functionality or atomic-behaviour AC request |
| `living-doc-update` | Amend or deprecate entities | `skills/living-doc-update/SKILL.md` | Updating, promoting, or deprecating an entity or AC |
| `living-doc-update` | Amend or deprecate entities | `skills/living-doc-update/SKILL.md` | Updating, promoting, or deprecating an entity or AC; changing a Feature's dependencies |
| `living-doc-impact-analysis` | Trace which entities a code change affects | `skills/living-doc-impact-analysis/SKILL.md` | PR review or change-trace request |
| `living-doc-gap-finder` | Find catalog gaps (top-down) and uncovered ACs (bottom-up) | `skills/living-doc-gap-finder/SKILL.md` | HEALING mode, gap audit, or scenario gap detection |

Expand Down
16 changes: 16 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ See [Token-Saving Skill](../docs/guides/token-saving.md) for details, including

---

## BDD Artifacts

When working with living documentation and BDD automation, use these standard artifact locations:
- **Business Seed:** `.copilot/bdd/seed.yaml` — App configuration, routes, test users, form fixtures
- **Exploration Manifest:** `.copilot/bdd/manifest.json` — Discovered surfaces, PageObject paths, UI elements
- **Project Profile:** `.copilot/bdd/.project-profile.yaml` — BDD conventions for this project
- **Feature Files (User Story):** `features/liv_doc_us/` — E2E scenarios linked to User Stories
- **Feature Files (Functionality):** `features/liv_doc_func/` — System-test scenarios linked to Functionalities
- **PageObjects:** `playwright/pages/` — Locators and page interaction methods
- **Step Definitions:** `playwright/steps/` — Gherkin step implementations
- **Living Doc Catalog:** `docs/living-doc/` — User Stories, Features, Functionalities, and Acceptance Criteria

These paths are configurable in `.copilot/bdd/.project-profile.yaml`.

---

## PR Review

When reviewing a pull request, load and apply:
Expand Down
Loading
Loading