rhachet-roles-ehmpathy 1.7.0 → 1.9.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.
Files changed (58) hide show
  1. package/dist/contract/commands/codegenBriefOptions.js +1 -1
  2. package/dist/contract/commands/codegenBriefOptions.js.map +1 -1
  3. package/dist/logic/roles/architect/.briefs/criteria.given_when_then.[seed].v3.md +87 -0
  4. package/dist/logic/roles/architect/.briefs/practices/prefer.env_access.prep_over_dev.md +12 -0
  5. package/dist/logic/roles/architect/getArchitectRole.d.ts +2 -0
  6. package/dist/logic/roles/architect/getArchitectRole.js +27 -0
  7. package/dist/logic/roles/architect/getArchitectRole.js.map +1 -0
  8. package/dist/logic/roles/bhrain/getBhrainRole.js +19 -14
  9. package/dist/logic/roles/bhrain/getBhrainRole.js.map +1 -1
  10. package/dist/logic/roles/ecologist/getEcologistRole.js +12 -7
  11. package/dist/logic/roles/ecologist/getEcologistRole.js.map +1 -1
  12. package/dist/logic/roles/getRoleRegistry.js +2 -0
  13. package/dist/logic/roles/getRoleRegistry.js.map +1 -1
  14. package/dist/logic/roles/mechanic/.briefs/architecture/directional-dependencies.md +49 -40
  15. package/dist/logic/roles/mechanic/.briefs/criteria.practices/never.term.script.md +7 -0
  16. package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.emojis.chill_nature.md +24 -0
  17. package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.jq.over_alt.[demo].md +29 -0
  18. package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.terraform.[criteria].md +4 -0
  19. package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.terraform.[seed].md +17 -0
  20. package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.dependency.pinned_versions.md +3 -0
  21. package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.idempotency.md +33 -0
  22. package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.knowledge.externalized.md +17 -0
  23. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.contract.inputs.nameargs/bad-practice/forbid.positional-args.md +43 -0
  24. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.contract.inputs.nameargs/best-practice/require.namedargs.md +6 -0
  25. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.declarative/.readme.md +0 -0
  26. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.declarative/best-practice/declastruct.[demo].md +485 -0
  27. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.has.attributes.nullable.md +13 -0
  28. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.has.attributes.undefined.md +15 -0
  29. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.refs.immuatble.md +9 -0
  30. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/best-practice/ref.package.domain-objects.[readme].md +585 -0
  31. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.operations/best-practice/require.sync.names.md +14 -0
  32. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/bad-practices/forbid.hide_errors.md +13 -0
  33. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/best-practice/require.fail_fast.[demo].shell.md +17 -0
  34. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/best-practice/require.fail_fast.md +28 -0
  35. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/best-practice/directional-dependencies.md +82 -0
  36. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/best-practice/dot-test-and-dot-temp.md +20 -0
  37. package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.typescript.utils/best-practice/ref.package.as-command.[tips].md +7 -0
  38. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.acceptance/best-practice/blackbox.md +5 -0
  39. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.run.[lesson].md +18 -0
  40. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.use.[lesson].md +20 -0
  41. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].md +3 -0
  42. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].on_scope.for_integ.md +8 -0
  43. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].on_scope.for_units.md +9 -0
  44. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.bdd.[lesson].md +280 -0
  45. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/prefer.datadriven.md +41 -0
  46. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/ref.test-fns.[readme].md +185 -0
  47. package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/whento.snapshots.[lesson].md +23 -0
  48. package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/.readme.md +1 -0
  49. package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/domain=practices.terms=forbid_prefer_desire_require.md +13 -0
  50. package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/domain=software.terms=prodcode_vs_testcode.md +7 -0
  51. package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/.readme.md +3 -0
  52. package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/prefer.chill-nature.md +0 -0
  53. package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/prefer.lowercase.md +0 -0
  54. package/dist/logic/roles/mechanic/getMechanicRole.js +7 -2
  55. package/dist/logic/roles/mechanic/getMechanicRole.js.map +1 -1
  56. package/dist/logic/roles/terminal.commander/getCommanderRole.js +7 -2
  57. package/dist/logic/roles/terminal.commander/getCommanderRole.js.map +1 -1
  58. package/package.json +2 -2
