@mytechtoday/augment-extensions 3.1.2 → 3.3.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 +127 -0
- package/README.md +1050 -32
- package/augment-extensions/coding-standards/java/CHANGELOG.md +12 -0
- package/augment-extensions/coding-standards/java/README.md +54 -0
- package/augment-extensions/coding-standards/java/examples/SearchRequest.java +13 -0
- package/augment-extensions/coding-standards/java/metadata.json +36 -0
- package/augment-extensions/coding-standards/java/module.json +35 -0
- package/augment-extensions/coding-standards/java/rules/language-and-api-design.md +45 -0
- package/augment-extensions/coding-standards/java/rules/reliability-and-concurrency.md +43 -0
- package/augment-extensions/coding-standards/java/rules/testing-tooling-and-security.md +39 -0
- 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/coding-standards/spring/CHANGELOG.md +12 -0
- package/augment-extensions/coding-standards/spring/README.md +61 -0
- package/augment-extensions/coding-standards/spring/examples/OrderController.java +40 -0
- package/augment-extensions/coding-standards/spring/metadata.json +39 -0
- package/augment-extensions/coding-standards/spring/module.json +38 -0
- package/augment-extensions/coding-standards/spring/rules/beans-configuration-and-boot.md +39 -0
- package/augment-extensions/coding-standards/spring/rules/data-testing-and-transactions.md +36 -0
- package/augment-extensions/coding-standards/spring/rules/production-operations.md +40 -0
- package/augment-extensions/coding-standards/spring/rules/web-apis-and-security.md +43 -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/augment-extensions/workflows/agent-engineering/README.md +67 -0
- package/augment-extensions/workflows/agent-engineering/examples/contracts.cjs +89 -0
- package/augment-extensions/workflows/agent-engineering/examples/demo.cjs +17 -0
- package/augment-extensions/workflows/agent-engineering/examples/evaluation-cases.json +7 -0
- package/augment-extensions/workflows/agent-engineering/examples/graphs.cjs +149 -0
- package/augment-extensions/workflows/agent-engineering/examples/loop.cjs +125 -0
- package/augment-extensions/workflows/agent-engineering/examples/recovery.cjs +51 -0
- package/augment-extensions/workflows/agent-engineering/examples/stub.cjs +11 -0
- package/augment-extensions/workflows/agent-engineering/examples/verify.cjs +21 -0
- package/augment-extensions/workflows/agent-engineering/module.json +24 -0
- package/augment-extensions/workflows/agent-engineering/rules/01-adoption.md +30 -0
- package/augment-extensions/workflows/agent-engineering/rules/02-agents.md +34 -0
- package/augment-extensions/workflows/agent-engineering/rules/03-contracts.md +34 -0
- package/augment-extensions/workflows/agent-engineering/rules/04-loops.md +39 -0
- package/augment-extensions/workflows/agent-engineering/rules/05-graphs.md +39 -0
- package/augment-extensions/workflows/agent-engineering/rules/06-improvement.md +38 -0
- package/augment-extensions/workflows/agent-engineering/schemas/contracts.schema.json +1 -0
- package/augment-extensions/workflows/agent-engineering/scripts/validate.cjs +32 -0
- package/augment-extensions/workflows/agent-engineering/sources.md +12 -0
- package/augment-extensions/workflows/agent-engineering/templates/agent.json +40 -0
- package/augment-extensions/workflows/agent-engineering/templates/check-tool.json +94 -0
- package/augment-extensions/workflows/agent-engineering/templates/evidence.json +29 -0
- package/augment-extensions/workflows/agent-engineering/templates/invocation.json +40 -0
- package/augment-extensions/workflows/agent-engineering/templates/node.json +27 -0
- package/augment-extensions/workflows/agent-engineering/templates/state.json +27 -0
- package/augment-extensions/workflows/agent-engineering/templates/task.json +40 -0
- package/augment-extensions/workflows/agent-engineering/templates/tool.json +52 -0
- package/augment-extensions/workflows/decision-layer/README.md +136 -0
- package/augment-extensions/workflows/decision-layer/examples/call-inventory.json +6 -0
- package/augment-extensions/workflows/decision-layer/examples/config.json +9 -0
- package/augment-extensions/workflows/decision-layer/examples/decision.json +13 -0
- package/augment-extensions/workflows/decision-layer/examples/labeled-cases.json +410 -0
- package/augment-extensions/workflows/decision-layer/examples/source.txt +3 -0
- package/augment-extensions/workflows/decision-layer/examples/task.json +8 -0
- package/augment-extensions/workflows/decision-layer/installation/package-lock.json +27 -0
- package/augment-extensions/workflows/decision-layer/installation/package.json +7 -0
- package/augment-extensions/workflows/decision-layer/installation/sources.json +18 -0
- package/augment-extensions/workflows/decision-layer/module.json +24 -0
- package/augment-extensions/workflows/decision-layer/rules/00-index.md +5 -0
- package/augment-extensions/workflows/decision-layer/rules/01-responsibilities.md +15 -0
- package/augment-extensions/workflows/decision-layer/rules/02-operation.md +13 -0
- package/augment-extensions/workflows/decision-layer/runtime/cli.cjs +70 -0
- package/augment-extensions/workflows/decision-layer/runtime/common.cjs +85 -0
- package/augment-extensions/workflows/decision-layer/runtime/contracts.d.ts +8 -0
- package/augment-extensions/workflows/decision-layer/runtime/decisions.cjs +198 -0
- package/augment-extensions/workflows/decision-layer/runtime/evaluate.cjs +61 -0
- package/augment-extensions/workflows/decision-layer/runtime/install.cjs +186 -0
- package/augment-extensions/workflows/decision-layer/runtime/integrations.cjs +64 -0
- package/augment-extensions/workflows/decision-layer/runtime/runner.cjs +201 -0
- package/augment-extensions/workflows/decision-layer/runtime/worker-child.cjs +15 -0
- package/augment-extensions/workflows/decision-layer/runtime/workers.cjs +15 -0
- package/augment-extensions/workflows/decision-layer/schemas/config.schema.json +27 -0
- package/augment-extensions/workflows/decision-layer/scripts/validate.cjs +16 -0
- package/augment-extensions/workflows/decision-layer/sources.md +25 -0
- package/cli/MODULES.md +804 -302
- package/cli/dist/__test_file-tracking.d.ts +2 -0
- package/cli/dist/__test_file-tracking.d.ts.map +1 -0
- package/cli/dist/__test_file-tracking.js +4 -0
- package/cli/dist/__test_file-tracking.js.map +1 -0
- 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/ast-parser.d.ts.map +1 -1
- package/cli/dist/analysis/ast-parser.js +25 -9
- package/cli/dist/analysis/ast-parser.js.map +1 -1
- 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 +67 -37
- 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/decision.d.ts +4 -0
- package/cli/dist/commands/decision.d.ts.map +1 -0
- package/cli/dist/commands/decision.js +32 -0
- package/cli/dist/commands/decision.js.map +1 -0
- 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-decision.d.ts +6 -0
- package/cli/dist/commands/gui-decision.d.ts.map +1 -0
- package/cli/dist/commands/gui-decision.js +189 -0
- package/cli/dist/commands/gui-decision.js.map +1 -0
- package/cli/dist/commands/gui-module-manager.d.ts +14 -0
- package/cli/dist/commands/gui-module-manager.d.ts.map +1 -0
- package/cli/dist/commands/gui-module-manager.js +326 -0
- package/cli/dist/commands/gui-module-manager.js.map +1 -0
- package/cli/dist/commands/gui.d.ts +5 -9
- package/cli/dist/commands/gui.d.ts.map +1 -1
- package/cli/dist/commands/gui.js +186 -231
- 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 +84 -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 +5 -0
- package/cli/dist/commands/link.d.ts.map +1 -1
- package/cli/dist/commands/link.js +137 -29
- 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/search.js +1 -11
- package/cli/dist/commands/search.js.map +1 -1
- 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 +2 -0
- package/cli/dist/commands/unlink.d.ts.map +1 -1
- package/cli/dist/commands/unlink.js +86 -44
- 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/gui.d.ts +4 -0
- package/cli/dist/types/gui.d.ts.map +1 -1
- 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 +2 -2
- package/cli/dist/utils/coordination-queries.js.map +1 -1
- package/cli/dist/utils/decision-runner.d.ts +18 -0
- package/cli/dist/utils/decision-runner.d.ts.map +1 -0
- package/cli/dist/utils/decision-runner.js +114 -0
- package/cli/dist/utils/decision-runner.js.map +1 -0
- 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 +2 -2
- package/cli/dist/utils/extractCommandHelp.d.ts.map +1 -1
- package/cli/dist/utils/extractCommandHelp.js +10 -4
- 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 +5 -5
- package/cli/dist/utils/file-tracking.js.map +1 -1
- package/cli/dist/utils/glob-match.d.ts +6 -0
- package/cli/dist/utils/glob-match.d.ts.map +1 -0
- package/cli/dist/utils/glob-match.js +8 -0
- package/cli/dist/utils/glob-match.js.map +1 -0
- package/cli/dist/utils/gui-helpers.d.ts.map +1 -1
- package/cli/dist/utils/gui-helpers.js +7 -3
- package/cli/dist/utils/gui-helpers.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 +15 -0
- package/cli/dist/utils/install-rules.d.ts.map +1 -1
- package/cli/dist/utils/install-rules.js +247 -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 +7 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -1
- package/cli/dist/utils/module-system.js +137 -42
- package/cli/dist/utils/module-system.js.map +1 -1
- package/cli/dist/utils/modules-catalog.d.ts.map +1 -1
- package/cli/dist/utils/modules-catalog.js +5 -0
- package/cli/dist/utils/modules-catalog.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 +89 -6
- package/package.json +150 -135
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this module are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [1.0.0] - 2026-11-26
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Initial Java standards module covering project baselines, language and API design, reliability, concurrency, testing, tooling, and secure coding.
|
|
12
|
+
- Added a Java 17 illustrative immutable request example.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Java Coding Standards
|
|
2
|
+
|
|
3
|
+
Version 1.0.0 provides practical, project-agnostic guidance for modern Java development. It is designed to be linked by itself or alongside the Spring module.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Use these rules for Java language and platform decisions that apply across application types: packages, naming, API design, types, collections, null handling, exceptions, resources, concurrency, tests, build tools, documentation, and secure coding.
|
|
8
|
+
|
|
9
|
+
This module does not assume a JDK release, framework, build system, or project layout. Before generating code, inspect the project's Maven or Gradle configuration, toolchain settings, wrapper, CI configuration, and supported runtime. Keep generated syntax and APIs within that declared baseline. The included value-object example is explicitly labeled for Java 17.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Link the module directly:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
augx link coding-standards/java
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
It can also be inspected without linking:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
augx show coding-standards/java
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
1. Read the project's JDK toolchain, compiler release, CI matrix, and supported runtime before selecting language features.
|
|
28
|
+
2. Load the rule file that matches the change: language and API design, reliability and concurrency, or testing, tooling, and security.
|
|
29
|
+
3. Use this module for Java decisions. If the project uses Spring, use the Spring module for container and framework behavior.
|
|
30
|
+
|
|
31
|
+
## Contents
|
|
32
|
+
|
|
33
|
+
- [Language and API design](rules/language-and-api-design.md): project baseline, naming, packages, encapsulation, generics, collections, null handling, and stable language features.
|
|
34
|
+
- [Reliability and concurrency](rules/reliability-and-concurrency.md): validation, exceptions, resource management, concurrency, and measured performance.
|
|
35
|
+
- [Testing, tooling, and security](rules/testing-tooling-and-security.md): useful tests, Maven and Gradle practices, documentation, and secure coding.
|
|
36
|
+
- [SearchRequest.java](examples/SearchRequest.java): an illustrative Java 17 record with boundary validation and a defensive collection copy.
|
|
37
|
+
|
|
38
|
+
## Relationship to Spring guidance
|
|
39
|
+
|
|
40
|
+
This module owns general Java language and platform guidance. [Spring Framework and Spring Boot Standards](../spring/README.md) owns dependency injection, bean configuration, Boot behavior, HTTP endpoints, framework testing, transactions, Spring Security integration, and Actuator operations. Link either module on its own. When both are linked, use this module for Java decisions and the Spring module for Spring-specific decisions.
|
|
41
|
+
|
|
42
|
+
## Version and source policy
|
|
43
|
+
|
|
44
|
+
Treat the JDK release and compiler target configured by the consuming project as authoritative. Use stable language features supported by that target. Do not enable preview features by default. Preview and incubator APIs require explicit project approval, matching build and runtime flags, and tests on every supported runtime.
|
|
45
|
+
|
|
46
|
+
For language and API changes, consult the [Java SE specifications](https://docs.oracle.com/javase/specs/) and the version-specific [Java language changes by release](https://docs.oracle.com/en/java/javase/21/language/java-language-changes-release.html). For reproducible builds, use the project's existing Maven or Gradle wrapper and toolchain configuration. See the official [Maven toolchains guide](https://maven.apache.org/guides/mini/guide-using-toolchains.html) and [Gradle toolchains guide](https://docs.gradle.org/current/userguide/toolchains.html).
|
|
47
|
+
|
|
48
|
+
## Character count
|
|
49
|
+
|
|
50
|
+
The count covers every file in this module directory, including manifests, documentation, rules, and examples: see `module.json` and `metadata.json` for the verified total.
|
|
51
|
+
|
|
52
|
+
## Changelog
|
|
53
|
+
|
|
54
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Illustrative Java 17 example. Adapt nullness and validation choices to the consuming project.
|
|
2
|
+
import java.util.List;
|
|
3
|
+
import java.util.Objects;
|
|
4
|
+
|
|
5
|
+
public record SearchRequest(String term, List<String> tags) {
|
|
6
|
+
public SearchRequest {
|
|
7
|
+
term = Objects.requireNonNull(term, "term").strip();
|
|
8
|
+
if (term.isEmpty()) {
|
|
9
|
+
throw new IllegalArgumentException("term must not be blank");
|
|
10
|
+
}
|
|
11
|
+
tags = List.copyOf(tags);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"name": "java-standards",
|
|
4
|
+
"displayName": "Java Coding Standards",
|
|
5
|
+
"description": "Version-aware Java development guidance for project structure, language features, APIs, reliability, testing, tooling, and secure coding.",
|
|
6
|
+
"type": "coding-standards",
|
|
7
|
+
"language": "java",
|
|
8
|
+
"tags": [
|
|
9
|
+
"java",
|
|
10
|
+
"jdk",
|
|
11
|
+
"jvm",
|
|
12
|
+
"coding-standards",
|
|
13
|
+
"language-features",
|
|
14
|
+
"api-design",
|
|
15
|
+
"testing",
|
|
16
|
+
"concurrency",
|
|
17
|
+
"security",
|
|
18
|
+
"maven",
|
|
19
|
+
"gradle"
|
|
20
|
+
],
|
|
21
|
+
"compatibility": {
|
|
22
|
+
"augmentMinVersion": "1.0.0"
|
|
23
|
+
},
|
|
24
|
+
"characterCount": 19105,
|
|
25
|
+
"lastUpdated": "2026-11-26",
|
|
26
|
+
"files": {
|
|
27
|
+
"rules": [
|
|
28
|
+
"language-and-api-design.md",
|
|
29
|
+
"reliability-and-concurrency.md",
|
|
30
|
+
"testing-tooling-and-security.md"
|
|
31
|
+
],
|
|
32
|
+
"examples": [
|
|
33
|
+
"SearchRequest.java"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "java-standards",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"displayName": "Java Coding Standards",
|
|
5
|
+
"description": "Version-aware Java development guidance for project structure, language features, APIs, reliability, testing, tooling, and secure coding.",
|
|
6
|
+
"type": "coding-standards",
|
|
7
|
+
"author": "Augment Extensions",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"tags": [
|
|
10
|
+
"java",
|
|
11
|
+
"jdk",
|
|
12
|
+
"jvm",
|
|
13
|
+
"coding-standards",
|
|
14
|
+
"language-features",
|
|
15
|
+
"api-design",
|
|
16
|
+
"testing",
|
|
17
|
+
"concurrency",
|
|
18
|
+
"security",
|
|
19
|
+
"maven",
|
|
20
|
+
"gradle"
|
|
21
|
+
],
|
|
22
|
+
"files": [
|
|
23
|
+
"rules/language-and-api-design.md",
|
|
24
|
+
"rules/reliability-and-concurrency.md",
|
|
25
|
+
"rules/testing-tooling-and-security.md",
|
|
26
|
+
"examples/SearchRequest.java"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": [],
|
|
29
|
+
"augment": {
|
|
30
|
+
"characterCount": 19105,
|
|
31
|
+
"priority": "high",
|
|
32
|
+
"category": "coding-standards",
|
|
33
|
+
"language": "java"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Java Language and API Design
|
|
2
|
+
|
|
3
|
+
Use these rules when designing Java types, packages, public APIs, and language-level changes.
|
|
4
|
+
|
|
5
|
+
## Start with the project's actual baseline
|
|
6
|
+
|
|
7
|
+
1. Read the configured JDK and release target in Maven or Gradle, the wrapper version, CI jobs, and supported deployment runtimes. Check compiler and runtime settings together; a locally installed JDK does not raise the project's baseline by itself.
|
|
8
|
+
2. Prefer a toolchain or compiler `release` setting already established by the project. Keep source, target, and runtime compatibility aligned. Do not recommend a language feature until the project's minimum compiler accepts it.
|
|
9
|
+
3. Treat preview and incubator features as opt-in experiments. Identify the exact JDK release, enable flags, deployment constraints, and removal risk. Do not enable them in ordinary production code without an explicit project decision.
|
|
10
|
+
4. When documentation and examples disagree with the configured baseline, follow the project and call out the mismatch instead of silently raising the target.
|
|
11
|
+
|
|
12
|
+
Records became a permanent feature in Java 16, sealed classes in Java 17, and pattern matching for `switch` in Java 21. Check the selected release's official language changes before applying a feature. A feature being stable in one release does not make it valid for an older target.
|
|
13
|
+
|
|
14
|
+
## Name and organize code consistently
|
|
15
|
+
|
|
16
|
+
- Use the repository's formatter and checkstyle rules if present. If none exist, follow nearby code and avoid introducing a new formatter or style dependency as part of a routine change.
|
|
17
|
+
- Use `UpperCamelCase` for types, `lowerCamelCase` for methods and variables, and uppercase underscore-separated names only for `static final` constants that represent named constants. Prefer descriptive names over abbreviations.
|
|
18
|
+
- Keep package names lowercase and stable. Organize packages around a domain or feature when that matches the application, and avoid a large catch-all `util` package.
|
|
19
|
+
- Keep types cohesive and limit visibility. Use package-private visibility for implementation details unless a wider API is needed. Do not expose fields or mutable collections as an accidental API.
|
|
20
|
+
- Keep imports explicit and remove unused imports. Avoid wildcard imports when they hide ownership or create ambiguity.
|
|
21
|
+
- Follow the existing source, test, and resource layout. Do not move project files solely to match a generic template.
|
|
22
|
+
|
|
23
|
+
## Design types and APIs for callers
|
|
24
|
+
|
|
25
|
+
- Prefer small interfaces that describe a real boundary. Avoid interfaces with one implementation when they add no substitution, testing, or API value.
|
|
26
|
+
- Use generics to preserve useful type information. Avoid raw types, unchecked casts, and broad `Object` APIs when a parameterized type expresses the contract.
|
|
27
|
+
- Choose a collection based on required behavior: ordering, uniqueness, lookup, mutability, and expected size. Return the narrowest useful abstraction and document ordering when callers rely on it.
|
|
28
|
+
- Make value objects immutable where practical. Copy mutable inputs and outputs at ownership boundaries. A `final` reference does not make its referenced object immutable.
|
|
29
|
+
- Prefer enums for a fixed set of alternatives. Use sealed hierarchies when the project baseline supports them and limiting implementations is part of the model.
|
|
30
|
+
- Keep public API changes deliberate. Check source and binary compatibility expectations, nullability conventions, serialization format, and downstream callers before changing a public signature.
|
|
31
|
+
|
|
32
|
+
## Handle null and use language features deliberately
|
|
33
|
+
|
|
34
|
+
- Inspect the project's nullness annotations and static analysis configuration. Apply the established convention consistently. Validate required inputs at system boundaries and at constructors that enforce invariants.
|
|
35
|
+
- Use `Optional<T>` mainly to express a possibly absent return value. Do not use it as a substitute for validation or as a default field, parameter, or collection type unless project conventions require that shape.
|
|
36
|
+
- Use a primitive when absence is not part of the contract. If absence matters, model it explicitly rather than using a magic value.
|
|
37
|
+
- Use a record for a transparent data carrier when its component model fits the domain. Records are shallowly immutable: copy mutable collections and validate invariants in the canonical constructor where needed.
|
|
38
|
+
- Use pattern matching and other newer syntax only when the project's release supports the stable form and the result remains clearer to maintainers. Avoid preview syntax in general-purpose examples.
|
|
39
|
+
|
|
40
|
+
See [SearchRequest.java](../examples/SearchRequest.java) for an illustrative Java 17 record that validates input and defensively copies a collection. It is not a complete project or a substitute for the consuming project's nullness and validation conventions.
|
|
41
|
+
|
|
42
|
+
## Official references
|
|
43
|
+
|
|
44
|
+
- [Java SE specifications](https://docs.oracle.com/javase/specs/)
|
|
45
|
+
- [Java language changes by release](https://docs.oracle.com/en/java/javase/21/language/java-language-changes-release.html)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Java Reliability and Concurrency
|
|
2
|
+
|
|
3
|
+
Use explicit contracts and ownership to make failures, resources, and shared state predictable.
|
|
4
|
+
|
|
5
|
+
## Validate inputs and handle failures
|
|
6
|
+
|
|
7
|
+
- Validate untrusted or externally supplied values at the boundary where they enter the application. Keep domain invariants close to the type or operation that owns them.
|
|
8
|
+
- Use exceptions for exceptional failure, not routine branching. Select checked or unchecked exceptions according to the existing API and recovery contract; do not convert every failure into a generic `RuntimeException`.
|
|
9
|
+
- Catch an exception only where the code can recover, add useful context, translate it at a layer boundary, or complete required cleanup. Preserve the cause when translating. Do not catch `Throwable` for normal application flow.
|
|
10
|
+
- Never swallow an exception or log it and then report success. Include stable identifiers and operation context in logs, but exclude credentials, tokens, and sensitive payloads.
|
|
11
|
+
- Avoid using exceptions for expected absence when a return type or explicit result is clearer.
|
|
12
|
+
- Keep error messages useful to operators and safe for users. Do not return implementation details or stack traces through public APIs.
|
|
13
|
+
|
|
14
|
+
## Manage resources with clear ownership
|
|
15
|
+
|
|
16
|
+
- Use try-with-resources for `AutoCloseable` resources so cleanup runs on both success and failure.
|
|
17
|
+
- Define who owns and closes streams, clients, executors, and other resources. Do not close a resource supplied by a caller unless the contract says ownership transfers.
|
|
18
|
+
- Avoid keeping sockets, files, database resources, or locks open longer than necessary. Set timeouts for network operations using the APIs and project defaults that apply.
|
|
19
|
+
- Use shutdown hooks only when the application lifecycle requires them. Prefer the existing framework or container lifecycle for managed services.
|
|
20
|
+
|
|
21
|
+
## Keep concurrent state safe
|
|
22
|
+
|
|
23
|
+
- Prefer immutable values and confinement over shared mutable state. Make thread-safety assumptions visible in type and method documentation when they affect callers.
|
|
24
|
+
- Use the concurrency primitive that expresses the requirement: executor services for task lifecycle, atomics for simple shared values, locks for compound invariants, and concurrent collections for supported concurrent access. A concurrent collection does not make a multi-step workflow atomic.
|
|
25
|
+
- Preserve interruption. If a method cannot rethrow `InterruptedException`, restore the interrupt flag before translating or returning.
|
|
26
|
+
- Avoid blocking calls on event-loop or request threads when the surrounding framework requires non-blocking work. Do not introduce thread pools without defining capacity, queueing, rejection, shutdown, and cancellation behavior.
|
|
27
|
+
- Consider virtual threads only when the project's JDK supports them, dependencies are compatible, and workload measurements support the choice. Do not assume they make CPU-heavy work faster or remove the need for limits on scarce downstream resources.
|
|
28
|
+
- Avoid `ThreadLocal` state unless its lifecycle and cleanup are well-defined, especially in pooled threads.
|
|
29
|
+
|
|
30
|
+
## Measure performance before tuning
|
|
31
|
+
|
|
32
|
+
- Choose an appropriate algorithm and data structure before micro-optimizing syntax. Use a representative profiler or benchmark when performance is material.
|
|
33
|
+
- Avoid repeated expensive work in loops, unbounded caches, unnecessary object retention, and accidental quadratic algorithms. Do not add caching without an invalidation and memory policy.
|
|
34
|
+
- Do not replace clear loops with streams or vice versa for assumed speed. Choose the form that best expresses the operation, and measure if speed is a requirement.
|
|
35
|
+
- Check allocation, I/O, lock contention, and database round trips at the relevant system boundary. Avoid speculative optimization based on tiny synthetic examples.
|
|
36
|
+
|
|
37
|
+
## Apply security checks at trust boundaries
|
|
38
|
+
|
|
39
|
+
- Treat network, file, environment, and user input as untrusted. Validate type, length, range, and allowed values before use.
|
|
40
|
+
- Use parameterized APIs for database queries and safe encoders for output contexts. Do not assemble executable SQL, shell commands, HTML, or expression strings from untrusted input.
|
|
41
|
+
- Use maintained cryptographic libraries and documented algorithms. Do not create custom encryption, password hashing, or random-number schemes.
|
|
42
|
+
- Keep secrets out of source files, logs, test fixtures, and exception messages. Use the project's approved secret configuration and rotation path.
|
|
43
|
+
- Avoid unsafe deserialization and unrestricted polymorphic type handling for untrusted data. Review dependency and serialization behavior against the project's supported JDK and libraries.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Java Testing, Tooling, and Documentation
|
|
2
|
+
|
|
3
|
+
Make changes repeatable through the project's existing build, test, and review workflow.
|
|
4
|
+
|
|
5
|
+
## Test observable behavior
|
|
6
|
+
|
|
7
|
+
- Follow the project's existing test framework and directory conventions. Do not add another test framework for a small change.
|
|
8
|
+
- Write focused unit tests for domain logic and edge cases. Assert outcomes and behavior rather than private implementation details.
|
|
9
|
+
- Add integration tests where behavior depends on a real boundary such as persistence, serialization, network configuration, or framework wiring. Use isolated fixtures and deterministic inputs.
|
|
10
|
+
- Keep tests repeatable: control clocks, random values, environment, ordering, and shared state when they affect results. Clean up temporary files and resources.
|
|
11
|
+
- Test failure paths and invalid input when they form part of the contract. Do not test only that a method was called if the observable result matters.
|
|
12
|
+
- Keep the test command and target JDK consistent with CI. A test passing locally on a newer JDK does not prove compatibility with the project's minimum runtime.
|
|
13
|
+
|
|
14
|
+
## Keep builds reproducible
|
|
15
|
+
|
|
16
|
+
- Use the checked-in Maven Wrapper or Gradle Wrapper. Preserve established plugin and dependency management.
|
|
17
|
+
- Set the Java toolchain or compiler release explicitly when the project supports it. Compile and test against the declared minimum release in CI, and use a separate job for newer supported runtimes where required.
|
|
18
|
+
- Keep dependency versions centrally managed through the existing parent, BOM, version catalog, or plugin conventions. Add only dependencies needed by the feature.
|
|
19
|
+
- Preserve deterministic builds and lock down versions according to project policy. Do not change wrappers, plugins, or build structure as an incidental cleanup.
|
|
20
|
+
- Run the narrow relevant build or test task first, then the broader checks required by the change and repository instructions. Report skipped commands accurately.
|
|
21
|
+
|
|
22
|
+
## Document public contracts
|
|
23
|
+
|
|
24
|
+
- Add Javadoc when a public type or method has non-obvious purpose, constraints, lifecycle, threading, nullability, or failure behavior.
|
|
25
|
+
- Document observable behavior and examples rather than restating every method name. Keep documentation current when public behavior changes.
|
|
26
|
+
- Use comments to explain a reason, invariant, workaround, or surprising constraint. Remove stale comments instead of leaving contradictory guidance.
|
|
27
|
+
|
|
28
|
+
## Review security and maintenance risks
|
|
29
|
+
|
|
30
|
+
- Check dependency provenance, maintenance, license policy, and known vulnerabilities using the repository's approved tools.
|
|
31
|
+
- Use least privilege for file, process, network, and cloud access. Avoid hard-coded credentials, insecure random values, and unsafe trust decisions.
|
|
32
|
+
- Check logs and error responses for secret or personal data exposure. Avoid logging full request bodies by default.
|
|
33
|
+
- Use maintained APIs supported by the project's baseline. Before replacing a deprecated API, verify the target library version and migration guidance.
|
|
34
|
+
|
|
35
|
+
## Official references
|
|
36
|
+
|
|
37
|
+
- [Java SE specifications](https://docs.oracle.com/javase/specs/)
|
|
38
|
+
- [Maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html)
|
|
39
|
+
- [Gradle Java toolchains](https://docs.gradle.org/current/userguide/toolchains.html)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this module will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-05-03
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of Q# Coding Standards module
|
|
13
|
+
- AI prompter rules file (`q-standards.md`) for QDK 1.0+ and Azure Quantum
|
|
14
|
+
- Skeleton split-rule files: naming, qubit management, error handling, performance, security, testing
|
|
15
|
+
- Bell-state example (`examples/bell-state.qs`)
|
|
16
|
+
- `augx` CLI and `augx gui` integration via standard module discovery
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Q# Coding Standards
|
|
2
|
+
|
|
3
|
+
AI prompter rules and coding standards for Q# quantum development with the Quantum Development Kit (QDK) and Azure Quantum.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This module ships a single, AI-optimized prompter rules file that Augment Code AI loads when generating, reviewing, or refactoring Q# code. Guidance covers qubit management, functor support, hybrid classical-quantum patterns, resource estimation, and Microsoft.Quantum.* library usage.
|
|
8
|
+
|
|
9
|
+
## Key Benefits
|
|
10
|
+
|
|
11
|
+
- **Quantum Correctness**: Operations vs. functions, `Adj + Ctl` functors, qubit scoping rules
|
|
12
|
+
- **Resource Awareness**: Resource estimation, gate-count and depth minimization
|
|
13
|
+
- **Hybrid Interop**: Classical-quantum separation, `@EntryPoint`, IQ#/C# host patterns
|
|
14
|
+
- **Library-First**: `Microsoft.Quantum.Intrinsic`, `Canon`, `Preparation`, `Diagnostics`
|
|
15
|
+
- **QDK 1.0+**: Targets modern QDK, Azure Quantum, and current simulators
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
augx link coding-standards/q
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Verify with:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
augx list --linked
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Contents
|
|
30
|
+
|
|
31
|
+
### Rules
|
|
32
|
+
|
|
33
|
+
- **q-standards.md** - Q# AI prompter: naming, formatting, qubit management, functors, error handling, resource estimation, security, anti-patterns
|
|
34
|
+
- **naming-conventions.md** - Naming rules (skeleton)
|
|
35
|
+
- **qubit-management.md** - `use`/`borrow`, `Reset`, `within/apply`, functors (skeleton)
|
|
36
|
+
- **error-handling.md** - `fail`, `Result` branching, diagnostics assertions (skeleton)
|
|
37
|
+
- **performance-optimization.md** - Resource estimation, gate-count and depth (skeleton)
|
|
38
|
+
- **security.md** - No-cloning, QKD/QRNG, host boundary hygiene (skeleton)
|
|
39
|
+
- **testing.md** - Diagnostics assertions, simulators, functor tests (skeleton)
|
|
40
|
+
|
|
41
|
+
### Examples
|
|
42
|
+
|
|
43
|
+
- **bell-state.qs** - Skeleton Bell-pair preparation with `@EntryPoint`
|
|
44
|
+
|
|
45
|
+
## Discovery
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
augx show q-standards
|
|
49
|
+
augx search "qubit"
|
|
50
|
+
augx search "resource estimation"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This module is auto-discovered by the `augx` CLI and `augx gui` interface via the standard module loader; no additional configuration is required.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Array and tuple naming conventions in Q#.
|
|
3
|
+
HOW: Arrays use camelCase plural names ending in "s" or "Array" (e.g., measurementResults, qubitArray). Tuples use camelCase descriptive names; when deconstructing, use meaningful variable names. Avoid generic names like "data".
|
|
4
|
+
WHEN: For qubit registers, measurement outcomes, or any multi-value classical data returned from callables.
|
|
5
|
+
WHERE: In variable declarations, operation parameters, and return types throughout quantum algorithms.
|
|
6
|
+
WHY: Arrays and tuples are fundamental to representing qubit registers and measurement statistics in Q#; clear naming prevents off-by-one errors in indexing and makes resource estimation and debugging significantly easier in large-scale quantum programs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
namespace MyTechToday.Quantum.NamingStandards.Collections {
|
|
10
|
+
|
|
11
|
+
open Microsoft.Quantum.Intrinsic;
|
|
12
|
+
open Microsoft.Quantum.Measurement;
|
|
13
|
+
open Microsoft.Quantum.Arrays;
|
|
14
|
+
|
|
15
|
+
// Good: camelCase plural array and descriptive tuple
|
|
16
|
+
operation RunMultipleMeasurements(qubitArray : Qubit[], repetitions : Int) : Result[] {
|
|
17
|
+
mutable measurementResults = new Result[0]; // camelCase plural array
|
|
18
|
+
for _ in 1..repetitions {
|
|
19
|
+
let singleShotResult = M(qubitArray[0]); // Descriptive tuple element name
|
|
20
|
+
set measurementResults += [singleShotResult];
|
|
21
|
+
}
|
|
22
|
+
return measurementResults;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Bad example (commented for illustration only):
|
|
26
|
+
// let results = ...; // Incorrect: vague singular name for array
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Callable alias naming conventions in Q#.
|
|
3
|
+
HOW: Aliases use PascalCase matching the original callable style (e.g., MyHadamard = H); open directives use full hierarchical PascalCase.
|
|
4
|
+
WHEN: Creating shorter or domain-specific names for frequently used library callables.
|
|
5
|
+
WHERE: After open statements or inside namespace with "let" alias syntax.
|
|
6
|
+
WHY: Aliases reduce verbosity in long quantum circuits while preserving clarity; maintains consistency with original PascalCase for discoverability.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: PascalCase alias for library callable
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.Aliases {
|
|
11
|
+
|
|
12
|
+
open Microsoft.Quantum.Intrinsic as IntrinsicGates;
|
|
13
|
+
|
|
14
|
+
// GOOD: PascalCase alias
|
|
15
|
+
let MyHadamard = IntrinsicGates.H;
|
|
16
|
+
|
|
17
|
+
operation UseAlias(targetQubit : Qubit) : Unit {
|
|
18
|
+
MyHadamard(targetQubit); // Alias call retains style
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Quantum circuit and gate sequence naming conventions in Q#.
|
|
3
|
+
HOW: Circuit variables use camelCase with "Circuit" suffix (e.g., bellCircuit); gate sequences use camelCase plural (e.g., gateSequence).
|
|
4
|
+
WHEN: Building, composing, or applying sequences of gates or sub-circuits.
|
|
5
|
+
WHERE: Variable declarations for ApplyUnitary or custom circuit types.
|
|
6
|
+
WHY: Modern quantum programming treats circuits as first-class; descriptive naming clarifies composition order and prevents errors in layered algorithms.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: camelCase for circuit variables
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.Circuits {
|
|
11
|
+
|
|
12
|
+
open Microsoft.Quantum.Canon;
|
|
13
|
+
|
|
14
|
+
operation BuildAndApplyCircuit() : Unit {
|
|
15
|
+
// GOOD: camelCase circuit variable
|
|
16
|
+
let bellCircuit = [H, CNOT]; // Gate sequence
|
|
17
|
+
|
|
18
|
+
// GOOD: camelCase gate sequence
|
|
19
|
+
let gateSequence = [X, Y, Z];
|
|
20
|
+
|
|
21
|
+
// BAD example (commented): let BellCircuit = ...
|
|
22
|
+
// Violates: PascalCase
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Constant value naming conventions in Q#.
|
|
3
|
+
HOW: Constants use camelCase (preferred) or UPPER_SNAKE_CASE only for truly global immutable values (e.g., maxQubitsAllowed); never magic numbers.
|
|
4
|
+
WHEN: Defining reusable numeric or string constants for qubit counts, angles, or tolerances.
|
|
5
|
+
WHERE: Top-level let statements inside namespace or inside operations.
|
|
6
|
+
WHY: Quantum code often uses fixed values (angles, qubit limits); named constants improve maintainability and prevent hard-coded value errors in simulations or hardware runs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: camelCase constants with descriptive names
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.Constants {
|
|
11
|
+
|
|
12
|
+
// GOOD: camelCase for local constants
|
|
13
|
+
let piOverFour = 3.1415926535 / 4.0;
|
|
14
|
+
|
|
15
|
+
operation UseConstantAngle(targetQubit : Qubit) : Unit {
|
|
16
|
+
// GOOD: Reusing constant
|
|
17
|
+
Rz(piOverFour, targetQubit);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/augment-extensions/coding-standards/q/examples/EntryPointAttributeNamingConventions.qs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Entry point and attribute naming conventions in Q#.
|
|
3
|
+
HOW: @EntryPoint() uses exact PascalCase attribute; custom attributes follow PascalCase.
|
|
4
|
+
WHEN: Marking the main executable operation in Q# programs for simulators or hardware.
|
|
5
|
+
WHERE: Immediately above the primary operation declaration.
|
|
6
|
+
WHY: Ensures the quantum program has a clear starting point for execution; consistent attribute naming aligns with Q# compiler and Azure Quantum requirements.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: Exact @EntryPoint() attribute
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.EntryPoints {
|
|
11
|
+
|
|
12
|
+
@EntryPoint()
|
|
13
|
+
operation MainQuantumProgram() : Unit {
|
|
14
|
+
// GOOD: Operation follows PascalCase as usual
|
|
15
|
+
Message("Quantum program started with proper entry point");
|
|
16
|
+
}
|
|
17
|
+
}
|
package/augment-extensions/coding-standards/q/examples/FunctorApplicationInControlledCircuits.qs
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// FunctorApplicationInControlledCircuits.qs
|
|
2
|
+
// Demonstrates optimal Q# naming conventions for functor (Adjoint/Controlled) application within controlled gate sequences.
|
|
3
|
+
|
|
4
|
+
// Context & Educational Value
|
|
5
|
+
// This file extends the examples library by focusing on naming conventions for functor application (Adjoint and Controlled) within controlled gate sequences typical of phase estimation or variational circuits. It uniquely contributes by showing how to name controlled operations, adjoint blocks, and auxiliary qubits so that functor intent remains explicit even in deeply nested quantum logic, complementing the repo's foundational examples with advanced circuit-control patterns.
|
|
6
|
+
// The implementation employs 17 distinct Q# constructs (multiple using/borrow, H/X/CNOT/CZ/Rz/Ry, Measure/MResetX, Reset, Adjoint/Controlled functors, repeat-until-success, within-apply, if statements, for loops, custom operations, arrays, and tuples) in a realistic controlled-phase simulation scenario.
|
|
7
|
+
|
|
8
|
+
qsharp // What: This example demonstrates Q# naming conventions for functor (Adjoint/Controlled) application, controlled unitary sequences, and auxiliary qubit management in a controlled-circuit pattern.
|
|
9
|
+
|
|
10
|
+
//
|
|
11
|
+
// How: The code defines PascalCase operations that explicitly incorporate functor modifiers, uses camelCase for control/target parameters and result variables, and orchestrates complex control flow with repeat-until and within-apply constructs, each accompanied by inline naming rationale.
|
|
12
|
+
//
|
|
13
|
+
// When: Apply these naming patterns during development of variational quantum algorithms, phase-estimation routines, or any controlled-gate heavy subcircuit where functor composition must be unambiguously readable.
|
|
14
|
+
//
|
|
15
|
+
// Where: This module belongs in utility namespaces of larger Q# projects focused on quantum simulation, optimization libraries, or hardware-aware circuit compilation pipelines.
|
|
16
|
+
//
|
|
17
|
+
// Why: Explicit functor-aware naming (e.g., ApplyAdjointControlledPhase) eliminates ambiguity in complex gate sequences, accelerates debugging of unitary inverses and controls, supports collaborative code reviews, and ensures long-term maintainability as circuits evolve toward error-corrected hardware.
|
|
18
|
+
|
|
19
|
+
// Q# naming demonstration file – strictly follows Microsoft QDK conventions for maximum readability and maintainability
|
|
20
|
+
namespace Augment.Extensions.CodingStandards.Q.Examples {
|
|
21
|
+
|
|
22
|
+
open Microsoft.Quantum.Intrinsic;
|
|
23
|
+
open Microsoft.Quantum.Canon;
|
|
24
|
+
open Microsoft.Quantum.Measurement;
|
|
25
|
+
|
|
26
|
+
// Operation name incorporates functor intent and PascalCase for clarity
|
|
27
|
+
operation ApplyAdjointControlledPhase(controlRegister : Qubit[], targetQubit : Qubit) : Unit is Adj + Ctl {
|
|
28
|
+
// Parameter names clearly distinguish control register from target
|
|
29
|
+
Adjoint Controlled Rz([controlRegister[0]], (1.0, targetQubit)); // Adjoint + Controlled functor combination; names make composition explicit
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Separate controlled operation for demonstration
|
|
33
|
+
operation ApplyControlledRotation(controlQubit : Qubit, targetQubit : Qubit, angle : Double) : Unit is Ctl {
|
|
34
|
+
Controlled Ry([controlQubit], (angle, targetQubit)); // Controlled functor with descriptive parameter names
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@EntryPoint()
|
|
38
|
+
operation DemonstrateFunctorControlledCircuit() : Unit {
|
|
39
|
+
using (controlQubit = Qubit(), targetQubit = Qubit(), auxiliaryQubit = Qubit()) {
|
|
40
|
+
|
|
41
|
+
H(controlQubit); // H on control; name indicates role
|
|
42
|
+
X(targetQubit);
|
|
43
|
+
|
|
44
|
+
ApplyAdjointControlledPhase([controlQubit], targetQubit); // custom functor operation call
|
|
45
|
+
|
|
46
|
+
ApplyControlledRotation(controlQubit, targetQubit, 0.785); // additional controlled call
|
|
47
|
+
|
|
48
|
+
CZ(controlQubit, auxiliaryQubit); // CZ demonstrates controlled-Z naming
|
|
49
|
+
|
|
50
|
+
// Measurement with descriptive result name
|
|
51
|
+
let phaseEstimationResult = MResetX(auxiliaryQubit);
|
|
52
|
+
|
|
53
|
+
// Repeat-until-success pattern with camelCase success variable
|
|
54
|
+
mutable successFlag = false;
|
|
55
|
+
repeat {
|
|
56
|
+
H(auxiliaryQubit);
|
|
57
|
+
let tempResult = Measure([PauliZ], [auxiliaryQubit]);
|
|
58
|
+
if (tempResult == Zero) {
|
|
59
|
+
set successFlag = true;
|
|
60
|
+
}
|
|
61
|
+
} until successFlag fixup {
|
|
62
|
+
Reset(auxiliaryQubit);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// within-apply for adjoint block demonstration
|
|
66
|
+
within {
|
|
67
|
+
S(targetQubit);
|
|
68
|
+
} apply {
|
|
69
|
+
T(targetQubit);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Additional constructs: for loop, more gates, ResetAll
|
|
73
|
+
for i in 0..1 {
|
|
74
|
+
let tempControl = controlQubit; // camelCase temporary
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
Rz(0.5, targetQubit);
|
|
78
|
+
Ry(0.25, targetQubit);
|
|
79
|
+
Rx(0.125, auxiliaryQubit);
|
|
80
|
+
|
|
81
|
+
ResetAll([controlQubit, targetQubit, auxiliaryQubit]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/augment-extensions/coding-standards/q/examples/FunctorSpecializationNamingConventions.qs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Functor and specialization naming conventions in Q#.
|
|
3
|
+
HOW: Callables supporting functors keep the base name in PascalCase; specializations are declared with 'is Adj + Ctl' or similar. When naming adjoint or controlled versions explicitly (rare), append "Adjoint" or "Controlled" in PascalCase.
|
|
4
|
+
WHEN: For any operation that needs adjoint or controlled variants, which is common in quantum algorithms requiring reversibility or multi-qubit control.
|
|
5
|
+
WHERE: In operation declarations and when applying functors (e.g., Adjoint OpName()).
|
|
6
|
+
WHY: Functors are a quantum-specific Q# feature enabling automatic generation of adjoint/controlled versions; consistent naming ensures the compiler and developers can reliably apply them, reducing gate count and improving performance in resource estimation.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
namespace MyTechToday.Quantum.NamingStandards.Functors {
|
|
10
|
+
|
|
11
|
+
open Microsoft.Quantum.Intrinsic;
|
|
12
|
+
open Microsoft.Quantum.Canon;
|
|
13
|
+
|
|
14
|
+
// Good: Base operation name in PascalCase with explicit functor support
|
|
15
|
+
operation ApplyPhaseRotation(targetQubit : Qubit) : Unit is Adj + Ctl {
|
|
16
|
+
Rz(PI() / 4.0, targetQubit); // Supports Adjoint and Controlled automatically
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Good: Explicit use of functor in calling code
|
|
20
|
+
operation DemonstrateFunctor() : Unit {
|
|
21
|
+
use q = Qubit();
|
|
22
|
+
Adjoint ApplyPhaseRotation(q); // Adjoint applied to PascalCase name
|
|
23
|
+
Controlled ApplyPhaseRotation([q], q); // Controlled variant
|
|
24
|
+
Reset(q);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Bad example (commented for illustration only):
|
|
28
|
+
// operation apply_phase() is Adj { ... } // Incorrect: lowercase and missing clear verb
|
|
29
|
+
}
|
package/augment-extensions/coding-standards/q/examples/GenericTypeParameterNamingConventions.qs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Generic type parameter naming conventions in Q#.
|
|
3
|
+
HOW: Type parameters use single uppercase letter or descriptive camelCase with "T" prefix (e.g., 'TInput, 'TOutput); avoid single lowercase.
|
|
4
|
+
WHEN: Defining generic operations/functions that work on multiple types (states, results, etc.).
|
|
5
|
+
WHERE: Operation/function signatures using <'T> syntax; inside generic bodies.
|
|
6
|
+
WHY: Generics enable reusable quantum libraries; clear parameter names improve type inference readability and prevent confusion in complex quantum algorithm templates.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: Descriptive generic type parameters
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.Generics {
|
|
11
|
+
|
|
12
|
+
operation ApplyGenericOperation<'TInput, 'TOutput>(input : 'TInput) : 'TOutput {
|
|
13
|
+
// GOOD: 'TInput and 'TOutput follow convention
|
|
14
|
+
// BAD example (commented): operation ApplyGenericOperation<tinput, toutput>
|
|
15
|
+
// Violates: lowercase
|
|
16
|
+
|
|
17
|
+
// Placeholder for generic logic
|
|
18
|
+
return input as 'TOutput; // Type cast for demo
|
|
19
|
+
}
|
|
20
|
+
}
|
package/augment-extensions/coding-standards/q/examples/HamiltonianOperatorNamingConventions.qs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
WHAT: Hamiltonian operator and term naming conventions in Q#.
|
|
3
|
+
HOW: Hamiltonians use camelCase with "Hamiltonian" suffix (e.g., molecularHamiltonian); individual terms use camelCase plural (e.g., pauliTerms).
|
|
4
|
+
WHEN: Defining or evolving under Hamiltonians for variational algorithms or simulation.
|
|
5
|
+
WHERE: Parameter lists or variable declarations for time evolution or expectation values.
|
|
6
|
+
WHY: Variational quantum algorithms depend on accurate Hamiltonian representation; clear naming prevents term misordering and improves readability in chemistry or physics simulations.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// GOOD: camelCase Hamiltonian and term names
|
|
10
|
+
namespace AugmentExtensions.Quantum.NamingStandards.Hamiltonians {
|
|
11
|
+
|
|
12
|
+
open Microsoft.Quantum.Canon;
|
|
13
|
+
|
|
14
|
+
operation EvolveUnderHamiltonian(time : Double) : Unit {
|
|
15
|
+
// GOOD: camelCase Hamiltonian variable
|
|
16
|
+
let molecularHamiltonian = [/* Pauli terms */];
|
|
17
|
+
|
|
18
|
+
// GOOD: camelCase terms array
|
|
19
|
+
let pauliTerms = new Pauli[2];
|
|
20
|
+
|
|
21
|
+
// BAD example (commented): let MolecularHamiltonian = ...
|
|
22
|
+
// Violates: PascalCase
|
|
23
|
+
}
|
|
24
|
+
}
|