Purpose: A reusable design framework for building LLM agents that give personal guidance in any high-stakes domain — mental health, career, financial, parenting, relationships, learning. Sections 1–6 are domain-agnostic instructions. Section 7 is a worked case study (mental health therapy) showing every rule instantiated. Last updated: 2026-05-04
⚠️ Disclaimer: AI is not a substitute for licensed professionals. Any agent built from this guide must include crisis escalation and professional referral paths.
Charlie Munger's key insight was that no single mental model is enough. You need a latticework — a connected web of thinking tools from many disciplines. The models hang together and reinforce each other. The person with 80–90 well-understood models across psychology, engineering, economics, and biology will consistently outperform the person who only thinks in code.
Here's a structured lattice, from craft to life:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # export all changed files from commit b58b5f9 to commit HEAD into tar archive | |
| git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT b58b5f9^..HEAD | tar -czf file.tgz -T - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Convert Unix timestamp to date in zsh/bash | |
| # | |
| # Add to .zshrc or .bash_profile | |
| # | |
| # Example usage: ts2date 1650621128 | |
| # Example output: 2022-04-22 11:52:08 | |
| timestamp2date() { | |
| date -r "$1" '+%Y-%m-%d %H:%M:%S' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # given list_search.txt with content, e.g. | |
| # <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.0" /> | |
| # <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.0" /> | |
| # given list_replace.txt with content, e.g. | |
| # <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5" /> | |
| # <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.5" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # good reference: https://wiki.ubuntuusers.de/CA/ | |
| # download missing cert DigiCertHighAssuranceEVRootCA.crt | |
| wget --no-check-certificate https://dl.cacerts.digicert.com/DigiCertHighAssuranceEVRootCA.crt | |
| # convert to pem format | |
| openssl x509 -inform DER -outform PEM -in DigiCertHighAssuranceEVRootCA.crt -out DigiCertHighAssuranceEVRootCA.pem.crt | |
| # copy to /usr/local/share/ca-certificates | |
| cp DigiCertHighAssuranceEVRootCA.pem.crt /usr/local/share/ca-certificates/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Place the following in the "Tests" tab of a request | |
| // Check HTTP status code | |
| tests['Status 200'] = responseCode.code === 200; | |
| // We need valid JSON | |
| var validJSON = false; | |
| var resData = {}; | |
| try { | |
| resData = JSON.parse(responseBody); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -type f -newermt '7/14/2019 16:00:00' |
NewerOlder