{"id":51702918,"url":"https://github.com/sanzgiri/thinking_tools","last_synced_at":"2026-07-16T13:07:46.219Z","repository":{"id":366079770,"uuid":"1110145668","full_name":"sanzgiri/thinking_tools","owner":"sanzgiri","description":"Tools for Thinking app, based on Daniel Dennett's book \"Intuition Pumps \u0026 Other Tools for Thinking\"","archived":false,"fork":false,"pushed_at":"2026-06-20T07:13:47.000Z","size":272,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T07:22:45.807Z","etag":null,"topics":["critical-thinking","daniel-dennett","intuition-pumps","mental-models","nextjs","ollama","philosophy","react","thinking-tools","typescript"],"latest_commit_sha":null,"homepage":"https://tools-for-thinking.netlify.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanzgiri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-04T19:22:21.000Z","updated_at":"2026-06-20T07:13:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sanzgiri/thinking_tools","commit_stats":null,"previous_names":["sanzgiri/thinking_tools"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sanzgiri/thinking_tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanzgiri%2Fthinking_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanzgiri%2Fthinking_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanzgiri%2Fthinking_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanzgiri%2Fthinking_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanzgiri","download_url":"https://codeload.github.com/sanzgiri/thinking_tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanzgiri%2Fthinking_tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35544565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["critical-thinking","daniel-dennett","intuition-pumps","mental-models","nextjs","ollama","philosophy","react","thinking-tools","typescript"],"created_at":"2026-07-16T13:07:45.557Z","updated_at":"2026-07-16T13:07:46.194Z","avatar_url":"https://github.com/sanzgiri.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dennett's Thinking Tools\n\nAn interactive web app presenting all 77 \"intuition pumps\" and tools for thinking from Daniel C. Dennett's *Intuition Pumps and Other Tools for Thinking* — each with a detailed guide and a practical exercise.\n\n**Live site:** https://tools-for-thinking.netlify.app/\n\n\u003c!-- Replace with a real screenshot: capture the homepage, save it to docs/screenshot.png --\u003e\n![Screenshot of Dennett's Thinking Tools](docs/screenshot.png)\n\n**Tech stack:** Next.js (App Router) · TypeScript · CSS Modules · Ollama (local LLM for content) · Python (content pipeline) · Netlify (hosting).\n\n## Project Structure\n\n- `dennet.txt`: Source text.\n- `slugify.py`: Single source of truth for turning a tool name into a URL slug (kept in sync with `site/src/lib/tools.ts`).\n- `process_dennet.py`: Parses `dennet.txt` into `tools.json`, computing the canonical `slug` for each tool.\n- `generate_content.py`: Generates detailed markdown content using Ollama (with retries, validation, and atomic writes).\n- `add_references.py`: Appends a `## References` section to each tool's markdown, sourced from the \"Works cited\" list in `dennet.txt`.\n- `remove_references.py`: Strips `## References` sections back out of the markdown.\n- `main.py`: Pipeline runner that ties the above scripts together (see below).\n- `sync_content.sh`: Copies `tools.json` and `content/` into `site/` so the app can read them.\n- `content/`: Generated markdown files (one per tool, named `\u003cslug\u003e.md`).\n- `site/`: Next.js web application.\n\n## Setup\n\n1. **Install Python dependencies**:\n   ```bash\n   uv sync\n   ```\n   (Or prefix commands with `uv run ...`.)\n\n2. **Run the content pipeline**:\n   `main.py` orchestrates the Python steps. The default (no args) runs `parse` then `generate`.\n   ```bash\n   uv run python main.py                 # parse + generate (default)\n   uv run python main.py parse           # rebuild tools.json only (fast, no Ollama)\n   uv run python main.py generate        # generate markdown via Ollama\n   uv run python main.py references      # append References sections\n   uv run python main.py clean           # strip References sections\n   uv run python main.py parse generate references   # chain steps\n   ```\n   *Notes:*\n   - Content generation uses a local Ollama instance (`mistral:latest` model), so Ollama must be running for the `generate` step.\n   - Generation takes time. You can stop and resume it; it skips tools whose `content/\u003cslug\u003e.md` already exists. Failed/invalid responses are retried and are not written, so they will be retried on the next run.\n\n3. **Build the site**:\n   The site needs `tools.json` and `content/` copied into `site/`. Use the sync script:\n   ```bash\n   ./sync_content.sh\n   cd site\n   npm install\n   npm run dev     # local preview at http://localhost:3000\n   # or\n   npm run build   # production build (static export of all 77 tool pages)\n   ```\n\n## Deployment\n\nThe project is deployed to **Netlify** and configured via `netlify.toml` (these settings come from the file, not the dashboard):\n\n- **Base directory**: `.` (repo root, so the build can run `sync_content.sh`)\n- **Build command**: `chmod +x sync_content.sh \u0026\u0026 ./sync_content.sh \u0026\u0026 cd site \u0026\u0026 npm install \u0026\u0026 npm run build`\n- **Publish directory**: `site/.next`\n- **Plugin**: `@netlify/plugin-nextjs`\n\nPushing to the `main` branch on GitHub triggers an automatic build and deploy.\n\n## Notes\n\n- The canonical tool slug is computed once in `process_dennet.py` and stored in `tools.json` (the `slug` field). All downstream code (content generation, references, the site) reads that field rather than recomputing it. `slugify.py` and `slugify()` in `site/src/lib/tools.ts` exist only as fallbacks and must be kept in sync.\n- The app uses **Vanilla CSS** (CSS Modules) for styling.\n- It features a \"Rich Aesthetic\" with dark mode, gradients, and glassmorphism.\n- The homepage supports **live search** and **category filtering** (client-side, in `site/src/app/ToolBrowser.tsx`).\n- Each tool page generates its own SEO metadata (`generateMetadata`) from the tool's name and short description.\n- If content for a tool is missing, the tool page displays a \"Content Generating...\" placeholder with the base description. (With all 77 files generated, this is a fallback that is not normally shown.)\n\n## License\n\n[MIT](LICENSE) © Ashutosh Sanzgiri.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanzgiri%2Fthinking_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanzgiri%2Fthinking_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanzgiri%2Fthinking_tools/lists"}