rhachet-roles-ehmpathy 1.0.0
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/LICENSE +21 -0
- package/dist/.test/genContextLogTrail.d.ts +2 -0
- package/dist/.test/genContextLogTrail.js +12 -0
- package/dist/.test/genContextLogTrail.js.map +1 -0
- package/dist/.test/genContextStitchTrail.d.ts +2 -0
- package/dist/.test/genContextStitchTrail.js +8 -0
- package/dist/.test/genContextStitchTrail.js.map +1 -0
- package/dist/.test/getContextOpenAI.d.ts +2 -0
- package/dist/.test/getContextOpenAI.js +18 -0
- package/dist/.test/getContextOpenAI.js.map +1 -0
- package/dist/contract/cases/mechanicGoalStubout.integration.test.d.ts +0 -0
- package/dist/contract/cases/mechanicGoalStubout.integration.test.js +2 -0
- package/dist/contract/cases/mechanicGoalStubout.integration.test.js.map +1 -0
- package/dist/contract/cases/mechanicStubFillout.integration.test.d.ts +0 -0
- package/dist/contract/cases/mechanicStubFillout.integration.test.js +2 -0
- package/dist/contract/cases/mechanicStubFillout.integration.test.js.map +1 -0
- package/dist/contract/commands/codegenBriefOptions.d.ts +1 -0
- package/dist/contract/commands/codegenBriefOptions.js +57 -0
- package/dist/contract/commands/codegenBriefOptions.js.map +1 -0
- package/dist/data/sdk/sdkOpenAi.d.ts +16 -0
- package/dist/data/sdk/sdkOpenAi.js +38 -0
- package/dist/data/sdk/sdkOpenAi.js.map +1 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/logic/artifact/genStepArtSet.d.ts +13 -0
- package/dist/logic/artifact/genStepArtSet.integration.test.d.ts +1 -0
- package/dist/logic/artifact/genStepArtSet.integration.test.js +142 -0
- package/dist/logic/artifact/genStepArtSet.integration.test.js.map +1 -0
- package/dist/logic/artifact/genStepArtSet.js +29 -0
- package/dist/logic/artifact/genStepArtSet.js.map +1 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.d.ts +19 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.integration.test.d.ts +1 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.integration.test.js +97 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.integration.test.js.map +1 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.js +84 -0
- package/dist/logic/artifact/genStepGrabCallerFeedbackToArtifact.js.map +1 -0
- package/dist/logic/roles/designer/getDesignerBrief.Options.codegen.d.ts +10 -0
- package/dist/logic/roles/designer/getDesignerBrief.Options.codegen.js +14 -0
- package/dist/logic/roles/designer/getDesignerBrief.Options.codegen.js.map +1 -0
- package/dist/logic/roles/designer/getDesignerBrief.d.ts +13 -0
- package/dist/logic/roles/designer/getDesignerBrief.js +21 -0
- package/dist/logic/roles/designer/getDesignerBrief.js.map +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.d.ts +26 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.integration.test.d.ts +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.integration.test.js +77 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.integration.test.js.map +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.js +53 -0
- package/dist/logic/roles/designer/outlineDistilisys/loopOutlineDistilisys.js.map +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.d.ts +22 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.integration.test.d.ts +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.integration.test.js +142 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.integration.test.js.map +1 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.js +55 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.js.map +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.d.ts +26 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.integration.test.d.ts +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.integration.test.js +71 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.integration.test.js.map +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.js +53 -0
- package/dist/logic/roles/designer/outlineRoadmap/loopOutlineRoadmap.js.map +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.d.ts +22 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.integration.test.d.ts +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.integration.test.js +130 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.integration.test.js.map +1 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.js +48 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.d.ts +17 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.integration.test.d.ts +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.integration.test.js +107 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.integration.test.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.js +76 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.expand.ResourcesAndMechanisms.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.imagine.ResourcesAndMechanisms.d.ts +17 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.imagine.ResourcesAndMechanisms.js +73 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.imagine.ResourcesAndMechanisms.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.d.ts +18 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.integration.test.d.ts +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.integration.test.js +73 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.integration.test.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.js +62 -0
- package/dist/logic/roles/ecologist/distill/.deprecate/distillDomain.refine.ResourcesAndMechanisms.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.d.ts +16 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.integration.test.d.ts +1 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.integration.test.js +120 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.integration.test.js.map +1 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.js +69 -0
- package/dist/logic/roles/ecologist/distill/distillDomain.ActionsAndActors.js.map +1 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.Options.codegen.d.ts +10 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.Options.codegen.js +39 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.Options.codegen.js.map +1 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.d.ts +13 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.js +21 -0
- package/dist/logic/roles/ecologist/getEcologistBrief.js.map +1 -0
- package/dist/logic/roles/getRoleRegistry.d.ts +8 -0
- package/dist/logic/roles/getRoleRegistry.js +19 -0
- package/dist/logic/roles/getRoleRegistry.js.map +1 -0
- package/dist/logic/roles/getRoleRegistry.readme.d.ts +5 -0
- package/dist/logic/roles/getRoleRegistry.readme.js +75 -0
- package/dist/logic/roles/getRoleRegistry.readme.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/getRefOrgPatterns.d.ts +5 -0
- package/dist/logic/roles/mechanic/codediff/getRefOrgPatterns.js +22 -0
- package/dist/logic/roles/mechanic/codediff/getRefOrgPatterns.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.d.ts +34 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.integration.test.js +246 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.js +56 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.d.ts +34 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.integration.test.js +144 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.js +33 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReview.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.d.ts +34 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.integration.test.js +138 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.js +49 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewBehavior.d.ts +28 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewBehavior.js +35 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewBehavior.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.d.ts +28 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.integration.test.js +294 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.js +44 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.d.ts +38 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.integration.test.js +162 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.js +32 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.d.ts +56 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.integration.test.js +169 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.js +30 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodeIterate.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.d.ts +53 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.integration.test.js +203 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.js +72 -0
- package/dist/logic/roles/mechanic/codediff/routeMechanicCodePropose.js.map +1 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.Options.codegen.d.ts +10 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.Options.codegen.js +35 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.Options.codegen.js.map +1 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.d.ts +13 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.js +21 -0
- package/dist/logic/roles/mechanic/getMechanicBrief.js.map +1 -0
- package/dist/logic/roles/mechanic/getMechanicRole.d.ts +2 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js +157 -0
- package/dist/logic/roles/mechanic/getMechanicRole.js.map +1 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.d.ts +19 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.integration.test.d.ts +1 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.integration.test.js +98 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.integration.test.js.map +1 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.js +30 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.js.map +1 -0
- package/package.json +95 -0
- package/readme.md +110 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* .what = the options for the briefs available to role Mechanic
|
|
5
|
+
* .note = codegened via:
|
|
6
|
+
* ```sh
|
|
7
|
+
* npx tsx src/contract/commands/codegenBriefOptions.ts
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
const options = [
|
|
11
|
+
'style.compressed.md',
|
|
12
|
+
'style.compressed.prompt.md',
|
|
13
|
+
'style.names.treestruct.md',
|
|
14
|
+
'style.names.ubiqlang.md',
|
|
15
|
+
'style.words.lowercase.md',
|
|
16
|
+
'architecture/bounded-contexts.md',
|
|
17
|
+
'architecture/directional-dependencies.md',
|
|
18
|
+
'architecture/domain-driven-design.md',
|
|
19
|
+
'architecture/ubiqlang.md',
|
|
20
|
+
'codestyle/_mech.compressed.md',
|
|
21
|
+
'codestyle/_mech.compressed.prompt.md',
|
|
22
|
+
'codestyle/flow.failfast.md',
|
|
23
|
+
'codestyle/flow.idempotency.md',
|
|
24
|
+
'codestyle/flow.immutability.md',
|
|
25
|
+
'codestyle/flow.narratives.md',
|
|
26
|
+
'codestyle/flow.single-responsibility.md',
|
|
27
|
+
'codestyle/mech.args.input-context.md',
|
|
28
|
+
'codestyle/mech.arrowonly.md',
|
|
29
|
+
'codestyle/mech.clear-contracts.md',
|
|
30
|
+
'codestyle/mech.tests.given-when-then.md',
|
|
31
|
+
'codestyle/mech.what-why.md',
|
|
32
|
+
'codestyle/mech.what-why.v2.md',
|
|
33
|
+
'engineer/dependency-injection.md',
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=getMechanicBrief.Options.codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMechanicBrief.Options.codegen.js","sourceRoot":"","sources":["../../../../src/logic/roles/mechanic/getMechanicBrief.Options.codegen.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,MAAM,OAAO,GAAG;IACd,qBAAqB;IACrB,4BAA4B;IAC5B,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;IAC1B,kCAAkC;IAClC,0CAA0C;IAC1C,sCAAsC;IACtC,0BAA0B;IAC1B,+BAA+B;IAC/B,sCAAsC;IACtC,4BAA4B;IAC5B,+BAA+B;IAC/B,gCAAgC;IAChC,8BAA8B;IAC9B,yCAAyC;IACzC,sCAAsC;IACtC,6BAA6B;IAC7B,mCAAmC;IACnC,yCAAyC;IACzC,4BAA4B;IAC5B,+BAA+B;IAC/B,kCAAkC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Artifact } from 'rhachet-artifact';
|
|
2
|
+
import { GitFile } from 'rhachet-artifact-git';
|
|
3
|
+
import { BriefOptionMechanic } from './getMechanicBrief.Options.codegen';
|
|
4
|
+
/**
|
|
5
|
+
* .what = loads an artifact:brief distilled for the mechanic to reference, from the `.briefs` directory
|
|
6
|
+
* .why = enables reusable knowledge downloads for mechanic contexts (e.g., matrix-movie style)
|
|
7
|
+
*/
|
|
8
|
+
export declare const getMechanicBrief: (key: BriefOptionMechanic) => Artifact<typeof GitFile>;
|
|
9
|
+
/**
|
|
10
|
+
* .what = loads multiple artifact:brief distilled for the mechanic to reference, from the `.briefs` directory
|
|
11
|
+
* .why = enables reusable knowledge downloads for mechanic contexts (e.g., matrix-movie style)
|
|
12
|
+
*/
|
|
13
|
+
export declare const getMechanicBriefs: (keys: BriefOptionMechanic[]) => Artifact<typeof GitFile>[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMechanicBriefs = exports.getMechanicBrief = void 0;
|
|
4
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
5
|
+
/**
|
|
6
|
+
* .what = loads an artifact:brief distilled for the mechanic to reference, from the `.briefs` directory
|
|
7
|
+
* .why = enables reusable knowledge downloads for mechanic contexts (e.g., matrix-movie style)
|
|
8
|
+
*/
|
|
9
|
+
const getMechanicBrief = (key) => {
|
|
10
|
+
return (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
11
|
+
uri: `${__dirname}/.briefs/${key}`,
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
exports.getMechanicBrief = getMechanicBrief;
|
|
15
|
+
/**
|
|
16
|
+
* .what = loads multiple artifact:brief distilled for the mechanic to reference, from the `.briefs` directory
|
|
17
|
+
* .why = enables reusable knowledge downloads for mechanic contexts (e.g., matrix-movie style)
|
|
18
|
+
*/
|
|
19
|
+
const getMechanicBriefs = (keys) => keys.map(exports.getMechanicBrief);
|
|
20
|
+
exports.getMechanicBriefs = getMechanicBriefs;
|
|
21
|
+
//# sourceMappingURL=getMechanicBrief.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMechanicBrief.js","sourceRoot":"","sources":["../../../../src/logic/roles/mechanic/getMechanicBrief.ts"],"names":[],"mappings":";;;AACA,+DAAmE;AAInE;;;GAGG;AACI,MAAM,gBAAgB,GAAG,CAC9B,GAAwB,EACE,EAAE;IAC5B,OAAO,IAAA,yCAAkB,EAAC;QACxB,GAAG,EAAE,GAAG,SAAS,YAAY,GAAG,EAAE;KACnC,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAEF;;;GAGG;AACI,MAAM,iBAAiB,GAAG,CAC/B,IAA2B,EACC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAgB,CAAC,CAAC;AAF/C,QAAA,iBAAiB,qBAE8B"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ROLE_MECHANIC = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
6
|
+
const genContextLogTrail_1 = require("../../../.test/genContextLogTrail");
|
|
7
|
+
const genContextStitchTrail_1 = require("../../../.test/genContextStitchTrail");
|
|
8
|
+
const getContextOpenAI_1 = require("../../../.test/getContextOpenAI");
|
|
9
|
+
const getRefOrgPatterns_1 = require("./codediff/getRefOrgPatterns");
|
|
10
|
+
const routeMechanicCodePropose_1 = require("./codediff/routeMechanicCodePropose");
|
|
11
|
+
const getMechanicBrief_1 = require("./getMechanicBrief");
|
|
12
|
+
exports.ROLE_MECHANIC = rhachet_1.Role.build({
|
|
13
|
+
slug: 'mechanic',
|
|
14
|
+
name: 'Mechanic',
|
|
15
|
+
purpose: 'write code',
|
|
16
|
+
readme: `
|
|
17
|
+
## 🔧 Mechanic
|
|
18
|
+
|
|
19
|
+
- **scale**: repo-level, implementation detail
|
|
20
|
+
- **focus**: maintainability, observability, readability
|
|
21
|
+
- **maximizes**: empathy for the 3am on-call engineer
|
|
22
|
+
|
|
23
|
+
Used to write and revise the actual logic that runs the system.
|
|
24
|
+
`.trim(),
|
|
25
|
+
traits: [],
|
|
26
|
+
skills: [
|
|
27
|
+
rhachet_1.RoleSkill.build({
|
|
28
|
+
slug: 'upsert',
|
|
29
|
+
route: routeMechanicCodePropose_1.routeMechanicCodePropose,
|
|
30
|
+
// : {
|
|
31
|
+
// target: {
|
|
32
|
+
// char: 't',
|
|
33
|
+
// desc: 'the target file or dir to upsert against',
|
|
34
|
+
// shape: 'string',
|
|
35
|
+
// },
|
|
36
|
+
// },
|
|
37
|
+
threads: {
|
|
38
|
+
lookup: {
|
|
39
|
+
target: {
|
|
40
|
+
source: 'process.argv',
|
|
41
|
+
char: 't',
|
|
42
|
+
desc: 'the target file or dir to upsert against',
|
|
43
|
+
type: 'string',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
assess: (input) => typeof input.target === 'string',
|
|
47
|
+
instantiate: async (input) => {
|
|
48
|
+
const targetArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({ uri: input.target });
|
|
49
|
+
const claimsArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
50
|
+
uri: input.target + '.rhachet.claims.md', // todo: namespace within a .rhachet directory
|
|
51
|
+
});
|
|
52
|
+
const feedbackArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
53
|
+
uri: input.target + '.rhachet.feedback.md',
|
|
54
|
+
});
|
|
55
|
+
const feedbackCodestyleArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
56
|
+
uri: input.target + '.rhachet.feedback.codestyle.md',
|
|
57
|
+
});
|
|
58
|
+
const judgementArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
59
|
+
uri: input.target + '.rhachet.judgement.md',
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
artist: await (0, rhachet_1.enrollThread)({
|
|
63
|
+
role: 'artist',
|
|
64
|
+
stash: {
|
|
65
|
+
ask: input.ask,
|
|
66
|
+
art: { inflight: targetArt },
|
|
67
|
+
org: {
|
|
68
|
+
patterns: (0, getRefOrgPatterns_1.getRefOrgPatterns)({ purpose: 'produce' }),
|
|
69
|
+
},
|
|
70
|
+
scene: { coderefs: [] },
|
|
71
|
+
},
|
|
72
|
+
inherit: {
|
|
73
|
+
traits: [(0, getMechanicBrief_1.getMechanicBrief)('style.compressed.md')],
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
critic: await (0, rhachet_1.enrollThread)({
|
|
77
|
+
role: 'critic',
|
|
78
|
+
stash: {
|
|
79
|
+
art: {
|
|
80
|
+
feedback: feedbackArt,
|
|
81
|
+
feedbackCodestyle: feedbackCodestyleArt,
|
|
82
|
+
},
|
|
83
|
+
org: {
|
|
84
|
+
patterns: (0, getRefOrgPatterns_1.getRefOrgPatterns)({ purpose: 'produce' }),
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
inherit: {
|
|
88
|
+
traits: [(0, getMechanicBrief_1.getMechanicBrief)('style.compressed.md')],
|
|
89
|
+
},
|
|
90
|
+
}),
|
|
91
|
+
student: await (0, rhachet_1.enrollThread)({
|
|
92
|
+
role: 'student',
|
|
93
|
+
stash: { art: { claims: claimsArt } },
|
|
94
|
+
}),
|
|
95
|
+
judge: await (0, rhachet_1.enrollThread)({
|
|
96
|
+
role: 'judge',
|
|
97
|
+
stash: { art: { judgement: judgementArt } },
|
|
98
|
+
}),
|
|
99
|
+
mechanic: await (0, rhachet_1.enrollThread)({
|
|
100
|
+
role: 'mechanic',
|
|
101
|
+
stash: {},
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
context: {
|
|
107
|
+
lookup: {
|
|
108
|
+
apiKeyOpenai: {
|
|
109
|
+
source: 'process.env',
|
|
110
|
+
envar: 'PREP_OPENAI_KEY',
|
|
111
|
+
desc: 'the openai key to use',
|
|
112
|
+
type: 'string',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
assess: (input) => typeof input.apiKeyOpenai === 'string',
|
|
116
|
+
instantiate: (input) => {
|
|
117
|
+
return {
|
|
118
|
+
...(0, getContextOpenAI_1.getContextOpenAI)(), // todo: use the input api key
|
|
119
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(), // todo: passthrough ?
|
|
120
|
+
...(0, genContextStitchTrail_1.genContextStitchTrail)(),
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
readme: `
|
|
125
|
+
### \`ask -r mechanic -s upsert\`
|
|
126
|
+
|
|
127
|
+
you can ask the mechanic to upsert the code in a target file or dir
|
|
128
|
+
- if it exists, it'll update
|
|
129
|
+
- if it doesn't, it'll create
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
\`\`\`sh
|
|
133
|
+
npx rhachet ask -r mechanic -s upsert -t ./path/to/file.ts "your ask"
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
\`\`\`sh
|
|
137
|
+
npx rhachet ask \
|
|
138
|
+
--role mechanic \
|
|
139
|
+
--skill upsert \
|
|
140
|
+
--target ./path/to/file.ts \
|
|
141
|
+
"your ask"
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
once it's self reviewed, it'll ask you for feedback
|
|
145
|
+
|
|
146
|
+
\`\`\`sh
|
|
147
|
+
? have notes? (Use arrow keys)
|
|
148
|
+
❯ no notes
|
|
149
|
+
yes notes
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
it'll loop until you tell it you have \`no notes\`
|
|
153
|
+
`.trim(),
|
|
154
|
+
}),
|
|
155
|
+
],
|
|
156
|
+
});
|
|
157
|
+
//# sourceMappingURL=getMechanicRole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMechanicRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/mechanic/getMechanicRole.ts"],"names":[],"mappings":";;;AAAA,qCAAqE;AACrE,+DAA0D;AAE1D,0EAAuE;AACvE,gFAA6E;AAC7E,sEAAmE;AACnE,oEAAiE;AACjE,kFAA+E;AAC/E,yDAAsD;AAEzC,QAAA,aAAa,GAAG,cAAI,CAAC,KAAK,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE;;;;;;;;GAQP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACN,mBAAS,CAAC,KAAK,CAA0D;YACvE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,mDAAwB;YAC/B,MAAM;YACN,cAAc;YACd,iBAAiB;YACjB,wDAAwD;YACxD,uBAAuB;YACvB,OAAO;YACP,KAAK;YACL,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,MAAM,EAAE;wBACN,MAAM,EAAE,cAAc;wBACtB,IAAI,EAAE,GAAG;wBACT,IAAI,EAAE,0CAA0C;wBAChD,IAAI,EAAE,QAAQ;qBACf;iBACF;gBACD,MAAM,EAAE,CAAC,KAAK,EAA4C,EAAE,CAC1D,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;gBAClC,WAAW,EAAE,KAAK,EAAE,KAGnB,EAEC,EAAE;oBACF,MAAM,SAAS,GAAG,IAAA,yCAAkB,EAAC,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;oBAC5D,MAAM,SAAS,GAAG,IAAA,yCAAkB,EAAC;wBACnC,GAAG,EAAE,KAAK,CAAC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;wBACF,OAAO,EAAE,MAAM,IAAA,sBAAY,EAAC;4BAC1B,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;yBACtC,CAAC;wBACF,KAAK,EAAE,MAAM,IAAA,sBAAY,EAAC;4BACxB,IAAI,EAAE,OAAO;4BACb,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE;yBAC5C,CAAC;wBACF,QAAQ,EAAE,MAAM,IAAA,sBAAY,EAAC;4BAC3B,IAAI,EAAE,UAAU;4BAChB,KAAK,EAAE,EAAE;yBACV,CAAC;qBACH,CAAC;gBACJ,CAAC;aACF;YACD,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,YAAY,EAAE;wBACZ,MAAM,EAAE,aAAa;wBACrB,KAAK,EAAE,iBAAiB;wBACxB,IAAI,EAAE,uBAAuB;wBAC7B,IAAI,EAAE,QAAQ;qBACf;iBACF;gBACD,MAAM,EAAE,CAAC,KAAK,EAAqC,EAAE,CACnD,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ;gBACxC,WAAW,EAAE,CAAC,KAEb,EAA2D,EAAE;oBAC5D,OAAO;wBACL,GAAG,IAAA,mCAAgB,GAAE,EAAE,8BAA8B;wBACrD,GAAG,IAAA,uCAAkB,GAAE,EAAE,sBAAsB;wBAC/C,GAAG,IAAA,6CAAqB,GAAE;qBAC3B,CAAC;gBACJ,CAAC;aACF;YACD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BT,CAAC,IAAI,EAAE;SACP,CAAC;KACH;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GStitcher, Threads, RoleContext } from 'rhachet';
|
|
2
|
+
import { Artifact } from 'rhachet-artifact';
|
|
3
|
+
import { GitFile } from 'rhachet-artifact-git';
|
|
4
|
+
import { ContextOpenAI } from '../../../../data/sdk/sdkOpenAi';
|
|
5
|
+
type StitcherDesired = GStitcher<Threads<{
|
|
6
|
+
student: RoleContext<'student', {
|
|
7
|
+
ask: string;
|
|
8
|
+
art: {
|
|
9
|
+
claims: Artifact<typeof GitFile>;
|
|
10
|
+
};
|
|
11
|
+
scene: {
|
|
12
|
+
coderefs: Artifact<typeof GitFile>[];
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
}>, ContextOpenAI & GStitcher['context'], {
|
|
16
|
+
content: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const routeStudyAsk: import("rhachet").Stitcher<StitcherDesired>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const helpful_errors_1 = require("helpful-errors");
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
6
|
+
const test_fns_1 = require("test-fns");
|
|
7
|
+
const genContextLogTrail_1 = require("../../../../.test/genContextLogTrail");
|
|
8
|
+
const genContextStitchTrail_1 = require("../../../../.test/genContextStitchTrail");
|
|
9
|
+
const getContextOpenAI_1 = require("../../../../.test/getContextOpenAI");
|
|
10
|
+
const getMechanicBrief_1 = require("../getMechanicBrief");
|
|
11
|
+
const routeStudyAsk_1 = require("./routeStudyAsk");
|
|
12
|
+
describe('routeStudyAsk ', () => {
|
|
13
|
+
const context = {
|
|
14
|
+
...(0, genContextLogTrail_1.genContextLogTrail)(),
|
|
15
|
+
...(0, genContextStitchTrail_1.genContextStitchTrail)(),
|
|
16
|
+
...(0, getContextOpenAI_1.getContextOpenAI)(),
|
|
17
|
+
};
|
|
18
|
+
const route = routeStudyAsk_1.routeStudyAsk;
|
|
19
|
+
(0, test_fns_1.given)('we want to multiply', () => {
|
|
20
|
+
const askText = 'stubout the ability to multiply';
|
|
21
|
+
const claimsArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
22
|
+
uri: __dirname + '/.temp/multiply.claims.md',
|
|
23
|
+
});
|
|
24
|
+
const coderefArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
25
|
+
uri: __dirname + '/.temp/multiply.coderef.md',
|
|
26
|
+
});
|
|
27
|
+
const coderefContent = 'export const add = (a: number, b: number) => a + b;';
|
|
28
|
+
beforeEach(async () => {
|
|
29
|
+
await claimsArt.del();
|
|
30
|
+
await coderefArt.set({ content: coderefContent });
|
|
31
|
+
});
|
|
32
|
+
(0, test_fns_1.when)('executed', () => {
|
|
33
|
+
const threads = (0, test_fns_1.usePrep)(async () => ({
|
|
34
|
+
student: await (0, rhachet_1.enrollThread)({
|
|
35
|
+
role: 'student',
|
|
36
|
+
stash: {
|
|
37
|
+
ask: askText,
|
|
38
|
+
art: { claims: claimsArt },
|
|
39
|
+
scene: { coderefs: [coderefArt] },
|
|
40
|
+
},
|
|
41
|
+
inherit: {
|
|
42
|
+
traits: [(0, getMechanicBrief_1.getMechanicBrief)('style.compressed.md')],
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
}));
|
|
46
|
+
(0, test_fns_1.then)('updates the claims artifact', async () => {
|
|
47
|
+
const outcome = await (0, rhachet_1.enweaveOneStitcher)({ stitcher: route, threads }, context);
|
|
48
|
+
console.log(JSON.stringify(outcome, null, 2));
|
|
49
|
+
const { content } = (await claimsArt.get()) ??
|
|
50
|
+
helpful_errors_1.UnexpectedCodePathError.throw('expected file');
|
|
51
|
+
expect(content).toContain('multiply');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
test_fns_1.given.only('we want to getSchedulableWindows for a crew', () => {
|
|
56
|
+
const askText = `
|
|
57
|
+
* .what = returns available time windows for appointment scheduling
|
|
58
|
+
* .why = enables customers to book with pros during valid, conflict-free slots
|
|
59
|
+
|
|
60
|
+
background:
|
|
61
|
+
- pro.crews set their schedule's availability
|
|
62
|
+
- appointment windows are computed from the daily availability windows
|
|
63
|
+
- each appointment window is 30min wide
|
|
64
|
+
- neighbors and pros then book appointment windows from these availabilities
|
|
65
|
+
- we only want to show windows that are
|
|
66
|
+
`;
|
|
67
|
+
const claimsArt = (0, rhachet_artifact_git_1.genArtifactGitFile)({
|
|
68
|
+
uri: __dirname + '/.temp/getSchedulableWindows.claims.md',
|
|
69
|
+
});
|
|
70
|
+
beforeEach(async () => {
|
|
71
|
+
await claimsArt.del();
|
|
72
|
+
});
|
|
73
|
+
(0, test_fns_1.when)('executed', () => {
|
|
74
|
+
const threads = (0, test_fns_1.usePrep)(async () => {
|
|
75
|
+
const student = await (0, rhachet_1.enrollThread)({
|
|
76
|
+
role: 'student',
|
|
77
|
+
stash: {
|
|
78
|
+
ask: askText,
|
|
79
|
+
art: { claims: claimsArt },
|
|
80
|
+
scene: { coderefs: [] },
|
|
81
|
+
},
|
|
82
|
+
inherit: {
|
|
83
|
+
traits: [(0, getMechanicBrief_1.getMechanicBrief)('style.compressed.md')],
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
student,
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
(0, test_fns_1.then)('updates the claims artifact', async () => {
|
|
91
|
+
console.log({ threads });
|
|
92
|
+
const outcome = await (0, rhachet_1.enweaveOneStitcher)({ stitcher: route, threads }, context);
|
|
93
|
+
console.log(JSON.stringify(outcome, null, 2));
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=routeStudyAsk.integration.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeStudyAsk.integration.test.js","sourceRoot":"","sources":["../../../../../src/logic/roles/mechanic/study/routeStudyAsk.integration.test.ts"],"names":[],"mappings":";;AAAA,mDAAyD;AACzD,qCAA2D;AAC3D,+DAA0D;AAC1D,uCAAsD;AAEtD,6EAA0E;A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;oBACD,OAAO,EAAE;wBACP,MAAM,EAAE,CAAC,IAAA,mCAAgB,EAAC,qBAAqB,CAAC,CAAC;qBAClD;iBACF,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO;iBACR,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,IAAA,eAAI,EAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;gBAC7C,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;gBACzB,MAAM,OAAO,GAAG,MAAM,IAAA,4BAAkB,EACtC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAC5B,OAAO,CACR,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAChD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.routeStudyAsk = void 0;
|
|
4
|
+
const rhachet_1 = require("rhachet");
|
|
5
|
+
const sdkOpenAi_1 = require("../../../../data/sdk/sdkOpenAi");
|
|
6
|
+
const genStepArtSet_1 = require("../../../artifact/genStepArtSet");
|
|
7
|
+
const template = (0, rhachet_1.genTemplate)({
|
|
8
|
+
ref: { uri: __dirname + '/routeStudyAsk.template.md' },
|
|
9
|
+
getVariables: async ({ threads }) => ({
|
|
10
|
+
...(await (0, rhachet_1.getTemplateVarsFromRoleInherit)({ thread: threads.student })),
|
|
11
|
+
ask: threads.student.context.stash.ask,
|
|
12
|
+
scene: await (0, rhachet_1.getTemplateValFromArtifacts)({
|
|
13
|
+
artifacts: threads.student.context.stash.scene.coderefs,
|
|
14
|
+
}),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
const stepStudyAskImagine = (0, rhachet_1.genStepImagineViaTemplate)({
|
|
18
|
+
slug: '[student]<study>[ask]<imagine>',
|
|
19
|
+
stitchee: 'student',
|
|
20
|
+
readme: 'intent(imagines a codediff)',
|
|
21
|
+
template,
|
|
22
|
+
imagine: sdkOpenAi_1.sdkOpenAi.imagine,
|
|
23
|
+
});
|
|
24
|
+
const stepArtSet = (0, genStepArtSet_1.genStepArtSet)({ stitchee: 'student', artee: 'claims' });
|
|
25
|
+
exports.routeStudyAsk = (0, rhachet_1.asStitcherFlat)((0, rhachet_1.genStitchRoute)({
|
|
26
|
+
slug: '[student]<study>[ask]',
|
|
27
|
+
readme: '@[student]<study>[ask] -> [[claim]]s',
|
|
28
|
+
sequence: [stepStudyAskImagine, stepArtSet],
|
|
29
|
+
}));
|
|
30
|
+
//# sourceMappingURL=routeStudyAsk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeStudyAsk.js","sourceRoot":"","sources":["../../../../../src/logic/roles/mechanic/study/routeStudyAsk.ts"],"names":[],"mappings":";;;AAAA,qCAUiB;AAIjB,8DAA0E;AAC1E,mEAAgE;AAiBhE,MAAM,QAAQ,GAAG,IAAA,qBAAW,EAA6B;IACvD,GAAG,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,4BAA4B,EAAE;IACtD,YAAY,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QACpC,GAAG,CAAC,MAAM,IAAA,wCAA8B,EAAC,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACtE,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG;QACtC,KAAK,EAAE,MAAM,IAAA,qCAA2B,EAAC;YACvC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ;SACxD,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,IAAA,mCAAyB,EAAkB;IACrE,IAAI,EAAE,gCAAgC;IACtC,QAAQ,EAAE,SAAkB;IAC5B,MAAM,EAAE,6BAA6B;IACrC,QAAQ;IACR,OAAO,EAAE,qBAAS,CAAC,OAAO;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE9D,QAAA,aAAa,GAAG,IAAA,wBAAc,EACzC,IAAA,wBAAc,EAAC;IACb,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,sCAAsC;IAC9C,QAAQ,EAAE,CAAC,mBAAmB,EAAE,UAAU,CAAC;CAC5C,CAAC,CACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rhachet-roles-ehmpathy",
|
|
3
|
+
"author": "ehmpathy",
|
|
4
|
+
"description": "empathetic software construction roles and skills, via rhachet",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"repository": "ehmpathy/rhachet-roles-ehmpathy",
|
|
7
|
+
"homepage": "https://github.com/ehmpathy/rhachet-roles-ehmpathy",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"rhachet",
|
|
10
|
+
"roles"
|
|
11
|
+
],
|
|
12
|
+
"bugs": "https://github.com/ehmpathy/rhachet-roles-ehmpathy/issues",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=8.0.0"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"/dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build:ts": "tsc -p ./tsconfig.build.json",
|
|
23
|
+
"commit:with-cli": "npx cz",
|
|
24
|
+
"fix:format:prettier": "prettier --write '**/*.ts' --config ./prettier.config.js",
|
|
25
|
+
"fix:format": "npm run fix:format:prettier",
|
|
26
|
+
"fix:lint": "eslint -c ./.eslintrc.js src/**/*.ts --fix",
|
|
27
|
+
"build:clean": "rm dist/ -rf",
|
|
28
|
+
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
29
|
+
"build": "npm run build:clean && npm run build:compile",
|
|
30
|
+
"test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose",
|
|
31
|
+
"test:types": "tsc -p ./tsconfig.build.json --noEmit",
|
|
32
|
+
"test:format:prettier": "prettier --parser typescript --check 'src/**/*.ts' --config ./prettier.config.js",
|
|
33
|
+
"test:format": "npm run test:format:prettier",
|
|
34
|
+
"test:lint:deps": "npx depcheck -c ./depcheckrc.yml",
|
|
35
|
+
"test:lint:eslint": "eslint -c ./.eslintrc.js src/**/*.ts",
|
|
36
|
+
"test:lint": "npm run test:lint:eslint && npm run test:lint:deps",
|
|
37
|
+
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
38
|
+
"test:integration": "echo 'todo: release'",
|
|
39
|
+
"test:integration:hold": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
40
|
+
"test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
41
|
+
"test": "npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally",
|
|
42
|
+
"test:acceptance": "npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
43
|
+
"prepush": "npm run test && npm run build",
|
|
44
|
+
"prepublish": "npm run build",
|
|
45
|
+
"preversion": "npm run prepush",
|
|
46
|
+
"postversion": "git push origin HEAD --tags --no-verify",
|
|
47
|
+
"postinstall": "[ -d .git ] && npm run prepare:husky || exit 0",
|
|
48
|
+
"prepare:husky": "npx husky install && chmod ug+x .husky/*"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@ehmpathy/as-command": "1.0.3",
|
|
52
|
+
"@ehmpathy/uni-time": "1.8.1",
|
|
53
|
+
"as-procedure": "1.1.7",
|
|
54
|
+
"fast-glob": "3.3.3",
|
|
55
|
+
"helpful-errors": "1.3.8",
|
|
56
|
+
"inquirer": "12.7.0",
|
|
57
|
+
"openai": "5.8.2",
|
|
58
|
+
"rhachet": "1.3.2",
|
|
59
|
+
"rhachet-artifact": "1.0.0",
|
|
60
|
+
"rhachet-artifact-git": "1.0.1",
|
|
61
|
+
"serde-fns": "1.2.0",
|
|
62
|
+
"type-fns": "1.19.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@commitlint/cli": "19.3.0",
|
|
66
|
+
"@commitlint/config-conventional": "13.1.0",
|
|
67
|
+
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
|
68
|
+
"@tsconfig/node-lts-strictest": "18.12.1",
|
|
69
|
+
"@types/jest": "29.2.4",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
71
|
+
"@typescript-eslint/parser": "7.8.0",
|
|
72
|
+
"core-js": "3.26.1",
|
|
73
|
+
"cz-conventional-changelog": "3.3.0",
|
|
74
|
+
"declapract": "0.12.0",
|
|
75
|
+
"declapract-typescript-ehmpathy": "0.39.5",
|
|
76
|
+
"depcheck": "1.4.3",
|
|
77
|
+
"eslint": "8.56.0",
|
|
78
|
+
"eslint-config-airbnb-typescript": "18.0.0",
|
|
79
|
+
"eslint-config-prettier": "8.5.0",
|
|
80
|
+
"eslint-plugin-import": "2.26.0",
|
|
81
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
82
|
+
"husky": "8.0.3",
|
|
83
|
+
"jest": "29.3.1",
|
|
84
|
+
"prettier": "2.8.1",
|
|
85
|
+
"test-fns": "1.6.0",
|
|
86
|
+
"ts-jest": "29.1.3",
|
|
87
|
+
"ts-node": "10.9.2",
|
|
88
|
+
"typescript": "5.4.5"
|
|
89
|
+
},
|
|
90
|
+
"config": {
|
|
91
|
+
"commitizen": {
|
|
92
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# rhachet-roles-ehmpathy
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
empathetic software construction roles and skills, via [rhachet](github.com/ehmpathy/rhachet)
|
|
7
|
+
|
|
8
|
+
# purpose
|
|
9
|
+
|
|
10
|
+
# install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install rhachet-roles-ehmpathy
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
# use
|
|
17
|
+
|
|
18
|
+
## `readme --registry`
|
|
19
|
+
```sh
|
|
20
|
+
npx rhachet readme --registry ehmpathy
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
produces
|
|
24
|
+
|
|
25
|
+
```md
|
|
26
|
+
# 🤝 ehmpathy role registry
|
|
27
|
+
|
|
28
|
+
This registry defines the four core roles used to craft empathetic, evolvable, and maintainable software.
|
|
29
|
+
|
|
30
|
+
Each role represents a lens — a way of thinking about the system — grounded in empathy for both the **people using the product** and the **engineers maintaining the system**.
|
|
31
|
+
|
|
32
|
+
All roles maximize:
|
|
33
|
+
|
|
34
|
+
- clarity over cleverness
|
|
35
|
+
- maintainability over magic
|
|
36
|
+
- empathy over ego
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 🌱 Ecologist
|
|
41
|
+
|
|
42
|
+
- **scale**: domain fundamentals, real-world systems
|
|
43
|
+
- **focus**: what changes, what flows, what matters — ignoring software
|
|
44
|
+
- **maximizes**: fidelity to the real world
|
|
45
|
+
|
|
46
|
+
Used to understand the physics, incentives, and causal flows beneath the system.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🏛 Architect
|
|
51
|
+
|
|
52
|
+
- **scale**: cross-repo, organizational boundaries
|
|
53
|
+
- **focus**: bounded contexts, trust layers, language design
|
|
54
|
+
- **maximizes**: ubiqlang, evolvability, decoupling
|
|
55
|
+
|
|
56
|
+
Used to shape contracts and interfaces that survive change.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 🎨 Designer
|
|
61
|
+
|
|
62
|
+
- **scale**: feature-level, user-experience layer
|
|
63
|
+
- **focus**: nudges, guardrails, pit-of-success defaults
|
|
64
|
+
- **maximizes**: usability, ergonomics, reliability
|
|
65
|
+
|
|
66
|
+
Used to sculpt workflows and interfaces that feel obvious and safe.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🔧 Mechanic
|
|
71
|
+
|
|
72
|
+
- **scale**: repo-level, implementation detail
|
|
73
|
+
- **focus**: maintainability, observability, readability
|
|
74
|
+
- **maximizes**: empathy for the 3am on-call engineer
|
|
75
|
+
|
|
76
|
+
Used to write and revise the actual logic that runs the system.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## `ask -r mechanic`
|
|
80
|
+
|
|
81
|
+
the mechanic writes code within a repo
|
|
82
|
+
|
|
83
|
+
### `ask -r mechanic -s upsert`
|
|
84
|
+
|
|
85
|
+
you can ask the mechanic to upsert the code in a target file or dir
|
|
86
|
+
- if it exists, it'll update
|
|
87
|
+
- if it doesn't, it'll create
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
npx rhachet ask -r mechanic -s upsert -t ./path/to/file.ts "your ask"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
npx rhachet ask \
|
|
96
|
+
--role mechanic \
|
|
97
|
+
--skill upsert \
|
|
98
|
+
--target ./path/to/file.ts \
|
|
99
|
+
"your ask"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
once it's self reviewed, it'll ask you for feedback
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
? have notes? (Use arrow keys)
|
|
106
|
+
❯ no notes
|
|
107
|
+
yes notes
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
it'll loop until you tell it you have `no notes`
|