@@ -50,7 +50,7 @@ export type BriefOption${input.role} = typeof options[number];
50
50
  // npx tsx src/contract/commands/codegenBriefOptions.ts
51
51
  if (require.main === module) {
52
52
  void command({ role: 'Ecologist' });
53
- // void command({ role: 'Architect' });
53
+ void command({ role: 'Architect' });
54
54
  void command({ role: 'Designer' });
55
55
  void command({ role: 'Mechanic' });
56
56
  void command({ role: 'Bhrain' });
@@ -1 +1 @@
1
- {"version":3,"file":"codegenBriefOptions.js","sourceRoot":"","sources":["../../../src/contract/commands/codegenBriefOptions.ts"],"names":[],"mappings":";;;;;AAAA,qDAAiD;AACjD,0DAA6B;AAC7B,4CAAoB;AACpB,gDAAwB;AACxB,+DAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,sBAAS,EACvB;IACE,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IAC/B,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,SAAS,GAAG,QAAQ;IACzB,GAAG,EAAE,OAAO;CACb,EACD,KAAK,EAAE,KAEN,EAAE,EAAE;IACH,kDAAkD;IAClD,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CACzB,CAAC,MAAM,IAAA,qCAAc,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACzC,oBAAoB,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CACzD,CAAC;IACF,MAAM,QAAQ,GAAG;QACf,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,cAAc;QAC5C,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,EAAE,4FAA4F;KACxI,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,IAAA,mBAAI,EAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5D,6BAA6B;IAC7B,MAAM,IAAI,GAAG,SAAS;SACnB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC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IAAI,CAAC,IAAI,CAAC,CAAC;IAE7D,MAAM,YAAY,GAAG;;0DAEiC,KAAK,CAAC,IAAI;;;oCAGhC,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;;;;EAI3D,YAAY;;;yBAGW,KAAK,CAAC,IAAI;CAClC,CAAC;IAEE,qBAAqB;IACrB,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAC1B,SAAS,EACT,SAAS,KAAK,CAAC,IAAI,0BAA0B,CAC9C,CAAC;IACF,YAAE,CAAC,aAAa,CAAC,UAAU,EAAE,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,WAAW,UAAU,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC,CACF,CAAC;AAEF,uDAAuD;AACvD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,KAAK,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IACpC,KAAK,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IACpC,KAAK,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACnC,KAAK,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IACnC,KAAK,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,87 @@
1
+ use this brief to help you declare acceptance test criteria for .behavior
2
+
3
+ in BDD given/when/then format
4
+
5
+ ================================
6
+
7
+ recall:
8
+ - acceptance.criteria should only test BEHAVIOR; never internals
9
+ - acceptance.criteria should treat the system as a black box
10
+ - it doesn't care how it gets done and has no visibility into it
11
+ - it only cares that the usecases are satisfied for the given scenes
12
+ - it only engages with the system at the CONTRACT LAYER
13
+ - src/contract/endpoints (a.k.a. src/contract/handlers)
14
+ - src/contract/commands
15
+
16
+
17
+ distinguish the criteria into
18
+
19
+ BLOCKER = required; will not satisfy requireemnts without it
20
+ and
21
+ NITPICK = nicetohave, but not a show stoppeer
22
+
23
+
24
+ ================================
25
+
26
+ here's some examples of what i mean
27
+
28
+
29
+ [idea] = nest then's within sothat? when many thens support the same sothat?
30
+
31
+ when([t4] bastion IAM instance profile is provisioned via terraform)
32
+ sothat(SSM sessions can be established to bastion)
33
+ then(instance profile includes AmazonSSMManagedInstanceCore policy)
34
+ then(instance profile allows ssm:StartSession action)
35
+ sothat(auto-pause can detect when bastion is idle)
36
+ then(instance profile allows ec2:StopInstances for self-stop)
37
+ then(instance profile allows ec2:DescribeInstances to check instance state)
38
+ then(instance profile allows ssm:DescribeSessions to detect active sessions)
39
+ then(instance profile allows ssm:GetConnectionStatus to verify session state)
40
+
41
+
42
+ i.e.,
43
+
44
+ usecase(purpose)
45
+ given(scene)
46
+ when(cause)
47
+ sothat(benefit)
48
+ then(effect.1)
49
+ then(effect.2)
50
+
51
+
52
+ ---
53
+
54
+
55
+ e.g.,
56
+
57
+ usecase(eat dinner)
58
+ given(its dinner time)
59
+ when(dinner is served)
60
+ sothat(we can eat with cleanly)
61
+ then(we should have cutlery appropriate to the dish)
62
+ then(we should have plates appropriate to the dish)
63
+ then(we should have napkins to clean with)
64
+
65
+
66
+
67
+
68
+ criteria is best written in behavior-driven-development format
69
+
70
+ e.g.,
71
+
72
+ given(scene)
73
+ when([t0] nochange)
74
+ then(assert initial condition)
75
+ ...
76
+ when([t1] cause)
77
+ then(effect)
78
+ sothat(benefit) # optional
79
+ ...
80
+ when([t2] cause)
81
+ then(effect)
82
+ sothat(benefit) # optional
83
+ ...
84
+
85
+
86
+ dont forget that given and when can nest inside eachother; but then() goes at the root
87
+
@@ -0,0 +1,12 @@
1
+ prep = prepare; pre-prod; is 4 char long
2
+
3
+ dev = developer
4
+
5
+
6
+ prep & prod are better symmetric terms for env.access than dev & prod, fundamentally
7
+
8
+
9
+ - prep = prepare; preparation; pre-production
10
+ - prod = produce; production
11
+
12
+
@@ -0,0 +1,2 @@
1
+ import { Role } from 'rhachet';
2
+ export declare const ROLE_ARCHITECT: import("domain-objects/dist/manipulation/immute/withImmute").WithImmute<Role>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ROLE_ARCHITECT = void 0;
4
+ const rhachet_1 = require("rhachet");
5
+ exports.ROLE_ARCHITECT = rhachet_1.Role.build({
6
+ slug: 'architect',
7
+ name: 'Architect',
8
+ purpose: 'design system',
9
+ readme: `
10
+ ## 🏛️ Architect
11
+
12
+ - **scale**: system-level, cross-cutting concerns
13
+ - **focus**: patterns, principles, maintainability
14
+ - **maximizes**: long-term scalability and coherence
15
+
16
+ Used to design system architecture and establish patterns that ensure maintainability.
17
+ `.trim(),
18
+ traits: [],
19
+ skills: {
20
+ dirs: [],
21
+ refs: [],
22
+ },
23
+ briefs: {
24
+ dirs: [{ uri: __dirname + '/.briefs' }],
25
+ },
26
+ });
27
+ //# sourceMappingURL=getArchitectRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getArchitectRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/architect/getArchitectRole.ts"],"names":[],"mappings":";;;AAAA,qCAA+B;AAElB,QAAA,cAAc,GAAG,cAAI,CAAC,KAAK,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE;;;;;;;;GAQP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;KACT;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -32,19 +32,24 @@ thought tactics; intent = be composed into other roles
32
32
  brief: (0, getMechanicBrief_1.getMechanicBrief)('style.words.lowercase.md'),
33
33
  }),
