Files
zeekayandGitHub 4b7a524989 Type pages (mcp to x-tender) under strict (#9)
* Type model, templates, reviews and sms pages under strict

Props, state, refs and handlers typed; null guards where the types showed a possible null. creativeData exports Slug.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type Kai/Mori/Koe/Uta, research, philosophy, press and risk pages under strict

Props, state, refs and handlers typed; ref callbacks no longer return the element.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type x-tender, solutions, story, tag, startups, support, newsletter and mcp pages under strict

Captured-page trees and docs get shared types. Null-safe reads where a figure has no source or a page has no siblings.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type open source, platform, products, operative, trust, sdks and o11y pages under strict

Captured-page trees, product docs and org data get shared types. Null guards on refs and canvas contexts; product() throws a clear error for a captured page with no API section.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type post, pricing, team, slack, skills, security, tabs and proof pages under strict

Live pricing uses the lib Rung/Group/Row types. Null guards on refs and canvas contexts.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type models, studio, university, science, referral, operator, network and module pages under strict

Model and university data tables get explicit row types; the Opener shape is shared by ModelsPage and Studio.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Narrow the review entry in its test

entry() returns Review | null under strict; the test asserts it is set before use.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type the Newsletter send button ref as a button

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Fit the callers of the typed pages to their types

Product, solutions and tabs-tree callers use the page types; the open-source snapshot reads lib/oss's own Summary and Activity; the O11y card ref is a list item ref.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
2026-11-14 01:44:08 -08:00

191 lines
40 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* The Zen of Hanzo as hanzo.ai/philosophy publishes it (re-read from live, 9 Nov): eight groups in King Wen order and the
sixty-four patterns, every word Hanzo's. Read from the page's own data, verbatim.
GROUPS: [numeral, name, from, to, focus, lede]
PATTERNS: [n, lines (bottom to top, 1 = whole), group (1-8), classical, principle, perspective, summary,
AI research, Scientific experimentation, Organizational improvement] */
export type GroupRow = [numeral: string, name: string, from: number, to: number, focus: string, lede: string];
export type PatternRow = [n: number, lines: number[], group: number, classical: string, principle: string, perspective: string, summary: string, research: string, science: string, organization: string];
export const GROUPS: GroupRow[] = [["I", "Explore", 1, 8, "Curiosity, possibility, and the beginning of discovery", "Every breakthrough begins with a question. Exploration requires imagination, openness, uncertainty, and the willingness to venture beyond what is already understood."], ["II", "Form", 9, 16, "Structure, methodology, and collective capability", "Ideas become useful when they acquire structure. Formation transforms possibilities into methods, systems, experiments, and coordinated research programs."], ["III", "Observe", 17, 24, "Evidence, measurement, understanding, and correction", "Progress depends on the ability to see reality clearly. Observation connects hypotheses to evidence and makes errors visible before they become embedded in systems."], ["IV", "Experiment", 25, 32, "Testing, computation, uncertainty, and endurance", "Experiments transform possibilities into evidence. Robust research requires trustworthy inputs, controlled execution, transparent measurements, and resilience when reality differs from prediction."], ["V", "Adapt", 33, 40, "Constraints, resistance, changing conditions, and new directions", "Research rarely proceeds exactly as planned. Adaptation is the ability to recognize limitations, reconsider assumptions, and change direction without losing what has already been learned."], ["VI", "Optimize", 41, 48, "Efficiency, leverage, experimental value, and shared foundations", "Research resources are finite. Optimization seeks better results through intelligent allocation of time, compute, energy, capital, instruments, and human attention."], ["VII", "Transform", 49, 56, "New methods, synthesis, deployment, and transformation", "Discovery changes what is possible. Transformation converts established knowledge into new architectures, research methods, technologies, and practical capabilities."], ["VIII", "Evolve", 57, 64, "Dissemination, verification, maturity, and continuous becoming", "Every result changes the conditions for future research. Evolution turns discoveries into shared knowledge, mature capabilities, and new questions."]];
export const PATTERNS: PatternRow[] = [
[1, [1, 1, 1, 1, 1, 1], 1, "The Creative", "Origination", "Inventor", "Generate new possibilities. Imagine what does not yet exist, then seek a way to test it.", "Sketch an architecture or training objective nobody has tried, and write down the result that would show it works.", "State a new hypothesis in a form an experiment can refute.", "Set aside time for proposals that have no owner yet, then pick a few to test."],
[2, [0, 0, 0, 0, 0, 0], 1, "The Receptive", "Observation", "Empiricist", "Receive evidence without forcing it to fit existing expectations.", "Read model outputs and failure cases before deciding what they mean.", "Record what the instrument shows, including readings that contradict the prediction.", "Read customer reports and support tickets before choosing a response."],
[3, [1, 0, 0, 0, 1, 0], 1, "Difficulty at the Beginning", "Emergence", "Pioneer", "Begin productive work amid uncertainty. Establish the first usable foundations.", "Ship a small baseline that trains end to end before tuning anything.", "Run a pilot with a few samples to learn what the full protocol will need.", "Start a new team with one clear task and one working process, then add structure as needed."],
[4, [0, 1, 0, 0, 0, 1], 1, "Youthful Folly", "Inquiry", "Learner", "Recognize what is unknown. Ask questions before assuming answers.", "List what a model's behavior leaves unexplained, then choose one question to answer.", "Write down the assumptions behind a design before collecting the first sample.", "Ask newcomers what confuses them and treat each answer as a defect in the process."],
[5, [1, 1, 1, 0, 1, 0], 1, "Waiting", "Preparation", "Strategist", "Gather evidence, establish readiness, and recognize when conditions support action.", "Hold a run until the data is clean, the evaluation is fixed, and the compute is reserved.", "Calibrate instruments and confirm controls before starting the measurement.", "Check dependencies, owners, and rollback paths before announcing a launch date."],
[6, [0, 1, 0, 1, 1, 1], 1, "Conflict", "Critical Debate", "Skeptic", "Investigate competing explanations. Use disagreement to reveal hidden assumptions.", "Assign someone to argue that a benchmark gain comes from leakage, not capability.", "Write down two competing explanations and the observation that would separate them.", "Put a disagreement in writing with each side's evidence, then decide on the record."],
[7, [0, 1, 0, 0, 0, 0], 1, "The Army", "Coordination", "Research Lead", "Organize people, agents, knowledge, and resources around a shared objective.", "Split a program into workstreams with named owners, a shared evaluation, and one data store.", "Give each laboratory or instrument a defined role in a multi-site study.", "Give a cross-team goal one lead, one plan, and one place to report status."],
[8, [0, 0, 0, 0, 1, 0], 1, "Holding Together", "Collaboration", "Collaborator", "Connect complementary capabilities and align participants around common evidence.", "Pair model builders with domain experts and judge their work on the same evaluation set.", "Share protocols and raw data between groups so their results can be combined.", "Connect teams with different skills and agree on the measures both will use."],
[9, [1, 1, 1, 0, 1, 1], 2, "Small Taming", "Incremental Progress", "Iterative Builder", "Make small, measurable improvements before attempting larger changes.", "Change one component at a time and keep the change only when the metric improves.", "Vary a single factor per run so each effect can be attributed.", "Ship a small improvement every week rather than waiting for one large release."],
[10, [1, 1, 0, 1, 1, 1], 2, "Treading", "Methodological Care", "Methodologist", "Proceed with discipline, understand the risks, and respect experimental boundaries.", "Fix the evaluation, the data splits, and the stopping rule before training starts.", "Follow the written protocol and record every deviation with its reason.", "Review a change's risks with the people who would bear them before it ships."],
[11, [1, 1, 1, 0, 0, 0], 2, "Peace", "Alignment", "Systems Architect", "Align objectives, methods, resources, and interfaces so progress can flow.", "Make the data pipeline, training code, evaluation, and serving agree on formats and interfaces.", "Match the measurement method to the question, the sample, and the analysis plan.", "Align goals, budgets, and interfaces between teams so work does not stall at the handoff."],
[12, [0, 0, 0, 1, 1, 1], 2, "Standstill", "Reassessment", "Diagnostician", "Recognize stagnation. Identify what prevents learning or execution.", "When loss stops falling, check the data, the optimizer, and the evaluation before adding compute.", "When results stop changing, test whether the instrument or the sample is the limit.", "When a project stalls, ask what is blocking it and who can remove the block."],
[13, [1, 0, 1, 1, 1, 1], 2, "Fellowship", "Open Cooperation", "Community Builder", "Advance knowledge through shared methods, open inquiry, and collaboration.", "Release code, weights, and evaluations so others can reproduce and extend the work.", "Publish methods and data in a form other laboratories can use.", "Share internal tools and findings so teams stop solving the same problem twice."],
[14, [1, 1, 1, 1, 0, 1], 2, "Great Possession", "Stewardship", "Research Steward", "Manage abundant knowledge, compute, talent, and resources responsibly.", "Track compute, datasets, and checkpoints, and retire what nobody uses.", "Budget samples, reagents, and instrument time against the questions that matter most.", "Keep an honest account of budget, headcount, and commitments, and review it on a schedule."],
[15, [0, 0, 1, 0, 0, 0], 2, "Modesty", "Intellectual Humility", "Calibrator", "Distinguish confidence from certainty. Remain willing to revise conclusions.", "Report confidence intervals and the number of seeds, and say what the result does not show.", "State the limits of the sample and the conditions under which the finding was made.", "Share forecasts as ranges, then compare them with what happened."],
[16, [0, 0, 0, 1, 0, 0], 2, "Enthusiasm", "Mobilization", "Program Director", "Convert promising ideas into coordinated initiatives with clear goals.", "Turn a promising result into a funded project with a goal, an owner, and a date.", "Move a validated pilot into a full study with defined resources.", "Turn agreement on an idea into a plan, a team, and a first milestone."],
[17, [1, 0, 0, 1, 1, 0], 3, "Following", "Responsiveness", "Adaptive Researcher", "Follow reliable evidence when it leads somewhere unexpected.", "Follow a surprising ablation result even when it contradicts the original plan.", "Update the next run in light of the last one, and record why.", "Change course when customer data shows the plan was wrong, and say so."],
[18, [0, 1, 1, 0, 0, 1], 3, "Work on the Decayed", "Correction", "Research Maintainer", "Identify outdated assumptions, faulty methods, and accumulated technical debt.", "Retire stale baselines, broken evaluations, and unused code before building on them.", "Re-validate old protocols, reagents, and calibrations that no longer match current practice.", "Schedule time to repair processes and documents that have drifted out of date."],
[19, [1, 1, 0, 0, 0, 0], 3, "Approach", "Accessibility", "Knowledge Translator", "Make complex systems, tools, and findings understandable and usable.", "Write model cards and tutorials that let a new user run the system correctly.", "Explain methods and results in plain terms to people outside the field.", "Document decisions so a new colleague can see the reason for each one."],
[20, [0, 0, 0, 0, 1, 1], 3, "Contemplation", "Observability", "Scientific Observer", "Study behavior carefully before attempting to change it.", "Add logging, traces, and evaluation dashboards before changing the model.", "Watch the system in its normal state and record its baseline before intervening.", "Measure how work actually flows before redesigning it."],
[21, [1, 0, 0, 1, 0, 1], 3, "Biting Through", "Rigorous Testing", "Verifier", "Confront inconsistencies directly. Resolve questions with explicit tests and evidence.", "Run held-out evaluations and adversarial tests to settle whether a claim holds.", "Resolve a disputed result with a decisive control rather than more discussion.", "Test a policy on one team with a defined measure before applying it everywhere."],
[22, [1, 0, 1, 0, 0, 1], 3, "Grace", "Representation", "Scientific Communicator", "Make discoveries legible through clear models, figures, interfaces, and explanations.", "Plot results with their uncertainty, label the axes, and show failures beside successes.", "Choose the figures and tables that let a reader see the comparison that matters.", "Report status on one page that shows progress, risks, and the decisions needed."],
[23, [0, 0, 0, 0, 0, 1], 3, "Splitting Apart", "Decomposition", "Analyst", "Break complex problems into components that can be independently examined.", "Break a failing pipeline into stages and measure each one separately.", "Separate a complex system into parts that can be tested one at a time.", "Divide a large goal into pieces that one team can own and finish."],
[24, [1, 0, 0, 0, 0, 0], 3, "Return", "Reproducibility", "Replication Scientist", "Return to reference conditions, repeat experiments, and establish reliable baselines.", "Re-run the baseline from a clean checkout and confirm it matches the reported number.", "Repeat the measurement under the reference conditions before testing the new one.", "After a failed change, return to the last good process, then reintroduce changes one at a time."],
[25, [1, 0, 0, 1, 1, 1], 4, "Innocence", "Unbiased Investigation", "Experimental Designer", "Test hypotheses without manipulating the conditions to favor an expected outcome.", "Fix the evaluation before seeing results, and never tune on the test set.", "Randomize assignment and blind the analysis where possible.", "Define the success measure before a pilot starts, not after."],
[26, [1, 1, 1, 0, 0, 1], 4, "Great Taming", "Accumulated Capability", "Infrastructure Builder", "Develop the instruments, models, datasets, and computational capacity needed for difficult investigations.", "Build the training cluster, data pipeline, and evaluation harness that harder questions require.", "Invest in instruments and automation that make careful measurement routine.", "Fund the shared tools that make every team's next project easier."],
[27, [1, 0, 0, 0, 0, 1], 4, "Nourishment", "Input Quality", "Data Curator", "Recognize that the reliability of results depends on the quality of evidence, data, and inputs.", "Audit training data for duplicates, contamination, and label errors before scaling.", "Verify samples, reagents, and sensors before relying on the results.", "Check the source and quality of the numbers behind a decision."],
[28, [0, 1, 1, 1, 1, 0], 4, "Great Exceeding", "Stress Testing", "Reliability Engineer", "Explore extreme conditions and discover where existing methods fail.", "Test models on rare, adversarial, and out-of-distribution inputs to find where they break.", "Push a system past its normal operating range to map its limits.", "Rehearse peak load, outages, and staff absence before they happen."],
[29, [0, 1, 0, 0, 1, 0], 4, "The Abyss", "Resilience", "Failure Researcher", "Investigate uncertainty, repeated failures, and adverse conditions without losing the research record.", "Keep checkpoints, logs, and failed-run notes so a crash does not erase what was learned.", "Preserve the lab notebook and raw data through failed trials and equipment faults.", "Write a blameless review after a failure and track the fixes it produces."],
[30, [1, 0, 1, 1, 0, 1], 4, "Clinging Fire", "Transparency", "Measurement Scientist", "Illuminate internal behavior through instrumentation, diagnostics, and interpretable measurements.", "Use probes, attribution, and interpretability tools to inspect what a model computes.", "Instrument the process so internal state is measured, not guessed.", "Make key metrics visible to everyone who can act on them."],
[31, [0, 0, 1, 1, 1, 0], 4, "Influence", "Interaction", "Systems Scientist", "Investigate relationships, feedback, dependencies, and possible causal mechanisms.", "Test how changes to data, architecture, and training interact, not only each alone.", "Design runs that reveal interactions and feedback between variables.", "Map how a change in one team's process affects the teams that depend on it."],
[32, [0, 1, 1, 1, 0, 0], 4, "Duration", "Longitudinal Validity", "Longitudinal Researcher", "Test whether findings remain reliable across time, environments, and changing conditions.", "Re-evaluate a deployed model over months to detect drift and decay.", "Repeat measurements across seasons, batches, and sites to see whether the effect persists.", "Check at six and twelve months whether a process change still holds."],
[33, [0, 0, 1, 1, 1, 1], 5, "Retreat", "Strategic Withdrawal", "Research Strategist", "Stop unproductive investigations when evidence no longer justifies their cost.", "Stop a training direction when the evidence no longer justifies its compute.", "End a line of inquiry with a written reason, and keep the data.", "Close projects that no longer serve the goal and reassign the people."],
[34, [1, 1, 1, 1, 0, 0], 5, "Great Power", "Controlled Capability", "Safety Engineer", "Apply powerful tools with appropriate limits, safeguards, and oversight.", "Gate powerful capabilities behind evaluations, access controls, and human review.", "Apply containment and approval to experiments whose failure could cause harm.", "Give strong tools to people trained to use them, and keep an audit trail."],
[35, [0, 0, 0, 1, 0, 1], 5, "Progress", "Measured Advancement", "Performance Researcher", "Establish whether a new method represents a genuine improvement over its baseline.", "Compare a new method with a strong baseline on the same data, budget, and seeds.", "Confirm an improvement against a control, with a stated effect size.", "Judge a new process by the metric it was meant to move."],
[36, [1, 0, 1, 0, 0, 0], 5, "Darkening of the Light", "Protected Knowledge", "Research Security Steward", "Protect sensitive discoveries, research participants, confidential data, and intellectual property.", "Protect weights, training data, and user data with access controls and encryption.", "Safeguard participant identity, consent, and unpublished findings.", "Limit sensitive records to the people who need them, and log every access."],
[37, [1, 0, 1, 0, 1, 1], 5, "The Family", "Local Responsibility", "Team Architect", "Establish clear ownership, trusted collaboration, and accountable research groups.", "Give each model, dataset, and evaluation a named owner.", "Assign a responsible person to each step of the protocol and its records.", "Keep teams small enough that members know one another's work and answer for it."],
[38, [1, 1, 0, 1, 0, 1], 5, "Opposition", "Diverse Perspectives", "Contrarian Researcher", "Explore alternative models, contradictory observations, and competing theories.", "Try an approach that contradicts the current consensus and compare the results honestly.", "Test the rival theory with the same rigor as the preferred one.", "Invite dissent from outside the team before a major decision."],
[39, [0, 0, 1, 0, 1, 0], 5, "Obstruction", "Constraint Discovery", "Bottleneck Investigator", "Identify the physical, computational, organizational, or methodological limitation preventing progress.", "Profile the system to find whether data, memory, compute, or communication limits throughput.", "Find which step of the protocol limits the number of samples per day.", "Trace a delay to the step where work waits longest."],
[40, [0, 1, 0, 1, 0, 0], 5, "Deliverance", "Unblocking", "Problem Solver", "Remove unnecessary constraints and restore the ability to investigate and experiment.", "Fix the slow data loader or broken dependency that stalls every experiment.", "Remove a procedural step that adds time without adding information.", "Remove an approval or handoff that delays work without reducing risk."],
[41, [1, 1, 0, 0, 0, 1], 6, "Decrease", "Simplification", "Minimalist", "Remove unnecessary complexity while preserving essential scientific capability.", "Remove model components that do not change the result, and keep the smaller model.", "Drop measurements that no analysis uses.", "Delete the reports and meetings that nobody acts on."],
[42, [1, 0, 0, 0, 1, 1], 6, "Increase", "Leverage", "Optimization Scientist", "Identify improvements that amplify productivity across many experiments or systems.", "Improve the shared training loop or tokenizer so every experiment benefits.", "Automate a step that every experiment repeats.", "Make the process change that saves time for many teams at once."],
[43, [1, 1, 1, 1, 1, 0], 6, "Breakthrough", "Evidence-Based Decision", "Decision Scientist", "Make consequential choices when evidence satisfies defined criteria.", "Promote a model to production when it meets the criteria set in advance.", "Declare a result only when it passes the stated threshold.", "Decide with the evidence on the table, and record the criteria used."],
[44, [0, 1, 1, 1, 1, 1], 6, "Coming to Meet", "Opportunity Assessment", "Technology Scout", "Evaluate unexpected discoveries, emerging methods, and external innovations before integrating them.", "Evaluate a new open model or technique on your own tasks before adopting it.", "Assess an unexpected observation or a new instrument for what it could add.", "Review outside tools and offers against a short list of needs."],
[45, [0, 0, 0, 1, 1, 0], 6, "Gathering Together", "Knowledge Integration", "Knowledge Engineer", "Bring complementary datasets, tools, expertise, and discoveries into a coherent research system.", "Combine datasets, tools, and retrieval sources into one system with shared definitions.", "Merge results from related studies into a common dataset with consistent units.", "Put scattered documents and decisions into one searchable record."],
[46, [0, 1, 1, 0, 0, 0], 6, "Pushing Upward", "Scalable Progress", "Scaling Researcher", "Extend validated methods to larger problems without losing correctness or efficiency.", "Verify a method at small scale, then grow model, data, and compute in measured steps.", "Move from a bench result to a larger batch while checking that the effect holds.", "Scale a successful pilot by writing down what made it work."],
[47, [0, 1, 0, 1, 1, 0], 6, "Oppression", "Resource Constraints", "Resource Optimizer", "Continue useful investigation under limited compute, funding, time, or experimental capacity.", "Get the most from limited compute with smaller models, careful data, and efficient methods.", "Choose the design that answers the question with the fewest samples.", "Put the few projects that matter first when budget or time is short."],
[48, [0, 1, 1, 0, 1, 0], 6, "The Well", "Shared Infrastructure", "Platform Engineer", "Build reusable scientific foundations that support many researchers and disciplines.", "Provide a common training and evaluation platform that every researcher can use.", "Maintain shared instruments, protocols, and data stores across laboratories.", "Run internal platforms as products, with owners, documentation, and support."],
[49, [1, 0, 1, 1, 1, 0], 7, "Revolution", "Paradigm Change", "Scientific Revolutionary", "Replace an established approach when stronger evidence supports a fundamentally better alternative.", "Replace an architecture when new evidence shows a different one is clearly better.", "Adopt a new method when it explains observations the old one cannot.", "Redesign a process from first principles when incremental fixes have run out."],
[50, [0, 1, 1, 1, 0, 1], 7, "The Cauldron", "Synthesis", "Interdisciplinary Inventor", "Combine methods and insights from different disciplines to create new capabilities.", "Combine ideas from neuroscience, physics, and software engineering into a new training method.", "Borrow a technique from another field to measure what existing tools miss.", "Form mixed teams from different disciplines around one shared problem."],
[51, [1, 0, 0, 1, 0, 0], 7, "Thunder", "Discovery Response", "Rapid Investigator", "Respond constructively to unexpected findings, anomalies, or sudden changes.", "Investigate an unexpected model behavior as soon as it appears, and preserve the evidence.", "Stop and examine an anomaly instead of discarding it as noise.", "Respond to an incident quickly, with named roles and a written timeline."],
[52, [0, 0, 1, 0, 0, 1], 7, "Keeping Still", "Deliberate Restraint", "Research Guardian", "Pause when additional investigation, independent review, or stronger controls are required.", "Hold a release until independent review and safety evaluations are complete.", "Hold an experiment until the ethical review and controls are in place.", "Delay a launch when the checks are not finished."],
[53, [0, 0, 1, 0, 1, 1], 7, "Development", "Cumulative Discovery", "Long-Horizon Researcher", "Build understanding through successive refinements and validated milestones.", "Build capability through a sequence of validated milestones rather than one leap.", "Add to a body of evidence one replicated result at a time.", "Plan multi-year work as milestones, each with a test of whether it was reached."],
[54, [1, 1, 0, 1, 0, 0], 7, "The Marrying Maiden", "Integration Risk", "Integration Scientist", "Examine compatibility, hidden dependencies, and unintended consequences when combining systems.", "Test a new model inside the full production stack before it replaces the old one.", "Check that a new instrument or protocol works with existing equipment and data formats.", "Map dependencies before merging teams, systems, or processes."],
[55, [1, 0, 1, 1, 0, 0], 7, "Abundance", "Signal Selection", "Scientific Synthesist", "Extract meaningful findings from abundant observations, experiments, and possibilities.", "Pick the few results that matter out of thousands of runs and logged metrics.", "Separate real effects from noise when measurements are plentiful.", "Reduce a flood of reports to the three figures leaders need."],
[56, [0, 0, 1, 1, 0, 1], 7, "The Wanderer", "Portability", "Transfer Scientist", "Move methods and knowledge between laboratories, disciplines, hardware, and organizations.", "Check that a method works across hardware, frameworks, and datasets, not only where it was built.", "Test whether a protocol gives the same result in another laboratory.", "Write practices down so they transfer to new teams and offices."],
[57, [0, 1, 1, 0, 1, 1], 8, "The Gentle Wind", "Composability", "Scientific Toolsmith", "Spread useful capabilities through reusable, interoperable methods and components.", "Build small, tested components with clear interfaces that others can combine.", "Package analysis steps so they can be reused across studies.", "Create standard building blocks that teams can assemble without asking permission."],
[58, [1, 1, 0, 1, 1, 0], 8, "The Joyous Lake", "Knowledge Exchange", "Scientific Collaborator", "Advance understanding through reciprocal learning, constructive criticism, and open dialogue.", "Trade evaluation results and critiques with other labs in the open.", "Invite outside groups to review methods and replicate findings.", "Hold regular sessions where teams teach one another what they have learned."],
[59, [0, 1, 0, 0, 1, 1], 8, "Dispersion", "Distributed Discovery", "Research Network Architect", "Enable independent researchers and institutions to contribute to a larger body of knowledge.", "Let many groups train, evaluate, and contribute on shared formats without a central gatekeeper.", "Coordinate studies across institutions with common protocols and open data.", "Give distributed teams the authority and context to decide locally."],
[60, [1, 1, 0, 0, 1, 0], 8, "Limitation", "Productive Constraints", "Constraint Designer", "Use explicit limits and standards to make research safer, clearer, and more reproducible.", "Set fixed budgets, evaluation protocols, and reporting standards so results are comparable.", "Define sample sizes, units, and acceptance criteria in advance.", "Adopt a few explicit rules that make decisions faster and clearer."],
[61, [1, 1, 0, 0, 1, 1], 8, "Inner Truth", "Verifiability", "Evidence Auditor", "Ground claims in traceable observations, documented methods, and reproducible analysis.", "Publish enough code, data, and configuration that a reader can check each claim.", "Keep raw data, analysis scripts, and version records for every reported result.", "Tie each claim in a report to a source that can be inspected."],
[62, [0, 0, 1, 1, 0, 0], 8, "Small Exceeding", "Precision", "Precision Engineer", "Refine small details whose effects can determine scientific or engineering success.", "Find the detail that matters, such as a tokenization quirk or a rounding error.", "Control small sources of error, such as temperature, timing, and calibration.", "Fix the small recurring defects that cost the most time in total."],
[63, [1, 0, 1, 0, 1, 0], 8, "After Completion", "Operational Maturity", "Release Steward", "Preserve reliability through validation, monitoring, maintenance, and disciplined change.", "Monitor deployed models, keep evaluations running, and plan the next update.", "Maintain instruments, records, and procedures after the study ends.", "Keep launched systems healthy with owners, alerts, and a change process."],
[64, [0, 1, 0, 1, 0, 1], 8, "Before Completion", "Continuous Becoming", "Lifelong Explorer", "Recognize that every answer creates new questions and every achievement opens new possibilities.", "Treat each result as the start of the next question, and record what to test next.", "End each study by stating the open questions it raised.", "Review what you learned, then choose the next problem."]
];
/* Ana B'Koach Path on the sixty-four patterns: what /philosophy reads in Hebrew (he).
Seven verses of six words (whose initial letters form the 42-letter Name), each paired with two companion patterns
at the third and sixth positions (42 + 14 = 56), followed by the eighth chapter, Continuation (8 patterns),
covering all 64 patterns once in the Ana BeKoach Path order. */
export const STANZAS = [
{ rank: 1, numeral: "I", sefirah: "חסד", name: "Chesed", group: "אבגיתץ", theme: "Request, strength, greatness, liberation.", lede: "The first five perspectives move from asking for help through strength and action to liberation. The sixth is the constraint being overcome.", companions: [3, 23] },
{ rank: 2, numeral: "II", sefirah: "גבורה", name: "Gevurah", group: "קרעשטן", theme: "Reception, collective expression, elevation, purification, reverence.", lede: "This verse balances openness with discipline. Receiving evidence and working together come with correction, humility, and respect for uncertainty.", companions: [22, 16] },
{ rank: 3, numeral: "III", sefirah: "תפארת", name: "Tiferet", group: "נגדיכש", theme: "Approach, strength, seeking unity, careful protection.", lede: "Pursue understanding, exercise disciplined capability, demand evidence, integrate knowledge, protect important details, and safeguard valuable work.", companions: [31, 52] },
{ rank: 4, numeral: "IV", sefirah: "נצח", name: "Netzach", group: "בטרצתג", theme: "Blessing, purification, compassion, justice, constancy, reward.", lede: "Ethical, sustainable progress. An achievement is not enough because it looks impressive: the method should be sound, the conclusions defensible, and the benefit lasting.", companions: [5, 35] },
{ rank: 5, numeral: "V", sefirah: "הוד", name: "Hod", group: "חקבטנע", theme: "Resilience, holiness, abundance, goodness, guidance, community.", lede: "Responsible stewardship of knowledge, resources, and research communities. The Cauldron, a ritual vessel of transformation, answers the word for holy.", companions: [48, 59] },
{ rank: 6, numeral: "VI", sefirah: "יסוד", name: "Yesod", group: "יגלפזק", theme: "Uniqueness, elevation, turning toward others, remembrance, sacred principles.", lede: "The researcher explores independently and stays connected to others, preserves accumulated knowledge, welcomes new possibilities, and works within meaningful principles.", companions: [17, 54] },
{ rank: 7, numeral: "VII", sefirah: "מלכות", name: "Malkhut", group: "שקוצית", theme: "A cry for help, reception, listening, understanding, hidden knowledge.", lede: "The prayer ends by calling on the Knower of Mysteries. Hanzo’s reading ends with Before Completion: the unknowns that remain to be investigated.", companions: [38, 43] }
];
export const WORDS = [
{ verse: 1, place: 1, word: "אנא", meaning: "We beg you", n: 4, hebrew: "אומץ לשאול", gloss: "Courage to ask" },
{ verse: 1, place: 2, word: "בכח", meaning: "with the strength", n: 34, hebrew: "בקרת עוצמה", gloss: "Strength with restraint" },
{ verse: 1, place: 3, word: "גדולת", meaning: "of the greatness", n: 14, hebrew: "גדולה באחריות", gloss: "Responsible greatness" },
{ verse: 1, place: 4, word: "ימינך", meaning: "of your right hand", n: 1, hebrew: "יוזמה יוצרת", gloss: "Creative agency" },
{ verse: 1, place: 5, word: "תתיר", meaning: "release", n: 40, hebrew: "תיקון חסמים", gloss: "Removing obstacles" },
{ verse: 1, place: 6, word: "צרורה", meaning: "the bound", n: 39, hebrew: "צוואר בקבוק", gloss: "Recognizing what binds" },
{ verse: 2, place: 1, word: "קבל", meaning: "accept", n: 2, hebrew: "קבלת ראיות", gloss: "Receive the evidence" },
{ verse: 2, place: 2, word: "רנת", meaning: "the song of", n: 58, hebrew: "רינה משותפת", gloss: "Shared expression" },
{ verse: 2, place: 3, word: "עמך", meaning: "your people", n: 8, hebrew: "עבודת צוות", gloss: "Collective cohesion" },
{ verse: 2, place: 4, word: "שגבנו", meaning: "raise us", n: 46, hebrew: "שגשוג מתמשך", gloss: "Continued elevation" },
{ verse: 2, place: 5, word: "טהרנו", meaning: "purify us", n: 18, hebrew: "טיוב השיטה", gloss: "Purify and repair methods" },
{ verse: 2, place: 6, word: "נורא", meaning: "awesome one", n: 10, hebrew: "נקיטת זהירות", gloss: "Reverent caution" },
{ verse: 3, place: 1, word: "נא", meaning: "please", n: 19, hebrew: "נכונות להתקרב", gloss: "Willingness to approach" },
{ verse: 3, place: 2, word: "גבור", meaning: "mighty one", n: 26, hebrew: "גבורה ממושמעת", gloss: "Disciplined strength" },
{ verse: 3, place: 3, word: "דורשי", meaning: "those who seek", n: 21, hebrew: "דרישת הוכחות", gloss: "Rigorous inquiry" },
{ verse: 3, place: 4, word: "יחודך", meaning: "your oneness", n: 11, hebrew: "ייחוד כוחות", gloss: "Unity and alignment" },
{ verse: 3, place: 5, word: "כבבת", meaning: "like the pupil of an eye", n: 62, hebrew: "כיוונון עדין", gloss: "Careful precision" },
{ verse: 3, place: 6, word: "שמרם", meaning: "guard them", n: 36, hebrew: "שמירה על היקר", gloss: "Protect what matters" },
{ verse: 4, place: 1, word: "ברכם", meaning: "bless them", n: 42, hebrew: "ברכה וצמיחה", gloss: "Blessing and growth" },
{ verse: 4, place: 2, word: "טהרם", meaning: "purify them", n: 25, hebrew: "טוהר המחקר", gloss: "Integrity of investigation" },
{ verse: 4, place: 3, word: "רחמי", meaning: "the mercy of", n: 15, hebrew: "רחמים וענווה", gloss: "Compassion and humility" },
{ verse: 4, place: 4, word: "צדקתך", meaning: "your righteousness", n: 61, hebrew: "צדק ואמת", gloss: "Justice and truth" },
{ verse: 4, place: 5, word: "תמיד", meaning: "always", n: 32, hebrew: "תוקף לאורך זמן", gloss: "Enduring validity" },
{ verse: 4, place: 6, word: "גמלם", meaning: "grant them", n: 63, hebrew: "גמול המאמץ", gloss: "Fulfillment of effort" },
{ verse: 5, place: 1, word: "חסין", meaning: "powerful one", n: 29, hebrew: "חוסן מול אי־ודאות", gloss: "Resilience in uncertainty" },
{ verse: 5, place: 2, word: "קדוש", meaning: "holy one", n: 50, hebrew: "קדושת התהליך", gloss: "Reverence for transformation" },
{ verse: 5, place: 3, word: "ברב", meaning: "in the abundance of", n: 55, hebrew: "בחירה מתוך שפע", gloss: "Discernment amid abundance" },
{ verse: 5, place: 4, word: "טובך", meaning: "your goodness", n: 27, hebrew: "טיב המקורות", gloss: "Quality of inputs" },
{ verse: 5, place: 5, word: "נהל", meaning: "guide", n: 7, hebrew: "ניהול מתואם", gloss: "Coordinated guidance" },
{ verse: 5, place: 6, word: "עדתך", meaning: "your congregation", n: 45, hebrew: "עדת חוקרים", gloss: "Community of inquiry" },
{ verse: 6, place: 1, word: "יחיד", meaning: "unique one", n: 56, hebrew: "ייחודיות הדרך", gloss: "Independent exploration" },
{ verse: 6, place: 2, word: "גאה", meaning: "exalted", n: 53, hebrew: "גובה השאיפה", gloss: "Aspirational development" },
{ verse: 6, place: 3, word: "לעמך", meaning: "to your people", n: 37, hebrew: "לכידות הקהילה", gloss: "Community cohesion" },
{ verse: 6, place: 4, word: "פנה", meaning: "turn", n: 44, hebrew: "פנייה אל החדש", gloss: "Turning toward discovery" },
{ verse: 6, place: 5, word: "זוכרי", meaning: "who remember", n: 24, hebrew: "זיכרון מחקרי", gloss: "Research memory and return" },
{ verse: 6, place: 6, word: "קדושתך", meaning: "your holiness", n: 60, hebrew: "קיום עקרונות", gloss: "Upholding principles" },
{ verse: 7, place: 1, word: "שועתנו", meaning: "our cry", n: 51, hebrew: "שמיעת מצוקה", gloss: "Respond to urgent signals" },
{ verse: 7, place: 2, word: "קבל", meaning: "accept", n: 13, hebrew: "קבלת האחר", gloss: "Receive one another" },
{ verse: 7, place: 3, word: "ושמע", meaning: "and hear", n: 20, hebrew: "וידוא הקשבה", gloss: "Listen and observe" },
{ verse: 7, place: 4, word: "צעקתנו", meaning: "our plea", n: 47, hebrew: "צעקה מתוך מצוקה", gloss: "Recognize distress" },
{ verse: 7, place: 5, word: "יודע", meaning: "knower of", n: 30, hebrew: "ידיעה בהירה", gloss: "Illuminate knowledge" },
{ verse: 7, place: 6, word: "תעלומות", meaning: "mysteries", n: 64, hebrew: "תעלומות שטרם נפתרו", gloss: "Unresolved mysteries" }
];
export const REST = [
{ n: 3, hebrew: "התהוות", gloss: "Emergence" },
{ n: 5, hebrew: "היערכות", gloss: "Preparation" },
{ n: 6, hebrew: "בירור מחלוקות", gloss: "Resolving disagreement" },
{ n: 9, hebrew: "שליטה הדרגתית", gloss: "Incremental control" },
{ n: 12, hebrew: "הערכה מחדש", gloss: "Reassessment" },
{ n: 16, hebrew: "הנעה", gloss: "Mobilization" },
{ n: 17, hebrew: "הסתגלות", gloss: "Adaptation" },
{ n: 22, hebrew: "ייצוג בהיר", gloss: "Clear representation" },
{ n: 23, hebrew: "פירוק", gloss: "Decomposition" },
{ n: 28, hebrew: "עמידות בעומס", gloss: "Load bearing" },
{ n: 31, hebrew: "השפעה הדדית", gloss: "Reciprocal influence" },
{ n: 33, hebrew: "נסיגה אסטרטגית", gloss: "Strategic withdrawal" },
{ n: 35, hebrew: "התקדמות מדודה", gloss: "Measured progress" },
{ n: 38, hebrew: "ריבוי נקודות מבט", gloss: "Diverse perspectives" },
{ n: 41, hebrew: "פישוט", gloss: "Simplification" },
{ n: 43, hebrew: "הכרעה", gloss: "Decision" },
{ n: 48, hebrew: "תשתית משותפת", gloss: "Shared infrastructure" },
{ n: 49, hebrew: "שינוי פרדיגמה", gloss: "Paradigm change" },
{ n: 52, hebrew: "עצירה מכוונת", gloss: "Deliberate pause" },
{ n: 54, hebrew: "סיכוני שילוב", gloss: "Integration risk" },
{ n: 57, hebrew: "הרכבה מודולרית", gloss: "Composability" },
{ n: 59, hebrew: "ביזור", gloss: "Distribution" }
];
export const CONTINUATION = [6, 12, 28, 33, 41, 9, 57, 49];
export const RENEWAL = { rank: 8, numeral: "VIII", hebrew: "המשך", name: "Continuation", group: "התחדשות", theme: "After the mysteries, how research begins again.", lede: "When an inquiry completes its cycle, remaining tensions, reassessments, simplifications, and paradigm shifts become the seeds of the next cycle." };
export const CHAPTERS = [
...STANZAS.map((v) => {
const w = WORDS.filter((x) => x.verse === v.rank).map((x) => x.n);
const [a, b] = v.companions;
return { rank: v.rank, numeral: v.numeral, hebrew: v.sefirah, name: v.name, group: v.group, theme: v.theme, lede: v.lede, members: [w[0], w[1], a, w[2], w[3], b, w[4], w[5]] };
}),
{ rank: 8, numeral: RENEWAL.numeral, hebrew: RENEWAL.hebrew, name: RENEWAL.name, group: RENEWAL.group, theme: RENEWAL.theme, lede: RENEWAL.lede, members: CONTINUATION }
];
export const PATH = CHAPTERS.flatMap((c) => c.members);
const BY_WORD = new Map(WORDS.map((w) => [w.n, w]));
const BY_HEBREW = new Map([...WORDS, ...REST].map((x) => [x.n, x.hebrew]));
const BY_CHAPTER = new Map<number, (typeof CHAPTERS)[number]>();
CHAPTERS.forEach((c) => c.members.forEach((n) => BY_CHAPTER.set(n, c)));
export const word = (n: number) => BY_WORD.get(n);
export const hebrew = (n: number) => BY_HEBREW.get(n) || "";
export const chapterOf = (n: number) => BY_CHAPTER.get(n) || CHAPTERS[0];
export const hebrewLocale = (locale: unknown) => typeof locale === "string" && (locale === "he" || locale.startsWith("he-"));