aw-spec-cli 0.1.9 → 0.1.11

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.
Files changed (58) hide show
  1. package/assets/.appweaver/ORCH-DIALECT.md +17 -5
  2. package/assets/.appweaver/orchestrator/README.md +1 -1
  3. package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +2 -2
  4. package/assets/.appweaver/orchestrator/adapters/google_antigravity.py +28 -6
  5. package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +13 -1
  6. package/assets/.appweaver/orchestrator/orchestrator.py +126 -39
  7. package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +5 -0
  8. package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +1 -0
  9. package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +1 -0
  10. package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +888 -141
  11. package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +826 -16
  12. package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +780 -12
  13. package/assets/.appweaver/stack-profiles/java-spring.json +3 -3
  14. package/assets/.appweaver/templates/spec-template.md +73 -62
  15. package/assets/.appweaver/templates/story-template.md +107 -0
  16. package/assets/guardrails/technology/java-spring/ai-rules.md +505 -0
  17. package/assets/guardrails/technology/java-spring/api-versioning.md +782 -0
  18. package/assets/guardrails/technology/java-spring/authorization.md +618 -0
  19. package/assets/guardrails/technology/java-spring/clean-architecture.md +960 -0
  20. package/assets/guardrails/technology/java-spring/coding-standards.md +821 -0
  21. package/assets/guardrails/technology/java-spring/dependency-policy.md +91 -0
  22. package/assets/guardrails/technology/java-spring/domain-driven-design.md +467 -0
  23. package/assets/guardrails/technology/java-spring/domain_abstraction.md +424 -0
  24. package/assets/guardrails/technology/java-spring/folder-structure.md +1537 -0
  25. package/assets/guardrails/technology/java-spring/global_exception_handler.md +247 -0
  26. package/assets/guardrails/technology/java-spring/logging.md +215 -0
  27. package/assets/guardrails/technology/java-spring/modular-monolith.md +77 -0
  28. package/assets/guardrails/technology/java-spring/persistence.md +316 -0
  29. package/assets/guardrails/technology/java-spring/problem_details.md +98 -0
  30. package/assets/guardrails/technology/java-spring/result_mapping.md +48 -0
  31. package/assets/guardrails/technology/java-spring/technology-constitution.md +168 -0
  32. package/assets/guardrails/technology/java-spring/testing.md +601 -0
  33. package/assets/guardrails/technology/java-spring/zero-trust.md +210 -0
  34. package/dist/index.js +0 -0
  35. package/dist/utils/config.d.ts +22 -0
  36. package/dist/utils/config.d.ts.map +1 -0
  37. package/dist/utils/config.js +76 -0
  38. package/dist/utils/config.js.map +1 -0
  39. package/dist/utils/copy-assets.d.ts.map +1 -1
  40. package/dist/utils/copy-assets.js +4 -11
  41. package/dist/utils/copy-assets.js.map +1 -1
  42. package/dist/utils/paths.d.ts.map +1 -1
  43. package/dist/utils/paths.js +11 -7
  44. package/dist/utils/paths.js.map +1 -1
  45. package/package.json +2 -1
  46. package/assets/guardrails/technology/java-spring/README.md +0 -62
  47. package/dist/commands/update.d.ts +0 -3
  48. package/dist/commands/update.d.ts.map +0 -1
  49. package/dist/commands/update.js +0 -142
  50. package/dist/commands/update.js.map +0 -1
  51. package/dist/utils/manifest.d.ts +0 -31
  52. package/dist/utils/manifest.d.ts.map +0 -1
  53. package/dist/utils/manifest.js +0 -91
  54. package/dist/utils/manifest.js.map +0 -1
  55. package/dist/utils/update-engine.d.ts +0 -52
  56. package/dist/utils/update-engine.d.ts.map +0 -1
  57. package/dist/utils/update-engine.js +0 -203
  58. package/dist/utils/update-engine.js.map +0 -1