34
34
  ],
35
- skills: [
36
- // khue primitives
37
- stepDiverge_skill_1.SKILL_DIVERGE,
38
- stepCluster_skill_1.SKILL_CLUSTER,
39
- stepTriage_skill_1.SKILL_TRIAGE,
40
- stepInstantiate_skill_1.SKILL_INSTANTIATE,
41
- // know primitives
42
- stepArticulate_skill_1.SKILL_ARTICULATE,
43
- stepDemonstrate_skill_1.SKILL_DEMONSTRATE,
44
- stepCatalogize_skill_1.SKILL_CATALOGIZE,
45
- // goal primitives
46
- // SKILL_INTERPRET; ask -> Focus[Goal]
47
- ],
48
- briefs: { dir: __dirname + '/.briefs' },
35
+ skills: {
36
+ dirs: [],
37
+ refs: [
38
+ // khue primitives
39
+ stepDiverge_skill_1.SKILL_DIVERGE,
40
+ stepCluster_skill_1.SKILL_CLUSTER,
41
+ stepTriage_skill_1.SKILL_TRIAGE,
42
+ stepInstantiate_skill_1.SKILL_INSTANTIATE,
43
+ // know primitives
44
+ stepArticulate_skill_1.SKILL_ARTICULATE,
45
+ stepDemonstrate_skill_1.SKILL_DEMONSTRATE,
46
+ stepCatalogize_skill_1.SKILL_CATALOGIZE,
47
+ // goal primitives
48
+ // SKILL_INTERPRET; ask -> Focus[Goal]
49
+ ],
50
+ },
51
+ briefs: {
52
+ dirs: [{ uri: __dirname + '/.briefs' }],
53
+ },
49
54
  });
