azcodr 2.3.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.agents/hooks.json +15 -0
  2. package/.agents/hooks.json.example +15 -0
  3. package/.agents/lib/agent-guard-command.js +103 -0
  4. package/.agents/lib/agent-guard-file.js +77 -0
  5. package/.agents/lib/agent-guard-tdd.js +77 -0
  6. package/.agents/lib/agent-guard.js +80 -0
  7. package/.agents/scripts/agent_guard.js +35 -3
  8. package/.agents/skills/clean-code-refactor/SKILL.md +1 -0
  9. package/.agents/skills/lets-build/SKILL.md +3 -2
  10. package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +159 -0
  11. package/.agents/skills/relentless-questioner/SKILL.md +1 -1
  12. package/.github/workflows/ci.yml +13 -0
  13. package/.github/workflows/publish.yml +7 -0
  14. package/AGENTS.md +3 -3
  15. package/CODE_OF_CONDUCT.md +122 -0
  16. package/CONTRIBUTING.md +16 -4
  17. package/README.md +77 -4
  18. package/docs/generated-enforcement-analysis.md +141 -0
  19. package/docs/rules/clean_code.md +3 -2
  20. package/docs/rules/test_driven_development.md +8 -5
  21. package/lib/cli-boundaries.d.ts +18 -0
  22. package/lib/cli-boundaries.d.ts.map +1 -0
  23. package/lib/cli-boundaries.js +46 -0
  24. package/lib/cli-boundaries.js.map +1 -0
  25. package/lib/cli-parse.d.ts +2 -1
  26. package/lib/cli-parse.d.ts.map +1 -1
  27. package/lib/cli-parse.js +15 -3
  28. package/lib/cli-parse.js.map +1 -1
  29. package/lib/cli.d.ts +3 -0
  30. package/lib/cli.d.ts.map +1 -1
  31. package/lib/cli.js +18 -4
  32. package/lib/cli.js.map +1 -1
  33. package/lib/index.d.ts +1 -1
  34. package/lib/index.js +1 -1
  35. package/lib/scaffold.js +1 -1
  36. package/lib/scaffold.js.map +1 -1
  37. package/memory.md +32 -0
  38. package/package.json +9 -3
  39. package/scripts/validate/toolchain.js +60 -0
  40. package/scripts/validate.js +12 -2
  41. package/src/cli-boundaries.ts +67 -0
  42. package/src/cli-parse.ts +19 -5
  43. package/src/cli.ts +20 -4
  44. package/src/index.ts +1 -1
  45. package/src/scaffold.ts +1 -1
package/src/cli.ts CHANGED
@@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url';
5
5
  import { scaffold, getTemplateDir } from './scaffold.js';
6
6
  import type { ScaffoldOptions, ScaffoldResult } from './scaffold.js';
7
7
  import { validate, createSilentReporter } from './validate.js';
8
+ import { handleBoundariesCommand } from './cli-boundaries.js';
8
9
  import { parseArgs } from './cli-parse.js';
9
10
  import type { CliParsedOptions } from './cli-parse.js';
10
11
  import { askQuestion, resolveTargetDir, ensureWritableTarget } from './cli-target.js';
@@ -28,10 +29,12 @@ Enterprise Multi-Tenant Architecture & Agentic Engineering Starter Template
28
29
  Usage:
29
30
  npx azcodr [directory] [options]
30
31
  npx azcodr check [directory] [options]
32
+ npx azcodr boundaries [directory] [options]
31
33
 
32
34
  Commands:
33
- [directory] Scaffold azcodr template into directory (default: current directory)
34
- check [directory] Validate architecture and governance rules (alias: validate, audit)
35
+ [directory] Scaffold azcodr template into directory (default: current directory)
36
+ check [directory] Validate architecture and governance rules (alias: validate, audit)
37
+ boundaries [directory] Inspect dependency cycles and layer boundaries (alias: boundary, cycles)
35
38
 
36
39
  Options:
37
40
  -d, --dry-run Simulate scaffolding without modifying filesystem
@@ -44,6 +47,7 @@ Options:
44
47
  Examples:
