universal-dev-standards 6.0.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/ai/options/commit-message/bilingual.ai.yaml +19 -1
- package/bundled/ai/standards/checkin-standards.ai.yaml +3 -3
- package/bundled/ai/standards/documentation-writing-standards.ai.yaml +1 -1
- package/bundled/ai/standards/frontend-design-standards.ai.yaml +33 -3
- package/bundled/ai/standards/push-standards.ai.yaml +14 -3
- package/bundled/ai/standards/requirement-engineering.ai.yaml +42 -3
- package/bundled/ai/standards/self-review-protocol.ai.yaml +15 -10
- package/bundled/ai/standards/verification-evidence.ai.yaml +88 -5
- package/bundled/core/checkin-standards.md +3 -3
- package/bundled/core/documentation-writing-standards.md +1 -1
- package/bundled/core/feature-discovery-standards.md +191 -0
- package/bundled/core/frontend-design-standards.md +93 -4
- package/bundled/core/multi-environment-e2e-testing.md +195 -0
- package/bundled/core/push-standards.md +82 -0
- package/bundled/core/requirement-engineering.md +2 -2
- package/bundled/core/self-review-protocol.md +13 -8
- package/bundled/core/verification-evidence.md +170 -10
- package/bundled/locales/COVERAGE.md +27 -21
- package/bundled/locales/zh-CN/CHANGELOG.md +38 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/MAINTENANCE.md +42 -661
- package/bundled/locales/zh-CN/README.md +10 -10
- package/bundled/locales/zh-CN/SECURITY.md +2 -2
- package/bundled/locales/zh-CN/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +17 -7
- package/bundled/locales/zh-CN/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-CN/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-CN/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-CN/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-CN/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/full-coverage-testing.md +74 -2
- package/bundled/locales/zh-CN/core/license-compliance.md +3 -1
- package/bundled/locales/zh-CN/core/logging-standards.md +83 -7
- package/bundled/locales/zh-CN/core/mock-boundary.md +58 -6
- package/bundled/locales/zh-CN/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-CN/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-CN/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-CN/core/replay-test.md +1 -1
- package/bundled/locales/zh-CN/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-CN/core/security-testing.md +24 -7
- package/bundled/locales/zh-CN/core/self-review-protocol.md +17 -12
- package/bundled/locales/zh-CN/core/smoke-test.md +1 -1
- package/bundled/locales/zh-CN/core/verification-evidence.md +252 -41
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +38 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/MAINTENANCE.md +32 -8
- package/bundled/locales/zh-TW/README.md +10 -10
- package/bundled/locales/zh-TW/SECURITY.md +2 -2
- package/bundled/locales/zh-TW/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-TW/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-TW/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-TW/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-TW/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-TW/core/license-compliance.md +3 -1
- package/bundled/locales/zh-TW/core/logging-standards.md +2 -2
- package/bundled/locales/zh-TW/core/mock-boundary.md +1 -1
- package/bundled/locales/zh-TW/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-TW/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-TW/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-TW/core/replay-test.md +1 -1
- package/bundled/locales/zh-TW/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-TW/core/security-testing.md +24 -7
- package/bundled/locales/zh-TW/core/self-review-protocol.md +16 -11
- package/bundled/locales/zh-TW/core/smoke-test.md +1 -1
- package/bundled/locales/zh-TW/core/verification-evidence.md +260 -31
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +1 -1
- package/bundled/skills/brainstorm-assistant/SKILL.md +22 -20
- package/bundled/skills/brainstorm-assistant/guide.md +10 -7
- package/bundled/skills/spec-driven-dev/SKILL.md +11 -0
- package/package.json +3 -3
- package/src/commands/check.js +23 -13
- package/src/commands/init.js +58 -17
- package/src/i18n/messages.js +6 -6
- package/standards-registry.json +10 -10
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Feature Discovery Standards
|
|
2
|
+
|
|
3
|
+
> **Version**: 1.0.0 | **Status**: Active | **Updated**: 2026-05-13
|
|
4
|
+
> **AI-optimized version**: `ai/standards/feature-discovery-standards.ai.yaml`
|
|
5
|
+
> **Spec**: XSPEC-202 (cross-project/specs/XSPEC-202-feature-discovery-standards.md); related: XSPEC-199/200/201 (migration completeness protocol suite)
|
|
6
|
+
|
|
7
|
+
**Scope**: universal
|
|
8
|
+
**Applicability**: Any legacy-system migration, refactor, or reverse-engineering effort that must produce an exhaustive feature list before change
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
This standard defines a language-agnostic methodology for **exhaustive feature discovery**
|
|
13
|
+
in legacy systems. Its pipeline position is the first of three stages:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
feature-discovery-standards (FIND) → feature-manifest-standard (REPRESENT) → behavior-snapshot (VERIFY)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The methodology rests on one non-negotiable idea, **Deterministic-First**, and provides:
|
|
20
|
+
a **Software Form Taxonomy** to pick the right extraction strategy per system type,
|
|
21
|
+
**five static foundations** to run against source alone, a **dynamic observation
|
|
22
|
+
protocol** for systems that can be executed, a **human observation protocol** as last
|
|
23
|
+
resort, and a **cross-layer validation matrix** that merges every foundation's output
|
|
24
|
+
into confidence-scored feature candidates.
|
|
25
|
+
|
|
26
|
+
## Core Principle: Deterministic-First
|
|
27
|
+
|
|
28
|
+
> AI cannot tell you what it doesn't know it doesn't know. RAG solves "find details
|
|
29
|
+
> about a known feature." It does NOT solve "discover that this feature exists."
|
|
30
|
+
> Exhaustive feature discovery requires deterministic tools (grep/AST/log/schema) —
|
|
31
|
+
> not AI inference.
|
|
32
|
+
|
|
33
|
+
- **Blocking rule**: if deterministic extraction artifacts are absent when entering the
|
|
34
|
+
Discovery Phase, the AI MUST output `[BLOCKED] Missing deterministic extraction
|
|
35
|
+
artifacts. Run extraction tools first before AI analysis.` and MUST NOT proceed.
|
|
36
|
+
- **RAG prohibition**: during the Discovery Phase, AI is PROHIBITED from generating the
|
|
37
|
+
feature list through inference or RAG retrieval alone — because AI will not report
|
|
38
|
+
what it doesn't know it missed; only deterministic tools produce exhaustive lists.
|
|
39
|
+
- **AI's permitted role in Discovery**: classify extracted items into feature
|
|
40
|
+
categories, assign confidence scores to candidates, and fill in business-purpose
|
|
41
|
+
descriptions for confirmed entries. AI must NOT generate the initial feature list.
|
|
42
|
+
|
|
43
|
+
## Software Form Taxonomy
|
|
44
|
+
|
|
45
|
+
Identify the software's form **before** choosing an extraction strategy. If ambiguous,
|
|
46
|
+
check the detection signals below or ask the user to confirm.
|
|
47
|
+
|
|
48
|
+
| Form | Key Entry Points | Primary Detection Signal | Fastest Extraction Tool |
|
|
49
|
+
|------|-------------------|---------------------------|--------------------------|
|
|
50
|
+
| **web** | Route definitions, HTTP handlers, middleware | `routes/`/`app/Http/` dir; express/fastify/hono/django/flask/fastapi deps | `grep` route definitions; DB schema extraction; access-log analysis |
|
|
51
|
+
| **cli** | `main()` + arg-parser registrations, shell completions | argparse/click/cobra/clap/typer import; `cmd/` dir; no listen calls | Run `--help` recursively; `grep -rE 'ArgumentParser\|click\.command\|cobra\.Command'` |
|
|
52
|
+
| **gui** | Menu/button handlers, UI definition files | `.ui`/`.fxml`/`.xib`/`.storyboard` files; `QMainWindow`/`JFrame`/`Activity` subclasses | `find . -name '*.ui' -o -name '*.fxml'`; grep event-listener patterns |
|
|
53
|
+
| **daemon** | `main()` + event loop, signal handlers, socket bind/listen | systemd `.service` unit; `signal()`/`bind()`/`listen()` calls; no UI imports | `grep -rE 'signal\(\|SIGTERM\|SIGUSR'`; parse config schema |
|
|
54
|
+
| **library** | Public API surface, header files, `index.d.ts`/`__init__.py` exports | No `main()`; `package.json` `exports`; header files with public markers | `cat index.d.ts` / `__init__.py`; `nm <binary> \| grep ' T '`; analyze existing tests as API spec |
|
|
55
|
+
| **mobile** | Activity/Fragment (Android), UIViewController/SwiftUI View (iOS), deep links, push handlers | `AndroidManifest.xml`; `Info.plist`; `extends Activity`; `UIApplicationDelegate` | `grep android:name` in manifest; `grep CFBundleURLTypes` in Info.plist |
|
|
56
|
+
| **embedded** | Interrupt handlers (ISR), main control loop, protocol parsers, watchdog/timer handlers | `ISR()` macro; `HAL_` prefix functions; no OS process model | `grep -rE 'ISR\(\|__interrupt\|_irq_handler'`; parse linker script (`.ld`) |
|
|
57
|
+
|
|
58
|
+
## Five Static Foundations
|
|
59
|
+
|
|
60
|
+
Apply to **all** software forms when git history, access logs, and runtime execution are
|
|
61
|
+
unavailable. Execute in order 1→5 — do not skip any foundation even if earlier ones seem
|
|
62
|
+
comprehensive, since each catches a different category of feature. **Any item appearing
|
|
63
|
+
in any foundation is a confirmed feature candidate**; merge results into the cross-layer
|
|
64
|
+
validation matrix before writing `feature-manifest.yaml`.
|
|
65
|
+
|
|
66
|
+
| Order | Foundation | What It Catches | Output |
|
|
67
|
+
|-------|-----------|------------------|--------|
|
|
68
|
+
| 1 | **Entry Points** | Direct feature invocation points — the most reliable foundation | Entry point inventory (file:line, handler name, interaction type) |
|
|
69
|
+
| 2 | **Call Graph** | Hidden logic reachable from entry points (nested logic, utility wrappers) | Call graph + dead-code candidate list |
|
|
70
|
+
| 3 | **String Mining** | UI strings, error messages, log calls — features and boundary conditions | String corpus, fed to AI for classification *after* collection |
|
|
71
|
+
| 4 | **Resource Files** | i18n/l10n keys, icons, config schemas, templates — often the most complete inventory | Resource inventory (i18n keys, icon names, config options, template names) |
|
|
72
|
+
| 5 | **External Interfaces** | File I/O, network calls, process execution, env vars — frequently missed because they read as utility code | External interface inventory |
|
|
73
|
+
|
|
74
|
+
Notes that matter in practice:
|
|
75
|
+
|
|
76
|
+
- **Call Graph dead code**: functions unreachable from any entry point are dead-code
|
|
77
|
+
candidates OR dynamic-dispatch targets (virtual functions, reflection). Flag for
|
|
78
|
+
human review — do not silently exclude.
|
|
79
|
+
- **String Mining value**: each unique error message is a boundary condition and a test
|
|
80
|
+
scenario.
|
|
81
|
+
- **Resource Files i18n value**: i18n file keys are often the most complete inventory of
|
|
82
|
+
all UI elements — each key maps to one visible feature element.
|
|
83
|
+
|
|
84
|
+
## Dynamic Observation Protocol
|
|
85
|
+
|
|
86
|
+
Use whenever the legacy system can be executed — even partially, even in a degraded/dev
|
|
87
|
+
mode — with a person familiar with the system available to demonstrate realistic usage.
|
|
88
|
+
Running the system once with tracing enabled produces a definitive reachability map that
|
|
89
|
+
static analysis cannot match; **prefer dynamic observation over static analysis when
|
|
90
|
+
available** (static foundations remain required — dynamic observation complements, not
|
|
91
|
+
replaces them).
|
|
92
|
+
|
|
93
|
+
- **Linux**: `strace -f -o trace.log` (syscalls), `ltrace -f -o ltrace.log` (library
|
|
94
|
+
calls), `lsof -p <pid>` (open files/sockets), `tcpdump -i any -w net.pcap` (network).
|
|
95
|
+
- **macOS**: `fswatch` (filesystem events), `dtrace` (syscall probes), `tcpdump`.
|
|
96
|
+
- **Windows**: Process Monitor / Sysinternals ProcMon (file/registry/network/process),
|
|
97
|
+
WireShark (network).
|
|
98
|
+
- **Universal code coverage**: gcov/lcov (C/C++), coverage.py (Python), JaCoCo (Java),
|
|
99
|
+
nyc/c8 (JS/TS), `go test -coverprofile` (Go) — code coverage with **real usage
|
|
100
|
+
scenarios** produces a definitive map of reachable code.
|
|
101
|
+
|
|
102
|
+
Recommended workflow: (1) have a domain expert demonstrate a complete typical workday,
|
|
103
|
+
(2) run strace/coverage in parallel during the demonstration, (3) replay the
|
|
104
|
+
demonstration 3 times for edge cases, (4) analyze the trace for system calls, files
|
|
105
|
+
accessed, and URLs called.
|
|
106
|
+
|
|
107
|
+
## Human Observation Protocol
|
|
108
|
+
|
|
109
|
+
Last resort — required when the system cannot run, domain experts are unavailable for
|
|
110
|
+
tracing, or features are triggered only by rare business events.
|
|
111
|
+
|
|
112
|
+
- **User Demo Recording**: have 1-2 heavy users screen-record (with audio) a full
|
|
113
|
+
typical workday; review for interactions not captured elsewhere; pay special attention
|
|
114
|
+
to keyboard shortcuts, context menus, and power-user workflows.
|
|
115
|
+
- **Support Ticket Mining**: search 6-12 months of support tickets/Jira/GitHub issues;
|
|
116
|
+
each recurring issue type is a boundary condition or edge-case feature; tickets
|
|
117
|
+
requesting "restore old behavior" are high-risk migration targets; group by frequency.
|
|
118
|
+
- **Internal Knowledge Mining**: internal wiki/Confluence, Slack/Teams history, email
|
|
119
|
+
threads about system behavior, old (even informal) release notes.
|
|
120
|
+
|
|
121
|
+
**Confidence assignment**:
|
|
122
|
+
|
|
123
|
+
| State | Confidence | Meaning | Action |
|
|
124
|
+
|-------|-----------|---------|--------|
|
|
125
|
+
| Human-observed, unverified | 0.7 | Confirmed by user observation, not yet located in source | Add to manifest at 0.7; find source code before AC generation |
|
|
126
|
+
| Human-observed, code-located | 1.0 | Confirmed by user AND verified in code | Upgrade to 1.0 after locating the code |
|
|
127
|
+
|
|
128
|
+
## Cross-Layer Validation Matrix
|
|
129
|
+
|
|
130
|
+
After running all applicable foundations, merge results into this matrix. **Any item
|
|
131
|
+
with at least one checkmark is a confirmed feature candidate** for the manifest; items
|
|
132
|
+
with zero checkmarks across all applicable layers are dead-code candidates — flag for
|
|
133
|
+
human review, never silently exclude.
|
|
134
|
+
|
|
135
|
+
| Column | Source |
|
|
136
|
+
|--------|--------|
|
|
137
|
+
| Entry Point | Foundation 1: Entry Points |
|
|
138
|
+
| DB/Schema | Foundation 1 (web): DB schema; data file for other forms |
|
|
139
|
+
| Log/Dynamic | Access log (web) or dynamic observation trace |
|
|
140
|
+
| UI/Resource | Foundation 3 (String Mining) + Foundation 4 (Resource Files) |
|
|
141
|
+
| Notification/External | Foundation 5: External Interfaces |
|
|
142
|
+
| Git/History | `git log --grep` / commit history, if available |
|
|
143
|
+
| Human | Human observation protocol |
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
confidence = (columns_with_checkmark) / (columns_applicable_to_this_form)
|
|
147
|
+
Minimum to include in feature-manifest: ≥ 1 checkmark in any column
|
|
148
|
+
Confidence < 0.5: flag for human review before AC generation
|
|
149
|
+
Confidence < 0.3: require human confirmation before including in manifest
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Example:
|
|
153
|
+
|
|
154
|
+
| Feature Candidate | Entry Point | DB/Schema | Log/Dynamic | UI/Resource | Notification/Ext | Git/History | Human | Confidence |
|
|
155
|
+
|---|---|---|---|---|---|---|---|---|
|
|
156
|
+
| UserLogin | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 1.0 |
|
|
157
|
+
| MonthlyReconcile | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | 0.71 |
|
|
158
|
+
| AdminUserDelete | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | 0.57 |
|
|
159
|
+
|
|
160
|
+
Each confirmed row becomes an `FM-NNN` entry per `feature-manifest-standard`; the
|
|
161
|
+
confidence value from this matrix becomes the manifest's `confidence` field.
|
|
162
|
+
|
|
163
|
+
## Rules
|
|
164
|
+
|
|
165
|
+
| Rule | Trigger | Instruction | Priority |
|
|
166
|
+
|------|---------|--------------|----------|
|
|
167
|
+
| `deterministic-first` | Starting feature discovery for any legacy system | Require deterministic extraction results before generating any feature list; if absent, output `[BLOCKED]` and list applicable tools for the detected form | required |
|
|
168
|
+
| `no-rag-for-discovery` | Feature discovery phase | Do NOT use RAG/long-context inference alone to generate the initial feature list; RAG is permitted only to fill in details of already-identified features | required |
|
|
169
|
+
| `identify-form-first` | Starting feature discovery | Identify the software form using detection signals before selecting an extraction strategy; ask the user to confirm if ambiguous | required |
|
|
170
|
+
| `apply-all-static-foundations` | Source-only analysis (no git, no log, no runtime) | Execute all five static foundations in order; merge all candidate lists into the cross-layer matrix | required |
|
|
171
|
+
| `prefer-dynamic-observation` | Legacy system can be executed in any environment | Prefer dynamic observation (strace/coverage + expert demo) over static analysis alone; static foundations remain required | recommended |
|
|
172
|
+
| `human-observation-for-gaps` | A feature candidate cannot be confirmed by any tool-based foundation | Escalate to human observation; assign confidence 0.7 for human-observed/code-unverified; never include confidence < 0.3 without explicit human confirmation | required |
|
|
173
|
+
| `matrix-before-manifest` | Generating `feature-manifest.yaml` | Complete the cross-layer validation matrix first; only ≥1-checkmark items become `FM-NNN` entries; zero-checkmark items go to a separate `dead_code_candidates` list | required |
|
|
174
|
+
| `dead-code-handling` | Call graph analysis reveals unreachable code | Never silently exclude unreachable functions; list as `dead_code_candidates`; account for dynamic dispatch; require human confirmation before classifying as dead code | required |
|
|
175
|
+
|
|
176
|
+
## Related Standards
|
|
177
|
+
|
|
178
|
+
- `feature-manifest-standard` — represents confirmed candidates as `FM-NNN` entries
|
|
179
|
+
- `behavior-snapshot` — verifies the manifest against observed runtime behavior
|
|
180
|
+
- `reverse-engineering-standards` — broader legacy reverse-engineering process this
|
|
181
|
+
standard feeds into
|
|
182
|
+
- `anti-hallucination` — the deterministic-first / no-inference-alone discipline this
|
|
183
|
+
standard applies to feature discovery specifically
|
|
184
|
+
- `acceptance-criteria-traceability` — confirmed features become AC-traceable units
|
|
185
|
+
- `refactoring-standards` — discovery precedes any refactor of legacy code
|
|
186
|
+
|
|
187
|
+
## Changelog
|
|
188
|
+
|
|
189
|
+
| Version | Date | Changes |
|
|
190
|
+
|---------|------|---------|
|
|
191
|
+
| v1.0.0 | 2026-05-13 | Initial — Deterministic-First principle, Software Form Taxonomy (7 forms), five static foundations, dynamic/human observation protocols, cross-layer validation matrix (XSPEC-202) |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/frontend-design-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 1.
|
|
6
|
-
**Last Updated**: 2026-
|
|
5
|
+
**Version**: 1.1.0
|
|
6
|
+
**Last Updated**: 2026-07-10
|
|
7
7
|
**Applicability**: All projects with frontend user interfaces
|
|
8
8
|
**Scope**: universal
|
|
9
9
|
**References**: [DEC-029](https://github.com/VoltAgent/awesome-design-md) (awesome-design-md, MIT), DEC-030 (OpenAI Frontend Guide)
|
|
@@ -41,8 +41,9 @@ The goal is to ensure AI agents produce consistent, high-quality UI across diffe
|
|
|
41
41
|
13. [Spacing Scale](#spacing-scale)
|
|
42
42
|
14. [UI Hard Constraints](#ui-hard-constraints)
|
|
43
43
|
15. [Anti-patterns](#anti-patterns)
|
|
44
|
-
16. [
|
|
45
|
-
17. [
|
|
44
|
+
16. [Optional Extension: Token Interpolation & Structured Components](#optional-extension-token-interpolation--structured-components)
|
|
45
|
+
17. [DESIGN.md File Placement](#designmd-file-placement)
|
|
46
|
+
18. [Validation Checklist](#validation-checklist)
|
|
46
47
|
|
|
47
48
|
---
|
|
48
49
|
|
|
@@ -417,6 +418,88 @@ Minimum required: at least 5 anti-patterns must be explicitly listed in every DE
|
|
|
417
418
|
|
|
418
419
|
---
|
|
419
420
|
|
|
421
|
+
## Optional Extension: Token Interpolation & Structured Components
|
|
422
|
+
|
|
423
|
+
> **Status**: Optional, Trial (added v1.1.0, 2026-07-10). Does **not** replace the mandatory 9-section structure or the governance-collapsed 5-token/4-role/7-step scales above — this is an additive machine-parseable layer for projects that want DESIGN.md itself to carry structured token references, not just prose. A DESIGN.md that omits this extension is still fully compliant.
|
|
424
|
+
>
|
|
425
|
+
> **Origin**: 2026-07-10 re-alignment review of [DEC-029](https://github.com/VoltAgent/awesome-design-md)'s upstream (grown from 4,385★ to 99,219★ and now officially the Google Stitch DESIGN.md format) found the upstream format evolved YAML frontmatter token dictionaries and `{category.token}` interpolation syntax, plus a structured `components:` binding block — capabilities this standard's original prose-only sections did not have. Adopted as an opt-in extension rather than a breaking change, consistent with this standard's deliberate 5-token governance collapse (adding more tokens is *not* the goal; making the 5 tokens *referenceable* is).
|
|
426
|
+
|
|
427
|
+
### Token Registry (YAML Frontmatter)
|
|
428
|
+
|
|
429
|
+
A DESIGN.md may optionally begin with a YAML frontmatter block declaring the semantic tokens from Sections 2/3/5 (and Section 4's border-radius scale) in machine-parseable key-value form, so tooling can resolve `{category.token}` references without re-parsing prose.
|
|
430
|
+
|
|
431
|
+
```yaml
|
|
432
|
+
---
|
|
433
|
+
colors:
|
|
434
|
+
background: "#0A0A0A"
|
|
435
|
+
surface: "#1A1A1A"
|
|
436
|
+
primary-text: "#F5F5F5"
|
|
437
|
+
muted-text: "#888888"
|
|
438
|
+
accent: "#6366F1"
|
|
439
|
+
typography:
|
|
440
|
+
display: { size: "48px", weight: 700, line-height: 1.1 }
|
|
441
|
+
headline: { size: "24px", weight: 600, line-height: 1.3 }
|
|
442
|
+
body: { size: "16px", weight: 400, line-height: 1.6 }
|
|
443
|
+
caption: { size: "13px", weight: 400, line-height: 1.4 }
|
|
444
|
+
rounded:
|
|
445
|
+
sm: "4px"
|
|
446
|
+
md: "8px"
|
|
447
|
+
lg: "12px"
|
|
448
|
+
pill: "9999px"
|
|
449
|
+
spacing:
|
|
450
|
+
sm: "8px"
|
|
451
|
+
md: "24px"
|
|
452
|
+
lg: "48px"
|
|
453
|
+
---
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Rules**:
|
|
457
|
+
- The frontmatter keys (`colors`, `typography`, `rounded`, `spacing`) map 1:1 to the token vocabularies already defined in Sections 2/3/5 — this block **restates** those tokens in parseable form, it does not introduce new ones. `colors` values must match the 5 mandatory semantic tokens (plus any optional extended tokens already in use).
|
|
458
|
+
- Frontmatter is optional. A DESIGN.md without it is still valid; tooling that wants interpolation support requires it.
|
|
459
|
+
|
|
460
|
+
### Interpolation Syntax
|
|
461
|
+
|
|
462
|
+
Within the prose sections (particularly Section 4: Component Styling), `{category.token}` references the frontmatter registry instead of restating raw values:
|
|
463
|
+
|
|
464
|
+
```markdown
|
|
465
|
+
### Buttons
|
|
466
|
+
- **Primary**: `{colors.accent}` background, `{colors.background}` text, `{rounded.md}` radius, `{spacing.sm}` padding
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Rules**:
|
|
470
|
+
- Syntax is `{category.token}` — category matches a frontmatter top-level key, token matches a key within it.
|
|
471
|
+
- A reference to a category/token not present in frontmatter is a validation error, not a silent fallback.
|
|
472
|
+
- Interpolation is for **documentation/tooling clarity**, not a runtime templating engine — DESIGN.md remains a static specification file.
|
|
473
|
+
|
|
474
|
+
### Structured Components Block (Optional)
|
|
475
|
+
|
|
476
|
+
Section 4 (Component Styling) may optionally include a `components:` block that binds a component to its token references explicitly, instead of (or alongside) the prose format already in Section 4's example:
|
|
477
|
+
|
|
478
|
+
```yaml
|
|
479
|
+
components:
|
|
480
|
+
button-primary:
|
|
481
|
+
backgroundColor: "{colors.accent}"
|
|
482
|
+
textColor: "{colors.background}"
|
|
483
|
+
rounded: "{rounded.md}"
|
|
484
|
+
padding: "{spacing.sm}"
|
|
485
|
+
card:
|
|
486
|
+
backgroundColor: "{colors.surface}"
|
|
487
|
+
rounded: "{rounded.lg}"
|
|
488
|
+
padding: "{spacing.md}"
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
**Rules**:
|
|
492
|
+
- Every value must be a `{category.token}` reference — raw hex/px values inside `components:` are an anti-pattern (defeats the purpose of centralizing tokens).
|
|
493
|
+
- This block is additive to, not a replacement for, Section 4's prose description — projects using this extension should still fill Section 4's prose fields for human readers.
|
|
494
|
+
|
|
495
|
+
### Non-goals (explicitly not adopted from upstream)
|
|
496
|
+
|
|
497
|
+
- **No lint CLI bundled with this standard** — the upstream ecosystem has a separate `@google/design.md` npm package for validation; this standard does not mandate or bundle a specific validator. Projects may adopt one independently.
|
|
498
|
+
- **No framework-specific export formats** (React/Vue/CSS-in-JS generators) — stays framework-agnostic per this standard's Key Principles (semantic token naming, framework-agnostic).
|
|
499
|
+
- **No expansion of the 5/4/7 token counts** — the interpolation syntax makes the existing tokens referenceable; it is not licence to add more tokens. Governance collapse (fewer tokens = more consistent AI output) remains the priority over granularity.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
420
503
|
## DESIGN.md File Placement
|
|
421
504
|
|
|
422
505
|
DESIGN.md must be placed at the **project root directory**, at the same level as README.md.
|
|
@@ -472,3 +555,9 @@ Use this checklist to verify a DESIGN.md is compliant with this standard:
|
|
|
472
555
|
- [ ] Style summary present (1–2 sentences)
|
|
473
556
|
- [ ] Key constraints bullet list present
|
|
474
557
|
- [ ] Tone defined
|
|
558
|
+
|
|
559
|
+
### Token Interpolation Extension (Optional — v1.1.0)
|
|
560
|
+
- [ ] If frontmatter token registry is used, all `colors` keys match the 5 mandatory semantic tokens
|
|
561
|
+
- [ ] If `{category.token}` interpolation is used, every reference resolves to a frontmatter entry (no dangling references)
|
|
562
|
+
- [ ] If `components:` block is used, every value is a `{category.token}` reference (no raw hex/px values)
|
|
563
|
+
- [ ] Absence of this extension is **not** a compliance failure — it is optional
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Multi-Environment E2E Testing Standards
|
|
2
|
+
|
|
3
|
+
> **Version**: 1.0.0 | **Status**: Active | **Updated**: 2026-05-13
|
|
4
|
+
> **AI-optimized version**: `ai/standards/multi-environment-e2e-testing.ai.yaml`
|
|
5
|
+
> **Spec**: XSPEC-204 (UDS Issue #94, #95)
|
|
6
|
+
|
|
7
|
+
**Scope**: universal
|
|
8
|
+
**Applicability**: Any project whose E2E tests must run against more than one deployment
|
|
9
|
+
target (local, local-IIS, UAT, PRD, etc.)
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
This standard defines how to configure E2E tests across multiple deployment targets. Its
|
|
14
|
+
core principle is **Executable Environment Documentation**: *the run command IS the
|
|
15
|
+
documentation*. Each environment gets one entry-point script that self-checks its own
|
|
16
|
+
prerequisites and runs the correct test subset — so the script itself becomes the
|
|
17
|
+
authoritative environment setup guide, instead of scattered knowledge in a README, a
|
|
18
|
+
wiki page, and verbal tribal knowledge.
|
|
19
|
+
|
|
20
|
+
> **Anti-pattern**: manually editing `BASE_URL` in `.env` before test runs. This breaks
|
|
21
|
+
> other developers' configs and cannot be committed without affecting everyone.
|
|
22
|
+
|
|
23
|
+
## Test Framework Multi-Environment Config
|
|
24
|
+
|
|
25
|
+
**Rule**: `BASE_URL` is baked into the test-project config, not read from `.env`. If
|
|
26
|
+
`BASE_URL` comes from `.env`, developers must edit `.env` before running against a
|
|
27
|
+
specific environment — a race condition in teams, and a source of accidental commits of
|
|
28
|
+
the wrong URL.
|
|
29
|
+
|
|
30
|
+
Playwright — one config, one project per environment:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// playwright.config.ts
|
|
34
|
+
const ENVS = {
|
|
35
|
+
'local-iis': 'http://localhost/corp',
|
|
36
|
+
'local-iis-express': 'http://localhost:18080/lotest',
|
|
37
|
+
'uat': 'http://portal_uat.example.com/app',
|
|
38
|
+
'prd': 'https://app.example.com',
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
projects: Object.entries(ENVS).map(([name, url]) => ({
|
|
43
|
+
name,
|
|
44
|
+
use: { browserName: 'chromium', baseURL: url },
|
|
45
|
+
})),
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Cypress — pass the target via `--env target=uat`, defaulting to `local`:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// cypress.config.ts
|
|
53
|
+
const ENVS = {
|
|
54
|
+
'local': { baseUrl: 'http://localhost:3000' },
|
|
55
|
+
'uat': { baseUrl: 'http://uat.example.com' },
|
|
56
|
+
'prd': { baseUrl: 'https://app.example.com' },
|
|
57
|
+
};
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Rules:
|
|
61
|
+
|
|
62
|
+
- One test config file; distinguish environments via project name or a `--project` /
|
|
63
|
+
`--env` flag.
|
|
64
|
+
- No environment-specific `playwright.config.*.ts` / `cypress.config.*.ts` files.
|
|
65
|
+
- `BASE_URL` is never sourced from `.env` for E2E test configs.
|
|
66
|
+
|
|
67
|
+
## Runner Script Pattern
|
|
68
|
+
|
|
69
|
+
**Rule**: each environment has one entry-point script,
|
|
70
|
+
`scripts/run-tests-<env>.(ps1|sh)`, that self-checks prerequisites before invoking the
|
|
71
|
+
test runner. Prerequisite checks typically cover: Docker/container runtime, application
|
|
72
|
+
health endpoint, database connectivity (if separate from the app), and any other
|
|
73
|
+
required environment-specific services.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
#!/bin/bash
|
|
77
|
+
# scripts/run-tests-local.sh
|
|
78
|
+
|
|
79
|
+
# 1. Check Docker
|
|
80
|
+
if ! docker info > /dev/null 2>&1; then
|
|
81
|
+
echo "ERROR: Docker is not running." >&2
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# 2. Check App
|
|
86
|
+
if ! curl -s -f http://localhost:3000/health > /dev/null 2>&1; then
|
|
87
|
+
echo "ERROR: App not responding at http://localhost:3000" >&2
|
|
88
|
+
exit 1
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
npx playwright test --project=local "$@"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
(The PowerShell equivalent follows the same three steps: check Docker, check the app
|
|
95
|
+
health endpoint, then run `npx playwright test --project=<env>`.)
|
|
96
|
+
|
|
97
|
+
## Environment Capability Matrix
|
|
98
|
+
|
|
99
|
+
**Rule**: projects with external dependencies (HTTP services, IdP, payment, messaging)
|
|
100
|
+
MUST maintain an environment capability matrix committed to the repository —
|
|
101
|
+
`docs/testing/environment-capability-matrix.md` or inline in the testing README. Update
|
|
102
|
+
it whenever a new external service dependency is added.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
## Environment Capability Matrix
|
|
106
|
+
|
|
107
|
+
| Service / Feature | local-dev | local-iis | UAT | PRD |
|
|
108
|
+
|-------------------|:---------:|:---------:|:---:|:---:|
|
|
109
|
+
| Auth / SAML | ⚠️ Keycloak stub | ✅ Keycloak local | ✅ Keycloak UAT | ✅ Enterprise IdP |
|
|
110
|
+
| SMS Gateway | ⚠️ stub-server | ⚠️ stub-server | ⚠️ stub-server / ❌ | ✅ Real Gateway + billing |
|
|
111
|
+
| Payment / Finance | ⚠️ stub-server | ⚠️ stub-server | ⚠️ partial | ✅ Real + reconciliation |
|
|
112
|
+
| Background Jobs | ✅ in-process | ✅ in-process | ✅ | ✅ |
|
|
113
|
+
| File Storage | ✅ local | ✅ local | ✅ blob | ✅ blob |
|
|
114
|
+
|
|
115
|
+
Legend: ✅ Full verification possible · ⚠️ Flow passes but through a stub (real-world
|
|
116
|
+
dimensions NOT verified) · ❌ Cannot test in this environment
|
|
117
|
+
|
|
118
|
+
### Dimensions NOT verifiable in UAT (must defer to PRD smoke)
|
|
119
|
+
- SMS: billing correctness, carrier delivery confirmation, DR reporting
|
|
120
|
+
- Payment: real debit/credit, bank reconciliation, card validation
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## CI Gate Mapping
|
|
124
|
+
|
|
125
|
+
**Rule**: map each CI/CD stage to the environment(s) it must pass, and document which
|
|
126
|
+
gate must pass before each deployment stage.
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
# .github/workflows/ci.yml or .gitlab-ci.yml
|
|
130
|
+
e2e-smoke-gate: # Must pass → any deployment
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
script: scripts/run-tests-local.sh --grep smoke
|
|
133
|
+
|
|
134
|
+
e2e-uat-gate: # Must pass → PRD deployment
|
|
135
|
+
environment: uat
|
|
136
|
+
script: scripts/run-tests-uat.sh
|
|
137
|
+
only: [tags, release-branches]
|
|
138
|
+
|
|
139
|
+
e2e-prd-smoke: # Must pass → mark release as stable
|
|
140
|
+
environment: prd
|
|
141
|
+
script: scripts/run-tests-prd-smoke.sh
|
|
142
|
+
only: [tags]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
| Deployment Stage | Required Gates |
|
|
146
|
+
|-------------------|-----------------|
|
|
147
|
+
| Before staging deploy | unit tests, integration tests, e2e-smoke-gate |
|
|
148
|
+
| Before UAT deploy | all staging gates, e2e-uat-gate (if a UAT environment is available) |
|
|
149
|
+
| Before PRD deploy | e2e-uat-gate, sign-off from capability-matrix review |
|
|
150
|
+
| After PRD deploy | e2e-prd-smoke, within 10 minutes of deploy |
|
|
151
|
+
|
|
152
|
+
## Credential Handling
|
|
153
|
+
|
|
154
|
+
**Rule**: separate what goes into git from what stays gitignored.
|
|
155
|
+
|
|
156
|
+
- **Commit to git**: base URLs per environment (non-secret, team-shared), test
|
|
157
|
+
usernames for non-PRD environments, feature flags and test configuration,
|
|
158
|
+
self-check scripts with no credentials embedded.
|
|
159
|
+
- **Gitignore**: passwords and secrets, API keys and tokens, `.env.test.local`
|
|
160
|
+
(personal overrides).
|
|
161
|
+
- **CI secrets**: PRD test passwords are passed via CI secret variables (GitHub
|
|
162
|
+
Secrets / GitLab CI Variables) — never committed.
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
# Test credentials
|
|
166
|
+
.env.test.local
|
|
167
|
+
tests/fixtures/auth-secrets.json
|
|
168
|
+
# Base URLs and non-secrets are committed; see playwright.config.ts
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Rules
|
|
172
|
+
|
|
173
|
+
| Rule | Trigger | Instruction | Priority |
|
|
174
|
+
|------|---------|--------------|----------|
|
|
175
|
+
| `base-url-in-config` | Setting up E2E tests for a project with multiple environments | Define all environment `BASE_URL`s in the test framework config as named projects; do not rely on `.env` for `BASE_URL` | required |
|
|
176
|
+
| `one-runner-per-env` | Adding a new deployment target | Create `scripts/run-tests-<env>.(ps1\|sh)` with self-checking prerequisite steps; verify all required services before invoking the test runner | required |
|
|
177
|
+
| `capability-matrix-required` | Feature has external service dependencies (SMS, payment, IdP, file storage) | Create or update the environment capability matrix; mark ✅/⚠️/❌ per service × environment; list dimensions not verifiable in UAT as "PRD-only smoke" | required |
|
|
178
|
+
| `ci-gate-mapping` | Defining CI/CD pipeline stages | Map each CI gate to the environment(s) it must pass; the E2E gate must specify which environment it targets | required |
|
|
179
|
+
|
|
180
|
+
## Relationship to Other Standards
|
|
181
|
+
|
|
182
|
+
- **`deployment-standards`** — extends: adds the environment dimension to CI gates and
|
|
183
|
+
deployment readiness.
|
|
184
|
+
- **`test-completeness-dimensions`** — complements: adds dimension 11, Environment
|
|
185
|
+
Verifiability.
|
|
186
|
+
- **`verification-evidence`** — complements: evidence must specify which environment it
|
|
187
|
+
was collected from.
|
|
188
|
+
- **`mock-boundary`** — complements: the capability matrix references Level 2 stub-server
|
|
189
|
+
usage.
|
|
190
|
+
|
|
191
|
+
## Changelog
|
|
192
|
+
|
|
193
|
+
| Version | Date | Changes |
|
|
194
|
+
|---------|------|---------|
|
|
195
|
+
| v1.0.0 | 2026-05-13 | Initial — executable environment documentation principle, framework config, runner scripts, capability matrix, CI gate mapping, credential handling (XSPEC-204) |
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Git Push Safety Gates
|
|
2
|
+
|
|
3
|
+
> **Version**: 1.1.0 | **Status**: Active | **Updated**: 2026-07-09
|
|
4
|
+
> **AI-optimized version**: `ai/standards/push-standards.ai.yaml`
|
|
5
|
+
> **Spec**: XSPEC-081 (cross-project/specs/XSPEC-081-uds-push-skill.md)
|
|
6
|
+
|
|
7
|
+
**Scope**: universal
|
|
8
|
+
**Applicability**: Any project using Git, invoking the `/push` skill or an equivalent
|
|
9
|
+
AI-assisted push workflow
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
This standard defines the safety gates an AI assistant MUST apply around `git push`:
|
|
14
|
+
protected-branch detection, force-push guardrails, pre-push quality gates, and a
|
|
15
|
+
structured push-receipt audit trail. It is the safety layer that sits between "tests
|
|
16
|
+
pass locally" and "code lands on a shared branch" — its job is to stop unsafe pushes
|
|
17
|
+
before they happen and to leave a durable record of every push that does happen.
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
| Setting | Default | Notes |
|
|
22
|
+
|---------|---------|-------|
|
|
23
|
+
| `protected_branches` | `["main", "master", "release/*", "hotfix/*"]` | Branches requiring explicit confirmation before push |
|
|
24
|
+
| `push_gates` | default: `["lint", "test"]`; optional: `["ac-coverage", "type-check", "security-scan"]` | Quality gates run before pushing |
|
|
25
|
+
| `push_gates.test_scope` | `"full"` (choices: `"full"`, `"changed"`) | `"changed"` runs only tests affected by the diff via the project's test impact analysis tooling (e.g. `vitest --changed`), if configured. This is a fast local pre-check only — it does not replace the project's CI/full-suite run, which remains the authoritative gate |
|
|
26
|
+
| `receipt.output` | `"console"` (choices: `console`, `file`, `both`) | Where the push receipt is written |
|
|
27
|
+
| `receipt.file_path` | `~/.uds/push-history.jsonl` | Append-only JSON-lines history when `file` output is enabled |
|
|
28
|
+
| `auto_pr` | `true` | Prompt to create a PR after pushing to a non-protected branch |
|
|
29
|
+
| `repo_mode` | `"team"` (choices: `team`, `single-owner`) | `single-owner` skips PR prompts and reduces collaboration guardrails |
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
| Rule | Trigger | Instruction | Priority |
|
|
34
|
+
|------|---------|--------------|----------|
|
|
35
|
+
| `detect-protected-branch` | Executing `/push` | Detect the target branch. If it matches any `protected_branches` pattern: display a warning with the branch name, show what commits will be pushed, require explicit user confirmation, and abort without pushing if not confirmed | required |
|
|
36
|
+
| `force-push-guardrail` | Push with `--force` detected | Calculate commits that will be overwritten on the remote, show their count and authors, require the user to type a confirmation string (e.g. "yes, force push"), and record `force_push: true` in the receipt | required |
|
|
37
|
+
| `pre-push-gates` | Before executing `git push` | Run all configured `push_gates` in sequence (lint, test, and any optional gates enabled); if any gate fails, abort the push, show which gate failed, and suggest a fix. The `test` gate respects `push_gates.test_scope`: `"full"` (default) runs the complete suite; `"changed"` runs only the diff-affected subset via the project's test impact tooling and does **not** count as a substitute for the project's own CI/full-suite run. With `--skip-gates`, push without gates and record `gates_skipped: true` | required |
|
|
38
|
+
| `push-receipt` | After a successful push | Output a structured push receipt (see schema below); if `receipt.output` includes `file`, append it as a JSON line to `~/.uds/push-history.jsonl` | required |
|
|
39
|
+
| `pr-integration` | After a successful push to a non-protected branch | If `auto_pr` is true AND `repo_mode` is `team`: check whether an open PR exists for this branch; if not, prompt the user to run `pr-automation-assistant`. Skip entirely if `auto_pr` is false or `repo_mode` is `single-owner` | suggested |
|
|
40
|
+
| `single-owner-mode` | `repo_mode: single-owner` is configured | Skip all collaboration-specific steps: no PR prompts, reduced force-push warnings (still warn, but no confirmation text required). Protected-branch detection remains active regardless of `repo_mode` | recommended |
|
|
41
|
+
|
|
42
|
+
## Push Receipt Schema
|
|
43
|
+
|
|
44
|
+
Every successful push MUST produce a receipt with the following fields:
|
|
45
|
+
|
|
46
|
+
| Field | Type | Description |
|
|
47
|
+
|-------|------|--------------|
|
|
48
|
+
| `branch` | string | Target branch name |
|
|
49
|
+
| `commit_sha` | string | HEAD commit SHA (short) |
|
|
50
|
+
| `gates_passed` | string[] | List of gates that ran and passed |
|
|
51
|
+
| `gates_skipped` | boolean | Whether `--skip-gates` was used |
|
|
52
|
+
| `force_push` | boolean | Whether this was a force push |
|
|
53
|
+
| `timestamp` | ISO 8601 string | Push time |
|
|
54
|
+
| `target_remote` | string | Remote the push was sent to |
|
|
55
|
+
|
|
56
|
+
## Anti-Patterns
|
|
57
|
+
|
|
58
|
+
- **Silent force-push** — overwriting remote history without showing the user which
|
|
59
|
+
commits/authors will be lost.
|
|
60
|
+
- **Skipping gates without a trace** — running with `--skip-gates` but not recording
|
|
61
|
+
`gates_skipped: true`, which makes the receipt misleading.
|
|
62
|
+
- **PR-prompting in single-owner repos** — nagging a single-owner repository to open a
|
|
63
|
+
PR against itself; `repo_mode: single-owner` exists precisely to suppress this.
|
|
64
|
+
- **Protected-branch bypass** — treating `single-owner-mode` as a reason to also skip
|
|
65
|
+
protected-branch confirmation; the two are independent. Protected-branch detection
|
|
66
|
+
always stays active.
|
|
67
|
+
|
|
68
|
+
## Related Standards
|
|
69
|
+
|
|
70
|
+
- **`git-workflow`** — branching strategy this standard's protected-branch list assumes
|
|
71
|
+
- **`checkin-standards`** — pre-commit quality gates that `push_gates` extends to the
|
|
72
|
+
pre-push moment
|
|
73
|
+
- **`pr-automation-assistant`** (skill) — invoked by the `pr-integration` rule
|
|
74
|
+
- **`audit-trail`** — the push receipt is a lightweight, project-local analogue of a
|
|
75
|
+
compliance-grade audit record
|
|
76
|
+
|
|
77
|
+
## Changelog
|
|
78
|
+
|
|
79
|
+
| Version | Date | Changes |
|
|
80
|
+
|---------|------|---------|
|
|
81
|
+
| v1.0.0 | 2026-04-23 | Initial — protected-branch detection, force-push guardrail, pre-push gates, push receipt, PR integration, single-owner mode (XSPEC-081) |
|
|
82
|
+
| v1.1.0 | 2026-07-09 | Add `push_gates.test_scope` (`full`/`changed`) — layered test gate exception so `test` can run a diff-affected subset locally without downgrading the project's authoritative full-suite gate (XSPEC-326) |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Requirement Engineering Standards
|
|
2
2
|
|
|
3
|
-
**Version**: 1.
|
|
4
|
-
**Last Updated**: 2026-
|
|
3
|
+
**Version**: 1.1.0
|
|
4
|
+
**Last Updated**: 2026-07-10
|
|
5
5
|
**Applicability**: All software projects
|
|
6
6
|
**Scope**: universal
|
|
7
7
|
**Industry Standards**: IEEE 830-1998, IEEE 29148-2018, SWEBOK v4.0
|