50
55
  //# sourceMappingURL=getBhrainRole.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBhrainRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/bhrain/getBhrainRole.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAE1C,mEAAgE;AAChE,kFAA2E;AAC3E,kFAA2E;AAC3E,qFAA8E;AAC9E,qDAAkD;AAClD,wEAAiE;AACjE,wEAAiE;AACjE,oFAA6E;AAC7E,qEAA8D;AAEjD,QAAA,WAAW,GAAG,cAAI,CAAC,KAAK,CAAC;IACpC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE;;;;GAIP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE;QACN,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,iDAAiD;YACzD,KAAK,EAAE,IAAA,+BAAc,EAAC,cAAc,CAAC;SACtC,CAAC;QACF,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,8CAA8C;YACtD,KAAK,EAAE,IAAA,mCAAgB,EAAC,0BAA0B,CAAC;SACpD,CAAC;KACH;IACD,MAAM,EAAE;QACN,kBAAkB;QAClB,iCAAa;QACb,iCAAa;QACb,+BAAY;QACZ,yCAAiB;QAEjB,kBAAkB;QAClB,uCAAgB;QAChB,yCAAiB;QACjB,uCAAgB;QAEhB,kBAAkB;QAClB,sCAAsC;KACvC;IACD,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE;CACxC,CAAC,CAAC"}