@@ -0,0 +1,210 @@
1
+ # Zero-Trust Security Architectural Specification (Rule)
2
+
3
+ ## 1. Purpose
4
+
5
+ Define a mandatory Zero-Trust security posture for the application. The Zero-Trust model assumes
6
+ that no user, workload, or network location is inherently trusted and requires explicit
7
+ authentication, least-privilege authorization, secure transport, and continuous validation of
8
+ security-sensitive interactions.
9
+
10
+ ## 2. Applicability
11
+
12
+ This rule applies to application APIs, external integrations, inter-module interactions where
13
+ authentication is applicable, service-to-service communication, and infrastructure boundaries.
14
+
15
+ The rule MUST be applied consistently with the application's deployment model. A modular monolith
16
+ MAY use in-process module communication without service-to-service authentication. Authentication
17
+ requirements become applicable when a module or capability crosses a separately secured process or
18
+ network boundary.
19
+
20
+ ## 3. Transport Security
21
+
22
+ - All network communication MUST be encrypted in transit using approved cryptographic protocols.
23
+ - HTTPS MUST be enforced for external API traffic.
24
+ - Internal network traffic MUST use TLS when it crosses a separately secured process, host, or
25
+ network boundary, unless an explicitly approved platform security control provides equivalent
26
+ protection.
27
+ - TLS 1.2 is the absolute minimum requirement; TLS 1.3 SHOULD be targeted.
28
+ - Cross-Origin Resource Sharing (CORS) MUST use explicit allow-lists.
29
+ - Wildcard (`*`) CORS origins MUST NOT be used for authenticated application APIs.
30
+
31
+ Strictly isolated local development MAY use HTTP where required for developer productivity.
32
+
33
+ ## 4. Identity and Authentication
34
+
35
+ - Human and workload authentication MUST use an approved Identity Provider (IdP) or approved
36
+ workload identity mechanism.
37
+ - Production authentication MUST NOT rely on locally stored user passwords or application-managed
38
+ credential databases.
39
+ - Workloads SHOULD authenticate using short-lived, scoped credentials where supported by the
40
+ deployment platform.
41
+ - Authentication mechanisms MUST be externalized from Domain and business logic.
42
+
43
+ For local development, explicitly approved development-only authentication mechanisms MAY be used,
44
+ provided they cannot be accidentally enabled in production.
45
+
46
+ ## 5. Service Authentication and Configuration
47
+
48
+ - Separately deployed services MUST authenticate before exchanging protected data.
49
+ - A modular monolith MAY use direct in-process application-service or event-based communication
50
+ between modules without network authentication.
51
+ - Backing services, databases, external APIs, and IdPs MUST NOT have connection credentials or
52
+ environment-specific connection parameters hardcoded in source code.
53
+ - Runtime configuration MUST be externalized through approved configuration mechanisms.
54
+ - Service discovery MAY be used when required by the deployment architecture.
55
+ - A modular monolith MUST NOT be required to introduce service discovery solely to satisfy this
56
+ rule.
57
+
58
+ ## 6. Token and Security Context Propagation
59
+
60
+ - Authentication tokens, scopes, and claims MUST be securely propagated where a request crosses
61
+ an authenticated integration boundary.
62
+ - Every protected endpoint MUST validate the applicable authentication and authorization context.
63
+ - Tokens MUST NOT be propagated to an unrelated downstream service unless that propagation is
64
+ explicitly required and authorized.
65
+ - Distributed trace context MAY be propagated alongside authenticated requests, but tracing
66
+ remains the responsibility of the observability/tracing capability.
67
+ - Security context propagation MUST NOT cause credentials or tokens to be written to logs.
68
+
69
+ ## 7. Internal Authorization
70
+
71
+ - Authorization MUST enforce the Principle of Least Privilege.
72
+ - Protected operations MUST use explicit authorization policies.
73
+ - Role-based and scope-based authorization SHOULD both be used where the application's identity
74
+ model provides both concepts.
75
+ - A requirement for both role and scope validation MUST only be applied where both are meaningful
76
+ security dimensions for the protected operation.
77
+ - Authorization MUST be enforced at the appropriate application/API boundary.
78
+ - Security-sensitive data MUST NOT intentionally appear in application logs, metrics, traces, or
79
+ unhandled error responses.
80
+
81
+ ## 8. Secrets Management
82
+
83
+ - Production secrets MUST be provisioned through an approved Secrets Manager, platform secret
84
+ facility, or equivalent secure runtime mechanism.
85
+ - Secrets MUST NOT be committed to source control.
86
+ - Secrets MUST NOT be hardcoded in Java source code.
87
+ - Secrets MUST NOT be stored as plain-text production configuration values.
88
+ - Development-only placeholder credentials MAY be used in isolated development/test environments
89
+ when they contain no production secrets.
90
+ - Database passwords, API keys, private keys, client secrets, and similar credentials MUST be
91
+ externally configurable.
92
+
93
+ Examples of approved mechanisms MAY include:
94
+
95
+ - Azure Key Vault
96
+ - AWS Secrets Manager
97
+ - HashiCorp Vault
98
+ - Cloud/platform-managed secret stores
99
+
100
+ The specific provider is an implementation/deployment decision.
101
+
102
+ ## 9. Architectural Boundaries and Dependencies
103
+
104
+ ### Domain Boundary
105
+
106
+ Zero-Trust enforcement MUST NOT bleed into the Domain layer.
107
+
108
+ The Domain MUST NOT depend on:
109
+
110
+ - Spring Security
111
+ - HTTP authentication types
112
+ - JWT implementation types
113
+ - Servlet security APIs
114
+ - IdP-specific SDKs
115
+ - Secrets Manager SDKs
116
+ - TLS configuration
117
+ - Infrastructure security implementations
118
+
119
+ Domain logic MUST operate independently of the mechanism used to authenticate the caller.
120
+
121
+ ### Application Boundary
122
+
123
+ The Application layer MAY consume technology-neutral authenticated identity/context information
124
+ when authorization or application policy requires it.
125
+
126
+ Application code MUST NOT depend directly on a concrete IdP SDK or infrastructure-specific
127
+ authentication implementation.
128
+
129
+ ### Infrastructure / Presentation
130
+
131
+ The Infrastructure and Presentation/Inbound Adapter layers are responsible for:
132
+
133
+ - Authentication configuration
134
+ - Token validation
135
+ - Security filter configuration
136
+ - CORS enforcement
137
+ - TLS configuration
138
+ - Secrets integration
139
+ - Security context integration
140
+ - Framework-specific authorization configuration
141
+
142
+ ## 10. Relationship with Other Cross-Cutting Concerns
143
+
144
+ This rule does not replace other technical concerns.
145
+
146
+ - **Logging** owns log formatting, masking, and logging behaviour.
147
+ - **Distributed tracing** owns trace propagation.
148
+ - **Problem Details** owns safe HTTP error representation.
149
+ - **Authorization** owns detailed authorization policy and enforcement.
150
+ - **Persistence** owns database and transaction behaviour.
151
+ - **Modular Monolith** owns module boundaries and inter-module communication patterns.
152
+
153
+ Zero-Trust security requirements apply across these capabilities without duplicating their
154
+ implementation responsibilities.
155
+
156
+ ## 11. Prohibited Behavior
157
+
158
+ The architecture MUST NOT:
159
+
160
+ - Permit unauthenticated access to protected production APIs.
161
+ - Use wildcard CORS origins for authenticated APIs.
162
+ - Store production credentials in source control.
163
+ - Hardcode production secrets or credentials in source code.
164
+ - Hardcode environment-specific connection credentials in application source code.
165
+ - Expose authentication tokens, passwords, private keys, or client secrets in logs.
166
+ - Expose sensitive security information through unhandled HTTP error responses.
167
+ - Allow separately deployed protected services to communicate without the required authentication.
168
+ - Introduce security infrastructure dependencies into the Domain layer.
169
+ - Require service discovery for an in-process modular monolith.
170
+ - Propagate authentication tokens to downstream systems without an approved security requirement.
171
+
172
+ ## 12. Implementation Boundary
173
+
174
+ This specification defines architectural security constraints and MUST NOT prescribe a specific
175
+ security vendor or implementation unless required by the project architecture.
176
+
177
+ The exact implementation details remain configurable, including:
178
+
179
+ - Identity Provider vendor
180
+ - Spring Security configuration
181
+ - OAuth2/OIDC implementation
182
+ - Secrets Manager
183
+ - HTTP client
184
+ - Service discovery mechanism
185
+ - API gateway
186
+ - TLS certificate management
187
+ - Workload identity mechanism
188
+
189
+ Selected implementations MUST comply with the security requirements defined by this rule.
190
+
191
+ ## 13. Acceptance Criteria
192
+
193
+ - [ ] Protected production APIs require explicit authentication.
194
+ - [ ] HTTPS/TLS is enforced at applicable network boundaries.
195
+ - [ ] CORS policies use explicit allow-lists.
196
+ - [ ] Production authentication uses an approved external IdP or approved workload identity
197
+ mechanism.
198
+ - [ ] Production applications do not maintain local user credential stores.
199
+ - [ ] Production secrets are supplied through approved secure runtime mechanisms.
200
+ - [ ] Production credentials and secrets are not hardcoded or committed to source control.
201
+ - [ ] Environment-specific connection configuration is externally supplied.
202
+ - [ ] Separately deployed protected services authenticate before exchanging protected data.
203
+ - [ ] Modular-monolith in-process communication is not incorrectly treated as a network boundary.
204
+ - [ ] Protected endpoints enforce applicable authorization policies.
205
+ - [ ] Authentication tokens are not unnecessarily propagated to downstream systems.
206
+ - [ ] Security context is not exposed through logs or error responses.
207
+ - [ ] Domain code has zero dependencies on Spring Security, IdP SDKs, HTTP security types, or
208
+ secrets-management implementations.
209
+ - [ ] Security responsibilities remain separated from Logging, Tracing, Problem Details,
210
+ Persistence, and Modular Monolith responsibilities.
package/dist/index.js CHANGED
File without changes
@@ -0,0 +1,22 @@
1
+ export interface CliConfig {
2
+ /** Path to the source spec repo (where .appweaver, foundations, guardrails live) */
3
+ sourceRepo: string;
4
+ /** Folders to include when bundling content for npm publish */
5
+ foldersToBundle: string[];
6
+ /** Folders always copied during `aw-spec init` */
7
+ alwaysCopy: string[];
8
+ /** Mapping from agent name to its folder name */
9
+ agentFolderMap: Record<string, string>;
10
+ /** Paths to verify after bundling */
11
+ verifyPaths: string[];
12
+ /** Folders checked by `aw-spec doctor` */
13
+ requiredFolders: string[];
14
+ /** Files checked by `aw-spec doctor` */
15
+ requiredFiles: string[];
16
+ /** Agent folder names checked by doctor */
17
+ doctorAgentFolders: string[];
18
+ }
19
+ export declare function getCliConfig(): CliConfig;
20
+ /** Reset cache — useful in tests */
21
+ export declare function resetConfigCache(): void;
22
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,SAAS;IACxB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kDAAkD;IAClD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,iDAAiD;IACjD,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,qCAAqC;IACrC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,0CAA0C;IAC1C,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,wCAAwC;IACxC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,2CAA2C;IAC3C,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAID,wBAAgB,YAAY,IAAI,SAAS,CA8DxC;AAED,oCAAoC;AACpC,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
@@ -0,0 +1,76 @@
1
+ import path from 'path';
2
+ import { fileURLToPath } from 'url';
3
+ import dotenv from 'dotenv';
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+ const PROJECT_ROOT = path.resolve(__dirname, '../..');
6
+ // Auto-load .env file from CLI project root
7
+ dotenv.config({ path: path.resolve(PROJECT_ROOT, '.env') });
8
+ function getEnvArray(key, defaultVal) {
9
+ const val = process.env[key];
10
+ if (!val || val.trim() === '')
11
+ return defaultVal;
12
+ return val.split(',').map(s => s.trim());
13
+ }
14
+ function getEnvString(key, defaultVal) {
15
+ return process.env[key] || defaultVal;
16
+ }
17
+ let cachedConfig = null;
18
+ export function getCliConfig() {
19
+ if (cachedConfig)
20
+ return cachedConfig;
21
+ const defaultSourceRepo = path.resolve(PROJECT_ROOT, '../AppWeaver.Spec');
22
+ cachedConfig = {
23
+ sourceRepo: getEnvString('AW_SOURCE_REPO', defaultSourceRepo),
24
+ foldersToBundle: getEnvArray('AW_FOLDERS_TO_BUNDLE', [
25
+ '.appweaver',
26
+ 'foundations',
27
+ 'guardrails',
28
+ '.agents',
29
+ '.claude',
30
+ '.kilocode',
31
+ ]),
32
+ alwaysCopy: getEnvArray('AW_ALWAYS_COPY', [
33
+ '.appweaver',
34
+ 'foundations',
35
+ 'guardrails',
36
+ ]),
37
+ agentFolderMap: {
38
+ claude: getEnvString('AW_CLAUDE_FOLDER', '.claude'),
39
+ antigravity: getEnvString('AW_AGENTS_FOLDER', '.agents'),
40
+ kilocode: getEnvString('AW_KILOCODE_FOLDER', '.kilocode'),
41
+ },
42
+ verifyPaths: getEnvArray('AW_VERIFY_PATHS', [
43
+ '.appweaver/extensions.yml',
44
+ '.appweaver/feature.json',
45
+ '.appweaver/init-options.json',
46
+ '.appweaver/integration.json',
47
+ '.appweaver/workflows/workflow-registry.json',
48
+ '.appweaver/templates/spec-template.md',
49
+ '.appweaver/templates/plan-template.md',
50
+ '.appweaver/templates/tasks-template.md',
51
+ '.appweaver/scripts/bash/common.sh',
52
+ 'foundations/dotnet/README.md',
53
+ 'guardrails/domain/REQUIREMENTS.md',
54
+ ]),
55
+ requiredFolders: getEnvArray('AW_DOCTOR_REQUIRED_FOLDERS', [
56
+ '.appweaver',
57
+ ]),
58
+ requiredFiles: getEnvArray('AW_DOCTOR_REQUIRED_FILES', [
59
+ '.appweaver/extensions.yml',
60
+ '.appweaver/feature.json',
61
+ '.appweaver/init-options.json',
62
+ '.appweaver/integration.json',
63
+ ]),
64
+ doctorAgentFolders: getEnvArray('AW_DOCTOR_AGENT_FOLDERS', [
65
+ '.claude',
66
+ '.agents',
67
+ '.kilocode',
68
+ ]),
69
+ };
70
+ return cachedConfig;
71
+ }
72
+ /** Reset cache — useful in tests */
73
+ export function resetConfigCache() {
74
+ cachedConfig = null;
75
+ }
76
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAEtD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AAE5D,SAAS,WAAW,CAAC,GAAW,EAAE,UAAoB;IACpD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,UAAU,CAAC;IACjD,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,YAAY,CAAC,GAAW,EAAE,UAAkB;IACnD,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC;AACxC,CAAC;AAqBD,IAAI,YAAY,GAAqB,IAAI,CAA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C9B,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"copy-assets.d.ts","sourceRoot":"","sources":["../../src/utils/copy-assets.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB;;;;CAIZ,CAAC;AAEX,KAAK,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAyG/C,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C1E"}
1
+ {"version":3,"file":"copy-assets.d.ts","sourceRoot":"","sources":["../../src/utils/copy-assets.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB;;;;CAIZ,CAAC;AAEX,KAAK,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAuG/C,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1E"}
@@ -2,12 +2,12 @@ import fs from 'fs-extra';
2
2
  import path from 'path';
3
3
  import inquirer from 'inquirer';
4
4
  import chalk from 'chalk';
5
+ import { getCliConfig } from './config.js';
5
6
  const AGENT_FOLDER_MAP = {
6
7
  claude: '.claude',
7
8
  antigravity: '.agents',
8
9
  kilocode: '.kilocode',
9
10
  };
10
- const ALWAYS_COPY = ['.appweaver', 'foundations', 'guardrails'];
11
11
  const EXCLUDE_PATTERNS = [
12
12
  '**/.git/**',
13
13
  '**/node_modules/**',
@@ -100,9 +100,10 @@ async function copyFolder(source, target, options) {
100
100
  export async function copyAssets(options) {
101
101
  const { sourceRoot, targetRoot, agent, overwrite = true } = options;
102
102
  const agentFolder = AGENT_FOLDER_MAP[agent];
103
+ const config = getCliConfig();
103
104
  console.log(chalk.bold('\n📦 Copying project assets...\n'));
104
- // Always copy .aw-spec and docs
105
- for (const folder of ALWAYS_COPY) {
105
+ // Always copy default folders (configurable via AW_ALWAYS_COPY env var)
106
+ for (const folder of config.alwaysCopy) {
106
107
  const source = path.join(sourceRoot, folder);
107
108
  const target = path.join(targetRoot, folder);
108
109
  if (await fs.pathExists(source)) {
@@ -125,14 +126,6 @@ export async function copyAssets(options) {
125
126
  else {
126
127
  console.log(chalk.yellow(` ⚠ Source not found: ${agentFolder}/`));
127
128
  }
128
- // Copy VerticalSlice from docs
129
- // const vsSource = path.join(sourceRoot, 'docs', 'VerticalSlice');
130
- // const vsTarget = path.join(targetRoot, 'docs', 'VerticalSlice');
131
- // if (await fs.pathExists(vsSource)) {
132
- // console.log(chalk.cyan(`Copying docs/VerticalSlice/...`));
133
- // await fs.ensureDir(vsTarget);
134
- // await copyFolder(vsSource, vsTarget, { overwrite, baseSource: sourceRoot });
135
- // }
136
129
  console.log();
137
130
  }
138
131
  //# sourceMappingURL=copy-assets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy-assets.js","sourceRoot":"","sources":["../../src/utils/copy-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,WAAW;CACb,CAAC;AAIX,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AAEhE,MAAM,gBAA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,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAyB,MAAM,GAAG,CAAC,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,6BAA6B;IAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACvD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAEvD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,WAAW,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC;QACxE,MAAM,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAChC,MAAM,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IACpF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAyB,WAAW,GAAG,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAwBzD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAyBzD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C"}
@@ -1,7 +1,9 @@
1
1
  import path from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
  import fs from 'fs-extra';
4
+ import { getCliConfig } from './config.js';
4
5
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
+ const PROJECT_ROOT = path.resolve(__dirname, '../..');
5
7
  /**
6
8
  * Resolve the path to the bundled assets directory.
7
9
  * In development: points to the source AppWeaver.Spec repo
@@ -13,24 +15,26 @@ export async function resolveAssetsPath() {
13
15
  if (await fs.pathExists(distAssets)) {
14
16
  return distAssets;
15
17
  }
16
- // Development mode: use the source AppWeaver.Spec repo
17
- const sourceRepo = path.resolve(__dirname, '../../../AppWeaver.Spec.Orchestration');
18
+ // Development mode: use the configured source repo
19
+ const config = getCliConfig();
20
+ const sourceRepo = path.resolve(PROJECT_ROOT, config.sourceRepo);
18
21
  if (await fs.pathExists(sourceRepo)) {
19
22
  return sourceRepo;
20
23
  }
21
24
  // Fallback: check relative to package root
22
- const pkgRoot = path.resolve(__dirname, '../..');
23
- const pkgAssets = path.join(pkgRoot, 'assets');
25
+ const pkgAssets = path.join(PROJECT_ROOT, 'assets');
24
26
  if (await fs.pathExists(pkgAssets)) {
25
27
  return pkgAssets;
26
28
  }
27
- throw new Error(`Could not locate AppWeaver.Spec.Orchestration assets. ` +
28
- `Tried: ${distAssets}, ${sourceRepo}, ${pkgAssets}`);
29
+ throw new Error(`Could not locate AppWeaver.Spec assets. ` +
30
+ `Tried: ${distAssets}, ${sourceRepo}, ${pkgAssets}` +
31
+ `\nSet AW_SOURCE_REPO env variable if your source folder is elsewhere.`);
29
32
  }
30
33
  /**
31
34
  * Get the source AppWeaver.Spec repository path (for bundling script)
32
35
  */
33
36
  export function getSourceRepoPath() {
34
- return path.resolve(__dirname, '../../AppWeaver.Spec.Orchestration');
37
+ const config = getCliConfig();
38
+ return path.resolve(PROJECT_ROOT, config.sourceRepo);
35
39
  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,UAAU,KAAK,UAAU,KAAK,SAAS,EAAE;QACnD,uEAAuE,CACxE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;AACvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aw-spec-cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "AppWeaver Spec-Driven Development CLI - scaffolds projects with vertical slices, DDD, CQRS, and agent skills",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -60,6 +60,7 @@
60
60
  "dependencies": {
61
61
  "chalk": "^5.3.0",
62
62
  "commander": "^12.0.0",
63
+ "dotenv": "^17.4.2",
63
64
  "fs-extra": "^11.2.0",
64
65
  "glob": "^10.3.10",
65
66
  "inquirer": "^9.2.12",
@@ -1,62 +0,0 @@
1
- # java-spring — unauthored corpus
2
-
3
- This corpus is **empty on purpose**. It is the worked example of the kit's extension point:
4
- adding a technology means adding a folder here and mapping it from a project, and nothing else.
5
- No workflow, script, engine or schema change is involved, and no existing project is touched.
6
-
7
- Nothing in this folder is loaded by any command — a rule reaches a phase only by being listed in
8
- a project's `tech-rule-bindings.md`, and no shipped project lists anything here. (A Spring
9
- backend paired with the `nextjs` frontend lane is not left ungoverned by that: see below.) This file is the
10
- corpus index, in the same sense as [`../../README.md`](../../README.md); it is not a rule.
11
-
12
- ## What already exists for a Spring lane
13
-
14
- One rule file for a Spring Boot backend is authored, and it does **not** live here — it lives
15
- in the corpus of the lane that reads it:
16
- [`../nextjs/api-integration.java-spring.md`](../nextjs/api-integration.java-spring.md), the
17
- cross-lane pairing rules for a `nextjs` frontend consuming a `java-spring` service. It is
18
- mapped from the frontend lane's `## /aw-spec-design-ui` and `## /aw-spec-implement-ui`
19
- headings through the `{{backend_stack}}` placeholder, so **it loads automatically the moment
20
- `.appweaver/stacks.json` declares a `java-spring` backend beside a `nextjs` frontend** — no
21
- project pack change, no workflow change.
22
-
23
- That file states what the UI may assume of a Spring service and where Spring's own defaults
24
- (0-based `Pageable`, `Page<T>` field names, `ProblemDetail`, `long` ids, `BigDecimal`,
25
- `LocalDateTime`, the `302`-to-login trap) will break the pairing if nothing was configured.
26
- It is written contract-first precisely because this corpus is unauthored: it defers to the
27
- service's published OpenAPI document rather than citing a rule file that does not exist yet.
28
-
29
- Authoring the service-side corpus below is what would let those rules be **enforced** at
30
- `design` and `implement` rather than only **expected** at `design-ui` and `implement-ui`.
31
-
32
- ## Authoring it
33
-
34
- The corpus is keyed on the stack id `java-spring`, which is
35
- [`.appweaver/stack-profiles/java-spring.json`](../../../.appweaver/stack-profiles/java-spring.json)
36
- — the same id `select-stack` writes into `.appweaver/stacks.json` for a Spring Boot lane. Keep the
37
- folder name and the profile id the same word.
38
-
39
- Mirror the shape of [`../dotnet-webapi/`](../dotnet-webapi/), which is the reference corpus:
40
-
41
- | File | Role |
42
- |---|---|
43
- | `technology-constitution.md` | the ratified technology base — the one file `## /aw-spec-constitution` needs |
44
- | `<concern>.md` | one rule file per technical concern (architecture, persistence, testing, …) |
45
- | `examples/<concern>.md` | the worked `<SampleProjectName>` sample for the rule file beside it |
46
-
47
- Write the rules **domain-free**. A technology corpus is shared by every project that maps it, so a
48
- sentence about prescriptions or patients belongs in `guardrails/domain/<industry>/`, not here.
49
- The dotnet-webapi corpus holds zero domain words, and that is the property that let two packs
50
- collapse into one.
51
-
52
- There is no `technical-requirements.md` here: that file is the project owner's, and it lives in
53
- the project folder that maps this corpus.
54
-
55
- ## Mapping it
56
-
57
- In a project's `tech-rule-bindings.md`, list the files under the command headings that should load
58
- them. A Spring Boot service project would start from
59
- [`../../projects/dotnet-default-project/tech-rule-bindings.md`](../../projects/dotnet-default-project/tech-rule-bindings.md)
60
- and repoint its `## /aw-spec-design`, `## /aw-spec-implement`, `## /aw-spec-build` and
61
- `## /aw-spec-constitution` bullets at `guardrails/technology/java-spring/…`. The domain map needs
62
- no edit at all — the domain is orthogonal to the stack, which is the whole point of the split.
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const updateCommand: Command;
3
- //# sourceMappingURL=update.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,eAAO,MAAM,aAAa,SA6ItB,CAAC"}