rhachet-roles-ehmpathy 1.13.2 → 1.13.3
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/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 +235 -0
- package/dist/logic/roles/mechanic/.skills/claude.hooks/forbid.stderr.redirect.sh +57 -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 +156 -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,67 @@
|
|
|
1
|
+
### .tactic = codestyle:single-responsibility
|
|
2
|
+
|
|
3
|
+
#### .what
|
|
4
|
+
enforce that every code file and procedure has a singular, clearly-defined responsibility
|
|
5
|
+
|
|
6
|
+
#### .why
|
|
7
|
+
- makes code easier to locate, understand, and test
|
|
8
|
+
- ensures separation of concerns between logic, validation, and orchestration
|
|
9
|
+
- prevents files from bloating with unrelated logic or creeping concerns
|
|
10
|
+
|
|
11
|
+
#### .rules
|
|
12
|
+
|
|
13
|
+
✅ required
|
|
14
|
+
- every file must export **exactly one** named procedure
|
|
15
|
+
- filename must match the exported procedure
|
|
16
|
+
- all logic in the file must directly support the procedure’s **domain intent**
|
|
17
|
+
- runtime typechecks are only allowed **if** the file's sole purpose is validation
|
|
18
|
+
|
|
19
|
+
❌ forbidden
|
|
20
|
+
- more than one exported procedure per file
|
|
21
|
+
- co-locating validation, parsing, or orchestration logic alongside domain logic
|
|
22
|
+
- runtime type assertions or guards inside general-purpose logic
|
|
23
|
+
- dead code, TODOs, or unrelated comments in the file
|
|
24
|
+
- guards that apply redundant runtime typechecks (we trust typescript)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#### .examples
|
|
28
|
+
|
|
29
|
+
**✅ good**
|
|
30
|
+
```ts
|
|
31
|
+
// getCustomerInvoices.ts
|
|
32
|
+
/**
|
|
33
|
+
* .what = retrieves all invoices for a given customer
|
|
34
|
+
* .why = isolates domain logic for invoice lookup by customer
|
|
35
|
+
*/
|
|
36
|
+
export const getCustomerInvoices = ({ customerId }: { customerId: string }) => {
|
|
37
|
+
return invoiceDao.findMany({ customerId });
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
**⛔ bad**
|
|
44
|
+
```ts
|
|
45
|
+
// customerUtils.ts
|
|
46
|
+
// utility file that contains many things
|
|
47
|
+
|
|
48
|
+
export const getCustomerInvoices = (...) => { ... }
|
|
49
|
+
|
|
50
|
+
export const validateCustomer = (...) => { ... } // ❌ multiple responsibilities
|
|
51
|
+
|
|
52
|
+
// random comment about edge cases — ❌ unrelated noise
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
**⛔ bad**
|
|
58
|
+
```ts
|
|
59
|
+
// getCustomerInvoices.ts
|
|
60
|
+
export const getCustomerInvoices = ({ customerId }: { customerId: string }) => {
|
|
61
|
+
if (typeof customerId !== 'string') // ❌ redundant runtime check
|
|
62
|
+
throw new Error('bad id');
|
|
63
|
+
|
|
64
|
+
return invoiceDao.findMany({ customerId });
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
package/dist/logic/roles/mechanic/.briefs/codestyle/flow.transformers_over_conditionals.[lesson].md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 🧩 .brief.lesson: prefer transformer:pipelines over conditional:mazes
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## 🌳 conditional:mazes
|
|
6
|
+
|
|
7
|
+
you treat each case as a fork in the road:
|
|
8
|
+
|
|
9
|
+
\`\`\`ts
|
|
10
|
+
if (dotfileNoExt) {
|
|
11
|
+
return ...
|
|
12
|
+
} else if (hasExt) {
|
|
13
|
+
return ...
|
|
14
|
+
} else {
|
|
15
|
+
return ...
|
|
16
|
+
}
|
|
17
|
+
\`\`\`
|
|
18
|
+
|
|
19
|
+
- **pros**
|
|
20
|
+
- explicit, easy to follow with 2–3 cases
|
|
21
|
+
|
|
22
|
+
- **cons**
|
|
23
|
+
- grows fast: every new edge case means a new twist in the maze
|
|
24
|
+
- fragmented: “which corridor am i in right now?”
|
|
25
|
+
- more test cases: you need one per branch
|
|
26
|
+
|
|
27
|
+
> conditionals are a **maze** — each new edge case adds another turn,
|
|
28
|
+
> and you can get lost tracing which branch leads where.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🌊 transformer:pipelines
|
|
33
|
+
|
|
34
|
+
normalize the data into a *sequence* and let transformations filter, drop, or join pieces:
|
|
35
|
+
|
|
36
|
+
\`\`\`ts
|
|
37
|
+
return [parts.name, \`i\${attempt}\`, parts.ext.replace(/^\./, '') || null]
|
|
38
|
+
.filter(isPresent)
|
|
39
|
+
.join('.');
|
|
40
|
+
\`\`\`
|
|
41
|
+
|
|
42
|
+
- **pros**
|
|
43
|
+
- handles dotfiles, no-ext, and normal files with the same flow
|
|
44
|
+
- future-proof: if `ext` is empty, the pipeline just drops it
|
|
45
|
+
- fewer "paths" → less test explosion
|
|
46
|
+
- intent is clear: *“take parts, add attempt, add ext if present, join with dots”*
|
|
47
|
+
|
|
48
|
+
- **cons**
|
|
49
|
+
- sometimes less explicit about special rules (e.g. `.env` → `env.i7`)
|
|
50
|
+
- requires discipline: not every problem is pipeline-friendly
|
|
51
|
+
|
|
52
|
+
> pipelines are **transformers** — they take data in, apply consistent stages,
|
|
53
|
+
> and yield output without needing to remember the map.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🔍 why pipelines shine here
|
|
58
|
+
|
|
59
|
+
1. **fewer moving parts** — single expression instead of scattered branches
|
|
60
|
+
2. **symmetry** — all inputs flow through the same transformation
|
|
61
|
+
3. **readability** — you immediately see the intent
|
|
62
|
+
4. **testability** — one flow, many inputs, fewer branches to cover
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 🧩 comparison
|
|
67
|
+
|
|
68
|
+
### conditional:maze
|
|
69
|
+
\`\`\`ts
|
|
70
|
+
if (ext) {
|
|
71
|
+
return \`\${name}.i\${attempt}.\${ext}\`;
|
|
72
|
+
}
|
|
73
|
+
if (dotfile) {
|
|
74
|
+
return \`\${base.slice(1)}.i\${attempt}\`;
|
|
75
|
+
}
|
|
76
|
+
return \`\${base}.i\${attempt}\`;
|
|
77
|
+
\`\`\`
|
|
78
|
+
|
|
79
|
+
### transformer:pipeline
|
|
80
|
+
\`\`\`ts
|
|
81
|
+
return [name, \`i\${attempt}\`, ext?.replace(/^\./, '')]
|
|
82
|
+
.filter(Boolean)
|
|
83
|
+
.join('.');
|
|
84
|
+
\`\`\`
|
|
85
|
+
|
|
86
|
+
- pipeline covers **all cases at once**
|
|
87
|
+
- conditional maze scatters logic across multiple passages
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🔑 general lesson
|
|
92
|
+
|
|
93
|
+
> **prefer transformer:pipelines over conditional:mazes**
|
|
94
|
+
|
|
95
|
+
- replace `if/else` with **optional data elements**
|
|
96
|
+
- use a pipeline (`map` / `filter` / `join`) to combine them
|
|
97
|
+
- outcome: shorter, more composable, easier to test, harder to get lost
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
### .tactic = args:input-context
|
|
2
|
+
|
|
3
|
+
#### .what
|
|
4
|
+
enforce hard requirement that all procedure args to follow the canonical pattern: `(input, context?)` — even for simple one-liners
|
|
5
|
+
|
|
6
|
+
#### .why
|
|
7
|
+
- promotes long-term clarity and change-resilience over short-term brevity
|
|
8
|
+
- prevents positional argument confusion
|
|
9
|
+
- supports context injection without argument churn
|
|
10
|
+
- aligns with domain patterns: input = upstream data, context = runtime environment
|
|
11
|
+
- enables safe refactoring and consistent documentation across codebase
|
|
12
|
+
|
|
13
|
+
#### .where
|
|
14
|
+
- applies to **all function definitions** (sync or async)
|
|
15
|
+
- required for all exported and internal functions in production code
|
|
16
|
+
- expected in tests, hooks, utils, and logic modules
|
|
17
|
+
- only anonymous inline callbacks are **exempt** if tightly scoped
|
|
18
|
+
|
|
19
|
+
#### .how
|
|
20
|
+
|
|
21
|
+
##### ✅ required
|
|
22
|
+
- every function must accept exactly:
|
|
23
|
+
- one `input` arg — a destructurable object
|
|
24
|
+
- optional second `context` arg — also a destructurable object
|
|
25
|
+
|
|
26
|
+
- **hard requirement** — applies even to trivial utilities, pure transforms, and data extractors
|
|
27
|
+
|
|
28
|
+
- `input` does **not** need to be destructured at the function boundary; shape like `(input: { ... })` is fine
|
|
29
|
+
- `function` keyword is forbidden unless implementing class methods (see `.tactic:funcs:arrow-only`)
|
|
30
|
+
|
|
31
|
+
##### ❌ forbidden
|
|
32
|
+
- more than 2 positional args
|
|
33
|
+
- non-destructurable inputs
|
|
34
|
+
- context blended into input
|
|
35
|
+
- inline positional args unless anonymous
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### .examples
|
|
41
|
+
|
|
42
|
+
##### ✅ positive
|
|
43
|
+
```ts
|
|
44
|
+
// standard function
|
|
45
|
+
export const genRoute = async (input: { slug: string }, context?: { traceId?: string }) => { ... }
|
|
46
|
+
|
|
47
|
+
// internal logic
|
|
48
|
+
const updateUser = ({ userId }: { userId: string }, context: { userDao: UserDao }) => { ... }
|
|
49
|
+
|
|
50
|
+
// test
|
|
51
|
+
expect(hasChanges({ before, after })).toBe(true);
|
|
52
|
+
```ts
|
|
53
|
+
|
|
54
|
+
##### ❌ negative
|
|
55
|
+
```ts
|
|
56
|
+
export function doThing(a, b, c) {} // ⛔ positional args & function keyword
|
|
57
|
+
|
|
58
|
+
handleRequest(input, options, env) // ⛔ more than two args
|
|
59
|
+
|
|
60
|
+
export const getTotal = (invoice) => ... // ⛔ input not typed
|
|
61
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 🧩 .brief: `args:inline-input`
|
|
2
|
+
|
|
3
|
+
## .what
|
|
4
|
+
**`args:inline-input`** is a declaration style for function arguments where the primary argument is a **single `input` object** with **inline type annotations**.
|
|
5
|
+
|
|
6
|
+
\`\`\`ts
|
|
7
|
+
export const doSomething = (input: { foo: string; bar: number }): void => {
|
|
8
|
+
// ...
|
|
9
|
+
};
|
|
10
|
+
\`\`\`
|
|
11
|
+
|
|
12
|
+
- **inline types**: the shape of `input` is declared directly at the point of use, not as a separate named type (unless truly reused across contexts).
|
|
13
|
+
- **non-destructured**: `input` remains intact in the parameter list.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## .why
|
|
18
|
+
this pattern maximizes **maintainability** and **readability** by:
|
|
19
|
+
|
|
20
|
+
1. **keeping type info local**
|
|
21
|
+
- no need to jump to another file or scroll to find the interface/type definition.
|
|
22
|
+
- changes to argument structure are quick and visible in one place.
|
|
23
|
+
|
|
24
|
+
2. **reinforcing origin clarity**
|
|
25
|
+
- variables from `input` are always referenced as `input.foo` or `input.bar`, making their provenance explicit.
|
|
26
|
+
- this avoids ambiguity in larger scopes, especially when a function mixes locals, constants, and context values.
|
|
27
|
+
|
|
28
|
+
3. **avoiding premature fragmentation**
|
|
29
|
+
- not all shapes deserve a named type. we only extract to `type` or `interface` when the same shape is reused across multiple functions or modules.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 📏 rules
|
|
34
|
+
- declare the first parameter as `(input: { ... })` with inline types by default.
|
|
35
|
+
- destructuring is allowed **inside** the function body, never in the parameter list.
|
|
36
|
+
- optional `context` parameter follows the same pattern `(context?: { ... })` and is always second.
|
|
37
|
+
- if the type is reused in 3+ places, extract to a named `type` but keep the `input` wrapper.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ✅ example
|
|
42
|
+
|
|
43
|
+
\`\`\`ts
|
|
44
|
+
export const sendEmail = (
|
|
45
|
+
input: { to: string; subject: string; body: string },
|
|
46
|
+
context?: { retries?: number }
|
|
47
|
+
): Promise<void> => {
|
|
48
|
+
const { to, subject, body } = input;
|
|
49
|
+
// ...
|
|
50
|
+
};
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## ❌ anti-pattern
|
|
56
|
+
|
|
57
|
+
\`\`\`ts
|
|
58
|
+
// ❌ loses "input" provenance
|
|
59
|
+
export const sendEmail = ({ to, subject, body }: { to: string; subject: string; body: string }) => {};
|
|
60
|
+
|
|
61
|
+
// ❌ type drift — must look up the type definition elsewhere for basic usage
|
|
62
|
+
export const sendEmail = (input: EmailInput) => {};
|
|
63
|
+
\`\`\`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
### .tactic = funcs:arrow-only
|
|
2
|
+
|
|
3
|
+
#### .what
|
|
4
|
+
enforce that all procedures are declared using arrow functions
|
|
5
|
+
disallow use of `function` keyword for any procedure
|
|
6
|
+
|
|
7
|
+
#### .where
|
|
8
|
+
- applies to all exported and internal functions across codebase
|
|
9
|
+
- required in modules, utilities, hooks, logic, and test declarations
|
|
10
|
+
- exempt only for class methods or dynamic `this` binding (rare)
|
|
11
|
+
|
|
12
|
+
#### .why
|
|
13
|
+
- enforces lexical `this` binding for predictable behavior
|
|
14
|
+
- aligns code structure with uniform declaration style
|
|
15
|
+
- improves visual clarity and reduces syntactic noise
|
|
16
|
+
- simplifies use with higher-order functions, closures, and composability
|
|
17
|
+
|
|
18
|
+
#### .how
|
|
19
|
+
|
|
20
|
+
##### .rules
|
|
21
|
+
- use arrow syntax (`const fn = (input) => {}`) for all functions
|
|
22
|
+
- never use `function` keyword for standalone or inline functions
|
|
23
|
+
- use object methods only when tied to a `class` or API contract
|
|
24
|
+
- always destructure input as the first arg if applicable
|
|
25
|
+
|
|
26
|
+
##### .examples
|
|
27
|
+
|
|
28
|
+
###### .positive
|
|
29
|
+
```ts
|
|
30
|
+
export const setCustomerPhone = ({ customer, phone }) => {
|
|
31
|
+
return { ...customer, phone };
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const getName = (input) => input.name;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
###### .negative
|
|
39
|
+
```ts
|
|
40
|
+
function setCustomerPhone({ customer, phone }) { // ⛔ function keyword
|
|
41
|
+
return { ...customer, phone };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function doWork() { // ⛔ export with function
|
|
45
|
+
...
|
|
46
|
+
}
|
|
47
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
.tactic = mech:contract-before-implementation
|
|
3
|
+
|
|
4
|
+
.what = declare the shape and expectations of behavior (the contract) before writing its implementation
|
|
5
|
+
|
|
6
|
+
.why:
|
|
7
|
+
- forces clarity about what is being built and why
|
|
8
|
+
- prevents premature optimization and over-engineering
|
|
9
|
+
- creates a shared agreement for both the builder and consumer
|
|
10
|
+
- enables parallel work (e.g., backend + frontend, or logic + UI)
|
|
11
|
+
|
|
12
|
+
.scope:
|
|
13
|
+
- applies to procedures, stitched flows, and any domain mechanisms
|
|
14
|
+
- applies at both macro (API endpoint, service) and micro (function, component) levels
|
|
15
|
+
|
|
16
|
+
.how:
|
|
17
|
+
- always begin with a **procedure type** that defines:
|
|
18
|
+
- function signature or interface
|
|
19
|
+
- expected inputs and output shape
|
|
20
|
+
- error modes and invariants
|
|
21
|
+
- why it exists (motivation or business rule)
|
|
22
|
+
|
|
23
|
+
.examples:
|
|
24
|
+
|
|
25
|
+
✅ good
|
|
26
|
+
// domain/procedures/sendInvoice.ts
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* .what = sends an invoice to the customer and marks it as sent
|
|
30
|
+
* .why = required for customer billing compliance and automation
|
|
31
|
+
*/
|
|
32
|
+
export const sendInvoice = async ({
|
|
33
|
+
invoice,
|
|
34
|
+
customer,
|
|
35
|
+
}: {
|
|
36
|
+
invoice: Invoice;
|
|
37
|
+
customer: Customer;
|
|
38
|
+
}): Promise<{ success: true }> => {
|
|
39
|
+
// ...
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
❌ bad
|
|
43
|
+
// logic/sendInvoice.ts
|
|
44
|
+
|
|
45
|
+
export const sendInvoice = async (invoice, customer) => {
|
|
46
|
+
// suddenly starts doing 4 things and mutates stuff randomly
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
.enforcement:
|
|
50
|
+
- if a PR implements logic without any visible contract: **blocker**
|
|
51
|
+
- if types are vague or inferred (e.g. `any`, `unknown`): **blocker**
|
|
52
|
+
- if behavior differs from contract or lacks a test: **blocker**
|
|
53
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
### .tactic = tests:given-when-then
|
|
2
|
+
|
|
3
|
+
#### .what
|
|
4
|
+
use `jest` in combination with `test-fns` to structure tests with `given / when / then` hierarchy
|
|
5
|
+
|
|
6
|
+
#### .where
|
|
7
|
+
- applies to all test suites across core logic and modules
|
|
8
|
+
- required for integration tests and expected for unit tests
|
|
9
|
+
- recommended for test readability, maintainability, and intent traceability
|
|
10
|
+
|
|
11
|
+
#### .why
|
|
12
|
+
- expresses test intent and flow in human-readable structure
|
|
13
|
+
- aligns test structure with natural reasoning: context → action → result
|
|
14
|
+
- improves ability to isolate, debug, and extend test scenarios
|
|
15
|
+
- keeps test surface minimal and expressive, especially for high-context logic
|
|
16
|
+
|
|
17
|
+
#### .how
|
|
18
|
+
|
|
19
|
+
##### .rules
|
|
20
|
+
- use `describe()` for grouping related logic (e.g., a route or stitcher)
|
|
21
|
+
- use `given()` to describe the setup scenario
|
|
22
|
+
- must establish all required input (e.g., files, threads, role context)
|
|
23
|
+
- use `when()` to declare the act or trigger
|
|
24
|
+
- should define one clear execution path
|
|
25
|
+
- use `then()` to assert outcomes
|
|
26
|
+
- may include async calls, file checks, or output inspection
|
|
27
|
+
|
|
28
|
+
##### .examples
|
|
29
|
+
|
|
30
|
+
###### .positive
|
|
31
|
+
```ts
|
|
32
|
+
import { given, when, then } from 'test-fns';
|
|
33
|
+
|
|
34
|
+
given('a mechanic with ask, claim, and coderefs', () => {
|
|
35
|
+
const coderef = genArtifactGitFile({ uri: 'file.md' });
|
|
36
|
+
|
|
37
|
+
beforeEach(async () => {
|
|
38
|
+
await coderef.set({ content: '...' });
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
when('executed', () => {
|
|
42
|
+
const threads = { /* setup threads */ };
|
|
43
|
+
|
|
44
|
+
then('updates the claims artifact', async () => {
|
|
45
|
+
const result = await enweaveOneStitcher({ stitcher, threads }, context);
|
|
46
|
+
const content = await claimsArt.get();
|
|
47
|
+
expect(content).toContain('...');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
then('throws on invalid input', async () => {
|
|
51
|
+
const error = await getError(enweaveOneStitcher({ stitcher, threads: {} }, context));
|
|
52
|
+
expect(error).toBeInstanceOf(ThreadMissError)
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
when('executed', async () => { // ⛔ async not allowed in when()
|
|
60
|
+
const result = await doSomething();
|
|
61
|
+
});
|
|
62
|
+
```
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
|
|
2
|
+
### .tactic = funcs:what-why-comments
|
|
3
|
+
|
|
4
|
+
#### .what
|
|
5
|
+
require `.what` and `.why` comments to prefix every named procedure and code paragraph
|
|
6
|
+
|
|
7
|
+
#### .why
|
|
8
|
+
- improves readability for future travelers
|
|
9
|
+
- captures intent behind decisions, not just behavior
|
|
10
|
+
- speeds up audits, refactors, and onboarding
|
|
11
|
+
- reinforces consistent communication in code
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
#### .how
|
|
16
|
+
|
|
17
|
+
##### .procedure headers
|
|
18
|
+
|
|
19
|
+
every named function must begin with a jsdoc block like:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
/**
|
|
23
|
+
* .what = summarize the intent of the procedure
|
|
24
|
+
* .why = explain why it exists or why it matters
|
|
25
|
+
* .note = optional; record special behaviors, edge cases, caveats
|
|
26
|
+
*/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- mandatory for all exported procedures => this is a BLOCKER
|
|
30
|
+
- required for helpers that aren’t self-evident
|
|
31
|
+
- optional for anonymous one-liners or trivial passthroughs
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
##### .paragraph summaries
|
|
35
|
+
|
|
36
|
+
every logical paragraph (group of lines) must be prefixed with a `//` comment summarizing its purpose:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// load invoice from database, for status check later in flow
|
|
40
|
+
const invoice = await getInvoiceById(invoiceId);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- avoid duplicating code — focus on *intent*
|
|
44
|
+
- explain why something matters, not just what it is
|
|
45
|
+
- group related lines under a shared summary
|
|
46
|
+
- important: compress into one line. if a paragraph summary is multiline, then the code paragraph is complex enough to need its own procedure and testsuite
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
#### .examples
|
|
50
|
+
|
|
51
|
+
##### ✅ positive
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
/**
|
|
55
|
+
* .what = generates a proposal by iterating until a releasable version is judged
|
|
56
|
+
* .why = ensures only clean code reaches the reviewer, via mechanic feedback loop
|
|
57
|
+
*/
|
|
58
|
+
export const proposeCode = async ({ threads }) => {
|
|
59
|
+
// iterate to gather feedback and judgment on inflight code
|
|
60
|
+
const result = await runIterateCycle({ threads });
|
|
61
|
+
|
|
62
|
+
// expose artifact for downstream routes
|
|
63
|
+
return result.threads.artist.context.stash.art.inflight;
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
##### ❌ negative
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
// run flow ⛔ unclear
|
|
71
|
+
const r = await run();
|
|
72
|
+
|
|
73
|
+
return r.artifact; // ⛔ what is this? why return this?
|
|
74
|
+
|
|
75
|
+
// very long comment describing why this block exists
|
|
76
|
+
// and what it does and why it's written in this particular way
|
|
77
|
+
// suggests the code below is too complex and should be split out
|
|
78
|
+
const result = someLogic(input);
|
|
79
|
+
const adjusted = adjustResult(result);
|
|
80
|
+
const validated = validate(adjusted);
|
|
81
|
+
const final = finalize(validated);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### .where
|
|
85
|
+
|
|
86
|
+
- applies to all production code: modules, utilities, logic, and exports
|
|
87
|
+
- expected in test files for setup blocks and assertions
|
|
88
|
+
- exempt only for tiny, obviously self-contained expressions
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
|
|
2
|
+
### .tactic = comment-discipline
|
|
3
|
+
|
|
4
|
+
#### .what
|
|
5
|
+
require jsdoc style `.what` and `.why` comments to prefix every named procedure
|
|
6
|
+
require oneliner summaries of .what and why comments to precede every code paragraph
|
|
7
|
+
|
|
8
|
+
#### .why
|
|
9
|
+
- improves readability for future travelers
|
|
10
|
+
- captures intent behind decisions, not just behavior
|
|
11
|
+
- speeds up audits, refactors, and onboarding
|
|
12
|
+
- reinforces consistent communication in code
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### .comment discipline
|
|
16
|
+
|
|
17
|
+
comments are a hard requirement — they must follow precise structure and length:
|
|
18
|
+
|
|
19
|
+
✅ required
|
|
20
|
+
- /** .what, .why */ block above all named procedures
|
|
21
|
+
- // one-liner before every logical paragraph of code
|
|
22
|
+
|
|
23
|
+
❌ forbidden
|
|
24
|
+
- missing .what or .why above a procedure
|
|
25
|
+
- multiline // paragraph comments
|
|
26
|
+
- vague, redundant, or “code-shaped” comments
|
|
27
|
+
|
|
28
|
+
##### .procedure headers
|
|
29
|
+
every named function must begin with:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
/**
|
|
33
|
+
* .what = intent summary
|
|
34
|
+
* .why = reason it exists or matters
|
|
35
|
+
* .note = optional; caveats or special behavior
|
|
36
|
+
*/
|
|
37
|
+
const doThing = (input: {}, context) => { ... }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
rules:
|
|
41
|
+
- both .what and .why are mandatory — missing either = BLOCKER
|
|
42
|
+
- .what must be 1line max, clear and scan-friendly
|
|
43
|
+
- .why must be 3lines max, clear and scan-friendly
|
|
44
|
+
- .note is optional but must be concise
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
##### .code paragraphs
|
|
48
|
+
|
|
49
|
+
every meaningful block of lines must start with a one-line summary:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// load invoice and raise on pastdue
|
|
53
|
+
const invoice = await getInvoiceById(invoiceId);
|
|
54
|
+
if (invoice.status === 'PASTDUE') UnexpectedCodePathError.throw(...)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
rules:
|
|
58
|
+
- must summarize intent (why this block exists), not echo code
|
|
59
|
+
- strictly one line — if it needs more, extract into its own procedure
|
|
60
|
+
- comment must precede the code it describes and have a newline predecessor (think of it like a paragraph title)
|
|
61
|
+
|
|
62
|
+
## .examples
|
|
63
|
+
|
|
64
|
+
expected, positive examples
|
|
65
|
+
```ts
|
|
66
|
+
/**
|
|
67
|
+
* .what = generates a proposal via mechanic-reviewer feedback loop
|
|
68
|
+
* .why = ensures code reaches quality bar before review
|
|
69
|
+
*/
|
|
70
|
+
export const proposeCode = async ({ threads }) => {
|
|
71
|
+
// gather mechanic feedback through iteration
|
|
72
|
+
const result = await runIterateCycle({ threads });
|
|
73
|
+
|
|
74
|
+
// expose artifact for downstream use
|
|
75
|
+
return result.threads.artist.context.stash.art.inflight;
|
|
76
|
+
};
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
forbidden, negative examples
|
|
81
|
+
```ts
|
|
82
|
+
// missing .what/.why above export ⛔ blocker
|
|
83
|
+
export const doStuff = () => { ... }
|
|
84
|
+
|
|
85
|
+
// vague comment ⛔ no intent
|
|
86
|
+
// run flow
|
|
87
|
+
const r = run();
|
|
88
|
+
|
|
89
|
+
// multiline paragraph comment ⛔ must extract into procedure
|
|
90
|
+
// handle logic for retries because retries are complicated
|
|
91
|
+
// and they sometimes need to be skipped on failure
|
|
92
|
+
const result = retry(input);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## .where
|
|
96
|
+
- required across all prod code (logic, utils, exports)
|
|
97
|
+
- expected in tests for setup/assert blocks
|
|
98
|
+
- exempt only for tiny expressions or internal lambdas
|
package/dist/logic/roles/mechanic/.briefs/codestyle/pit-of-success.via.minimize-surface-area.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 🧩 .brief: `tactic.pit-of-success.via.minimum-surface-area`
|
|
2
|
+
|
|
3
|
+
## .what
|
|
4
|
+
`tactic.pit-of-success.via.minimum-surface-area` is a design strategy where the default interface exposes only the **fewest necessary inputs** to achieve a correct, useful outcome. it reduces configuration complexity so users succeed **without deciding everything** up front.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🎯 goal
|
|
9
|
+
- maximize success-by-default
|
|
10
|
+
- minimize misuse and confusion
|
|
11
|
+
- reduce time-to-first-win
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📜 principles
|
|
16
|
+
1. **eliminate before you default** — if an option isn’t needed, remove it entirely. a missing knob is safer than a defaulted one.
|
|
17
|
+
2. **default everything that remains** — provide sensible, production-safe defaults for the rare knobs that survive elimination.
|
|
18
|
+
3. **hide until needed** — reveal additional controls only when the user’s context clearly justifies the complexity (progressive disclosure).
|
|
19
|
+
4. **bias to action** — the shortest path from “call function” to “successful result” should be the default path.
|
|
20
|
+
5. **remove footguns** — defer or delete inputs that commonly lead to error.
|
|
21
|
+
6. **inline the common case** — the most frequent usage should fit in one glance, without doc-diving.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🛠 example
|
|
26
|
+
|
|
27
|
+
### before
|
|
28
|
+
\\`\\`\\`ts
|
|
29
|
+
createUser({
|
|
30
|
+
name,
|
|
31
|
+
email,
|
|
32
|
+
validateEmail = true,
|
|
33
|
+
sendWelcomeEmail = true,
|
|
34
|
+
welcomeTemplate = 'default',
|
|
35
|
+
timezone = 'UTC',
|
|
36
|
+
retries = 3,
|
|
37
|
+
});
|
|
38
|
+
\\`\\`\\`
|
|
39
|
+
|
|
40
|
+
### after (minimum surface area)
|
|
41
|
+
\\`\\`\\`ts
|
|
42
|
+
createUser({ name, email });
|
|
43
|
+
\\`\\`\\`
|
|
44
|
+
- validation is on, welcome email is sent with the default template, timezone is utc, retries = 3.
|
|
45
|
+
- if possible, **delete** those options entirely and make them behavior, not configuration.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 💡 why it works
|
|
50
|
+
- **lower cognitive load** — fewer decisions up front
|
|
51
|
+
- **higher reliability** — default paths get the most testing and hardening
|
|
52
|
+
- **faster adoption** — quick wins encourage deeper usage later
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🔄 related tactics
|
|
57
|
+
- complements `tactic.progressive-disclosure` (reveal complexity as needed)
|
|
58
|
+
- overlaps with `tactic.safe-defaults`
|