rhachet-roles-bhuild 0.20.2 → 0.21.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/dist/contract/cli/init.behavior.js +34 -31
- package/dist/contract/cli/init.behavior.js.map +1 -1
- package/dist/domain.operations/behavior/init/asBehaviorTargetDir.d.ts +7 -0
- package/dist/domain.operations/behavior/init/asBehaviorTargetDir.js +10 -0
- package/dist/domain.operations/behavior/init/asBehaviorTargetDir.js.map +1 -0
- package/dist/domain.operations/behavior/init/asCleanRelativePath.d.ts +7 -0
- package/dist/domain.operations/behavior/init/asCleanRelativePath.js +10 -0
- package/dist/domain.operations/behavior/init/asCleanRelativePath.js.map +1 -0
- package/dist/domain.operations/behavior/init/asDatedBehaviorDir.d.ts +8 -0
- package/dist/domain.operations/behavior/init/asDatedBehaviorDir.js +18 -0
- package/dist/domain.operations/behavior/init/asDatedBehaviorDir.js.map +1 -0
- package/dist/domain.operations/behavior/init/findsertWishFromInput.d.ts +8 -0
- package/dist/domain.operations/behavior/init/findsertWishFromInput.js +37 -0
- package/dist/domain.operations/behavior/init/findsertWishFromInput.js.map +1 -0
- package/dist/domain.operations/behavior/init/getWishContent.d.ts +7 -0
- package/dist/domain.operations/behavior/init/getWishContent.js +16 -0
- package/dist/domain.operations/behavior/init/getWishContent.js.map +1 -0
- package/dist/domain.operations/behavior/init/templates/3.3.1.blueprint.product.guard.heavy +4 -4
- package/dist/domain.operations/behavior/init/templates/3.3.1.blueprint.product.guard.light +4 -4
- package/dist/domain.operations/behavior/init/templates/5.1.execution.from_vision.guard +5 -5
- package/dist/domain.operations/behavior/init/templates/5.1.execution.phase0_to_phaseN.guard +5 -5
- package/dist/index.js +31 -12
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -7,12 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.initBehavior = void 0;
|
|
10
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
10
11
|
const path_1 = require("path");
|
|
11
12
|
const route_1 = require("rhachet-roles-bhrain/sdk/route");
|
|
12
13
|
const zod_1 = require("zod");
|
|
13
14
|
const bind_1 = require("../../domain.operations/behavior/bind");
|
|
14
15
|
const findBehaviorByExactName_1 = require("../../domain.operations/behavior/findBehaviorByExactName");
|
|
15
16
|
const init_1 = require("../../domain.operations/behavior/init");
|
|
17
|
+
const asBehaviorTargetDir_1 = require("../../domain.operations/behavior/init/asBehaviorTargetDir");
|
|
18
|
+
const asCleanRelativePath_1 = require("../../domain.operations/behavior/init/asCleanRelativePath");
|
|
19
|
+
const asDatedBehaviorDir_1 = require("../../domain.operations/behavior/init/asDatedBehaviorDir");
|
|
20
|
+
const findsertWishFromInput_1 = require("../../domain.operations/behavior/init/findsertWishFromInput");
|
|
21
|
+
const getWishContent_1 = require("../../domain.operations/behavior/init/getWishContent");
|
|
16
22
|
const expandBehaviorName_1 = require("../../domain.operations/behavior/name/expandBehaviorName");
|
|
17
23
|
const computeFooterOutput_1 = require("../../domain.operations/behavior/render/computeFooterOutput");
|
|
18
24
|
const cli_1 = require("../../infra/cli");
|
|
@@ -29,6 +35,7 @@ const schemaOfArgs = zod_1.z.object({
|
|
|
29
35
|
open: zod_1.z.string().optional(),
|
|
30
36
|
size: zod_1.z.enum(['nano', 'mini', 'medi', 'mega', 'giga']).optional(),
|
|
31
37
|
guard: zod_1.z.enum(['light', 'heavy']).optional(),
|
|
38
|
+
wish: zod_1.z.string().optional(),
|
|
32
39
|
// rhachet passthrough args (optional, ignored)
|
|
33
40
|
repo: zod_1.z.string().optional(),
|
|
34
41
|
role: zod_1.z.string().optional(),
|
|
@@ -45,16 +52,10 @@ const initBehavior = async () => {
|
|
|
45
52
|
const context = { cwd: process.cwd() };
|
|
46
53
|
const targetDirRaw = named.dir ?? '.';
|
|
47
54
|
// validate --open has a value if provided
|
|
48
|
-
if (named.open !== undefined && named.open.trim() === '')
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
console.error(' --open codium');
|
|
53
|
-
console.error(' --open vim');
|
|
54
|
-
console.error(' --open zed');
|
|
55
|
-
console.error(' --open code');
|
|
56
|
-
process.exit(1);
|
|
57
|
-
}
|
|
55
|
+
if (named.open !== undefined && named.open.trim() === '')
|
|
56
|
+
throw new helpful_errors_1.ConstraintError('--open requires an editor name', {
|
|
57
|
+
hint: 'specify what editor to open with: --open codium, --open vim, --open zed, --open code',
|
|
58
|
+
});
|
|
58
59
|
// get current branch
|
|
59
60
|
const currentBranch = (0, bind_1.getCurrentBranch)({}, context);
|
|
60
61
|
// expand @branch token to behavior name
|
|
@@ -63,21 +64,13 @@ const initBehavior = async () => {
|
|
|
63
64
|
branch: currentBranch,
|
|
64
65
|
});
|
|
65
66
|
// trim .behavior suffix from target dir if present
|
|
66
|
-
const targetDir =
|
|
67
|
+
const targetDir = (0, asBehaviorTargetDir_1.asBehaviorTargetDir)({ targetDirRaw });
|
|
67
68
|
// check for extant behavior with same name (different date)
|
|
68
69
|
const behaviorFound = (0, findBehaviorByExactName_1.findBehaviorByExactName)({ name: behaviorName, targetDir }, context);
|
|
69
70
|
// reuse extant behavior or create new with today's date
|
|
70
|
-
const behaviorDir = ((
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
// generate isodate in format YYYY_MM_DD
|
|
75
|
-
const now = new Date();
|
|
76
|
-
const isoDate = `${now.getFullYear()}_${String(now.getMonth() + 1).padStart(2, '0')}_${String(now.getDate()).padStart(2, '0')}`;
|
|
77
|
-
return (0, path_1.join)(targetDir, '.behavior', `v${isoDate}.${behaviorName}`);
|
|
78
|
-
})();
|
|
79
|
-
// clean up leading ./ for display and route binding
|
|
80
|
-
const behaviorDirRel = behaviorDir.replace(/^\.\//, '');
|
|
71
|
+
const behaviorDir = behaviorFound ?? (0, asDatedBehaviorDir_1.asDatedBehaviorDir)({ targetDir, behaviorName });
|
|
72
|
+
// remove prefix ./ for display and route bind
|
|
73
|
+
const behaviorDirRel = (0, asCleanRelativePath_1.asCleanRelativePath)({ path: behaviorDir });
|
|
81
74
|
// check if branch already bound (must be after behaviorDir is computed)
|
|
82
75
|
const bindResult = (0, bind_1.getBranchBehaviorBind)({
|
|
83
76
|
branchName: currentBranch,
|
|
@@ -85,13 +78,13 @@ const initBehavior = async () => {
|
|
|
85
78
|
}, context);
|
|
86
79
|
// compare absolute paths to handle relative vs absolute format differences
|
|
87
80
|
const behaviorDirAbs = (0, path_1.resolve)(context.cwd, behaviorDir);
|
|
88
|
-
if (bindResult.behaviorDir && bindResult.behaviorDir !== behaviorDirAbs)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
if (bindResult.behaviorDir && bindResult.behaviorDir !== behaviorDirAbs)
|
|
82
|
+
throw new helpful_errors_1.ConstraintError(`branch '${currentBranch}' is already bound to: ${(0, path_1.basename)(bindResult.behaviorDir)}`, {
|
|
83
|
+
hint: 'to create a new behavior, use a new tree: git tree set --from main --open <branch-name-new>',
|
|
84
|
+
currentBranch,
|
|
85
|
+
boundTo: bindResult.behaviorDir,
|
|
86
|
+
attempted: behaviorDirAbs,
|
|
87
|
+
});
|
|
95
88
|
// initialize behavior directory with template files
|
|
96
89
|
const result = (0, init_1.initBehaviorDir)({
|
|
97
90
|
behaviorDir,
|
|
@@ -99,6 +92,13 @@ const initBehavior = async () => {
|
|
|
99
92
|
size: named.size,
|
|
100
93
|
guard: named.guard,
|
|
101
94
|
});
|
|
95
|
+
// compute wish file path
|
|
96
|
+
const wishPath = (0, path_1.join)(behaviorDir, '0.wish.md');
|
|
97
|
+
// if --wish provided, findsert content into wish file
|
|
98
|
+
if (named.wish !== undefined) {
|
|
99
|
+
const wishInput = (0, getWishContent_1.getWishContent)({ wish: named.wish });
|
|
100
|
+
(0, findsertWishFromInput_1.findsertWishFromInput)({ wishInput, wishPath });
|
|
101
|
+
}
|
|
102
102
|
// render tree-style output
|
|
103
103
|
const treeOutput = (0, init_1.computeOutputTree)({
|
|
104
104
|
created: result.created,
|
|
@@ -109,6 +109,7 @@ const initBehavior = async () => {
|
|
|
109
109
|
// compute relative path to wish file
|
|
110
110
|
const wishPathRel = `${behaviorDirRel}/0.wish.md`;
|
|
111
111
|
// try opener if --open is provided (before footer render)
|
|
112
|
+
// .note = graceful degradation: behavior init succeeds even if opener fails
|
|
112
113
|
let openerUsed;
|
|
113
114
|
if (named.open) {
|
|
114
115
|
try {
|
|
@@ -117,8 +118,10 @@ const initBehavior = async () => {
|
|
|
117
118
|
}
|
|
118
119
|
catch (error) {
|
|
119
120
|
if (error instanceof OpenerUnavailableError_1.OpenerUnavailableError) {
|
|
120
|
-
|
|
121
|
-
console.
|
|
121
|
+
// log to stderr: opener failed but behavior init succeeded
|
|
122
|
+
console.error('');
|
|
123
|
+
console.error(`⚠️ ${error.message}`);
|
|
124
|
+
console.error(` behavior created, open manually: ${wishPathRel}`);
|
|
122
125
|
}
|
|
123
126
|
else {
|
|
124
127
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.behavior.js","sourceRoot":"","sources":["../../../src/contract/cli/init.behavior.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA+C;AAC/C,0DAA8D;AAC9D,6BAAwB;AAExB,+DAI8C;AAC9C,qGAAkG;AAClG,+DAG8C;AAC9C,gGAA6F;AAC7F,oGAAiG;AACjG,wCAA4C;AAC5C,oFAAiF;AACjF,4EAAyE;AAEzE,uEAAuE;AACvE,SAAS;AACT,uEAAuE;AAEvE,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,sBAAsB;QACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,E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AC;IAChB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CACT,gBAAgB,aAAa,iBAAiB,IAAA,eAAQ,EAAC,WAAW,CAAC,EAAE,CACtE,CAAC;IACF,OAAO,CAAC,GAAG,CACT,SAAS,GAAG,8CAA8C,KAAK,EAAE,CAClE,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,4CAA4C,KAAK,EAAE,CAAC,CAAC;AAC/E,CAAC,CAAC;AAvIW,QAAA,YAAY,gBAuIvB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asBehaviorTargetDir = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* .what = strip .behavior suffix from target directory path
|
|
6
|
+
* .why = users may pass path that ends in .behavior; strip for consistent handling
|
|
7
|
+
*/
|
|
8
|
+
const asBehaviorTargetDir = (input) => input.targetDirRaw.replace(/\/?\.behavior\/?$/, '');
|
|
9
|
+
exports.asBehaviorTargetDir = asBehaviorTargetDir;
|
|
10
|
+
//# sourceMappingURL=asBehaviorTargetDir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asBehaviorTargetDir.js","sourceRoot":"","sources":["../../../../src/domain.operations/behavior/init/asBehaviorTargetDir.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAU,EAAE,CAC7E,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;AADzC,QAAA,mBAAmB,uBACsB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asCleanRelativePath = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* .what = remove prefix ./ from path for clean display
|
|
6
|
+
* .why = paths like ./foo should display as foo in output and route bind
|
|
7
|
+
*/
|
|
8
|
+
const asCleanRelativePath = (input) => input.path.replace(/^\.\//, '');
|
|
9
|
+
exports.asCleanRelativePath = asCleanRelativePath;
|
|
10
|
+
//# sourceMappingURL=asCleanRelativePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asCleanRelativePath.js","sourceRoot":"","sources":["../../../../src/domain.operations/behavior/init/asCleanRelativePath.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAuB,EAAU,EAAE,CACrE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AADrB,QAAA,mBAAmB,uBACE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .what = generate behavior directory path with today's date prefix
|
|
3
|
+
* .why = new behaviors get versioned directory names like v2026_04_17.my-feature
|
|
4
|
+
*/
|
|
5
|
+
export declare const asDatedBehaviorDir: (input: {
|
|
6
|
+
targetDir: string;
|
|
7
|
+
behaviorName: string;
|
|
8
|
+
}) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asDatedBehaviorDir = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
/**
|
|
6
|
+
* .what = generate behavior directory path with today's date prefix
|
|
7
|
+
* .why = new behaviors get versioned directory names like v2026_04_17.my-feature
|
|
8
|
+
*/
|
|
9
|
+
const asDatedBehaviorDir = (input) => {
|
|
10
|
+
const now = new Date();
|
|
11
|
+
const year = now.getFullYear();
|
|
12
|
+
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
13
|
+
const day = String(now.getDate()).padStart(2, '0');
|
|
14
|
+
const isoDate = `${year}_${month}_${day}`;
|
|
15
|
+
return (0, path_1.join)(input.targetDir, '.behavior', `v${isoDate}.${input.behaviorName}`);
|
|
16
|
+
};
|
|
17
|
+
exports.asDatedBehaviorDir = asDatedBehaviorDir;
|
|
18
|
+
//# sourceMappingURL=asDatedBehaviorDir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asDatedBehaviorDir.js","sourceRoot":"","sources":["../../../../src/domain.operations/behavior/init/asDatedBehaviorDir.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAE5B;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CAAC,KAGlC,EAAU,EAAE;IACX,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;IAC1C,OAAO,IAAA,WAAI,EACT,KAAK,CAAC,SAAS,EACf,WAAW,EACX,IAAI,OAAO,IAAI,KAAK,CAAC,YAAY,EAAE,CACpC,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,kBAAkB,sBAc7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findsertWishFromInput = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
/**
|
|
7
|
+
* .what = validates wish input and findserts into wish file
|
|
8
|
+
* .why = findsert semantics: same = no-op, template = populate, different = error
|
|
9
|
+
*/
|
|
10
|
+
const findsertWishFromInput = (input) => {
|
|
11
|
+
// validate non-empty
|
|
12
|
+
if (!input.wishInput.trim()) {
|
|
13
|
+
console.error('error: --wish requires content');
|
|
14
|
+
process.exit(2); // constraint error: user must fix
|
|
15
|
+
}
|
|
16
|
+
// findsert semantics
|
|
17
|
+
const wishExpected = `wish =\n\n${input.wishInput}\n`;
|
|
18
|
+
const wishCurrent = (0, fs_1.readFileSync)(input.wishPath, 'utf-8');
|
|
19
|
+
const wishPathRel = (0, path_1.relative)(process.cwd(), input.wishPath);
|
|
20
|
+
if (wishCurrent === wishExpected) {
|
|
21
|
+
// already populated with same content — no-op (idempotent)
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (wishCurrent.trim() === 'wish =' || wishCurrent.trim() === '') {
|
|
25
|
+
// template or empty — populate
|
|
26
|
+
(0, fs_1.writeFileSync)(input.wishPath, wishExpected);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// different content — error
|
|
30
|
+
console.error('error: wish file has been modified');
|
|
31
|
+
console.error('');
|
|
32
|
+
console.error('to overwrite, delete the wish file first:');
|
|
33
|
+
console.error(` rm ${wishPathRel}`);
|
|
34
|
+
process.exit(2); // constraint error: user must fix
|
|
35
|
+
};
|
|
36
|
+
exports.findsertWishFromInput = findsertWishFromInput;
|
|
37
|
+
//# sourceMappingURL=findsertWishFromInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findsertWishFromInput.js","sourceRoot":"","sources":["../../../../src/domain.operations/behavior/init/findsertWishFromInput.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AACjD,+BAAgC;AAEhC;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CAAC,KAGrC,EAAQ,EAAE;IACT,qBAAqB;IACrB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,kCAAkC;IACrD,CAAC;IAED,qBAAqB;IACrB,MAAM,YAAY,GAAG,aAAa,KAAK,CAAC,SAAS,IAAI,CAAC;IACtD,MAAM,WAAW,GAAG,IAAA,iBAAY,EAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,IAAA,eAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAE5D,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;QACjC,2DAA2D;QAC3D,OAAO;IACT,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,+BAA+B;QAC/B,IAAA,kBAAa,EAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAC5C,OAAO;IACT,CAAC;IAED,4BAA4B;IAC5B,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACpD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC3D,OAAO,CAAC,KAAK,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,kCAAkC;AACrD,CAAC,CAAC;AAhCW,QAAA,qBAAqB,yBAgChC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWishContent = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
/**
|
|
6
|
+
* .what = extracts wish content from @stdin or returns inline value
|
|
7
|
+
* .why = handles @stdin pattern for piped input
|
|
8
|
+
*/
|
|
9
|
+
const getWishContent = (input) => {
|
|
10
|
+
if (input.wish === '@stdin') {
|
|
11
|
+
return (0, fs_1.readFileSync)(0, 'utf-8').trim();
|
|
12
|
+
}
|
|
13
|
+
return input.wish;
|
|
14
|
+
};
|
|
15
|
+
exports.getWishContent = getWishContent;
|
|
16
|
+
//# sourceMappingURL=getWishContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWishContent.js","sourceRoot":"","sources":["../../../../src/domain.operations/behavior/init/getWishContent.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAElC;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAU,EAAE;IAChE,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,IAAA,iBAAY,EAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
|
|
@@ -514,10 +514,10 @@ reviews:
|
|
|
514
514
|
|
|
515
515
|
peer:
|
|
516
516
|
- npx rhachet run --repo bhrain --skill review --rules '.agent/repo=ehmpathy/role=mechanic/briefs/practices/code.{prod,test}/pitofsuccess.errors/rule.*.md' --diffs since-main --paths-with '$route/3.3.blueprint.*.md' --join intersect --output '$route/.reviews/$stone.peer-review.failhides.md' --mode hard
|
|
517
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the blueprint at $route/$stone.md for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
518
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
519
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the blueprint for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
520
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the blueprint for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
517
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the blueprint at $route/$stone.md for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
518
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
519
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the blueprint for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
520
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the blueprint for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
521
521
|
|
|
522
522
|
judges:
|
|
523
523
|
- npx rhachet run --repo bhrain --skill route.stone.judge --mechanism reviewed? --stone $stone --route $route --allow-blockers 0 --allow-nitpicks 3
|
|
@@ -462,10 +462,10 @@ reviews:
|
|
|
462
462
|
|
|
463
463
|
peer:
|
|
464
464
|
- npx rhachet run --repo bhrain --skill review --rules '.agent/repo=ehmpathy/role=mechanic/briefs/practices/code.{prod,test}/pitofsuccess.errors/rule.*.md' --diffs since-main --paths-with '$route/3.3.blueprint.*.md' --join intersect --output '$route/.reviews/$stone.peer-review.failhides.md' --mode hard
|
|
465
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the blueprint at $route/$stone.md for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
466
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
467
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the blueprint for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
468
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the blueprint for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
465
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the blueprint at $route/$stone.md for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
466
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
467
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the blueprint for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
468
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the blueprint for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
469
469
|
|
|
470
470
|
judges:
|
|
471
471
|
- npx rhachet run --repo bhrain --skill route.stone.judge --mechanism reviewed? --stone $stone --route $route --allow-blockers 0 --allow-nitpicks 3
|
|
@@ -154,11 +154,11 @@ reviews:
|
|
|
154
154
|
|
|
155
155
|
peer:
|
|
156
156
|
- npx rhachet run --repo bhrain --skill review --rules '.agent/repo=ehmpathy/role=mechanic/briefs/practices/code.{prod,test}/pitofsuccess.errors/rule.*.md' --diffs since-main --paths-with 'src/**/*.ts' --join intersect --output '$route/.reviews/$stone.peer-review.failhides.md' --mode hard
|
|
157
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the diff for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
158
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
159
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the diff for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
160
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the diff for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
161
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the current src/ implementation against the wish and vision. identify gaps where requirements are not addressed and omissions where features are missing. emit BLOCKERS and NITPICKS."
|
|
157
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the diff for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
158
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
159
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the diff for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
160
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the diff for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
161
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the current src/ implementation against the wish and vision. identify gaps where requirements are not addressed and omissions where features are missing. emit BLOCKERS and NITPICKS."
|
|
162
162
|
|
|
163
163
|
judges:
|
|
164
164
|
- npx rhachet run --repo bhrain --skill route.stone.judge --mechanism reviewed? --stone $stone --route $route --allow-blockers 0 --allow-nitpicks 3
|
|
@@ -159,11 +159,11 @@ reviews:
|
|
|
159
159
|
peer:
|
|
160
160
|
- npx rhachet run --repo bhrain --skill review --rules '.agent/repo=ehmpathy/role=mechanic/briefs/practices/code.{prod,test}/pitofsuccess.errors/rule.*.md' --diffs since-main --paths-with 'src/**/*' --join intersect --output '$route/.reviews/$stone.peer-review.failhides.md' --mode hard
|
|
161
161
|
- npx rhachet run --repo bhrain --skill review --rules '.agent/repo=ehmpathy/role=architect/briefs/practices/rule.{forbid.decode-friction-in-orchestrators,require.orchestrators-as-narrative}.md' --rules '.agent/repo=ehmpathy/role=mechanic/briefs/practices/code.prod/readable.narrative/rule.{forbid.inline-decode-friction,require.named-transforms}.md' --refs '.agent/repo=ehmpathy/role=architect/briefs/practices/{define.domain-operation-grains,philosophy.transform-orchestrator-separation.[philosophy]}.md' --diffs since-main --paths-with 'src/**/*' --paths-without '**/*.test.ts' --join intersect --output '$route/.reviews/$stone.peer-review.decode-friction.md' --mode hard
|
|
162
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the diff for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
163
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
164
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the diff for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
165
|
-
- npx rhachet enroll claude --roles ergonomist,mechanic -p "review the diff for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
166
|
-
- npx rhachet enroll claude --roles architect,mechanic -p "review the current src/ implementation against the wish and vision. identify gaps where requirements are not addressed and omissions where features are missing. emit BLOCKERS and NITPICKS."
|
|
162
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the diff for architectural gaps and defects. emit BLOCKERS and NITPICKS."
|
|
163
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review diff for architectural scope leak, decompose to reuse opportunities, and other arch smells. emit BLOCKERS and NITPICKS."
|
|
164
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the diff for snapshot coverage on contract endpoints and acceptance test user journey coverage. emit BLOCKERS and NITPICKS."
|
|
165
|
+
- npx rhachet enroll claude --roles behaver,ergonomist,mechanic -p "review the diff for experiential and visual blemishes in snapshotted acceptance test journeys. emit BLOCKERS and NITPICKS."
|
|
166
|
+
- npx rhachet enroll claude --roles behaver,architect,mechanic -p "review the current src/ implementation against the wish and vision. identify gaps where requirements are not addressed and omissions where features are missing. emit BLOCKERS and NITPICKS."
|
|
167
167
|
|
|
168
168
|
judges:
|
|
169
169
|
- npx rhachet run --repo bhrain --skill route.stone.judge --mechanism reviewed? --stone $stone --route $route --allow-blockers 0 --allow-nitpicks 3
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.cli = void 0;
|
|
|
18
18
|
__exportStar(require("./contract/sdk"), exports);
|
|
19
19
|
// CLI entry points for portable skill dispatch
|
|
20
20
|
const emoji_space_shim_1 = require("emoji-space-shim");
|
|
21
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
21
22
|
const bind_behavior_1 = require("./contract/cli/bind.behavior");
|
|
22
23
|
const boot_behavior_1 = require("./contract/cli/boot.behavior");
|
|
23
24
|
const catch_dream_1 = require("./contract/cli/catch.dream");
|
|
@@ -29,18 +30,36 @@ const init_behavior_1 = require("./contract/cli/init.behavior");
|
|
|
29
30
|
const radioTaskPull_1 = require("./contract/cli/radioTaskPull");
|
|
30
31
|
const radioTaskPush_1 = require("./contract/cli/radioTaskPush");
|
|
31
32
|
const review_behavior_1 = require("./contract/cli/review.behavior");
|
|
33
|
+
const asCli = (logic) => async () => {
|
|
34
|
+
try {
|
|
35
|
+
await logic();
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof helpful_errors_1.ConstraintError) {
|
|
39
|
+
const metadata = error.metadata;
|
|
40
|
+
const hint = metadata?.hint;
|
|
41
|
+
console.error(`✋ ConstraintError: ${error.message.replace(/^✋ ConstraintError: /, '')}`);
|
|
42
|
+
if (hint) {
|
|
43
|
+
console.error('');
|
|
44
|
+
console.error(hint);
|
|
45
|
+
}
|
|
46
|
+
process.exit(helpful_errors_1.ConstraintError.code.exit);
|
|
47
|
+
}
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
32
51
|
exports.cli = {
|
|
33
|
-
bindBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
34
|
-
bootBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
35
|
-
catchDream: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
36
|
-
decomposeBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
37
|
-
feedbackGive: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
38
|
-
feedbackTakeGet: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
39
|
-
feedbackTakeSet: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
40
|
-
giveFeedback: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
41
|
-
initBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
42
|
-
radioTaskPull: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
43
|
-
radioTaskPush: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
44
|
-
reviewBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic:
|
|
52
|
+
bindBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(bind_behavior_1.bindBehavior) }),
|
|
53
|
+
bootBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(boot_behavior_1.bootBehavior) }),
|
|
54
|
+
catchDream: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(catch_dream_1.catchDream) }),
|
|
55
|
+
decomposeBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(decompose_behavior_1.decomposeBehavior) }),
|
|
56
|
+
feedbackGive: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(feedback_give_1.feedbackGive) }),
|
|
57
|
+
feedbackTakeGet: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(feedback_take_get_1.feedbackTakeGet) }),
|
|
58
|
+
feedbackTakeSet: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(feedback_take_set_1.feedbackTakeSet) }),
|
|
59
|
+
giveFeedback: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(feedback_give_1.feedbackGive) }), // backwards compat
|
|
60
|
+
initBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(init_behavior_1.initBehavior) }),
|
|
61
|
+
radioTaskPull: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(radioTaskPull_1.cliRadioTaskPull) }),
|
|
62
|
+
radioTaskPush: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(radioTaskPush_1.cliRadioTaskPush) }),
|
|
63
|
+
reviewBehavior: () => (0, emoji_space_shim_1.withEmojiSpaceShim)({ logic: asCli(review_behavior_1.reviewBehavior) }),
|
|
45
64
|
};
|
|
46
65
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAE/B,+CAA+C;AAC/C,uDAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAE/B,+CAA+C;AAC/C,uDAAsD;AACtD,mDAAiD;AAEjD,gEAA4D;AAC5D,gEAA4D;AAC5D,4DAAwD;AACxD,0EAAsE;AACtE,gEAA4D;AAC5D,wEAAmE;AACnE,wEAAmE;AACnE,gEAA4D;AAC5D,gEAAgE;AAChE,gEAAgE;AAChE,oEAAgE;AAEhE,MAAM,KAAK,GACT,CAAC,KAAiC,EAAE,EAAE,CAAC,KAAK,IAAmB,EAAE;IAC/D,IAAI,CAAC;QACH,MAAM,KAAK,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,gCAAe,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAA+C,CAAC;YACvE,MAAM,IAAI,GAAG,QAAQ,EAAE,IAA0B,CAAC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AAE,CAAC,IAAA,qCAAkB,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,4BAAY,CAAC,EAAE,CAAC,EAAE,mBAAmB;IAC3F,YAAY,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAkB,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,4BAAY,CAAC,EAAE,CAAC;IACtE,aAAa,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAkB,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,gCAAgB,CAAC,EAAE,CAAC;IAC3E,aAAa,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAkB,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,gCAAgB,CAAC,EAAE,CAAC;IAC3E,cAAc,EAAE,GAAG,EAAE,CAAC,IAAA,qCAAkB,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,gCAAc,CAAC,EAAE,CAAC;CAC3E,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "rhachet-roles-bhuild",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "roles for building resilient systems, via rhachet",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.21.1",
|
|
6
6
|
"repository": "ehmpathy/rhachet-roles-bhuild",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/rhachet-roles-bhuild",
|
|
8
8
|
"keywords": [
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"domain-objects": "0.31.9",
|
|
66
66
|
"emoji-space-shim": "0.0.0",
|
|
67
|
-
"helpful-errors": "1.
|
|
67
|
+
"helpful-errors": "1.7.3",
|
|
68
68
|
"iso-time": "1.11.3",
|
|
69
69
|
"test-fns": "1.15.0",
|
|
70
70
|
"zod": "4.3.4"
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"esbuild-register": "3.6.0",
|
|
90
90
|
"husky": "8.0.3",
|
|
91
91
|
"jest": "30.2.0",
|
|
92
|
-
"rhachet": "1.40.
|
|
92
|
+
"rhachet": "1.40.7",
|
|
93
93
|
"rhachet-brains-anthropic": "0.4.0",
|
|
94
94
|
"rhachet-brains-xai": "0.3.3",
|
|
95
|
-
"rhachet-roles-bhrain": "0.
|
|
95
|
+
"rhachet-roles-bhrain": "0.27.0",
|
|
96
96
|
"rhachet-roles-bhuild": "link:.",
|
|
97
|
-
"rhachet-roles-ehmpathy": "1.34.
|
|
97
|
+
"rhachet-roles-ehmpathy": "1.34.34",
|
|
98
98
|
"tsc-alias": "1.8.10",
|
|
99
99
|
"tsx": "4.20.6",
|
|
100
100
|
"typescript": "5.4.5",
|