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.
- package/.agents/hooks.json +15 -0
- package/.agents/hooks.json.example +15 -0
- package/.agents/lib/agent-guard-command.js +103 -0
- package/.agents/lib/agent-guard-file.js +77 -0
- package/.agents/lib/agent-guard-tdd.js +77 -0
- package/.agents/lib/agent-guard.js +80 -0
- package/.agents/scripts/agent_guard.js +35 -3
- package/.agents/skills/clean-code-refactor/SKILL.md +1 -0
- package/.agents/skills/lets-build/SKILL.md +3 -2
- package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +159 -0
- package/.agents/skills/relentless-questioner/SKILL.md +1 -1
- package/.github/workflows/ci.yml +13 -0
- package/.github/workflows/publish.yml +7 -0
- package/AGENTS.md +3 -3
- package/CODE_OF_CONDUCT.md +122 -0
- package/CONTRIBUTING.md +16 -4
- package/README.md +77 -4
- package/docs/generated-enforcement-analysis.md +141 -0
- package/docs/rules/clean_code.md +3 -2
- package/docs/rules/test_driven_development.md +8 -5
- package/lib/cli-boundaries.d.ts +18 -0
- package/lib/cli-boundaries.d.ts.map +1 -0
- package/lib/cli-boundaries.js +46 -0
- package/lib/cli-boundaries.js.map +1 -0
- package/lib/cli-parse.d.ts +2 -1
- package/lib/cli-parse.d.ts.map +1 -1
- package/lib/cli-parse.js +15 -3
- package/lib/cli-parse.js.map +1 -1
- package/lib/cli.d.ts +3 -0
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +18 -4
- package/lib/cli.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/scaffold.js +1 -1
- package/lib/scaffold.js.map +1 -1
- package/memory.md +32 -0
- package/package.json +9 -3
- package/scripts/validate/toolchain.js +60 -0
- package/scripts/validate.js +12 -2
- package/src/cli-boundaries.ts +67 -0
- package/src/cli-parse.ts +19 -5
- package/src/cli.ts +20 -4
- package/src/index.ts +1 -1
- 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]
|
|
34
|
-
check [directory]
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
187
|
+
description: 'Scaffolded with the azcodr architecture governance toolkit',
|
|
188
188
|
scripts: {
|
|
189
189
|
test: 'node --test',
|
|
190
190
|
'test:coverage': 'jest --coverage',
|