rhachet-roles-ehmpathy 1.13.6 → 1.13.8
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/logic/roles/architect/.briefs/criteria.given_when_then.[seed].v3.md +87 -0
- package/dist/logic/roles/architect/.briefs/practices/prefer.env_access.prep_over_dev.md +12 -0
- package/dist/logic/roles/architect/.briefs/ubiqlang.ambiguous-from-overload.md +1 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog000.overview.and.premise.md +115 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.coordinates.spherical.md +69 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.metaphor.cauliflorous.md +44 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.metaphor.galactic_spacetravel.[article].md +42 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.metaphor.galactic_spacetravel.[lesson].md +60 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.structs.catalog.md +51 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.structs.treestruct.md +85 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog021.structs.vector.md +112 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.definition.md +115 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct._.md +112 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.coords.1.spherical.md +80 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.coords.2.abstractive.md +59 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.coords.3.descriptive.md +64 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.persp.1.perspectives.md +88 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.persp.2.universal.md +82 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.persp.3.relative.md +106 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog101.concept.treestruct.persp.4.fractal.md +83 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog151.concept.treestruct.gravity.md +89 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog201.cortal.focus.p1.definition.md +231 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog201.cortal.focus.p1.examples.cont.md +82 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog201.cortal.focus.p2.acuity.md +134 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog201.cortal.focus.p2.breadth.md +151 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog201.cortal.focus.p2.depth.md +147 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog251.cortal.focus.p3.fabric.md +96 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog251.cortal.focus.p3.mode.md +68 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog251.cortal.focus.p3.rythm.md +56 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog251.cortal.focus.p3.usecases.md +76 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.1.motion.primitives._.md +155 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.1.motion.primitives.acuity.md +94 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.1.motion.primitives.breadth.md +114 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.1.motion.primitives.breadth.vary.md +105 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.1.motion.primitives.depth.md +132 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.2.motion.composites._.md +106 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog301.traversal.2.motion.composites.grammar.md +105 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.._.md +209 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.1.persp.as.berries.md +168 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.1.persp.as.vectors.md +74 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.1.persp.has.precision.tunable.md +80 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.2.1.primitives.rough._.md +99 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.2.1.primitives.rough.interrogative.md +108 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.2.1.primitives.rough.why.[article].md +55 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.2.2.composite.smooth._.md +83 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog401.questions.2.2.composite.smooth.examples.md +101 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.1.primitives._.md +134 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.1.primitives.recall.md +149 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.1.primitives.steer.md +146 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.1.primitives.think.md +141 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.2.composites.zoom.md +127 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.3.catalogs.md +107 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang.3.grammar.md +124 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/cog501.cortal.assemblylang_.md +0 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/inflight/concept.vs.idea.md +70 -0
- package/dist/logic/roles/bhrain/.briefs/cognition/inflight/core.concept.adjectives.md +8 -0
- package/dist/logic/roles/bhrain/.briefs/distilisys.grammar.compressed.md +19 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.1.why.common.[article].md +32 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.1.why.term_smells.[article].md +36 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.1.why.term_smells.detection.[lesson].md +73 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.2.tactic.eliminate.[article].md +55 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.2.tactic.eliminate.[lesson].md +41 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.3.eliminator.[trait]._.md +66 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.3.eliminator.[trait].balance.md +36 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.3.eliminator.[trait].bane.md +34 -0
- package/dist/logic/roles/bhrain/.briefs/grammar/gerunds.3.eliminator.[trait].boon.md +35 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.1.ontology.[article].frame.docs_as_materializations.md +63 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.1.ontology.[article].frame.docs_as_references.md +45 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.2.rel.many_to_many.[article].md +37 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.3.instances.[article].md +39 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.4.documents.[article].md +37 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno101.primitives.5.concepts.[article].md +39 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents._.[article].md +48 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents._.[catalog].md +52 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents.articles.[article].md +40 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents.catalogs.[article].md +41 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents.demos.[article].md +42 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno201.documents.lessons.[article].md +42 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.compression.1.refs._.[article].md +41 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.compression.2.kernels._.[article].i1.md +50 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.compression.3.briefs._.[article].md +40 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.compression._.[article].md +90 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.compression._.[catalog].persp.garden.md +64 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[article].md +45 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].algorithm.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].color.md +56 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].empathy.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].entropy.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].gravity.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].joke.md +56 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.1.from_instances.[demo].value.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2._.[catalog].md +43 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.articulate.[article].md +27 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.articulate.[lesson].md +49 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.catalogize.[article].md +27 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.catalogize.[lesson].md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.demonstrate.[article].md +26 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.demonstrate.[lesson].md +49 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.lessonize.[article].md +26 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.enbrief.2.lessonize.[lesson].md +54 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.kernelize._.[article].md +58 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno301.doc.kernelize._.[lesson].md +88 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno351.docs.are_instances.[article].md +34 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno351.docs.recursion.[catalog].md +44 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno401.actors.1.role.author.[article].md +36 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno401.actors.1.role.librarian.[article].md +40 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno401.actors.2.interdependence.[article].md +52 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno501.doc.enbrief.catalog.structure1.[article].md +53 -0
- package/dist/logic/roles/bhrain/.briefs/knowledge/kno501.doc.enbrief.catalog.structure1.[lesson].template.md +101 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/article.variant.vision.[article].md +60 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.expectation.vs_assumption._.md +60 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.frame.vs_perspective.[article].md +96 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.invariant.[article].md +29 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.lesson._vs_article.[article].md +36 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.ref._vs_brief.md +90 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/term.referent.[article].md +43 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/usage.lesson_vs_article.[lesson].md +31 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.context/usage.lesson_vs_article_vs_demo.[lesson].md +37 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/.readme.md +12 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>._.[article].frame.cognitive.md +33 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>._.[article].frame.tactical.md +45 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.[catalog].md +83 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.concept_dimension.examples.[article][seed].md +4 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.concept_dimension.invariants.[article].md +36 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.from.examples.md +44 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.from.seed.md +48 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.with.templates.[article].md +57 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tactic.with.templates.[gallery][review].effective.md +1 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<articulate>.tone.bluecollar.[article][seed].md +5 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<catalogize>._.[article][seed].md +3 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<catalogize>.observation.via_clusterage_over_via_imagination.[seed].md +6 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<catalogize>.vs_diverge.[article].persp.save_compute.md +46 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>._.[article].frame.colloquial.i2.by_grok.md +64 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.[catalog].md +106 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.contrast.[demo].usecase.vs_userjourney.by_chatgpt.md +45 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.counter.[demo].usecase.flyer.by_chargpt.md +38 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.counter.[demo].walkability.phoenix.by_chargpt.md +41 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].shear_force.scissors.by_grok.md +52 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].tea.darjeeling.by_grok.md +50 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].usecase.book_flight.by_grok.md +54 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].usecase.order_food.by_chatgpt.md +40 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].walkability.portland.by_chatgpt.i3.md +42 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[demo].walkability.portland.by_grok.i2.md +49 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.[lesson].howto.md +28 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.example.structure.[article].i2.md +73 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.narrative.[demo].usecase.order_online.by_chatgpt.md +34 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/<demonstrate>.variants.walkthrough.[demo].usecase.book_online.by_chatgpt.md +47 -0
- package/dist/logic/roles/bhrain/.briefs/librarian.tactics/[brief].verbiage.outline.over.narrative.md +55 -0
- package/dist/logic/roles/bhrain/.briefs/logistics/term.logistics.[article].md +21 -0
- package/dist/logic/roles/bhrain/.briefs/logistics/term.logistics.of_information.[article].md +22 -0
- package/dist/logic/roles/bhrain/.briefs/logistics/term.logistics.of_knowledge.[article].md +29 -0
- package/dist/logic/roles/bhrain/.briefs/physics/optics.focal.acuity.md +77 -0
- package/dist/logic/roles/bhrain/.briefs/physics/optics.focal.breadth.md +74 -0
- package/dist/logic/roles/bhrain/.briefs/physics/optics.focal.depth.md +77 -0
- package/dist/logic/roles/bhrain/.briefs/physics/optics.focal.distance.md +92 -0
- package/dist/logic/roles/bhrain/.briefs/physics/optics.focal.tradeoffs.md +107 -0
- package/dist/logic/roles/bhrain/.briefs/tactician/tactics.compose.traits_and_skills.[article].md +76 -0
- package/dist/logic/roles/bhrain/.briefs/tactician/trait.articulation.[article].md +67 -0
- package/dist/logic/roles/bhrain/.briefs/tactician/trait.purpose.[article].md +56 -0
- package/dist/logic/roles/bhrain/.briefs/tactician/trait.vs_skill.[article].md +55 -0
- package/dist/logic/roles/bhrain/.briefs/tactician/trait.vs_tactic.[article].md +70 -0
- package/dist/logic/roles/bhrain/.briefs/terms.motive.intent.goal.md +46 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<cluster>._.[article].frame.tactical._.md +85 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<cluster>.vs_<diverge>.duality.[article].md +43 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<diverge>._.[article].frame.cognitive.[seed].md +4 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<diverge>._.[article].frame.tactical.md +89 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<elaborate>_vs_<elucidate>.[seed].md +1 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<enquestion>._.[article].md +113 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<enquestion>._.[gallery].plumber.diagnose.md +130 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<enquestion>._.[gallery].thinker.enquestion.md +125 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<enquestion>.tactic.perspectives.[article].md +36 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<triage>._.[article].frame.tactical.md +85 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<triage>.persp.grades_from_context.[article].md +48 -0
- package/dist/logic/roles/bhrain/.briefs/thinker.tactics/<triage>.persp.implicit_question.[article].md +65 -0
- package/dist/logic/roles/bhrain/.briefs/trait.chillnature.md +14 -0
- package/dist/logic/roles/bhrain/.briefs/trait.ocd.md +5 -0
- package/dist/logic/roles/bhrain/.briefs/worders/core.matmuls_vecmuls_elemuls.md +93 -0
- package/dist/logic/roles/bhrain/.briefs/worders/core.transformers.as_origin.md +62 -0
- package/dist/logic/roles/bhrain/.briefs/worders/core.transformers.self_attention.[article].md +93 -0
- package/dist/logic/roles/bhrain/.briefs/worders/core.transformers.self_attention.[demo].ambig.bank.md +80 -0
- package/dist/logic/roles/bhrain/.briefs/worders/core.transformers.self_attention.[demo].cat_sat.md +67 -0
- package/dist/logic/roles/bhrain/.briefs/worders/force.repeat_input_structures.md +48 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.interdependence.[article].md +37 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.interdependence.[demo].domain.physics.md +30 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internal_vs_external.[article].artist_vs_librarian.md +44 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internal_vs_external.[demo].artist_vs_librarian.md +37 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internal_vs_external.[demo].domain.physics.md +39 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internalized.[article].md +35 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internalized.[demo].artist.md +36 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internalized.[demo].neural.md +37 -0
- package/dist/logic/roles/bhrain/.briefs/worders/knowledge.internalized.[demo].pianist.md +34 -0
- package/dist/logic/roles/bhrain/.briefs/worders/limits.rhyme.md +46 -0
- package/dist/logic/roles/bhrain/.briefs/worders/limits.spell.md +49 -0
- package/dist/logic/roles/bhrain/.briefs/worders/teach.via.library.examples.md +28 -0
- package/dist/logic/roles/bhrain/.briefs/worders/teach.via.library.explanations_vs_examples.md +40 -0
- package/dist/logic/roles/bhrain/.briefs/worders/trend.prefer_reuse.[seed].md +10 -0
- package/dist/logic/roles/bhrain/brief.articulate/stepArticulate.template.md +120 -0
- package/dist/logic/roles/bhrain/brief.demonstrate/stepDemonstrate.template.md +135 -0
- package/dist/logic/roles/bhrain/khue.cluster/stepCluster.template.md +134 -0
- package/dist/logic/roles/bhrain/khue.diverge/stepDiverge.template.md +110 -0
- package/dist/logic/roles/bhrain/khue.instantiate/stepInstantiate.template.md +73 -0
- package/dist/logic/roles/bhrain/khue.triage/stepTriage.template.md +128 -0
- package/dist/logic/roles/coach/.briefs/claude.context-caching.md +76 -0
- package/dist/logic/roles/designer/.briefs/declarative-over-imperative.md +79 -0
- package/dist/logic/roles/designer/.briefs/declarative-over-imperative.stub.md +14 -0
- package/dist/logic/roles/designer/.briefs/pit-of-success.md +70 -0
- package/dist/logic/roles/designer/.briefs/pit-of-success.stub.md +3 -0
- package/dist/logic/roles/designer/outlineDistilisys/stepOutlineDistilisys.template.md +173 -0
- package/dist/logic/roles/designer/outlineRoadmap/stepOutlineRoadmap.template.md +88 -0
- package/dist/logic/roles/designer/outlineVision/stepOutlineVision.template.md +47 -0
- package/dist/logic/roles/ecologist/.briefs/.readme.md +17 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys101.distilisys.grammar.md +221 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive._.summary.md +82 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive.p1.reversibility.entropy.md +39 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive.p2.option.chance.choice.md +140 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive.p3.chance.motive.polarity.threat.md +72 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive.p4.motive.horizon.md +101 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys201.actor.motive.p5.motive.grammar.md +131 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources._.primitives.summary.md +108 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources.pt1.primitive.time.md +56 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources.pt2.primitive.energy.md +69 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources.pt3.primitive.space.md +85 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources.pt4.primitive.claim.md +113 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys211.actor.resources.pt5.composites.md +146 -0
- package/dist/logic/roles/ecologist/.briefs/distilisys/sys231.actor.claims.p1.primitive.exchange.md +130 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/.eco001.origin.prompt.md +11 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco001.overview.md +44 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco101.core-system-understanding.md +70 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco101.p1.ecosystem-structure.md +62 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco101.p2.trophic-dynamics.md +59 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco101.p3.population-ecology.md +71 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco101.p4.community-interactions.md +78 -0
- package/dist/logic/roles/ecologist/.briefs/ecology/eco505.systems-thinking.md +62 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ001.overview.md +65 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ101.core-mechanics.md +65 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ101.p1.supply-and-demand.md +76 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ101.p2.opportunity-cost.md +106 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ101.p3.marginal-analysis.md +79 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ101.p4.rational-choice.md +81 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ201.market-structures-and-failures.md +81 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ301.production-and-growth.md +71 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ401.macro-systems.md +92 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ501.global-and-institutional.md +85 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ501.p1.game-theory.md +142 -0
- package/dist/logic/roles/ecologist/.briefs/economy/econ501.p4.behavioral-economics.md +146 -0
- package/dist/logic/roles/ecologist/.briefs/product/user.journey._.[article].i1.md +68 -0
- package/dist/logic/roles/ecologist/.briefs/product/user.journey._.[article].md +0 -0
- package/dist/logic/roles/ecologist/.briefs/product/user.journey.purpose.[article].i1.md +52 -0
- package/dist/logic/roles/ecologist/.briefs/product/user.journey.purpose.[article].md +52 -0
- package/dist/logic/roles/ecologist/.briefs/term.distillation.md +93 -0
- package/dist/logic/roles/mechanic/.briefs/architecture/bounded-contexts.md +61 -0
- package/dist/logic/roles/mechanic/.briefs/architecture/directional-dependencies.md +82 -0
- package/dist/logic/roles/mechanic/.briefs/architecture/domain-driven-design.md +61 -0
- package/dist/logic/roles/mechanic/.briefs/architecture/ubiqlang.md +37 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/_mech.compressed.md +57 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/_mech.compressed.prompt.md +5 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.failfast.md +37 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.idempotency.md +63 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.immutability.md +48 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.narratives.md +74 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.single-responsibility.md +67 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/flow.transformers_over_conditionals.[lesson].md +97 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.args.input-context.md +61 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.args.input-inline.md +63 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.arrowonly.md +47 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.clear-contracts.md +53 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.tests.given-when-then.md +62 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.what-why.md +88 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/mech.what-why.v2.md +98 -0
- package/dist/logic/roles/mechanic/.briefs/codestyle/pit-of-success.via.minimize-surface-area.md +58 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/never.term.script.md +7 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.emojis.chill_nature.md +24 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.jq.over_alt.[demo].md +29 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.terraform.[criteria].md +4 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/prefer.terraform.[seed].md +17 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.dependency.pinned_versions.md +3 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.idempotency.md +33 -0
- package/dist/logic/roles/mechanic/.briefs/criteria.practices/require.knowledge.externalized.md +17 -0
- package/dist/logic/roles/mechanic/.briefs/engineer/dependency-injection.md +118 -0
- package/dist/logic/roles/mechanic/.briefs/engineer/dependency-injection.stub.md +11 -0
- package/dist/logic/roles/mechanic/.briefs/lessons/code.prod.typescript.types/bivariance_vs_contravariance.[lesson].md +95 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.contract.inputs.nameargs/bad-practice/forbid.positional-args.md +43 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.contract.inputs.nameargs/best-practice/require.namedargs.md +6 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.declarative/.readme.md +0 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.declarative/best-practice/declastruct.[demo].md +485 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.has.attributes.nullable.md +13 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.has.attributes.undefined.md +15 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/bad-practices/blocker.refs.immuatble.md +9 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.objects/best-practice/ref.package.domain-objects.[readme].md +585 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.domain.operations/best-practice/require.sync.names.md +14 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/bad-practices/forbid.failhide.md +19 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/bad-practices/forbid.hide_errors.md +13 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/best-practice/prefer.HelpfulError.wrap.md +54 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/best-practice/require.fail_fast.[demo].shell.md +17 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.errors.failfast/best-practice/require.fail_fast.md +28 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.narrative/bad-practices/forbid.else.md +54 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.narrative/bad-practices/forbid.else.v2.md +9 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.narrative/best-practice/early-returns.named-checks.[demo].md +181 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/bad-practices/forbid.barrel.exports.ts.md +41 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/bad-practices/forbid.index.ts.md +3 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/best-practice/directional-dependencies.md +82 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.repo.structure/best-practice/dot-test-and-dot-temp.md +20 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.prod.typescript.utils/best-practice/ref.package.as-command.[tips].md +7 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.acceptance/best-practice/blackbox.md +5 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.diagnose.[lesson].md +14 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.run.[lesson].md +18 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.use.[lesson].md +20 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].md +3 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].on_scope.for_integ.md +8 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.[lesson].on_scope.for_units.md +9 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/howto.write.bdd.[lesson].md +280 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/prefer.datadriven.md +41 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/ref.test-fns.[readme].md +185 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/code.test.howto/best-practice/whento.snapshots.[lesson].md +23 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/.readme.md +1 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/bad-practices/forbid.term=existing.md +10 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/best-practice/require.order.noun_adj.md +39 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/domain=practices.terms=forbid_prefer_desire_require.md +13 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.terms/domain=software.terms=prodcode_vs_testcode.md +7 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/.readme.md +3 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/prefer.chill-nature.md +0 -0
- package/dist/logic/roles/mechanic/.briefs/patterns/lang.tones/prefer.lowercase.md +0 -0
- package/dist/logic/roles/mechanic/.briefs/style.compressed.md +29 -0
- package/dist/logic/roles/mechanic/.briefs/style.compressed.prompt.md +5 -0
- package/dist/logic/roles/mechanic/.briefs/style.names.treestruct.md +48 -0
- package/dist/logic/roles/mechanic/.briefs/style.names.ubiqlang.md +37 -0
- package/dist/logic/roles/mechanic/.briefs/style.words.lowercase.md +36 -0
- package/dist/logic/roles/mechanic/.briefs/terms/badpractice/script.md +9 -0
- package/dist/logic/roles/mechanic/.briefs/terms/plan.exec_vs_apply.md +45 -0
- package/dist/logic/roles/mechanic/.skills/claude.hooks/check.pretooluse.permissions.sh +346 -0
- package/dist/logic/roles/mechanic/.skills/claude.hooks/forbid.stderr.redirect.sh +57 -0
- package/dist/logic/roles/mechanic/.skills/claude.tools/mvsafe.sh +75 -0
- package/dist/logic/roles/mechanic/.skills/declapract.upgrade.sh +50 -0
- package/dist/logic/roles/mechanic/.skills/git.worktree.common.sh +58 -0
- package/dist/logic/roles/mechanic/.skills/git.worktree.del.sh +51 -0
- package/dist/logic/roles/mechanic/.skills/git.worktree.get.sh +51 -0
- package/dist/logic/roles/mechanic/.skills/git.worktree.set.sh +108 -0
- package/dist/logic/roles/mechanic/.skills/git.worktree.sh +46 -0
- package/dist/logic/roles/mechanic/.skills/init.bhuild.sh +260 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.hooks.forbid.stderr.redirect.sh +116 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.hooks.pretooluse.sh +118 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.hooks.sessionstart.sh +113 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.hooks.sh +25 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.permissions.sh +159 -0
- package/dist/logic/roles/mechanic/.skills/init.claude.sh +47 -0
- package/dist/logic/roles/mechanic/.skills/link.claude.transcripts.sh +43 -0
- package/dist/logic/roles/mechanic/.skills/test.integration.sh +50 -0
- package/dist/logic/roles/mechanic/codediff/routeArtistCodeDiff.template.md +46 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewArchitecture.template.md +78 -0
- package/dist/logic/roles/mechanic/codediff/routeCriticCodeReviewCodestyle.template.md +75 -0
- package/dist/logic/roles/mechanic/codediff/routeJudgeReleasable.template.md +67 -0
- package/dist/logic/roles/mechanic/study/routeStudyAsk.template.md +73 -0
- package/dist/logic/roles/mechanic/write/.test/prior.template.md +21 -0
- package/dist/logic/roles/mechanic/write/stepWrite.template.md +38 -0
- package/package.json +2 -2
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# 📘 term-selection.brief: how to distill the best term
|
|
2
|
+
|
|
3
|
+
> this brief defines a systematic method to choose the **clearest, strongest term** for a concept, pattern, or unit.
|
|
4
|
+
> good terms collapse synonyms, avoid confusion, and align with intuitive grasp — enabling fluent reuse across systems.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🧭 goals of a good term
|
|
9
|
+
|
|
10
|
+
- **🧼 clarity** – avoids ambiguity and misreading
|
|
11
|
+
- **🧲 gravity** – feels “right” and sticks in memory
|
|
12
|
+
- **🔁 reuse** – unlocks consistent expression across contexts
|
|
13
|
+
- **🧠 intuition** – fits what a first-time reader expects
|
|
14
|
+
- **🧯 disambiguation** – contrasts clearly from neighbors or opposites
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## ⚠️ key naming hazards
|
|
19
|
+
|
|
20
|
+
| hazard | example | fix |
|
|
21
|
+
|-------------------|-----------------------------|----------------------------------------------------------------------|
|
|
22
|
+
| ❗ ambiguity | `target`, `value`, `state` | clarify the type or role (e.g. `goal`, `rank`, `setting`) |
|
|
23
|
+
| 🔀 synonym clash | `impact` vs `effect` vs `outcome` | collapse to one canonical form with clear internal grammar |
|
|
24
|
+
| 🧱 intuition gap | `vectorize` used for ranking | choose a more vivid or grounded term (e.g. `score`, `grade`, `weigh`) |
|
|
25
|
+
| ⚓ overload | `tag` meaning many things | constrain usage or rename distinctly (`label`, `marker`, `flag`) |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🧪 test criteria for term selection
|
|
30
|
+
|
|
31
|
+
ask these when evaluating term candidates:
|
|
32
|
+
|
|
33
|
+
1. **is it vivid?**
|
|
34
|
+
does it evoke the right imagery or mechanic?
|
|
35
|
+
|
|
36
|
+
2. **is it distinct?**
|
|
37
|
+
does it clearly differ from adjacent terms?
|
|
38
|
+
|
|
39
|
+
3. **is it reusable?**
|
|
40
|
+
can this term scale across similar use cases?
|
|
41
|
+
|
|
42
|
+
4. **does it collapse synonyms?**
|
|
43
|
+
can it absorb nearby concepts under one roof?
|
|
44
|
+
|
|
45
|
+
5. **does it pass the "blank slate" test?**
|
|
46
|
+
what would a first-time reader *assume* it means?
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🔧 process to distill best term
|
|
51
|
+
|
|
52
|
+
1. **collect contenders**
|
|
53
|
+
list all possible terms, including wild ideas
|
|
54
|
+
|
|
55
|
+
2. **tag each**
|
|
56
|
+
note for each: clarity, conflicts, connotations, candidates it might replace
|
|
57
|
+
|
|
58
|
+
3. **simulate usage**
|
|
59
|
+
plug into real example sentences or data flows
|
|
60
|
+
|
|
61
|
+
4. **eliminate and converge**
|
|
62
|
+
remove fuzzy or redundant terms; prefer intuitive clarity over cleverness
|
|
63
|
+
|
|
64
|
+
5. **test opposite / inverse**
|
|
65
|
+
name the inverse or contrast (e.g. if this is `<gain>`, what’s the `<drop>`?)
|
|
66
|
+
|
|
67
|
+
6. **declare and lock**
|
|
68
|
+
publish as part of `.brief` or `ubiqlang`
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 📦 output format
|
|
73
|
+
|
|
74
|
+
distilled term entry should include:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
{
|
|
78
|
+
name: 'chance',
|
|
79
|
+
role: 'a positively motivated [option]',
|
|
80
|
+
replaces: ['opportunity', 'magnet', 'upside'],
|
|
81
|
+
inverse: 'threat',
|
|
82
|
+
test_case: '<enmotive> → <<gain>>[chance] → <choose>',
|
|
83
|
+
note: '“chance” works as a synonym for “opportunity” without implying randomness'
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 🧭 guidance phrases
|
|
90
|
+
|
|
91
|
+
- “would this confuse someone from another domain?”
|
|
92
|
+
- “can this become a root word in our grammar?”
|
|
93
|
+
- “if we only had one word for this… which feels truest?”
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.tactic = arch:bounded-contexts
|
|
2
|
+
|
|
3
|
+
.what = enforce clear separation of concerns using bounded contexts — each domain must own its logic, models, and procedures
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- applies to all modules, folders, stitched routes, domain objects, and services
|
|
7
|
+
- especially enforced within `domain/`, `services/`, `routes/`, and stitched thread flows
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- upholds the **single responsibility principle** at the system level:
|
|
11
|
+
- each context owns exactly one domain concern (e.g. invoicing, job management, customer data)
|
|
12
|
+
- enforces **low-trust contracts** between contexts:
|
|
13
|
+
- no assumptions about internal structures or invariants of other domains
|
|
14
|
+
- all interaction must happen through **explicit, versionable contracts**
|
|
15
|
+
- prevents entanglement, duplication, and reach-in violations
|
|
16
|
+
- allows teams to reason about one domain in isolation
|
|
17
|
+
|
|
18
|
+
.how:
|
|
19
|
+
- define one folder per bounded context (e.g. `invoice/`, `customer/`, `job/`)
|
|
20
|
+
- each folder must include its own domain objects, contracts, and procedures
|
|
21
|
+
- forbid imports from other domains' **internal** logic or types
|
|
22
|
+
- instead, expose explicit interfaces or shared types through `contracts/`, `shared/`, or stitched artifacts
|
|
23
|
+
- ensure that each context is **autonomous** and testable in isolation
|
|
24
|
+
- domain folders must never reach into another folder's `db/`, `logic/`, or `utils/`
|
|
25
|
+
- stitched logic must route between contexts via artifacts or high-trust gateways
|
|
26
|
+
- never directly call a foreign context’s service or procedure unless it is exported as a contract
|
|
27
|
+
|
|
28
|
+
.enforcement:
|
|
29
|
+
- any import of another domain’s internal file or model = BLOCKER
|
|
30
|
+
- procedures must not assume or enforce foreign invariants directly
|
|
31
|
+
- stitched logic must respect bounded context ownership — no direct mutation of another domain's stash
|
|
32
|
+
|
|
33
|
+
.definitions:
|
|
34
|
+
- **bounded context** = a named scope of ownership over a domain's concepts, contracts, and behaviors
|
|
35
|
+
- **single responsibility** = a context may only solve problems related to its own domain
|
|
36
|
+
- **low-trust contract** = cross-context interactions must rely only on validated inputs and canonical exports
|
|
37
|
+
|
|
38
|
+
.examples:
|
|
39
|
+
|
|
40
|
+
.positive:
|
|
41
|
+
- `job/JobQuote.ts` imports `CustomerPhoneUpdate` from `contracts/`, not from `customer/logic/`
|
|
42
|
+
- `invoice/` has its own `InvoiceDraft`, `InvoiceFinal`, and `generateInvoice.ts`
|
|
43
|
+
- `routes/submitJob.ts` orchestrates job + invoice by stitching, not by importing both
|
|
44
|
+
|
|
45
|
+
.negative:
|
|
46
|
+
- `job.ts` imports `from '../../invoice/utils.ts'` ⛔ reach-in
|
|
47
|
+
- `invoiceService.ts` directly updates `customer.email` ⛔ cross-context mutation
|
|
48
|
+
- `customer.ts` imports `JobQuote` and infers state ⛔ ownership violation
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- src
|
|
53
|
+
- contract
|
|
54
|
+
- endpoints // public endpoints, deployed and exposed publically
|
|
55
|
+
- commands // internal operations, locally ran
|
|
56
|
+
- data
|
|
57
|
+
- sdks // the sdks used by this service
|
|
58
|
+
- daos // the daos owned by this service
|
|
59
|
+
- domain
|
|
60
|
+
- objects // the domain resources
|
|
61
|
+
- logic // the domain mechanisms
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.tactic = arch:directional-deps
|
|
2
|
+
|
|
3
|
+
.what
|
|
4
|
+
enforce strict top-down dependency flow across layered system boundaries — lower layers must never import from higher ones
|
|
5
|
+
|
|
6
|
+
.scope
|
|
7
|
+
- applies to all folders and modules within `src/`
|
|
8
|
+
- required for `contract/`, `access/`, `domain.objects/`, `domain.operations/`
|
|
9
|
+
- governs imports, module references, and stitched flow boundaries
|
|
10
|
+
|
|
11
|
+
.why
|
|
12
|
+
- upholds **separation of concerns** and enforces **clean architecture**
|
|
13
|
+
- prevents circular dependencies and tangled system boundaries
|
|
14
|
+
- makes each layer easier to test, replace, and understand in isolation
|
|
15
|
+
- aligns with `arch:bounded-contexts` and enables predictable top-down orchestration
|
|
16
|
+
|
|
17
|
+
.structure
|
|
18
|
+
\`\`\`
|
|
19
|
+
src/
|
|
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
|
+
\`\`\`
|
|
36
|
+
|
|
37
|
+
.how
|
|
38
|
+
- each layer may depend **only on the layers below it**
|
|
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
|
|
48
|
+
|
|
49
|
+
.enforcement
|
|
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
|
|
56
|
+
|
|
57
|
+
.examples
|
|
58
|
+
|
|
59
|
+
✅ positive
|
|
60
|
+
\`\`\`ts
|
|
61
|
+
// contract/endpoints/sendInvoice.ts
|
|
62
|
+
import { generateInvoice } from '@/domain.operations/generateInvoice';
|
|
63
|
+
import { invoiceDao } from '@/access/daos/invoiceDao';
|
|
64
|
+
|
|
65
|
+
// access/daos/jobDao.ts
|
|
66
|
+
import { Job } from '@/domain.objects/Job';
|
|
67
|
+
|
|
68
|
+
// domain.operations/calculateTotal.ts
|
|
69
|
+
import { LineItem } from '@/domain.objects/LineItem';
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
❌ negative
|
|
73
|
+
\`\`\`ts
|
|
74
|
+
// domain.objects/Customer.ts
|
|
75
|
+
import { customerDao } from '@/access/daos/customerDao'; // ⛔ illegal upward import
|
|
76
|
+
|
|
77
|
+
// domain.operations/InvoiceOps.ts
|
|
78
|
+
import { runFlow } from '@/contract/commands'; // ⛔ direction violation
|
|
79
|
+
|
|
80
|
+
// access/svcs/sdkWrapper.ts
|
|
81
|
+
import { dispatchFlow } from '@/contract/'; // ⛔ bottom-up reference
|
|
82
|
+
\`\`\`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.tactic = arch:domain-driven-design
|
|
2
|
+
|
|
3
|
+
.what = model all business logic using well-defined domain objects, procedures, and contracts — never loose bags of properties
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- applies to all business logic, application services, types, data flows, and stateful modules
|
|
7
|
+
- especially enforced within core domain folders and stitched procedures
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- ensures the system is built from **recognizable domain concepts**
|
|
11
|
+
- improves correctness through **runtime validation**
|
|
12
|
+
- enables identity comparison, change detection, and immutability by default
|
|
13
|
+
- prevents "bag-of-words" logic and accidental complexity
|
|
14
|
+
|
|
15
|
+
.how:
|
|
16
|
+
- always use `domain-objects` to model the domain
|
|
17
|
+
- use `DomainLiteral<T>` for immutable value objects
|
|
18
|
+
- use `DomainEntity<T>` when identity and lifecycle matter
|
|
19
|
+
- use `DomainEvent<T>` for structured domain signals
|
|
20
|
+
- **never** pass raw `{ prop1, prop2, ... }` bags across procedure boundaries
|
|
21
|
+
- define and reuse domain objects instead
|
|
22
|
+
- compose nested models with `.nested` and `.build`
|
|
23
|
+
- distill your domain into:
|
|
24
|
+
- **domain objects** = nouns (e.g. `Customer`, `Invoice`, `RocketShip`)
|
|
25
|
+
- **domain procedures** = verbs (e.g. `generateInvoice`, `submitPayment`)
|
|
26
|
+
- **domain contracts** = shapes of external interfaces or cross-context bridges
|
|
27
|
+
- always prefer the most **specific and canonical domain object** for a given use case
|
|
28
|
+
- if a `Customer`, `Invoice`, or `Quote` already exists, reuse it — don’t make a new shape
|
|
29
|
+
- support **runtime validation** with schemas (Zod, Joi, Yup)
|
|
30
|
+
- all domain objects with external inputs must be validated on instantiation
|
|
31
|
+
- define `.unique` and `.updatable` fields for identity and change tracking
|
|
32
|
+
- expose immutable behaviors using `.clone()` and `.build()` for safe updates
|
|
33
|
+
- procedures with more than 2 scalar arguments representing **data** should be refactored to use a domain object
|
|
34
|
+
- control/options args are acceptable when clearly scoped (e.g. `{ dryRun: true }`)
|
|
35
|
+
|
|
36
|
+
.enforcement:
|
|
37
|
+
- code reviews must block untyped or loosely typed `{}` logic
|
|
38
|
+
- procedures with more than 2 scalar arguments should be refactored to use domain objects
|
|
39
|
+
- stitched routes and service layers must pass domain objects explicitly
|
|
40
|
+
- tests should validate domain behavior, not just JSON shape
|
|
41
|
+
- imports from `domain-objects` are required for any core domain concept
|
|
42
|
+
|
|
43
|
+
.examples:
|
|
44
|
+
|
|
45
|
+
.positive:
|
|
46
|
+
- `class Customer extends DomainEntity<Customer> implements Customer {}`
|
|
47
|
+
- `new JobQuote({ customer, lineItems, total })`
|
|
48
|
+
- `generateInvoice({ invoice: Invoice })` instead of `generateInvoice({ id, total, customerId })`
|
|
49
|
+
- `LeadSource.build({ type: 'referral' })` with schema validation on instantiation
|
|
50
|
+
- `customer.clone({ phone: '555-1234' })` for safe mutation
|
|
51
|
+
|
|
52
|
+
.negative:
|
|
53
|
+
- `{ name, email, address }` passed between modules without a domain object
|
|
54
|
+
- `function updateUser(name, email, phone)` instead of `updateCustomerInfo(Customer)`
|
|
55
|
+
- `type UserData = { ... }` duplicating `Customer` shape
|
|
56
|
+
- storing JSON blobs that replicate existing domain models
|
|
57
|
+
- `update()` method used on raw DTOs
|
|
58
|
+
|
|
59
|
+
.links:
|
|
60
|
+
- see also: `name:ubiqlang`
|
|
61
|
+
- library: https://www.npmjs.com/package/domain-objects
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.tactic = name:ubiqlang
|
|
2
|
+
|
|
3
|
+
.what = enforce a rigorous, domain-driven naming system rooted in ubiquitous language
|
|
4
|
+
.where:
|
|
5
|
+
- ubiquitous language = the shared, unambiguous vocabulary used by both domain experts and developers
|
|
6
|
+
- this tactic applies to all names: types, variables, functions, slugs, and folders
|
|
7
|
+
|
|
8
|
+
.why:
|
|
9
|
+
- eliminates ambiguity and cognitive friction
|
|
10
|
+
- ensures that everyone speaks the same language — in code, UI, tests, and docs
|
|
11
|
+
- prevents synonym drift (e.g., "client" vs "customer") and overload traps (e.g., "update" meaning 3 things)
|
|
12
|
+
|
|
13
|
+
.how:
|
|
14
|
+
- eliminate synonyms
|
|
15
|
+
- choose one canonical word per concept (e.g., always use `customer`, never `client`, `user`, or `account`)
|
|
16
|
+
- eliminate overloads
|
|
17
|
+
- each term must refer to one concept only (e.g., avoid using `update` for both "save data" and "fetch latest")
|
|
18
|
+
- use consistent noun-verb stacking that mirrors domain intent (e.g., `customerPhoneUpdate`, not `editPhoneNumber`)
|
|
19
|
+
- whenever a new term is introduced:
|
|
20
|
+
- define its interface, expected shape, and role
|
|
21
|
+
- document its meaning clearly and visibly (ideally in context or hover docs)
|
|
22
|
+
- ensure its usage is verified across type definitions, business rules, and communication flows
|
|
23
|
+
|
|
24
|
+
.examples:
|
|
25
|
+
.positive:
|
|
26
|
+
- `customer` instead of `client`, `user`, or `buyer`
|
|
27
|
+
- `jobQuote` as the single term for estimates/proposals
|
|
28
|
+
- `leadCapture` as the canonical action for inbound lead collection
|
|
29
|
+
- `customerPhoneUpdate` for updating a phone number
|
|
30
|
+
- `invoiceDraft` and `invoiceFinal` for two distinct invoice states
|
|
31
|
+
|
|
32
|
+
.negative:
|
|
33
|
+
- `client`, `user`, `account`, `buyer` all referring to the same actor
|
|
34
|
+
- `editCustomerPhone`, `changePhone`, `updateNumber` used interchangeably
|
|
35
|
+
- `job` used for both a requested service and a completed one
|
|
36
|
+
- `update()` overloaded to mean save, patch, sync, or refresh
|
|
37
|
+
- `quote`, `estimate`, `proposal`, and `bid` all floating without clear hierarchy
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
- ### **args:input-context**
|
|
2
|
+
- **rule**: all procedures must follow the signature `(input, context?)`
|
|
3
|
+
- **input** and **context** must be destructurable objects
|
|
4
|
+
- positional args beyond `(input, context)` are **forbidden**
|
|
5
|
+
- inline callbacks may be exempt if anonymous + tightly scoped
|
|
6
|
+
- **example:**
|
|
7
|
+
```ts
|
|
8
|
+
export const doWork = async (input, context) => { ... } // ✅
|
|
9
|
+
export function legacyFunc(a, b) {} // ⛔
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
- ### **funcs:arrow-only**
|
|
15
|
+
- **rule**: all procedures must be declared as arrow functions
|
|
16
|
+
- `function` keyword is **disallowed**, even for exports
|
|
17
|
+
- object methods are allowed only inside class or API contracts
|
|
18
|
+
- always destructure `input` as first argument when applicable
|
|
19
|
+
- **example:**
|
|
20
|
+
```ts
|
|
21
|
+
const getName = ({ name }) => name; // ✅
|
|
22
|
+
export function getName(name) { return name } // ⛔
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
- ### **comment-discipline**
|
|
28
|
+
- **procedure headers**: every named procedure must begin with a block comment:
|
|
29
|
+
```ts
|
|
30
|
+
/**
|
|
31
|
+
* .what = intent in 1 line
|
|
32
|
+
* .why = purpose in ≤ 3 lines
|
|
33
|
+
* .note = optional caveats (concise)
|
|
34
|
+
*/
|
|
35
|
+
```
|
|
36
|
+
- missing `.what` or `.why` = **blocker**
|
|
37
|
+
|
|
38
|
+
- **code paragraphs**: every group of related lines must begin with a one-line `//` summary
|
|
39
|
+
- must explain *why*, not echo the code
|
|
40
|
+
- **multiline `//` comments are forbidden**
|
|
41
|
+
- if more than one line is needed → extract into a named procedure
|
|
42
|
+
- comment must be preceded by a newline
|
|
43
|
+
|
|
44
|
+
- **example:**
|
|
45
|
+
```ts
|
|
46
|
+
/**
|
|
47
|
+
* .what = proposes code by iterating until clean
|
|
48
|
+
* .why = ensures reviewer only sees finalized artifacts
|
|
49
|
+
*/
|
|
50
|
+
export const proposeCode = async ({ threads }) => {
|
|
51
|
+
// run mechanic feedback loop
|
|
52
|
+
const result = await runIterateCycle({ threads });
|
|
53
|
+
|
|
54
|
+
// return artifact for downstream route
|
|
55
|
+
return result.threads.artist.context.stash.art.inflight;
|
|
56
|
+
};
|
|
57
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.tactic = flow:fail-fast
|
|
2
|
+
|
|
3
|
+
.what = enforce fail-fast logic using early exits and HelpfulError subclasses to reject invalid state or input immediately
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- required in all stitched logic, business procedures, and service flows
|
|
7
|
+
- applies to guard checks, validations, and branching paths
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- improves readability by collapsing failure paths early
|
|
11
|
+
- eliminates nested branches and lets core logic shine
|
|
12
|
+
- increases safety by clearly documenting and halting on invalid input
|
|
13
|
+
- makes bugs easier to debug with rich context using `helpful-errors`
|
|
14
|
+
|
|
15
|
+
.how:
|
|
16
|
+
- use **early returns or throws** for all guard clauses
|
|
17
|
+
- never use `if (...) else` or deep nesting to control flow
|
|
18
|
+
- prefer `UnexpectedCodePathError.throw(...)` for internal invariant violations
|
|
19
|
+
- these signal logic errors that “should never happen”
|
|
20
|
+
- prefer `BadRequestError.throw(...)` for rejecting invalid input or user requests
|
|
21
|
+
- these signal invalid calls, not system failures
|
|
22
|
+
- use `.throw(...)` syntax for clean 1-liners inside nullish chains or short circuits
|
|
23
|
+
- include **context objects** in all thrown errors to aid debugging
|
|
24
|
+
- validate error behavior in tests using `getError(...)`
|
|
25
|
+
|
|
26
|
+
.code structure:
|
|
27
|
+
- treat each guard block as a **code paragraph**
|
|
28
|
+
- must be preceded by a comment summarizing *why* the guard exists
|
|
29
|
+
- blank line after each guard before continuing main logic
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
// reject if user does not exist
|
|
33
|
+
if (!user) return BadRequestError.throw('user not found', { userUuid });
|
|
34
|
+
|
|
35
|
+
// halt if state is invalid
|
|
36
|
+
if (!input.customer.phone)
|
|
37
|
+
UnexpectedCodePathError.throw('customer lacks phone, invalid state', { customer });
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.tactic = proc:require-idempotency
|
|
2
|
+
|
|
3
|
+
.what = all procedures must be idempotent unless explicitly marked otherwise — calling the same logic twice must not cause double effects
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- applies to all stitched procedures, exports, and service logic
|
|
7
|
+
- especially required for write operations, upserts, queues, retries, and workflows
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- prevents duplicate side effects from retries, race conditions, or concurrent execution
|
|
11
|
+
- enables safe reruns, resume-after-failure, and audit-friendly execution
|
|
12
|
+
- makes all logic safer to test, stitch, compose, and scale
|
|
13
|
+
|
|
14
|
+
.how:
|
|
15
|
+
- all procedures must **guard against re-entry**
|
|
16
|
+
- check whether the action has already occurred before executing
|
|
17
|
+
- e.g., `if (invoice.status === 'FINAL') return invoice;`
|
|
18
|
+
- any **side-effect-producing operation** must:
|
|
19
|
+
- check for an existing result (e.g. existing record, idempotency key, state flag)
|
|
20
|
+
- return early if already complete
|
|
21
|
+
- **external writes** (db, api, fs, queues) must be safe to call multiple times without duplication
|
|
22
|
+
- use upserts, conflict-ignore inserts, or external idempotency tokens
|
|
23
|
+
- **procedures that are not idempotent** must be marked:
|
|
24
|
+
- include `.note = non-idempotent` in header comment
|
|
25
|
+
- include a guard against accidental retries (e.g. check `context.traceId`)
|
|
26
|
+
- stitched logic should not assume “exactly once” semantics — instead, enforce “at-least once, safely”
|
|
27
|
+
|
|
28
|
+
.enforcement:
|
|
29
|
+
- procedures with `set`, `push`, `post`, or other side-effect verbs must show idempotency check
|
|
30
|
+
- non-idempotent procedures must be annotated with a `.note`
|
|
31
|
+
- workflows and retry logic must assume re-entry and prove safety
|
|
32
|
+
- test cases must show repeat-calling has no additional effect
|
|
33
|
+
|
|
34
|
+
.examples:
|
|
35
|
+
|
|
36
|
+
.positive:
|
|
37
|
+
```ts
|
|
38
|
+
// skip if already finalized
|
|
39
|
+
if (invoice.status === 'FINAL') return invoice;
|
|
40
|
+
|
|
41
|
+
// finalize invoice
|
|
42
|
+
const updated = invoice.clone({ status: 'FINAL' });
|
|
43
|
+
await saveInvoice(updated);
|
|
44
|
+
return updated;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
// deduplicate outbound message
|
|
49
|
+
const alreadySent = await Message.find({ idempotencyKey });
|
|
50
|
+
if (alreadySent) return alreadySent;
|
|
51
|
+
|
|
52
|
+
await sendMessage({ to, body });
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
.negative:
|
|
56
|
+
```ts
|
|
57
|
+
await sendEmail(input); // ⛔ no check for previous send
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
const saved = await insertLog({ ... }) // ⛔ may insert duplicate on retry
|
|
62
|
+
```
|
|
63
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.tactic = vars:require-immutable
|
|
2
|
+
|
|
3
|
+
.what = require all code to use immutable variables, objects, and update patterns — mutation is a blocker
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- applies to all variable declarations, function arguments, object updates, and data flows
|
|
7
|
+
- enforced in all modules, logic layers, stitched routes, and tests
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- eliminates side effects from shared mutable state
|
|
11
|
+
- enables predictable execution, safer concurrency, and undoable flows
|
|
12
|
+
- enforces functional purity and simplifies debugging
|
|
13
|
+
- guarantees compatibility with clone-based and parallel architectures
|
|
14
|
+
|
|
15
|
+
.how:
|
|
16
|
+
- all bindings must use `const`; `let` or `var` are **forbidden** unless explicitly scoped to a mutation block
|
|
17
|
+
- input arguments must never be mutated — always treat as read-only
|
|
18
|
+
- objects must never be mutated in place:
|
|
19
|
+
- use object spreads (`{ ...original, field }`) or `.clone()` on domain objects
|
|
20
|
+
- arrays must not be mutated directly:
|
|
21
|
+
- never use `.push()`, `.pop()`, `.splice()`, or `.sort()` on the original array
|
|
22
|
+
- use spread + map/filter/reduce or copy before mutating
|
|
23
|
+
- use `withImmute()` and `.clone()` for all updates to domain objects
|
|
24
|
+
- avoid shared reference mutation:
|
|
25
|
+
- never change shared singletons or top-level config objects after import
|
|
26
|
+
- if mutation is unavoidable (e.g. caching, metrics), isolate it in a clearly scoped, documented zone with `.note = deliberate mutation` comment
|
|
27
|
+
|
|
28
|
+
.enforcement:
|
|
29
|
+
- `let`, `var`, and in-place mutation are blockers unless specifically exempted
|
|
30
|
+
- mutation of input arguments or shared objects must fail review
|
|
31
|
+
- mutation of domain object instances is forbidden; use `.clone()` instead
|
|
32
|
+
- functions with mutation behavior must be annotated and justified
|
|
33
|
+
|
|
34
|
+
.examples:
|
|
35
|
+
|
|
36
|
+
.positive:
|
|
37
|
+
- `const updated = { ...original, status: 'complete' }`
|
|
38
|
+
- `const newInvoice = invoice.clone({ total: 1200 })`
|
|
39
|
+
- `const next = [...current].sort(byDate)`
|
|
40
|
+
|
|
41
|
+
.negative:
|
|
42
|
+
- `let count = 0; count++`
|
|
43
|
+
- `input.customer.name = 'bob'` // ⛔ input mutation
|
|
44
|
+
- `config.debug = false` // ⛔ shared singleton mutation
|
|
45
|
+
- `arr.push(1)` // ⛔ in-place array mutation
|
|
46
|
+
|
|
47
|
+
.links:
|
|
48
|
+
- see also: `arch:immutable-core`, `args:input-context`, `domain-objects.withImmute`
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.tactic = flow:narrative
|
|
2
|
+
|
|
3
|
+
.what = structure all logic as flat, linear code paragraphs — never nested branches — to improve clarity and scanability
|
|
4
|
+
|
|
5
|
+
.scope:
|
|
6
|
+
- applies to all procedural code: stitched logic, exports, and internal helpers
|
|
7
|
+
- required for all conditional flows, validation paths, and stateful transformations
|
|
8
|
+
|
|
9
|
+
.why:
|
|
10
|
+
- reduces visual complexity by eliminating indentation creep
|
|
11
|
+
- aligns code with natural narrative flow: guard clauses → main path → fallback
|
|
12
|
+
- makes logic easier to read, debug, test, and extend
|
|
13
|
+
- allows each "paragraph" of logic to be summarized with a single comment
|
|
14
|
+
|
|
15
|
+
.how:
|
|
16
|
+
- eliminate `if/else` and nested `if` blocks entirely
|
|
17
|
+
- use early returns (`if (x) return`, `if (error) throw`) instead
|
|
18
|
+
- prefer `return`, `throw`, or `continue` to flatten control flow
|
|
19
|
+
- define and use **code paragraphs**:
|
|
20
|
+
- a group of 1–5 lines that do one thing together
|
|
21
|
+
- each paragraph must be preceded by a `//` one-line title explaining **what** or **why**
|
|
22
|
+
- paragraph titles act like section headers — they are not optional
|
|
23
|
+
- paragraphs must be separated by a blank line
|
|
24
|
+
- paragraph comments must **not** describe how the code works — only why this paragraph exists
|
|
25
|
+
- deeply nested branches should be broken into separate procedures if needed
|
|
26
|
+
|
|
27
|
+
.enforcement:
|
|
28
|
+
- `else` and nested `if` blocks are blockers and must be refactored
|
|
29
|
+
- any multi-line logic block without a paragraph title is a violation
|
|
30
|
+
- paragraph comments must be one-liners — multiline `//` is forbidden (see `comment-discipline`)
|
|
31
|
+
- code that reads like a decision tree must be flattened into a readable narrative
|
|
32
|
+
|
|
33
|
+
.definitions:
|
|
34
|
+
- **code paragraph** = a contiguous block of related lines, preceded by a single-line `//` title and separated by a blank line
|
|
35
|
+
```ts
|
|
36
|
+
// validate input format
|
|
37
|
+
const isValid = validateShape(input);
|
|
38
|
+
if (!isValid) return failure();
|
|
39
|
+
|
|
40
|
+
// attempt fallback resolution
|
|
41
|
+
const resolved = tryToResolve(input);
|
|
42
|
+
if (!resolved) UnexpectedCodePathError.throw('resolution failed');
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
.examples:
|
|
46
|
+
|
|
47
|
+
.positive:
|
|
48
|
+
```ts
|
|
49
|
+
// return early if invalid
|
|
50
|
+
if (!input.email) return failure();
|
|
51
|
+
|
|
52
|
+
// check for banned domains
|
|
53
|
+
if (input.email.endsWith('@spam.com')) return forbidden();
|
|
54
|
+
|
|
55
|
+
// process verified email
|
|
56
|
+
const result = handleVerifiedEmail(input.email);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
.negative:
|
|
60
|
+
```ts
|
|
61
|
+
if (!input.email) {
|
|
62
|
+
return failure();
|
|
63
|
+
} else {
|
|
64
|
+
if (input.email.endsWith('@spam.com')) {
|
|
65
|
+
return forbidden();
|
|
66
|
+
} else {
|
|
67
|
+
const result = handleVerifiedEmail(input.email);
|
|
68
|
+
...
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
.links:
|
|
74
|
+
- see also: `comment-discipline`, `funcs:shape-and-signal`, `flow:guard-first`
|