@mytechtoday/augment-extensions 3.2.0 → 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 +4 -0
- package/README.md +86 -17
- 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/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/metadata.json +1 -1
- package/augment-extensions/visual-design/module.json +2 -2
- 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/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/cli.js +5 -2
- package/cli/dist/cli.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/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 +3 -9
- package/cli/dist/commands/gui.d.ts.map +1 -1
- package/cli/dist/commands/gui.js +7 -293
- package/cli/dist/commands/gui.js.map +1 -1
- package/cli/dist/commands/link.d.ts +2 -0
- package/cli/dist/commands/link.d.ts.map +1 -1
- package/cli/dist/commands/link.js +82 -84
- package/cli/dist/commands/link.js.map +1 -1
- package/cli/dist/commands/search.js +1 -11
- package/cli/dist/commands/search.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 +51 -45
- package/cli/dist/commands/unlink.js.map +1 -1
- package/cli/dist/lib/module-resolver.d.ts.map +1 -1
- package/cli/dist/lib/module-resolver.js +2 -2
- package/cli/dist/lib/module-resolver.js.map +1 -1
- package/cli/dist/types/gui.d.ts +4 -0
- package/cli/dist/types/gui.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/extractCommandHelp.d.ts +2 -2
- package/cli/dist/utils/extractCommandHelp.d.ts.map +1 -1
- package/cli/dist/utils/extractCommandHelp.js +4 -4
- package/cli/dist/utils/extractCommandHelp.js.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/module-system.d.ts +2 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -1
- package/cli/dist/utils/module-system.js +24 -13
- 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/modules.md +72 -6
- package/package.json +30 -16
package/AGENTS.md
CHANGED
|
@@ -443,6 +443,10 @@ When reading an exported file in any of the four target tools:
|
|
|
443
443
|
|
|
444
444
|
**Note**: This is a meta-repository for extending Augment Code AI. The actual project-specific `.augment/` folder remains in individual projects.
|
|
445
445
|
|
|
446
|
+
## myTech.Today Company Profile
|
|
447
|
+
|
|
448
|
+
The canonical company services, service area, business claims, and contact details are maintained in `docs/company-profile.md`. Keep the public profile in `README.md`, the npm author in `package.json`, and the publishing guides aligned with that record when those details change. Do not copy company-specific marketing claims into project-agnostic extension modules.
|
|
449
|
+
|
|
446
450
|
|
|
447
451
|
## Landing the Plane (Session Completion)
|
|
448
452
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Reusable augmentation modules for Augment Code AI, with cross-platform distribution to Claude Code, Cursor, Windsurf, and GitHub Copilot.**
|
|
4
4
|
|
|
5
|
-
[](https://github.com/mytech-today-now/augment-extensions)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
[](https://www.npmjs.com/package/@mytechtoday/augment-extensions)
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Augment Extensions is the structural layer between your rule modules and the AI
|
|
|
10
10
|
|
|
11
11
|
The repository exists because rule content for AI agents has outgrown the surfaces individual tools provide. Each tool reserves a small budget for instructions the agent sees before it reasons about your code. Augment Code allocates roughly 49,400 characters to `.augment/`. Cursor, Windsurf, Copilot, and Claude Code each have their own constraints. The modules here live outside those budgets, are loaded on demand, and are emitted into the tool-native shapes those budgets expect, so the same module set can drive every tool without manual duplication.
|
|
12
12
|
|
|
13
|
-
Current release: 3.
|
|
13
|
+
Current release: 3.3.0 adds Java and Spring standards, Agent Engineering and Jev / TypeSafe Decision Layer workflows, and a refreshed terminal manager with scoped module selection, content browsing, and decision actions. See [the changelog](CHANGELOG.md#330---2026-11-26) for the release notes.
|
|
14
14
|
|
|
15
15
|
## Table of Contents
|
|
16
16
|
|
|
@@ -29,6 +29,7 @@ Current release: 3.2.0 adds repository-scoped linked-module inheritance, lifecyc
|
|
|
29
29
|
- [Module Catalog](#module-catalog)
|
|
30
30
|
- [Per-Tool Consumer Notes](#per-tool-consumer-notes)
|
|
31
31
|
- [Contributing](#contributing)
|
|
32
|
+
- [About myTech.Today](#about-mytech-today)
|
|
32
33
|
- [License](#license)
|
|
33
34
|
|
|
34
35
|
## Why This Exists
|
|
@@ -73,6 +74,10 @@ augx export --target all --dry-run # preview without writing
|
|
|
73
74
|
|
|
74
75
|
From a clean clone to a working `CLAUDE.md`, `.cursor/rules/augx-coding-standards-typescript.mdc`, and `.windsurf/rules/augx-coding-standards-typescript.md` is four commands.
|
|
75
76
|
|
|
77
|
+
## Runtime Compatibility
|
|
78
|
+
|
|
79
|
+
The package declares Node.js `>=16` and builds the CLI as CommonJS. The CLI loads Chalk synchronously for command output, so it uses Chalk 4, which supports the fluent color and bold methods used by the CLI and can be required from CommonJS on Node 16. Chalk 5 is ESM-only and fails when loaded by this CommonJS entry point on Node 16. Inquirer remains on version 9 and is loaded with native dynamic import only when an interactive prompt is needed. UUID remains unchanged because the CLI startup path does not import it.
|
|
80
|
+
|
|
76
81
|
## Concepts
|
|
77
82
|
|
|
78
83
|
### Modules
|
|
@@ -81,11 +86,15 @@ A module is a directory under `augment-extensions/` with a `module.json` manifes
|
|
|
81
86
|
|
|
82
87
|
Four module categories exist:
|
|
83
88
|
|
|
84
|
-
- **coding-standards** - language- or framework-specific guidance. Currently shipped: Bash, C, CSS, Go, HTML, HTML+CSS+JS, JavaScript, Perl, PHP, PowerShell, Python, Q, React, TypeScript.
|
|
89
|
+
- **coding-standards** - language- or framework-specific guidance. Currently shipped: Bash, C, CSS, Go, HTML, HTML+CSS+JS, Java, JavaScript, Perl, PHP, PowerShell, Python, Q, React, Spring Framework and Spring Boot, TypeScript.
|
|
85
90
|
- **domain-rules** - subject-matter guidance independent of language. Currently shipped: API Design, Database, Design (color), MCP, Security, SEO/Sales/Marketing, Software Architecture, WordPress, WordPress Plugin. The `visual-design/` module ships alongside as a sibling tree with its own vendor and domain palettes.
|
|
86
|
-
- **workflows** - process integration for spec-driven development, task tracking, and multi-tool distribution. Currently shipped: adr-support, cross-platform, database, mcp, wordpress-plugin.
|
|
91
|
+
- **workflows** - process integration for spec-driven development, task tracking, and multi-tool distribution. Currently shipped: adr-support, agent-engineering, cross-platform, database, decision-layer, mcp, wordpress-plugin.
|
|
87
92
|
- **examples** - canned working examples that illustrate the rules. Currently shipped: design-patterns, gutenberg-block-plugin, rest-api-plugin, woocommerce-extension.
|
|
88
93
|
|
|
94
|
+
The [Agent Engineering workflow](augment-extensions/workflows/agent-engineering/README.md) covers scoped agents, harnesses, bounded loops, and dependency graphs with validated contracts and runnable deterministic local examples. Link it with `augx link workflows/agent-engineering` from a checkout or package that contains the module.
|
|
95
|
+
|
|
96
|
+
The [Decision Layer workflow](augment-extensions/workflows/decision-layer/README.md) adds an optional TypeSafe integration with project-local software setup, eleven typed decision capabilities, bounded local workers, independent artifact verification, recovery, and labeled evaluation. Link it with `augx link workflows/decision-layer`, inspect `augx decision setup --dry-run`, then explicitly run setup. Ordinary discovery and exports do not install or load the optional SDK. See the module guide for offline fixtures, live credentials and request budgets, actual host boundaries, and safe removal.
|
|
97
|
+
|
|
89
98
|
### Linked vs. mirrored vs. exported
|
|
90
99
|
|
|
91
100
|
These three verbs are orthogonal and stack:
|
|
@@ -190,7 +199,7 @@ augx show completed --since 2026-01-01 --priority 1
|
|
|
190
199
|
|
|
191
200
|
#### `augx search <keyword>`
|
|
192
201
|
|
|
193
|
-
Search
|
|
202
|
+
Search canonical IDs, manifest names, display names, descriptions, types and actual tags case-insensitively. `--type` restricts to a single category. For example, `augx search Jev` finds `workflows/decision-layer`.
|
|
194
203
|
|
|
195
204
|
```bash
|
|
196
205
|
augx search typescript
|
|
@@ -350,18 +359,16 @@ augx sync watch # watch for changes and auto-sync
|
|
|
350
359
|
|
|
351
360
|
### Catalog
|
|
352
361
|
|
|
353
|
-
The catalog command
|
|
362
|
+
The catalog command generates the CLI catalog from the on-disk module tree. This repository also maintains the curated root index in `modules.md`.
|
|
354
363
|
|
|
355
364
|
```bash
|
|
356
|
-
augx catalog
|
|
357
|
-
augx catalog --check # exit 1 if out of date
|
|
358
|
-
augx catalog --auto # update only if out of date
|
|
359
365
|
augx catalog --output cli/MODULES.md
|
|
360
|
-
augx catalog
|
|
361
|
-
augx catalog
|
|
362
|
-
augx catalog-hook --remove
|
|
366
|
+
augx catalog --output cli/MODULES.md --check # exit 1 if out of date
|
|
367
|
+
augx catalog --output cli/MODULES.md --auto # update only if out of date
|
|
363
368
|
```
|
|
364
369
|
|
|
370
|
+
The optional `catalog-hook` uses the default package-root `MODULES.md` path. This checkout keeps its curated root index as `modules.md`, so the hook is not installed here.
|
|
371
|
+
|
|
365
372
|
### Rule installation
|
|
366
373
|
|
|
367
374
|
`install-rules` re-installs the character-count and em-dash management rules (and any other repo-mandated rule files) into `.augment/rules/`. Use the hook flags to keep rules current across branch switches and merges.
|
|
@@ -432,8 +439,15 @@ augx analyze --dir src --type dependencies --fix
|
|
|
432
439
|
|
|
433
440
|
```bash
|
|
434
441
|
augx gui # launch the interactive TUI module browser
|
|
442
|
+
augx gui --project "path/to/project" # choose project scope explicitly
|
|
435
443
|
```
|
|
436
444
|
|
|
445
|
+
The terminal manager uses keyboard-operated Inquirer menus. Search module metadata, manage links, link valid collections, browse canonical READMEs/rules/examples/templates, or browse existing skills. Java and Spring are independently selectable: Java covers language/platform practices and Spring covers framework behavior. Agent Engineering details expose its contracts, bounded-loop/graph examples and local validator guidance as static content. Linking guidance never executes these files.
|
|
446
|
+
|
|
447
|
+
Selections affect only the displayed modules. Review the project scope and proposed changes, then apply or cancel. The menu refreshes discovery and linked state after actions, preserves pinned and unavailable entries outside the selection, and reports partial failures. Up/Down navigates, Space toggles checkboxes, Enter confirms, `a` toggles all checkboxes and `i` inverts them. Use Back/Cancel choices to return. Ctrl+C exits the menu; during a decision child it requests cancellation and retains durable accounting.
|
|
448
|
+
|
|
449
|
+
Open **Jev / TypeSafe Decision Workflow** for setup planning, explicit installation, doctor, decide, run, resume, evaluate, examples, inventory and ownership-protected removal. Installation always previews the plan first. Offline fixtures are labeled and need no provider credentials; existing valid decision configuration and a compatible optional execution runtime are still required. Live work requires explicit selection, a request budget within policy and confirmation. Credentials come from the environment. Resume accepts the exact digest from the persisted review file and keeps original budgets/deadlines. Unlinking guidance and removing software are separate actions. See [terminal workflows](cli/docs/GUI_CONFIGURATION.md) and the [Decision Layer guide](augment-extensions/workflows/decision-layer/README.md).
|
|
450
|
+
|
|
437
451
|
### Help reference
|
|
438
452
|
|
|
439
453
|
After `augx init`, the file `.augment/COMMAND_HELP.md` is regenerated and contains the comprehensive help text for every workflow tool detected in the project (Augx, Beads, OpenSpec). Agents and humans can read it without invoking any command. It is regenerated each time `augx init` runs.
|
|
@@ -460,7 +474,7 @@ Every exported file starts with a five-line HTML-comment banner. For Cursor, the
|
|
|
460
474
|
|
|
461
475
|
```text
|
|
462
476
|
<!-- GENERATED BY augx export - DO NOT EDIT -->
|
|
463
|
-
<!-- augx-version: 3.
|
|
477
|
+
<!-- augx-version: 3.3.0 -->
|
|
464
478
|
<!-- generated-at: 2026-05-25T21:13:00Z -->
|
|
465
479
|
<!-- source-hash: a1b2c3d4e5f60718 -->
|
|
466
480
|
<!-- modules: coding-standards/typescript@2.0.0, workflows/cross-platform@1.0.0 -->
|
|
@@ -850,7 +864,7 @@ augment-extensions/<category>/<module-name>/
|
|
|
850
864
|
- Minor: new rule files or expanded guidance that preserves prior behavior.
|
|
851
865
|
- Major: removed rules, renamed canonical ids, or guidance that contradicts a prior major.
|
|
852
866
|
|
|
853
|
-
|
|
867
|
+
This checkout keeps a curated root index at `modules.md` and a generated CLI catalog at `cli/MODULES.md`. Regenerate or check the CLI catalog with `augx catalog --output cli/MODULES.md` or `augx catalog --output cli/MODULES.md --check`. The optional `catalog-hook` uses the package-root `MODULES.md` default and is not installed here.
|
|
854
868
|
|
|
855
869
|
## Operability
|
|
856
870
|
|
|
@@ -929,11 +943,11 @@ augment-extensions/
|
|
|
929
943
|
|
|
930
944
|
## Module Catalog
|
|
931
945
|
|
|
932
|
-
The
|
|
946
|
+
The curated root index is `modules.md`. The generated CLI catalog is `cli/MODULES.md`; regenerate or check it with `augx catalog --output cli/MODULES.md` and `augx catalog --output cli/MODULES.md --check`. A representative slice of what ships today:
|
|
933
947
|
|
|
934
948
|
### coding-standards
|
|
935
949
|
|
|
936
|
-
`bash`, `c`, `css`, `go`, `html`, `html-css-js`, `javascript`, `perl`, `php`, `powershell`, `python`, `q-sharp`, `react`, `typescript`.
|
|
950
|
+
`bash`, `c`, `css`, `go`, `html`, `html-css-js`, `java`, `javascript`, `perl`, `php`, `powershell`, `python`, `q-sharp`, `react`, `spring`, `typescript`.
|
|
937
951
|
|
|
938
952
|
### domain-rules
|
|
939
953
|
|
|
@@ -999,12 +1013,67 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) and [AGENTS.md](./AGENTS.md) for the fu
|
|
|
999
1013
|
1. Discuss substantial changes as an OpenSpec proposal under `openspec/changes/<change-name>/`.
|
|
1000
1014
|
2. Decompose into Beads tasks with `bd-` prefixed ids. Append to `.beads/issues.jsonl`.
|
|
1001
1015
|
3. Implement the work, referencing the task id in each commit.
|
|
1002
|
-
4. Run `npm test`, `augx validate <module>` for any touched modules, and `augx catalog --check`.
|
|
1016
|
+
4. Run `npm test`, `augx validate <module>` for any touched modules, and `augx catalog --output cli/MODULES.md --check`.
|
|
1003
1017
|
5. Run `augx export --target all --dry-run` to confirm no unintended drift.
|
|
1004
1018
|
6. Open a PR with a description that links the proposal and the closing task ids.
|
|
1005
1019
|
|
|
1006
1020
|
Branch and commit-message conventions live in `CONTRIBUTING.md`. The `Landing the Plane` section in `AGENTS.md` describes the mandatory session-close workflow for any AI agent contributing work.
|
|
1007
1021
|
|
|
1022
|
+
<a id="about-mytech-today"></a>
|
|
1023
|
+
## About myTech.Today
|
|
1024
|
+
|
|
1025
|
+
<table role="presentation">
|
|
1026
|
+
<tr>
|
|
1027
|
+
<td width="50%" valign="top">
|
|
1028
|
+
<h3>🛠️ Our Services</h3>
|
|
1029
|
+
<ul>
|
|
1030
|
+
<li>IT Consulting and Support</li>
|
|
1031
|
+
<li>Custom PowerShell Automation and Scripting</li>
|
|
1032
|
+
<li>Infrastructure Optimization and System Administration</li>
|
|
1033
|
+
<li>Cloud Integration (Azure, AWS, GCS, Microsoft 365)</li>
|
|
1034
|
+
<li>Network Design and Management</li>
|
|
1035
|
+
<li>Cybersecurity and Compliance Solutions</li>
|
|
1036
|
+
<li>Database Management and Custom Development</li>
|
|
1037
|
+
<li>System Setup, Upgrades, and Troubleshooting</li>
|
|
1038
|
+
<li>Virus and Spyware Removal</li>
|
|
1039
|
+
<li>Hardware Procurement, Installation, and Configuration</li>
|
|
1040
|
+
</ul>
|
|
1041
|
+
<h3>📍 Service Area</h3>
|
|
1042
|
+
<ul>
|
|
1043
|
+
<li>Omaha, NE</li>
|
|
1044
|
+
<li>Lincoln, NE</li>
|
|
1045
|
+
</ul>
|
|
1046
|
+
</td>
|
|
1047
|
+
<td width="50%" valign="top">
|
|
1048
|
+
<h3>⭐ Why Choose myTech.Today?</h3>
|
|
1049
|
+
<ul>
|
|
1050
|
+
<li>20+ years of IT consulting and software development experience</li>
|
|
1051
|
+
<li>Personalized service to 190+ satisfied clients</li>
|
|
1052
|
+
<li>5-star review rating with consistent 24-hour solution delivery</li>
|
|
1053
|
+
<li>Payment-upon-success terms available</li>
|
|
1054
|
+
<li>Expertise in Windows automation, PowerShell scripting, and system optimization</li>
|
|
1055
|
+
</ul>
|
|
1056
|
+
<h3>📬 Contact Information</h3>
|
|
1057
|
+
<table>
|
|
1058
|
+
<tr><th scope="row">📧 Email</th><td><a href="mailto:sales@mytech.today">sales@mytech.today</a></td></tr>
|
|
1059
|
+
<tr><th scope="row">🌐 Website</th><td><a href="https://mytech.today">mytech.today</a></td></tr>
|
|
1060
|
+
<tr><th scope="row">💻 GitHub</th><td><a href="https://github.com/mytech-today-now">@mytech-today-now</a></td></tr>
|
|
1061
|
+
<tr><th scope="row">🔗 LinkedIn</th><td><a href="https://linkedin.com/in/kylerode">linkedin.com/in/kylerode</a></td></tr>
|
|
1062
|
+
</table>
|
|
1063
|
+
</td>
|
|
1064
|
+
</tr>
|
|
1065
|
+
</table>
|
|
1066
|
+
|
|
1067
|
+
<table role="presentation">
|
|
1068
|
+
<tr>
|
|
1069
|
+
<td colspan="2" align="center">
|
|
1070
|
+
<sub><strong>myTech.Today</strong> · Professional IT Services · Serving Omaha and Lincoln · <a href="https://mytech.today">mytech.today</a></sub>
|
|
1071
|
+
</td>
|
|
1072
|
+
</tr>
|
|
1073
|
+
</table>
|
|
1074
|
+
|
|
1075
|
+
The canonical company profile is maintained in [docs/company-profile.md](./docs/company-profile.md). Keep it aligned with this public profile and the npm package author metadata.
|
|
1076
|
+
|
|
1008
1077
|
## License
|
|
1009
1078
|
|
|
1010
1079
|
MIT. See [LICENSE](./LICENSE).
|
|
@@ -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,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 Spring Framework and Spring Boot standards module covering configuration, web APIs, transactions, testing, security, and production operations.
|
|
12
|
+
- Added an illustrative Spring Boot 3+ MVC endpoint example using Jakarta Validation.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Spring Framework and Spring Boot Standards
|
|
2
|
+
|
|
3
|
+
Version 1.0.0 provides practical guidance for applications built with Spring Framework and Spring Boot. The module is useful on its own and complements the Java Coding Standards module.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Use these rules for Spring-specific design and operation: constructor injection, bean lifecycle, Boot auto-configuration, external settings, Spring MVC or WebFlux, request validation, error handling, transaction boundaries, Spring testing, Spring Security, observability, health, and Actuator exposure.
|
|
8
|
+
|
|
9
|
+
The module does not prescribe a Spring release, database, deployment platform, or build tool. Inspect the consuming project's Spring Boot and Spring Framework versions, Java toolchain, dependency management, and official compatibility requirements before suggesting APIs or dependencies. Spring Cloud, Spring AI, Spring Batch, Spring Data, and other Spring portfolio projects are separate products. This module covers their integration only when an application already uses them and the concern is directly relevant.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Link the module directly:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
augx link coding-standards/spring
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Inspect its guidance with:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
augx show coding-standards/spring
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
1. Identify the project's Spring Framework, Spring Boot, Spring Security, and Java versions before suggesting annotations, configuration keys, or dependencies.
|
|
28
|
+
2. Choose the rule file for the concern: bean and Boot configuration, web APIs and security, data and tests, or production operations.
|
|
29
|
+
3. Use this module for Spring-specific decisions. Link the Java module separately for general language, API, and platform guidance.
|
|
30
|
+
|
|
31
|
+
## Contents
|
|
32
|
+
|
|
33
|
+
- [Beans, configuration, and Boot](rules/beans-configuration-and-boot.md): dependency injection, bean lifecycle, application structure, auto-configuration, and externalized settings.
|
|
34
|
+
- [Web APIs and security](rules/web-apis-and-security.md): MVC and WebFlux choice, endpoints, validation, consistent errors, and Spring Security.
|
|
35
|
+
- [Data, testing, and transactions](rules/data-testing-and-transactions.md): persistence boundaries, transaction behavior, unit tests, slices, and integration tests.
|
|
36
|
+
- [Production operations](rules/production-operations.md): production configuration, observability, health checks, graceful lifecycle, and safe Actuator exposure.
|
|
37
|
+
- [OrderController.java](examples/OrderController.java): an illustrative Spring Boot 3+ MVC endpoint using constructor injection and Jakarta validation. It is not a compiled project.
|
|
38
|
+
|
|
39
|
+
## Relationship to Java guidance
|
|
40
|
+
|
|
41
|
+
[Java Coding Standards](../java/README.md) owns general Java language, API, exception, concurrency, build, testing, and security practices. This module owns Spring Framework and Spring Boot behavior. Link either module independently. When both are linked, apply Java rules to language choices and this module to framework choices, without duplicating general Java advice.
|
|
42
|
+
|
|
43
|
+
## Version and source policy
|
|
44
|
+
|
|
45
|
+
Follow the versions declared by the consuming project and its supported Java baseline. Use the official compatibility and reference documentation for those exact versions. Do not add a starter or portfolio project just because an example uses it. Versioned details in examples are labeled so teams can adjust them to their own supported releases.
|
|
46
|
+
|
|
47
|
+
Official sources:
|
|
48
|
+
|
|
49
|
+
- [Spring projects](https://spring.io/projects)
|
|
50
|
+
- [Spring Framework reference](https://docs.spring.io/spring-framework/reference/)
|
|
51
|
+
- [Spring Boot reference](https://docs.spring.io/spring-boot/reference/)
|
|
52
|
+
- [Spring Boot system requirements](https://docs.spring.io/spring-boot/system-requirements.html)
|
|
53
|
+
- [Spring Security reference](https://docs.spring.io/spring-security/reference/)
|
|
54
|
+
|
|
55
|
+
## Character count
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
## Changelog
|
|
60
|
+
|
|
61
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Illustrative single-file Spring Boot 3+ MVC example using Jakarta Validation.
|
|
2
|
+
// Verify dependency versions, package layout, and validation setup against the consuming project.
|
|
3
|
+
package example.orders;
|
|
4
|
+
|
|
5
|
+
import jakarta.validation.Valid;
|
|
6
|
+
import jakarta.validation.constraints.NotBlank;
|
|
7
|
+
import org.springframework.http.HttpStatus;
|
|
8
|
+
import org.springframework.stereotype.Service;
|
|
9
|
+
import org.springframework.web.bind.annotation.PostMapping;
|
|
10
|
+
import org.springframework.web.bind.annotation.RequestBody;
|
|
11
|
+
import org.springframework.web.bind.annotation.RequestMapping;
|
|
12
|
+
import org.springframework.web.bind.annotation.ResponseStatus;
|
|
13
|
+
import org.springframework.web.bind.annotation.RestController;
|
|
14
|
+
|
|
15
|
+
@RestController
|
|
16
|
+
@RequestMapping("/orders")
|
|
17
|
+
class OrderController {
|
|
18
|
+
private final OrderService orderService;
|
|
19
|
+
|
|
20
|
+
OrderController(OrderService orderService) {
|
|
21
|
+
this.orderService = orderService;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@PostMapping
|
|
25
|
+
@ResponseStatus(HttpStatus.CREATED)
|
|
26
|
+
OrderResponse create(@Valid @RequestBody CreateOrderRequest request) {
|
|
27
|
+
return orderService.create(request);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
record CreateOrderRequest(@NotBlank String reference) {}
|
|
32
|
+
|
|
33
|
+
record OrderResponse(String reference) {}
|
|
34
|
+
|
|
35
|
+
@Service
|
|
36
|
+
class OrderService {
|
|
37
|
+
OrderResponse create(CreateOrderRequest request) {
|
|
38
|
+
return new OrderResponse(request.reference());
|
|
39
|
+
}
|
|
40
|
+
}
|