45
48
  npx azcodr my-project
46
49
  npx azcodr check
50
+ npx azcodr boundaries ./src
47
51
  npx azcodr check ./existing-repo
48
52
  npx azcodr . --dry-run
49
53
  `);
@@ -63,6 +67,7 @@ export interface CliIo {
63
67
  templateDir?: string;
64
68
  scaffold?: (options?: ScaffoldOptions) => ScaffoldResult;
65
69
  validate?: (workspaceRoot: string, reporter?: any) => { errors: number; warnings: number } | Promise<{ errors: number; warnings: number }>;
70
+ boundaries?: (parsed: CliParsedOptions, io: any) => Promise<void | number>;
66
71
  }
67
72
 
68
73
  export interface NormalizedCliIo {
@@ -75,6 +80,7 @@ export interface NormalizedCliIo {
75
80
  templateDir: string;
76
81
  scaffoldFn: (options?: ScaffoldOptions) => ScaffoldResult;
77
82
  validateFn: (workspaceRoot: string, reporter?: any) => { errors: number; warnings: number } | Promise<{ errors: number; warnings: number }>;
83
+ boundariesFn: (parsed: CliParsedOptions, io: any) => Promise<void | number>;
78
84
  }
79
85
 
80
86
  function defaultStreams(io: CliIo) {
@@ -94,7 +100,8 @@ function normalizeIo(io: CliIo): NormalizedCliIo {
94
100
  cwd: io.cwd ?? process.cwd(),
95
101
  templateDir: io.templateDir ?? getTemplateDir(),
96
102
  scaffoldFn: io.scaffold ?? scaffold,
97
- validateFn: io.validate ?? validate
103
+ validateFn: io.validate ?? validate,
104
+ boundariesFn: io.boundaries ?? handleBoundariesCommand
98
105
  };
99
106
  }
100
107
 
@@ -123,7 +130,13 @@ async function handleCheckCommand(
123
130
  const checkDir = parsed.targetDir ? path.resolve(fullIo.cwd, parsed.targetDir) : fullIo.cwd;
124
131
  const reporter = parsed.silent ? createSilentReporter() : undefined;
125
132
  const result = await fullIo.validateFn(checkDir, reporter);
126
- return fullIo.exit(result.errors === 0 ? 0 : 1);
133
+ if (result.errors !== 0) return fullIo.exit(1);
134
+
135
+ const srcDir = path.join(checkDir, 'src');
136
+ if (fs.existsSync(srcDir)) {
137
+ return fullIo.boundariesFn({ ...parsed, targetDir: srcDir }, fullIo);
138
+ }
139
+ return fullIo.exit(0);
127
140
  }
128
141
 
129
142
  function reportDryRun(result: ScaffoldResult, out: (msg: string) => void): void {
@@ -228,6 +241,9 @@ export async function runCli(
228
241
  if (parsed.command === 'check') {
229
242
  return handleCheckCommand(parsed, fullIo);
230
243
  }
244
+ if (parsed.command === 'boundaries') {
245
+ return fullIo.boundariesFn(parsed, fullIo);
246
+ }
231
247
 
232
248
  if (!parsed.silent) {
233
249
  outBanner(fullIo);
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module @azcodr/azcodr
3
- * Enterprise Architecture & Agentic Engineering Starter Template.
3
+ * Architecture governance toolkit, with an optional starter.
4
4
  *
5
5
  * Provides problem-first, topology-aligned project scaffolding with strict systemic atomicity,
6
6
  * filesystem scope guards, git worktree initialization, and multi-agent harness parity.
package/src/scaffold.ts CHANGED
@@ -184,7 +184,7 @@ function starterPackageJson(resolvedTarget: string): Record<string, unknown> {
184
184
  version: '0.1.0',
185
185
  type: 'module',
186
186
  private: true,
187
- description: 'Scaffolded with azcodr enterprise architecture template',
187
+ description: 'Scaffolded with the azcodr architecture governance toolkit',
188
188
  scripts: {
189
189
  test: 'node --test',
190
190
  'test:coverage': 'jest --coverage',