@afokapu/atdd-bun 0.10.48 → 0.10.50
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/README.md +11 -0
- package/integrity.json +4 -4
- package/package.json +2 -2
- package/src/cli.ts +5 -3
- package/src/enforce.ts +13 -2
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ registerEnforcementTest({ root: import.meta.dir + "/..", profiles: ["traceabilit
|
|
|
61
61
|
| `interlocking` | train/interlocking binding, infrastructure and route coverage |
|
|
62
62
|
| `htmx` | htmx source/test conventions and Playwright browser specs (`*.e2e.ts`) |
|
|
63
63
|
| `design` | design-system layering, token-only styling and responsiveness |
|
|
64
|
+
| `flow` | optional ATDD Flow companion conventions for durable seats, tasks and threads |
|
|
64
65
|
| `all` | every activated profile; what the hooks and CI run |
|
|
65
66
|
|
|
66
67
|
`planner-nodes/ENFORCEMENT_SCOPE.yaml` says which canonical planner rules have a Bun realization.
|
|
@@ -80,6 +81,16 @@ profiles: [traceability, planner]
|
|
|
80
81
|
by name (`bun run atdd-bun coder`) to see what remains. An unknown name or an empty list is an
|
|
81
82
|
error, never a silent run of nothing.
|
|
82
83
|
|
|
84
|
+
### Flow profile compatibility
|
|
85
|
+
|
|
86
|
+
`flow` is the canonical optional profile name. For a compatible upgrade, a legacy explicit
|
|
87
|
+
`workflow` entry in `atdd-bun.yaml`, or a direct `bun run atdd-bun workflow`, normalizes to
|
|
88
|
+
`flow`; it does not make unrelated names valid. `flow` requires `@afokapu/atdd-bun` **0.10.45 or
|
|
89
|
+
newer**. If a checkout reports that `flow` is unknown, it is running a stale toolkit: run
|
|
90
|
+
`bun update @afokapu/atdd-bun`, then use the repository-local command
|
|
91
|
+
`bun run atdd-bun flow --root .` (never a PATH-global `atdd-bun`). Keep `flow` in newly edited
|
|
92
|
+
configuration.
|
|
93
|
+
|
|
83
94
|
With no `profiles:` field, every profile runs, but none is governed yet. The first explicit list is
|
|
84
95
|
the adoption that establishes the governed set, so a brownfield repository can declare
|
|
85
96
|
`profiles: [docs]` in an ordinary pull request. From then on, the integrity check reports, against
|
package/integrity.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.10.
|
|
2
|
+
"version": "0.10.50",
|
|
3
3
|
"files": {
|
|
4
4
|
"HOOK_AUDIT.md": "5329d840db37671b1918f688ead26865473b87db73dbc75f7c8b2a8bbe8d6d43",
|
|
5
5
|
"PLANNER_PORT.md": "fb5935bac8b7ac18994de21e43ace3a5ef8cd55f85b0e3349fca261280054f11",
|
|
6
|
-
"README.md": "
|
|
6
|
+
"README.md": "91e481217865f4bbb2711d89f02ce095cd2f60414b00b10e4874bfadb363e10b",
|
|
7
7
|
"bunfig.toml": "b9fc65eca9014c5179380259d70e76385a6a80788fa9a2df5fb3eaa5554fd2fe",
|
|
8
8
|
"conventions/_profiles/architecture.yaml": "f1808768b720a4e476047e4a0912002ca673946562cea9aeef5d0c214828d93a",
|
|
9
9
|
"conventions/_profiles/coder.yaml": "3fb191556a64c9ebcf249516afa189afca24da9b22fd40b2fc66908196cdfb78",
|
|
@@ -1195,9 +1195,9 @@
|
|
|
1195
1195
|
"relationships.yaml": "5860a308ebc3ee7fa8172fc2c6633984000ab3003f0ae4b6fa28db48879eda22",
|
|
1196
1196
|
"src/agent.ts": "39ca8b3183063c60e00eb96e5629d0397aeb83cc82d4c4bc32c01715c906649b",
|
|
1197
1197
|
"src/ci.ts": "67e54d2cbfc44a9e42837d5e750af526d6255c539d3c452a4d5fca3226c0d9ac",
|
|
1198
|
-
"src/cli.ts": "
|
|
1198
|
+
"src/cli.ts": "521aa363813f84877a97189d1a629b5db26c22f672e0386fb88f26d540918414",
|
|
1199
1199
|
"src/docs-capability.ts": "bdeeb414649049b1cd4fa8008cada3a576318be51c43bec91bfa46a8e250c270",
|
|
1200
|
-
"src/enforce.ts": "
|
|
1200
|
+
"src/enforce.ts": "7e6b3a1fc7c90f8e1836ab3e4655778fb569a63be5e7c199de44024fc003e6be",
|
|
1201
1201
|
"src/hooks.ts": "0b4ca8c857e637bbd144e737e78eda924e3cba7b038c0abe5e6916d200d73068",
|
|
1202
1202
|
"src/index.ts": "4081f8b08d1d3ee9e15a9964143e53d9cfb94a5616ab3e58a180d24cc16dc381",
|
|
1203
1203
|
"src/integrity.ts": "f5ad22759eec675454df82cdcf791b1f081951f08ca5084ebdcb8cd82aa1ecef",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afokapu/atdd-bun",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.50",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/afokapu/atdd-bun.git"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"bun": ">=1.3.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@afokapu/atdd-flow": "^0.
|
|
38
|
+
"@afokapu/atdd-flow": "^0.3.0",
|
|
39
39
|
"ajv": "^8.17.1",
|
|
40
40
|
"ajv-formats": "^3.0.1"
|
|
41
41
|
},
|
package/src/cli.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { enforce, profileNames, type Profile } from "./enforce";
|
|
2
|
+
import { enforce, flowCompatibilityDiagnostic, normalizeProfileName, profileNames, type Profile } from "./enforce";
|
|
3
3
|
import { finishWorktree, hookEvents, hooksStatus, installHooks, runHook, startWorktree, uninstallHooks, worktreeStatus } from "./hooks";
|
|
4
4
|
import { ciInit, ciStatus } from "./ci";
|
|
5
5
|
import { agentInit, agentStatus } from "./agent";
|
|
@@ -118,9 +118,11 @@ for (let index = 0; index < args.length; index += 1) {
|
|
|
118
118
|
const profileValue = args.includes("--profile") ? valueAfter("--profile") : undefined;
|
|
119
119
|
if (args.includes("--profile") && !profileValue) fail("--profile requires one or more comma-separated profiles");
|
|
120
120
|
const requested = profileValue ? profileValue.split(",").filter(Boolean) : positional.length ? positional : ["all"];
|
|
121
|
-
const
|
|
121
|
+
const normalizedRequested = requested.map(normalizeProfileName);
|
|
122
|
+
const invalid = normalizedRequested.find(profile => !profileNames.includes(profile as Profile));
|
|
122
123
|
if (invalid) fail("unknown command or profile: " + invalid);
|
|
123
|
-
|
|
124
|
+
if (requested.includes("workflow")) console.error(flowCompatibilityDiagnostic);
|
|
125
|
+
const violations = await enforce({ root, profiles: normalizedRequested as Profile[] });
|
|
124
126
|
for (const violation of violations) {
|
|
125
127
|
console.error([violation.file, violation.line, violation.col].join(":") + " " + violation.rule_id + " — " + violation.evidence);
|
|
126
128
|
}
|
package/src/enforce.ts
CHANGED
|
@@ -60,6 +60,16 @@ export const optionalProfiles: ConcreteProfile[] = ["flow"];
|
|
|
60
60
|
export const defaultProfiles = concreteProfiles.filter(profile => !optionalProfiles.includes(profile));
|
|
61
61
|
/** Profile names accepted by the CLI and public integrations. */
|
|
62
62
|
export const profileNames = [...concreteProfiles, "all"] as Profile[];
|
|
63
|
+
/** Retired spellings accepted only to migrate old configuration and invocations to their canonical profile. */
|
|
64
|
+
export const legacyProfileAliases = { workflow: "flow" } as const;
|
|
65
|
+
|
|
66
|
+
/** Normalize a supported retired spelling without making it part of the canonical profile registry. */
|
|
67
|
+
export function normalizeProfileName(name: string): string {
|
|
68
|
+
return legacyProfileAliases[name as keyof typeof legacyProfileAliases] ?? name;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Guidance for a repository that was configured during the workflow → flow rename. */
|
|
72
|
+
export const flowCompatibilityDiagnostic = "Legacy profile workflow is normalized to canonical flow. If this checkout reports flow as unknown, it is using @afokapu/atdd-bun older than 0.10.45; run bun update @afokapu/atdd-bun, then invoke the project-local CLI with bun run atdd-bun flow --root . (not a PATH-global atdd-bun).";
|
|
63
73
|
|
|
64
74
|
/**
|
|
65
75
|
* The profiles the operator has activated: `profiles:` in atdd-bun.yaml, or every built-in profile when absent. A legacy
|
|
@@ -72,9 +82,10 @@ export async function enabledProfiles(root = process.cwd()): Promise<ConcretePro
|
|
|
72
82
|
const listed = existsSync(file) ? (Bun.YAML.parse(await readFile(file, "utf8")) as { profiles?: unknown } | null)?.profiles : undefined;
|
|
73
83
|
if (listed === undefined) return defaultProfiles;
|
|
74
84
|
if (!Array.isArray(listed) || !listed.length) throw new Error("atdd-bun.yaml profiles must be a non-empty list of profile names");
|
|
75
|
-
const
|
|
85
|
+
const normalized = listed.map(name => typeof name === "string" ? normalizeProfileName(name) : name);
|
|
86
|
+
const unknown = normalized.filter(name => typeof name !== "string" || !concreteProfiles.includes(name as ConcreteProfile));
|
|
76
87
|
if (unknown.length) throw new Error(`atdd-bun.yaml profiles lists unknown profile(s): ${unknown.join(", ")}; known: ${concreteProfiles.join(", ")}`);
|
|
77
|
-
return [...new Set(
|
|
88
|
+
return [...new Set(normalized as ConcreteProfile[])];
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
const packageRoot = resolve(import.meta.dir, "..");
|