@mytechtoday/augment-extensions 3.1.0 → 3.2.0
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/AGENTS.md +123 -0
- package/README.md +981 -32
- package/augment-extensions/coding-standards/q/CHANGELOG.md +16 -0
- package/augment-extensions/coding-standards/q/README.md +53 -0
- package/augment-extensions/coding-standards/q/examples/ArrayAndTupleNamingConventions.qs +27 -0
- package/augment-extensions/coding-standards/q/examples/CallableAliasNamingConventions.qs +20 -0
- package/augment-extensions/coding-standards/q/examples/CircuitCompositionNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/ConstantValueNamingConventions.qs +19 -0
- package/augment-extensions/coding-standards/q/examples/EntryPointAttributeNamingConventions.qs +17 -0
- package/augment-extensions/coding-standards/q/examples/FunctorApplicationInControlledCircuits.qs +84 -0
- package/augment-extensions/coding-standards/q/examples/FunctorSpecializationNamingConventions.qs +29 -0
- package/augment-extensions/coding-standards/q/examples/GenericTypeParameterNamingConventions.qs +20 -0
- package/augment-extensions/coding-standards/q/examples/HamiltonianOperatorNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/MeasurementResultNamingConventions.qs +48 -0
- package/augment-extensions/coding-standards/q/examples/NamespaceNamingConventions.qs +30 -0
- package/augment-extensions/coding-standards/q/examples/OperationAndFunctionNamingConventions.qs +31 -0
- package/augment-extensions/coding-standards/q/examples/OracleCallableNamingConventions.qs +41 -0
- package/augment-extensions/coding-standards/q/examples/PauliBasisNamingConventions.qs +42 -0
- package/augment-extensions/coding-standards/q/examples/PauliOperatorNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/QubitManagementAndTeleportation.qs +94 -0
- package/augment-extensions/coding-standards/q/examples/QubitNamingConventions.qs +53 -0
- package/augment-extensions/coding-standards/q/examples/QubitRegisterNamingConventions.qs +30 -0
- package/augment-extensions/coding-standards/q/examples/StateVectorNamingConventions.qs +23 -0
- package/augment-extensions/coding-standards/q/examples/UserDefinedTypeNamingConventions.qs +22 -0
- package/augment-extensions/coding-standards/q/examples/VariableAndParameterNamingConventions.qs +26 -0
- package/augment-extensions/coding-standards/q/examples/bell-state.qs +21 -0
- package/augment-extensions/coding-standards/q/metadata.json +38 -0
- package/augment-extensions/coding-standards/q/module.json +29 -0
- package/augment-extensions/coding-standards/q/rules/q-error-handling.md +143 -0
- package/augment-extensions/coding-standards/q/rules/q-naming-conventions.md +82 -0
- package/augment-extensions/coding-standards/q/rules/q-performance-optimization.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-qubit-management.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-security.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-standards.md +127 -0
- package/augment-extensions/coding-standards/q/rules/q-testing.md +10 -0
- package/augment-extensions/visual-design/CHANGELOG.md +2 -2
- package/augment-extensions/visual-design/README.md +31 -8
- package/augment-extensions/visual-design/VERSION +1 -0
- package/augment-extensions/visual-design/__tests__/README.md +32 -18
- package/augment-extensions/visual-design/__tests__/guidance-contract.test.ts +355 -0
- package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +23 -5
- package/augment-extensions/visual-design/domains/other/dotnet-application.ts +1 -1
- package/augment-extensions/visual-design/domains/other/mobile-application.ts +3 -4
- package/augment-extensions/visual-design/domains/other/os-application.ts +1 -1
- package/augment-extensions/visual-design/domains/other/windows-platform.ts +1 -1
- package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +4 -4
- package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +10 -10
- package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +3 -3
- package/augment-extensions/visual-design/examples/README.md +2 -0
- package/augment-extensions/visual-design/examples/basic-usage.md +5 -3
- package/augment-extensions/visual-design/examples/vendor-comparison.md +2 -2
- package/augment-extensions/visual-design/guidelines/coverage-map.md +30 -0
- package/augment-extensions/visual-design/guidelines/design-levels.md +211 -0
- package/augment-extensions/visual-design/guidelines/index.md +5 -0
- package/augment-extensions/visual-design/metadata.json +26 -5
- package/augment-extensions/visual-design/module.json +39 -6
- package/augment-extensions/visual-design/rules/accessibility-and-color.md +51 -0
- package/augment-extensions/visual-design/rules/design-practice.md +55 -0
- package/augment-extensions/visual-design/rules/index.md +34 -0
- package/augment-extensions/visual-design/rules/platform-guidance.md +47 -0
- package/augment-extensions/visual-design/scripts/validate-guidance.cjs +233 -0
- package/augment-extensions/visual-design/skills/README.md +11 -0
- package/augment-extensions/visual-design/skills/design-brief.md +40 -0
- package/augment-extensions/visual-design/skills/design-review.md +38 -0
- package/augment-extensions/visual-design/skills/responsive-validation/SKILL.md +94 -0
- package/augment-extensions/visual-design/skills/responsive-validation/scripts/responsive-sweep.cjs +457 -0
- package/augment-extensions/visual-design/style-selector.ts +4 -4
- package/augment-extensions/visual-design/types.ts +101 -46
- package/augment-extensions/visual-design/visual-design-core.ts +8 -8
- package/cli/dist/adapters/banner.d.ts +62 -0
- package/cli/dist/adapters/banner.d.ts.map +1 -0
- package/cli/dist/adapters/banner.js +105 -0
- package/cli/dist/adapters/banner.js.map +1 -0
- package/cli/dist/adapters/claude-code.d.ts +13 -0
- package/cli/dist/adapters/claude-code.d.ts.map +1 -0
- package/cli/dist/adapters/claude-code.js +79 -0
- package/cli/dist/adapters/claude-code.js.map +1 -0
- package/cli/dist/adapters/copilot.d.ts +17 -0
- package/cli/dist/adapters/copilot.d.ts.map +1 -0
- package/cli/dist/adapters/copilot.js +81 -0
- package/cli/dist/adapters/copilot.js.map +1 -0
- package/cli/dist/adapters/cursor.d.ts +16 -0
- package/cli/dist/adapters/cursor.d.ts.map +1 -0
- package/cli/dist/adapters/cursor.js +99 -0
- package/cli/dist/adapters/cursor.js.map +1 -0
- package/cli/dist/adapters/index.d.ts +25 -0
- package/cli/dist/adapters/index.d.ts.map +1 -0
- package/cli/dist/adapters/index.js +59 -0
- package/cli/dist/adapters/index.js.map +1 -0
- package/cli/dist/adapters/types.d.ts +113 -0
- package/cli/dist/adapters/types.d.ts.map +1 -0
- package/cli/dist/adapters/types.js +13 -0
- package/cli/dist/adapters/types.js.map +1 -0
- package/cli/dist/adapters/windsurf.d.ts +14 -0
- package/cli/dist/adapters/windsurf.d.ts.map +1 -0
- package/cli/dist/adapters/windsurf.js +78 -0
- package/cli/dist/adapters/windsurf.js.map +1 -0
- package/cli/dist/analysis/index.d.ts +1 -0
- package/cli/dist/analysis/index.d.ts.map +1 -1
- package/cli/dist/analysis/index.js +1 -0
- package/cli/dist/analysis/index.js.map +1 -1
- package/cli/dist/analysis/pattern-analyzer.d.ts +6 -0
- package/cli/dist/analysis/pattern-analyzer.d.ts.map +1 -0
- package/cli/dist/analysis/pattern-analyzer.js +100 -0
- package/cli/dist/analysis/pattern-analyzer.js.map +1 -0
- package/cli/dist/cli.js +62 -35
- package/cli/dist/cli.js.map +1 -1
- package/cli/dist/commands/code-analysis.d.ts.map +1 -1
- package/cli/dist/commands/code-analysis.js +22 -2
- package/cli/dist/commands/code-analysis.js.map +1 -1
- package/cli/dist/commands/export.d.ts +81 -0
- package/cli/dist/commands/export.d.ts.map +1 -0
- package/cli/dist/commands/export.js +334 -0
- package/cli/dist/commands/export.js.map +1 -0
- package/cli/dist/commands/gui.d.ts +3 -1
- package/cli/dist/commands/gui.d.ts.map +1 -1
- package/cli/dist/commands/gui.js +263 -22
- package/cli/dist/commands/gui.js.map +1 -1
- package/cli/dist/commands/init.d.ts +2 -0
- package/cli/dist/commands/init.d.ts.map +1 -1
- package/cli/dist/commands/init.js +95 -3
- package/cli/dist/commands/init.js.map +1 -1
- package/cli/dist/commands/lifecycle.d.ts +14 -0
- package/cli/dist/commands/lifecycle.d.ts.map +1 -0
- package/cli/dist/commands/lifecycle.js +463 -0
- package/cli/dist/commands/lifecycle.js.map +1 -0
- package/cli/dist/commands/link.d.ts +3 -0
- package/cli/dist/commands/link.d.ts.map +1 -1
- package/cli/dist/commands/link.js +126 -16
- package/cli/dist/commands/link.js.map +1 -1
- package/cli/dist/commands/list.js +2 -2
- package/cli/dist/commands/list.js.map +1 -1
- package/cli/dist/commands/mcp.d.ts +1 -2
- package/cli/dist/commands/mcp.d.ts.map +1 -1
- package/cli/dist/commands/mcp.js +20 -20
- package/cli/dist/commands/mcp.js.map +1 -1
- package/cli/dist/commands/module-management.d.ts +9 -0
- package/cli/dist/commands/module-management.d.ts.map +1 -0
- package/cli/dist/commands/module-management.js +420 -0
- package/cli/dist/commands/module-management.js.map +1 -0
- package/cli/dist/commands/self-remove.d.ts.map +1 -1
- package/cli/dist/commands/self-remove.js +98 -44
- package/cli/dist/commands/self-remove.js.map +1 -1
- package/cli/dist/commands/show.d.ts +1 -1
- package/cli/dist/commands/show.d.ts.map +1 -1
- package/cli/dist/commands/show.js +21 -10
- package/cli/dist/commands/show.js.map +1 -1
- package/cli/dist/commands/showCompleted.d.ts +1 -0
- package/cli/dist/commands/showCompleted.d.ts.map +1 -1
- package/cli/dist/commands/showCompleted.js +4 -3
- package/cli/dist/commands/showCompleted.js.map +1 -1
- package/cli/dist/commands/skill.d.ts +7 -1
- package/cli/dist/commands/skill.d.ts.map +1 -1
- package/cli/dist/commands/skill.js +79 -21
- package/cli/dist/commands/skill.js.map +1 -1
- package/cli/dist/commands/unlink.d.ts.map +1 -1
- package/cli/dist/commands/unlink.js +38 -2
- package/cli/dist/commands/unlink.js.map +1 -1
- package/cli/dist/commands/update.d.ts.map +1 -1
- package/cli/dist/commands/update.js +6 -16
- package/cli/dist/commands/update.js.map +1 -1
- package/cli/dist/commands/upgrade.d.ts +2 -0
- package/cli/dist/commands/upgrade.d.ts.map +1 -1
- package/cli/dist/commands/upgrade.js +22 -5
- package/cli/dist/commands/upgrade.js.map +1 -1
- package/cli/dist/commands/use.d.ts.map +1 -1
- package/cli/dist/commands/use.js +2 -68
- package/cli/dist/commands/use.js.map +1 -1
- package/cli/dist/core/compatibility-checker.d.ts +37 -1
- package/cli/dist/core/compatibility-checker.d.ts.map +1 -1
- package/cli/dist/core/compatibility-checker.js +133 -12
- package/cli/dist/core/compatibility-checker.js.map +1 -1
- package/cli/dist/gui/state/navigation-state.d.ts +20 -0
- package/cli/dist/gui/state/navigation-state.d.ts.map +1 -0
- package/cli/dist/gui/state/navigation-state.js +115 -0
- package/cli/dist/gui/state/navigation-state.js.map +1 -0
- package/cli/dist/gui/state/selection-state.d.ts +21 -0
- package/cli/dist/gui/state/selection-state.d.ts.map +1 -0
- package/cli/dist/gui/state/selection-state.js +117 -0
- package/cli/dist/gui/state/selection-state.js.map +1 -0
- package/cli/dist/lib/export-runner.d.ts +76 -0
- package/cli/dist/lib/export-runner.d.ts.map +1 -0
- package/cli/dist/lib/export-runner.js +111 -0
- package/cli/dist/lib/export-runner.js.map +1 -0
- package/cli/dist/lib/mcp-detection.d.ts +40 -0
- package/cli/dist/lib/mcp-detection.d.ts.map +1 -0
- package/cli/dist/lib/mcp-detection.js +167 -0
- package/cli/dist/lib/mcp-detection.js.map +1 -0
- package/cli/dist/lib/mirror-coordination.d.ts +57 -0
- package/cli/dist/lib/mirror-coordination.d.ts.map +1 -0
- package/cli/dist/lib/mirror-coordination.js +151 -0
- package/cli/dist/lib/mirror-coordination.js.map +1 -0
- package/cli/dist/lib/mirror-runner.d.ts +123 -0
- package/cli/dist/lib/mirror-runner.d.ts.map +1 -0
- package/cli/dist/lib/mirror-runner.js +579 -0
- package/cli/dist/lib/mirror-runner.js.map +1 -0
- package/cli/dist/lib/module-resolver.d.ts +65 -0
- package/cli/dist/lib/module-resolver.d.ts.map +1 -0
- package/cli/dist/lib/module-resolver.js +211 -0
- package/cli/dist/lib/module-resolver.js.map +1 -0
- package/cli/dist/lib/source-hash.d.ts +62 -0
- package/cli/dist/lib/source-hash.d.ts.map +1 -0
- package/cli/dist/lib/source-hash.js +99 -0
- package/cli/dist/lib/source-hash.js.map +1 -0
- package/cli/dist/types/coordination-export.d.ts +33 -0
- package/cli/dist/types/coordination-export.d.ts.map +1 -0
- package/cli/dist/types/coordination-export.js +28 -0
- package/cli/dist/types/coordination-export.js.map +1 -0
- package/cli/dist/types/lifecycle.d.ts +81 -0
- package/cli/dist/types/lifecycle.d.ts.map +1 -0
- package/cli/dist/types/lifecycle.js +3 -0
- package/cli/dist/types/lifecycle.js.map +1 -0
- package/cli/dist/utils/beads-sync.d.ts +4 -0
- package/cli/dist/utils/beads-sync.d.ts.map +1 -1
- package/cli/dist/utils/beads-sync.js.map +1 -1
- package/cli/dist/utils/catalog-sync.d.ts.map +1 -1
- package/cli/dist/utils/catalog-sync.js +41 -8
- package/cli/dist/utils/catalog-sync.js.map +1 -1
- package/cli/dist/utils/coordination-queries.d.ts +3 -0
- package/cli/dist/utils/coordination-queries.d.ts.map +1 -1
- package/cli/dist/utils/coordination-queries.js.map +1 -1
- package/cli/dist/utils/extensions-config.d.ts +29 -0
- package/cli/dist/utils/extensions-config.d.ts.map +1 -0
- package/cli/dist/utils/extensions-config.js +151 -0
- package/cli/dist/utils/extensions-config.js.map +1 -0
- package/cli/dist/utils/extractCommandHelp.d.ts.map +1 -1
- package/cli/dist/utils/extractCommandHelp.js +8 -2
- package/cli/dist/utils/extractCommandHelp.js.map +1 -1
- package/cli/dist/utils/file-tracking.d.ts +4 -0
- package/cli/dist/utils/file-tracking.d.ts.map +1 -1
- package/cli/dist/utils/file-tracking.js.map +1 -1
- package/cli/dist/utils/inspection-cache.d.ts +8 -0
- package/cli/dist/utils/inspection-cache.d.ts.map +1 -1
- package/cli/dist/utils/inspection-cache.js +12 -0
- package/cli/dist/utils/inspection-cache.js.map +1 -1
- package/cli/dist/utils/inspection-handlers.d.ts.map +1 -1
- package/cli/dist/utils/inspection-handlers.js +230 -52
- package/cli/dist/utils/inspection-handlers.js.map +1 -1
- package/cli/dist/utils/install-rules.d.ts +20 -0
- package/cli/dist/utils/install-rules.d.ts.map +1 -1
- package/cli/dist/utils/install-rules.js +367 -0
- package/cli/dist/utils/install-rules.js.map +1 -1
- package/cli/dist/utils/interactive-prompt.d.ts +7 -0
- package/cli/dist/utils/interactive-prompt.d.ts.map +1 -0
- package/cli/dist/utils/interactive-prompt.js +41 -0
- package/cli/dist/utils/interactive-prompt.js.map +1 -0
- package/cli/dist/utils/lifecycle.d.ts +47 -0
- package/cli/dist/utils/lifecycle.d.ts.map +1 -0
- package/cli/dist/utils/lifecycle.js +841 -0
- package/cli/dist/utils/lifecycle.js.map +1 -0
- package/cli/dist/utils/mcp-integration.d.ts +24 -3
- package/cli/dist/utils/mcp-integration.d.ts.map +1 -1
- package/cli/dist/utils/mcp-integration.js +364 -151
- package/cli/dist/utils/mcp-integration.js.map +1 -1
- package/cli/dist/utils/module-system.d.ts +5 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -1
- package/cli/dist/utils/module-system.js +113 -29
- package/cli/dist/utils/module-system.js.map +1 -1
- package/cli/dist/utils/openspec-sync.d.ts +4 -0
- package/cli/dist/utils/openspec-sync.d.ts.map +1 -1
- package/cli/dist/utils/openspec-sync.js.map +1 -1
- package/cli/dist/utils/plugin-system.js +1 -1
- package/cli/dist/utils/plugin-system.js.map +1 -1
- package/cli/dist/utils/skill-system.d.ts +11 -0
- package/cli/dist/utils/skill-system.d.ts.map +1 -1
- package/cli/dist/utils/skill-system.js +101 -3
- package/cli/dist/utils/skill-system.js.map +1 -1
- package/cli/dist/utils/zip-archive.d.ts +25 -0
- package/cli/dist/utils/zip-archive.d.ts.map +1 -0
- package/cli/dist/utils/zip-archive.js +287 -0
- package/cli/dist/utils/zip-archive.js.map +1 -0
- package/modules.md +21 -4
- package/package.json +138 -140
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Q# AI Prompter Rules
|
|
2
|
+
|
|
3
|
+
You are generating, reviewing, or refactoring Q# code for the Quantum Development Kit (QDK 1.0+) and Azure Quantum. Apply every rule below. Treat qubits, gates, and circuit depth as scarce, expensive resources.
|
|
4
|
+
|
|
5
|
+
## Role and Output Contract
|
|
6
|
+
|
|
7
|
+
- Default to library-first solutions using `Microsoft.Quantum.Intrinsic`, `Canon`, `Preparation`, `Diagnostics`, `ResourceEstimation`, and `Convert`. Implement custom gates only when no library primitive fits.
|
|
8
|
+
- Every public `operation`/`function` MUST carry `///` doc comments with `# Summary`, `# Input`, `# Output`, and a `# Remarks` block stating qubit state assumptions (e.g., "expects |0> input") and resource implications.
|
|
9
|
+
- Never violate the no-cloning theorem. Never assume a qubit can be copied; use entanglement or teleportation patterns explicitly.
|
|
10
|
+
- Prefer correctness, then resource economy, then readability. Reject solutions that submit un-estimated circuits to hardware.
|
|
11
|
+
|
|
12
|
+
## Naming
|
|
13
|
+
|
|
14
|
+
| Element | Convention | Example |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Namespaces | PascalCase, hierarchical | `Augment.Quantum.Algorithms.Grover` |
|
|
17
|
+
| Operations / Functions | PascalCase, verb-led | `PrepareBellState`, `ApplyOracle`, `MeasureAllZ` |
|
|
18
|
+
| Qubits / Registers | camelCase, descriptive | `targetQubit`, `dataRegister` |
|
|
19
|
+
| Variables / Parameters | camelCase | `inputAngle`, `nIterations` |
|
|
20
|
+
| Constants | UPPER_SNAKE_CASE | `PI_OVER_4` |
|
|
21
|
+
| User-Defined Types | PascalCase | `QuantumRegister` |
|
|
22
|
+
| Files | kebab-case `.qs` | `bell-state.qs`, `oracle-utils.qs` |
|
|
23
|
+
|
|
24
|
+
Prefix reusable Augment quantum modules with `AugmentQuantum`. Avoid single-letter names outside tight loop indices.
|
|
25
|
+
|
|
26
|
+
## Formatting
|
|
27
|
+
|
|
28
|
+
- 4-space indent, no tabs. Target line length <= 100. Brace on same line as declaration.
|
|
29
|
+
- Single space after `operation`, `function`, `let`, `mutable`, `use`, `borrow`. Spaces around operators.
|
|
30
|
+
- Group `open` statements: `Microsoft.Quantum.*` first, then project namespaces.
|
|
31
|
+
- Use `within { ... } apply { ... }` for automatic uncomputation.
|
|
32
|
+
- Visually align gate sequences in circuits.
|
|
33
|
+
|
|
34
|
+
## Operations vs. Functions
|
|
35
|
+
|
|
36
|
+
- `function`: deterministic, side-effect-free classical logic only.
|
|
37
|
+
- `operation`: anything touching qubits, gates, measurement, or randomness.
|
|
38
|
+
- Declare `is Adj + Ctl` whenever semantically valid. Missing functors blocks circuit optimization and is a defect.
|
|
39
|
+
|
|
40
|
+
## Qubit Management
|
|
41
|
+
|
|
42
|
+
- Allocate with `use` (fresh) or `borrow` (clean borrowed). Never extend qubit lifetime beyond its tight scope.
|
|
43
|
+
- `Reset` qubits before scope exit when they may be non-zero, especially on hardware targets.
|
|
44
|
+
- Prefer `within/apply` over manual adjoint inversion.
|
|
45
|
+
- Never hold qubits across host-language boundaries.
|
|
46
|
+
|
|
47
|
+
## Hybrid Classical-Quantum
|
|
48
|
+
|
|
49
|
+
- Do classical pre/post-processing in the host (Python via IQ#, C# via QDK libs). Keep `operation` bodies quantum-dense.
|
|
50
|
+
- Expose entry points with `@EntryPoint()` for Azure Quantum job submission.
|
|
51
|
+
- Bridge types via `Microsoft.Quantum.Convert`.
|
|
52
|
+
- Wrap quantum failures in host-language exceptions; never silently retry on hardware.
|
|
53
|
+
|
|
54
|
+
## Error Handling
|
|
55
|
+
|
|
56
|
+
- Use `fail "message"` for unrecoverable conditions (invalid qubit count, violated state assumption).
|
|
57
|
+
- Branch on `Result` (`Zero`/`One`) explicitly; convert with `ResultAsBool` when needed.
|
|
58
|
+
- Use `Microsoft.Quantum.Diagnostics` (`AssertQubit`, `AssertAllZero`, `DumpMachine`, `DumpRegister`) during development; gate them out for hardware runs.
|
|
59
|
+
- Validate classical inputs before allocating qubits.
|
|
60
|
+
|
|
61
|
+
```qsharp
|
|
62
|
+
if (nQubits < 2) {
|
|
63
|
+
fail "Grover search requires at least 2 qubits.";
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Performance and Resource Estimation
|
|
68
|
+
|
|
69
|
+
- Run the QDK `ResourcesEstimator` or Azure Quantum Resource Estimator before any hardware submission. Report qubit count, T-count, gate count, and depth.
|
|
70
|
+
- Minimize two-qubit gates; prefer hardware-native gates of the target provider.
|
|
71
|
+
- Reuse qubits via `Reset` and `borrow`. Offload classical loops to the host.
|
|
72
|
+
- Choose simulators by scale: full-state (<= 20 qubits), Toffoli/sparse (larger), resource estimator (scaling studies).
|
|
73
|
+
- Apply provider-appropriate error mitigation; document the choice.
|
|
74
|
+
|
|
75
|
+
## Security and Quantum Hygiene
|
|
76
|
+
|
|
77
|
+
- No-cloning compliance is mandatory. No state duplication shortcuts.
|
|
78
|
+
- For QKD or QRNG, follow standard protocols and document measurement bases.
|
|
79
|
+
- Sanitize and, where appropriate, encrypt parameters and results crossing the host/Q# boundary, especially for Azure Quantum jobs.
|
|
80
|
+
- Use authenticated Azure Quantum workspaces; never log raw job outputs that could leak superposition-derived data.
|
|
81
|
+
- Pair Q# components with post-quantum-resistant classical algorithms.
|
|
82
|
+
|
|
83
|
+
## Canonical Examples
|
|
84
|
+
|
|
85
|
+
```qsharp
|
|
86
|
+
/// # Summary
|
|
87
|
+
/// Prepares a Bell pair (|00> + |11>)/sqrt(2) on two qubits.
|
|
88
|
+
/// # Input
|
|
89
|
+
/// q1, q2 : Qubits assumed in |0> state.
|
|
90
|
+
operation PrepareBellState(q1 : Qubit, q2 : Qubit) : Unit is Adj + Ctl {
|
|
91
|
+
H(q1);
|
|
92
|
+
CNOT(q1, q2);
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```qsharp
|
|
97
|
+
@EntryPoint()
|
|
98
|
+
operation RunGroverSearch(nQubits : Int, markedItem : Int) : Result[] {
|
|
99
|
+
use qubits = Qubit[nQubits];
|
|
100
|
+
// Grover iteration via Microsoft.Quantum.* library ops
|
|
101
|
+
return MeasureEachZ(qubits);
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Anti-Patterns (Reject in Review)
|
|
106
|
+
|
|
107
|
+
- Long-lived qubits outside tight `use`/`borrow` scopes; missing `Reset`.
|
|
108
|
+
- `operation` declared without `is Adj + Ctl` when it qualifies.
|
|
109
|
+
- Heavy classical loops or arithmetic inside `operation` bodies.
|
|
110
|
+
- Magic numbers for qubit counts, angles, or iteration counts.
|
|
111
|
+
- Submitting circuits to hardware without resource estimation.
|
|
112
|
+
- Re-implementing standard gates or oracles instead of using libraries.
|
|
113
|
+
- Missing or incomplete `///` docs on public callables.
|
|
114
|
+
|
|
115
|
+
## When Asked to Generate Q#
|
|
116
|
+
|
|
117
|
+
1. Confirm the target (simulator vs. provider) and qubit budget. If unstated, assume full-state simulator and note assumptions.
|
|
118
|
+
2. Sketch the circuit at the operation level, choosing library primitives.
|
|
119
|
+
3. Implement with `is Adj + Ctl` where valid and `within/apply` for uncomputation.
|
|
120
|
+
4. Add `///` docs, input validation, and resource-estimation guidance.
|
|
121
|
+
5. Provide a brief host-language invocation snippet only if requested.
|
|
122
|
+
|
|
123
|
+
## Augment Extensions Integration
|
|
124
|
+
|
|
125
|
+
- Link with `augx link coding-standards/q`.
|
|
126
|
+
- Combine with `coding-standards/python` (IQ# host) or `coding-standards/c` style modules for full-stack hybrid solutions.
|
|
127
|
+
- When prompting Augment Code AI, cite this file: "Follow Q# AI Prompter Rules for qubit scoping, functors, and resource estimation."
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Q# Testing
|
|
2
|
+
|
|
3
|
+
> Skeleton rule file. See `q-standards.md` for full context.
|
|
4
|
+
|
|
5
|
+
- Use `Microsoft.Quantum.Diagnostics` assertions (`AssertQubit`, `AssertAllZero`, `AssertOperationsEqualReferenced`) for unit tests.
|
|
6
|
+
- Run tests via `dotnet test` against the full-state simulator first, then resource estimator.
|
|
7
|
+
- Property-test parameterized circuits over representative input domains.
|
|
8
|
+
- Verify adjoint and controlled variants explicitly; missing functor tests is a defect.
|
|
9
|
+
- Pin QDK and Azure Quantum SDK versions in `.qsproj` so test runs are reproducible.
|
|
10
|
+
- For hybrid apps, add host-language tests (Python/IQ# or C#) wrapping the Q# entry points.
|
|
@@ -53,9 +53,9 @@ All notable changes to the Visual Design module will be documented in this file.
|
|
|
53
53
|
- ✅ 5 skill categories (Visual Design Fundamentals, UI Design, UX Design, Technical Implementation, Design Tools & Workflow)
|
|
54
54
|
- ✅ 3 vendor design systems (Google, Microsoft, Amazon)
|
|
55
55
|
- ✅ 10 domain-specific styles
|
|
56
|
-
-
|
|
56
|
+
- Legacy 100% core-module coverage statement from this release is unverified by the current test suite.
|
|
57
57
|
- ✅ Extensive usage examples
|
|
58
|
-
-
|
|
58
|
+
- Legacy WCAG 2.1 AA compliance statement from this release is unverified. See the current rules for standards scope and required evidence.
|
|
59
59
|
- ✅ Responsive design patterns
|
|
60
60
|
- ✅ Cross-platform support
|
|
61
61
|
|
|
@@ -11,15 +11,36 @@ This module provides AI agents with structured visual design knowledge including
|
|
|
11
11
|
- **Domain Styles**: Website, Web-app, Mobile, .NET Application, Linux, Windows, Motion Picture, AI Prompt Helper, Print Campaigns
|
|
12
12
|
- **Default Fallback**: google → microsoft → amazon
|
|
13
13
|
|
|
14
|
+
## Guidance Structure and Discovery
|
|
15
|
+
|
|
16
|
+
This module combines its selectable TypeScript vendor and domain styles with indexed rules, progressive guidelines, and task-oriented skills:
|
|
17
|
+
|
|
18
|
+
- Start at rules/index.md for the decision order and task router. The CLI lists direct Markdown files in rules.
|
|
19
|
+
- Review rules/design-practice.md for research, UX, product, service, interaction, information architecture, visual language, and design-system work.
|
|
20
|
+
- Review rules/accessibility-and-color.md and rules/platform-guidance.md for accessibility, themes, typography, motion, and platform constraints.
|
|
21
|
+
- Use guidelines/design-levels.md and guidelines/coverage-map.md for basic, intermediate, and advanced coverage.
|
|
22
|
+
- Use skills/design-brief.md and skills/design-review.md for repeatable design work.
|
|
23
|
+
- Use skills/responsive-validation/SKILL.md and its runner for caller-supplied web applications.
|
|
24
|
+
|
|
25
|
+
Read module-local files through augx show visual-design <module-relative-path>, for example rules/index.md or skills/responsive-validation/SKILL.md. The repository-level augx skill command indexes the root skills directory only; module-local skill files are discoverable through the module index and file-view command.
|
|
26
|
+
|
|
27
|
+
The responsive workflow applies to screen interfaces. Print, film, and image-generation work retain their existing domain-specific constraints and do not use browser viewport rules.
|
|
28
|
+
|
|
14
29
|
## Architecture
|
|
15
30
|
|
|
16
31
|
```
|
|
17
32
|
visual-design/
|
|
18
33
|
├── module.json # Module metadata
|
|
19
34
|
├── README.md # This file
|
|
35
|
+
├── metadata.json # Version, character count, and indexed content files
|
|
36
|
+
├── VERSION # Version used by the version-aware module loader
|
|
20
37
|
├── visual-design-core.ts # Core design elements, principles, skills
|
|
21
38
|
├── types.ts # TypeScript interfaces
|
|
22
39
|
├── style-selector.ts # Vendor priority logic
|
|
40
|
+
├── rules/ # Directly listed module rules and task index
|
|
41
|
+
├── guidelines/ # Design levels and coverage map
|
|
42
|
+
├── skills/ # Module-local task procedures and responsive runner
|
|
43
|
+
├── scripts/ # Guidance manifest validator
|
|
23
44
|
├── domains/
|
|
24
45
|
│ ├── web-page-styles/
|
|
25
46
|
│ │ ├── google-modern.ts # Material 3 Expressive
|
|
@@ -38,6 +59,7 @@ visual-design/
|
|
|
38
59
|
│ └── os-application.ts # General OS applications
|
|
39
60
|
├── __tests__/ # Unit and integration tests
|
|
40
61
|
│ ├── README.md # Test documentation
|
|
62
|
+
│ ├── guidance-contract.test.ts # Guidance and responsive plan contract tests
|
|
41
63
|
│ ├── style-selector.test.ts # Style selector tests
|
|
42
64
|
│ └── vendor-styles.test.ts # Vendor integration tests
|
|
43
65
|
└── examples/ # Usage examples
|
|
@@ -79,7 +101,7 @@ augx link visual-design
|
|
|
79
101
|
augx show visual-design
|
|
80
102
|
|
|
81
103
|
# View specific vendor style
|
|
82
|
-
augx show visual-design/google-modern
|
|
104
|
+
augx show visual-design domains/web-page-styles/google-modern.ts
|
|
83
105
|
```
|
|
84
106
|
|
|
85
107
|
## Usage
|
|
@@ -104,8 +126,7 @@ for a SaaS product with:
|
|
|
104
126
|
- Testimonials section
|
|
105
127
|
- Footer with links
|
|
106
128
|
|
|
107
|
-
Apply Material 3 Expressive characteristics
|
|
108
|
-
corners, and accessible contrast ratios.
|
|
129
|
+
Apply Material 3 Expressive characteristics such as dynamic color and rounded corners. Measure contrast for each rendered state against the product target.
|
|
109
130
|
```
|
|
110
131
|
|
|
111
132
|
## Design Elements (8)
|
|
@@ -130,16 +151,16 @@ corners, and accessible contrast ratios.
|
|
|
130
151
|
7. **Proportion** - Size relationships
|
|
131
152
|
8. **White Space** - Breathing room
|
|
132
153
|
9. **Consistency** - Predictable patterns
|
|
133
|
-
10. **Accessibility** -
|
|
154
|
+
10. **Accessibility** - Inclusive design reviewed against the applicable target
|
|
134
155
|
11. **Responsiveness** - Multi-device adaptation
|
|
135
156
|
|
|
136
|
-
## Skill Categories (5)
|
|
157
|
+
## Core TypeScript Skill Categories (5)
|
|
137
158
|
|
|
138
159
|
1. **Color Theory** - Palettes, harmony, psychology
|
|
139
160
|
2. **Typography** - Font pairing, hierarchy, readability
|
|
140
161
|
3. **Layout Design** - Grid systems, composition, flow
|
|
141
162
|
4. **Visual Hierarchy** - Emphasis, contrast, scale
|
|
142
|
-
5. **Accessibility** -
|
|
163
|
+
5. **Accessibility** - Inclusive design and accessibility review
|
|
143
164
|
|
|
144
165
|
## Vendor Characteristics
|
|
145
166
|
|
|
@@ -147,7 +168,7 @@ corners, and accessible contrast ratios.
|
|
|
147
168
|
- Dynamic color theming with tonal palettes
|
|
148
169
|
- Rounded corners (8px-24px)
|
|
149
170
|
- Springy motion with easing curves
|
|
150
|
-
-
|
|
171
|
+
- Accessible design patterns that must be verified against the current product target
|
|
151
172
|
|
|
152
173
|
### Microsoft Fluent 2
|
|
153
174
|
- Acrylic and Mica materials for depth
|
|
@@ -238,6 +259,8 @@ The `__tests__/` directory contains comprehensive test coverage:
|
|
|
238
259
|
|
|
239
260
|
- **style-selector.test.ts**: Tests for vendor priority chain and fallback logic
|
|
240
261
|
- **vendor-styles.test.ts**: Integration tests for all vendor design systems
|
|
262
|
+
- **guidance-contract.test.ts**: Checks metadata references, module discovery, skill coverage, and responsive sweep planning
|
|
263
|
+
- **scripts/validate-guidance.cjs**: Validates metadata paths and local guidance links
|
|
241
264
|
- **README.md**: Test documentation and usage instructions
|
|
242
265
|
|
|
243
266
|
All tests validate:
|
|
@@ -247,7 +270,7 @@ All tests validate:
|
|
|
247
270
|
- ✅ Fallback logic for invalid vendors
|
|
248
271
|
- ✅ Cross-vendor consistency
|
|
249
272
|
- ✅ Required properties validation
|
|
250
|
-
- ✅
|
|
273
|
+
- ✅ Current accessibility guidance and metadata contract
|
|
251
274
|
|
|
252
275
|
## License
|
|
253
276
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -22,20 +22,17 @@ Integration tests for all vendor design systems:
|
|
|
22
22
|
|
|
23
23
|
## Running Tests
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install --save-dev jest @types/jest ts-jest
|
|
28
|
-
```
|
|
25
|
+
Run the tests from the repository root with the dependencies in `package-lock.json` installed:
|
|
29
26
|
|
|
30
|
-
### Run All Tests
|
|
31
27
|
```bash
|
|
32
|
-
npm test
|
|
28
|
+
npm test -- --runInBand augment-extensions/visual-design/__tests__
|
|
33
29
|
```
|
|
34
30
|
|
|
35
|
-
### Run Specific Test
|
|
31
|
+
### Run Specific Test Files
|
|
36
32
|
```bash
|
|
37
|
-
npm test style-selector.test.ts
|
|
38
|
-
npm test vendor-styles.test.ts
|
|
33
|
+
npm test -- --runInBand augment-extensions/visual-design/__tests__/style-selector.test.ts
|
|
34
|
+
npm test -- --runInBand augment-extensions/visual-design/__tests__/vendor-styles.test.ts
|
|
35
|
+
npm test -- --runInBand augment-extensions/visual-design/__tests__/guidance-contract.test.ts
|
|
39
36
|
```
|
|
40
37
|
|
|
41
38
|
### Run with Coverage
|
|
@@ -43,7 +40,7 @@ npm test vendor-styles.test.ts
|
|
|
43
40
|
npm test -- --coverage
|
|
44
41
|
```
|
|
45
42
|
|
|
46
|
-
##
|
|
43
|
+
## Verified Coverage
|
|
47
44
|
|
|
48
45
|
The test suite covers:
|
|
49
46
|
- ✅ Style selector creation and configuration
|
|
@@ -55,20 +52,38 @@ The test suite covers:
|
|
|
55
52
|
- ✅ All vendor style implementations
|
|
56
53
|
- ✅ Cross-vendor consistency checks
|
|
57
54
|
- ✅ Required properties validation
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
55
|
+
- Guidance paths, indexes, local Markdown links, metadata synchronization, and CLI module discovery
|
|
56
|
+
- Responsive sweep planning, viewport boundaries, aspect ratios, and breakpoint neighbors
|
|
57
|
+
- Synthetic pass, fail, and needs-review metric classifications
|
|
58
|
+
|
|
59
|
+
The responsive contract tests do not render an application. Browser layout, native UI, physical device, zoom, reduced-motion effect, localization, and assistive-technology behavior require a consuming application and its runner.
|
|
61
60
|
|
|
62
|
-
##
|
|
61
|
+
## Covered Modules
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
The focused suite covers behavior in:
|
|
65
64
|
- `style-selector.ts`
|
|
65
|
+
- `scripts/validate-guidance.cjs`
|
|
66
|
+
- `skills/responsive-validation/scripts/responsive-sweep.cjs`
|
|
66
67
|
- `domains/web-page-styles/google-modern.ts`
|
|
67
68
|
- `domains/web-page-styles/microsoft-fluent.ts`
|
|
68
69
|
- `domains/web-page-styles/amazon-cloudscape.ts`
|
|
69
70
|
|
|
70
71
|
## Adding New Tests
|
|
71
72
|
|
|
73
|
+
The guidance contract suite also checks module.json references, local Markdown paths and headings, module discovery, version-aware loading, vendor priority, and responsive sweep planning. It uses synthetic invalid metadata and viewport metrics for negative-path coverage. It does not render an application.
|
|
74
|
+
|
|
75
|
+
Run the module test files with Jest:
|
|
76
|
+
|
|
77
|
+
npm test -- --runInBand augment-extensions/visual-design/__tests__
|
|
78
|
+
|
|
79
|
+
Validate the checked-in guidance references directly:
|
|
80
|
+
|
|
81
|
+
node augment-extensions/visual-design/scripts/validate-guidance.cjs
|
|
82
|
+
|
|
83
|
+
Inspect the responsive viewport plan without an application:
|
|
84
|
+
|
|
85
|
+
node augment-extensions/visual-design/skills/responsive-validation/scripts/responsive-sweep.cjs --dry-run --width-breakpoints 768,1024
|
|
86
|
+
|
|
72
87
|
When adding new vendor styles or features:
|
|
73
88
|
|
|
74
89
|
1. **Add vendor style tests** in `vendor-styles.test.ts`:
|
|
@@ -94,9 +109,8 @@ When adding new vendor styles or features:
|
|
|
94
109
|
## Continuous Integration
|
|
95
110
|
|
|
96
111
|
These tests are designed to run in CI/CD pipelines:
|
|
97
|
-
-
|
|
98
|
-
- No external dependencies
|
|
99
|
-
- Deterministic results
|
|
112
|
+
- Deterministic and isolated
|
|
113
|
+
- No additional external dependencies
|
|
100
114
|
- Clear error messages
|
|
101
115
|
|
|
102
116
|
## Troubleshooting
|