1
+ {"version":3,"file":"getBhrainRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/bhrain/getBhrainRole.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAE1C,mEAAgE;AAChE,kFAA2E;AAC3E,kFAA2E;AAC3E,qFAA8E;AAC9E,qDAAkD;AAClD,wEAAiE;AACjE,wEAAiE;AACjE,oFAA6E;AAC7E,qEAA8D;AAEjD,QAAA,WAAW,GAAG,cAAI,CAAC,KAAK,CAAC;IACpC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE;;;;GAIP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE;QACN,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,iDAAiD;YACzD,KAAK,EAAE,IAAA,+BAAc,EAAC,cAAc,CAAC;SACtC,CAAC;QACF,mBAAS,CAAC,KAAK,CAAC;YACd,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,8CAA8C;YACtD,KAAK,EAAE,IAAA,mCAAgB,EAAC,0BAA0B,CAAC;SACpD,CAAC;KACH;IACD,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,IAAI,EAAE;YACJ,kBAAkB;YAClB,iCAAa;YACb,iCAAa;YACb,+BAAY;YACZ,yCAAiB;YAEjB,kBAAkB;YAClB,uCAAgB;YAChB,yCAAiB;YACjB,uCAAgB;YAEhB,kBAAkB;YAClB,sCAAsC;SACvC;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -19,12 +19,17 @@ Used to understand the physics, incentives, and causal flows beneath the system.
19
19
 
20
20
  `.trim(),
21
21
  traits: [],
22
- skills: [
23
- // SKILL_ENVISION_JOURNEY,
24
- // SKILL_STUDY_DOMAIN,
25
- // SKILL_DOMAIN_TERM_COLLECT_USECASES,
26
- // SKILL_DOMAIN_TERM_DISTILL,
27
- ],
28
- briefs: { dir: __dirname + '/.briefs' },
22
+ skills: {
23
+ dirs: [],
24
+ refs: [
25
+ // SKILL_ENVISION_JOURNEY,
26
+ // SKILL_STUDY_DOMAIN,
27
+ // SKILL_DOMAIN_TERM_COLLECT_USECASES,
28
+ // SKILL_DOMAIN_TERM_DISTILL,
29
+ ],
30
+ },
31
+ briefs: {
32
+ dirs: [{ uri: __dirname + '/.briefs' }],
33
+ },
29
34
  });
30
35
  //# sourceMappingURL=getEcologistRole.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getEcologistRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/ecologist/getEcologistRole.ts"],"names":[],"mappings":";;;AAAA,qCAA+B;AAE/B,kEAAkE;AAErD,QAAA,cAAc,GAAG,cAAI,CAAC,KAAK,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE;;;;;;;;;;GAUP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;IACN,0BAA0B;IAC1B,sBAAsB;IACtB,sCAAsC;IACtC,6BAA6B;KAC9B;IACD,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE;CACxC,CAAC,CAAC"}
1
+ {"version":3,"file":"getEcologistRole.js","sourceRoot":"","sources":["../../../../src/logic/roles/ecologist/getEcologistRole.ts"],"names":[],"mappings":";;;AAAA,qCAA+B;AAE/B,kEAAkE;AAErD,QAAA,cAAc,GAAG,cAAI,CAAC,KAAK,CAAC;IACvC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE;;;;;;;;;;GAUP,CAAC,IAAI,EAAE;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACN,IAAI,EAAE,EAAE;QACR,IAAI,EAAE;QACJ,0BAA0B;QAC1B,sBAAsB;QACtB,sCAAsC;QACtC,6BAA6B;SAC9B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,GAAG,UAAU,EAAE,CAAC;KACxC;CACF,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRoleRegistry = void 0;
4
4
  const rhachet_1 = require("rhachet");
5
+ const getArchitectRole_1 = require("./architect/getArchitectRole");
5
6
  const getBhrainRole_1 = require("./bhrain/getBhrainRole");
6
7
  // import { ROLE_ECOLOGIST } from './ecologist/getEcologistRole';
7
8
  const getRoleRegistry_readme_1 = require("./getRoleRegistry.readme");
@@ -19,6 +20,7 @@ const getRoleRegistry = () => new rhachet_1.RoleRegistry({
19
20
  roles: [
20
21
  getBhrainRole_1.ROLE_BHRAIN, // todo: lift bhrain role into own repo
21
22
  // ROLE_ECOLOGIST,
23
+ getArchitectRole_1.ROLE_ARCHITECT,
22
24
  getMechanicRole_1.ROLE_MECHANIC,
23
25
  getCommanderRole_1.ROLE_COMMANDER,
24
26
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"getRoleRegistry.js","sourceRoot":"","sources":["../../../src/logic/roles/getRoleRegistry.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC,0DAAqD;AACrD,iEAAiE;AACjE,qEAAoE;AACpE,gEAA2D;AAC3D,4EAAuE;AAEvE;;;;;GAKG;AACI,MAAM,eAAe,GAAG,GAAiB,EAAE,CAChD,IAAI,sBAAY,CAAC;IACf,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,iDAAwB;IAChC,KAAK,EAAE;QACL,2BAAW,EAAE,uCAAuC;QACpD,kBAAkB;QAClB,+BAAa;QAEb,iCAAc;KACf;CACF,CAAC,CAAC;AAXQ,QAAA,eAAe,mBAWvB"}
1
+ {"version":3,"file":"getRoleRegistry.js","sourceRoot":"","sources":["../../../src/logic/roles/getRoleRegistry.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC,mEAA8D;AAC9D,0DAAqD;AACrD,iEAAiE;AACjE,qEAAoE;AACpE,gEAA2D;AAC3D,4EAAuE;AAEvE;;;;;GAKG;AACI,MAAM,eAAe,GAAG,GAAiB,EAAE,CAChD,IAAI,sBAAY,CAAC;IACf,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,iDAAwB;IAChC,KAAK,EAAE;QACL,2BAAW,EAAE,uCAAuC;QACpD,kBAAkB;QAClB,iCAAc;QACd,+BAAa;QAEb,iCAAc;KACf;CACF,CAAC,CAAC;AAZQ,QAAA,eAAe,mBAYvB"}
@@ -5,7 +5,7 @@ enforce strict top-down dependency flow across layered system boundaries — low
5
5
 
6
6
  .scope
7
7
  - applies to all folders and modules within `src/`
8
- - required for `contract/`, `logic/`, `data/`, and `domain/` folders
8
+ - required for `contract/`, `access/`, `domain.objects/`, `domain.operations/`
9
9
  - governs imports, module references, and stitched flow boundaries
10
10
 
11
11
  .why
@@ -15,59 +15,68 @@ enforce strict top-down dependency flow across layered system boundaries — low
15
15
  - aligns with `arch:bounded-contexts` and enables predictable top-down orchestration
16
16
 
17
17
  .structure
18
- ```
18
+ \`\`\`
19
19
  src/
20
- contract/ // topmost — public interfaces, local commands
21
- endpoints/ // exposed APIs
22
- commands/ // internal entrypoints (e.g. CLI, scripts)
23
- logic/ // application procedures, stitched flows
24
- data/ // infrastructure layer (daos, sdks, services)
25
- daos/ // persistence logic — may reference domain objects
26
- sdks/ // external clients may reference domain types
27
- domain/ // lowestdomain models, business rules
28
- objects/ // canonical domain declarations
29
- ```
20
+ contract/ // topmost — public interfaces, local commands
21
+ api/ // public invocable api endpoints, deployed and exposed by the project; e.g., via `aws-lambda`
22
+ cmd/ // private internal use entrypoints, supported by the project; e.g., via `as-command`
23
+ sdk/ // public software development kit exports, supported by the project; e.g., `export ...`
24
+ cli/ // public command line interface contracts, supported by the project; e.g., via `commander`
25
+
26
+ access/ // infrastructure layer (daos, sdks, svcs)
27
+ daos/ // private persistence logic may reference domain objects
28
+ sdks/ // remote third party contracts, from any alt org — may declare their own domain.objects
29
+ svcs/ // remote first party contracts, from our own org — may declare their own domain.objects
30
+
31
+ domain.objects/ // canonical domain declarations
32
+ domain.operations/ // domain behavior + business rules
33
+
34
+ infra/ // infrastructure specific adapters
35
+ \`\`\`
30
36
 
31
37
  .how
32
38
  - each layer may depend **only on the layers below it**
33
- - `contract/` may depend on `logic/`, `data/`, `domain/`
34
- - `logic/` may depend on `data/`, `domain/`
35
- - `data/` may depend on `domain/`
36
- - `domain/` must not depend on anything outside its own layer
37
- - stitched flows live in `logic/` or `contract/commands/` and orchestrate downstream only
38
- - never import upward across layers (e.g. `domain/` importing `data/`)
39
- - shared types must follow same directional rules
39
+ - `contract/` may depend on `domain.objects/` and `domain.operations/`
40
+ - `access/` may depend on `domain.objects/` and `domain.operations/`
41
+ - `domain.operations/` may depend on `domain.objects/` or `infra/`
42
+ - `domain.objects/` must not depend on anything outside its own layer
43
+ - `infra/` must not depend on anything outside its own layer
44
+
45
+ - stitched flows live in `domain.operations/` or `contract/commands/` and orchestrate downstream only
46
+ - never import upward across layers (e.g., `domain.objects/` importing `access/`)
47
+ - shared types must follow the same directional rules
40
48
 
41
49
  .enforcement
42
- - imports that violate top-down boundary = BLOCKER
43
- - circular dependencies between layers = BLOCKER
44
- - logic in `domain/` must never reach into `data/`, `logic/`, or `contract/`
45
- - logic in `data/` may use `domain/`, but must stay decoupled from business rules
50
+ - imports that violate top-down boundary = **BLOCKER**
51
+ - circular dependencies between layers = **BLOCKER**
52
+ - logic in `domain.objects/` must never reach into `access/`, `contract/`, or `domain.operations/`
53
+ - logic in `domain.operations/` must not reference infrastructure concerns; they can can only leverage `infra/` adapters
54
+ - logic in `access/` may use domain layers but must remain free of domain knowledge and business rules
55
+ - logic in `infra/` must remain free of domain knowledge and business rules
46
56
 
47
57
  .examples
48
58
 
49
59
  ✅ positive
50
- ```ts
60
+ \`\`\`ts
51
61
  // contract/endpoints/sendInvoice.ts
52
- import { generateInvoice } from '@/logic/generateInvoice';
62
+ import { generateInvoice } from '@/domain.operations/generateInvoice';
63
+ import { invoiceDao } from '@/access/daos/invoiceDao';
53
64
 
54
- // logic/submitJob.ts
55
- import { Job } from '@/domain/objects/Job';
56
- import { jobDao } from '@/data/daos/jobDao';
65
+ // access/daos/jobDao.ts
66
+ import { Job } from '@/domain.objects/Job';
57
67
 
58
- // data/daos/jobDao.ts
59
- import { Job } from '@/domain/objects/Job';
60
- ```
68
+ // domain.operations/calculateTotal.ts
69
+ import { LineItem } from '@/domain.objects/LineItem';
70
+ \`\`\`
61
71
 
62
72
  ❌ negative
63
- ```ts
64
- // domain/Customer.ts
65
- import { customerDao } from '@/data/daos/customerDao'; // ⛔ illegal upward import
66
-
67
- // domain/Invoice.ts
68
- import { calculateTotal } from '@/logic/calculateTotal'; // ⛔ direction violation
73
+ \`\`\`ts
74
+ // domain.objects/Customer.ts
75
+ import { customerDao } from '@/access/daos/customerDao'; // ⛔ illegal upward import
69
76
 
70
- // data/sdkWrapper.ts
71
- import { dispatchFlow } from '@/logic/' // ⛔ bottom-up reference
72
- ```
77
+ // domain.operations/InvoiceOps.ts
78
+ import { runFlow } from '@/contract/commands'; // ⛔ direction violation
73
79
 
80
+ // access/svcs/sdkWrapper.ts
81
+ import { dispatchFlow } from '@/contract/'; // ⛔ bottom-up reference
82
+ \`\`\`
@@ -0,0 +1,7 @@
1
+ never use the term `script`
2
+
3
+ it's overloaded
4
+
5
+ choose what exactly its purpose is
6
+
7
+ - adhoc usage? => `command`
@@ -0,0 +1,24 @@
1
+ prefer the inclusion of emojis in comments and logs, to make things easier to grok
2
+
3
+ prefer chill, nature based emojis, to give a zen vibe
4
+
5
+ ---
6
+
7
+ careful not to do emojis - and try and reuse emojis based on similarities
8
+
9
+ ideally, no more than 5-7 different emojis would be present at a time, and typically, only for imporant callouts
10
+
11
+ ---
12
+
13
+ otherwise, use neutral and chill unicode characters for bulletpoints and etc
14
+
15
+
16
+ ---
17
+
18
+ e.g.,
19
+
20
+ ⛈️ = error
21
+ 🔭 = lookup
22
+ ✨ = success
23
+ 🌿 = output
24
+ 🌊 = outcome
@@ -0,0 +1,29 @@
1
+ # given
2
+
3
+ you are in a .shell env
4
+
5
+ # what
6
+
7
+ prefer `jq` over escape to other languages, like python
8
+
9
+ # demo
10
+
11
+ ### bad practice
12
+
13
+ ```sh
14
+ local instance_id
15
+ instance_id=$(echo "$instance_json" | python3 -c "
16
+ import sys, json
17
+ data = json.load(sys.stdin)
18
+ if data and data != 'None':
19
+ print(data.get('InstanceId', ''))
20
+ " 2>/dev/null)
21
+ ```
22
+
23
+
24
+ ### best practice
25
+
26
+ ```sh
27
+ local instance_id
28
+ instance_id=$(echo "$instance_json" | jq -r '.InstanceId // empty' 2>/dev/null)
29
+ ```
@@ -0,0 +1,4 @@
1
+ given('a command which modifies infrastructure')
2
+ when('it does not leverage terraform')
3
+ then('flag it as a BLOCKER')
4
+ sothat('we manage all infrastructure via terraform')
@@ -0,0 +1,17 @@
1
+ .what = use terraform rather than adhoc .shell commands to manage infra
2
+
3
+ .why =
4
+ - terraform is declarative
5
+ - enables you to declare desires and compare reality
6
+ - simpler to review for issues, since you see the final product explicitly in code
7
+ - simpler to review for issues, since you see divergence with reality
8
+ - enables drift detection
9
+ - more
10
+
11
+ ---
12
+
13
+ if your goal is to change infra (add resources, del resources, set resources) => use terraform
14
+
15
+ ---
16
+
17
+ note = code.actors make it very easy to sync terraform state && go from wish => critera => done
@@ -0,0 +1,3 @@
1
+ always pin versions of dependencies to exact versions
2
+
3
+ this eliminates surprise changes when our dependencies dont respect semver notation and have an surprise backwards-incompat change
@@ -0,0 +1,33 @@
1
+ idempotency is a must
2
+
3
+ we must always assume that retries will occur
4
+ - user will forget if they ran it or not
5
+ - code will compose dependent flows that may need to repeat operations safely
6
+ - apps will face network errors and retry requests
7
+
8
+ idempotency means that the same request duplicated will succeed as if it only ran once
9
+
10
+ ---
11
+
12
+ the main methods of doing so are via
13
+
14
+ - findsert = find or insert
15
+ - const before = dao.findByRef()
16
+ - if (before && nonDiff) return before
17
+ - if (before && hasDiff) BadRequestError.throw('can not findsert; entity already exists but with different attributes')
18
+ - const after = dao.upsert()
19
+ - return after
20
+
21
+ - upsert = update or insert
22
+ - this is a standard operation often handled at the database layer
23
+ - simply always overwrite, idempotently
24
+
25
+ ---
26
+
27
+ why are these the two main modes?
28
+
29
+ because otherwise the only other option is to throw an error on duplicate requests
30
+
31
+ there are fundamentally no other ways to support idempotency
32
+ - if it doesn't exist, great -> insert
33
+ - if it does exist, decide -> update (upsert) or retain (findsert)
@@ -0,0 +1,17 @@
1
+ if using a tool dependency that is not already fully understood with internalized knowledge
2
+
3
+ first, it is mandatory to externalize knowledge about that tool
4
+
5
+ for example
6
+ - what is it
7
+ - when was it released
8
+ - how much does it cost
9
+ - how to use it
10
+
11
+ - what are advantages and devantages? boons and banes?
12
+
13
+ ---
14
+
15
+ research this always via a websearch first
16
+
17
+ and always cite your sources
@@ -0,0 +1,43 @@
1
+ positional args are
2
+ - hard to read
3
+ - easy to break
4
+
5
+ never use positional args if we can avoid them
6
+
7
+
8
+ even in bash!
9
+
10
+
11
+ ---
12
+
13
+ e.g., which one's easier to understand?
14
+
15
+
16
+ ```sh
17
+ # final attempt with fail_on_error=true (exits on hard failures, warns on timeout)
18
+ _try_start_port_forwarding "$instance_id" "$rds_endpoint" 60 true
19
+ ```
20
+
21
+
22
+ vs
23
+
24
+ ```sh
25
+
26
+ # final attempt with fail_on_error=true (exits on hard failures, warns on timeout)
27
+ _try_start_port_forwarding \
28
+ instance_id="$instance_id" \
29
+ rds_endpoint="$rds_endpoint" \
30
+ timeout=60 \
31
+ fail_on_error=true
32
+ ```
33
+
34
+
35
+ ---
36
+
37
+
38
+
39
+ - Self-documenting: You can see what each parameter is at the call site
40
+ - Order-independent: Arguments can be passed in any order
41
+ - Easier to maintain: Adding new optional parameters won't break existing calls
42
+ - Validation: Each function validates required parameters
43
+ - Usage examples: Included in function headers
@@ -0,0 +1,6 @@
1
+ always used named arguments on inputs
2
+
3
+ they make it clear when reading what the arguments are used for
4
+
5
+ they also make it possible to reorder arguments without breaking the contract (great for refactors, deprecations, renames, etc)
6
+