wikifier 4.1.2__tar.gz → 4.1.3__tar.gz

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.
Files changed (51) hide show
  1. wikifier-4.1.3/PKG-INFO +164 -0
  2. wikifier-4.1.3/README.md +132 -0
  3. {wikifier-4.1.2 → wikifier-4.1.3}/index.html +81 -13
  4. {wikifier-4.1.2 → wikifier-4.1.3}/pyproject.toml +5 -3
  5. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/__init__.py +1 -1
  6. wikifier-4.1.3/wikifier.egg-info/PKG-INFO +164 -0
  7. wikifier-4.1.2/PKG-INFO +0 -423
  8. wikifier-4.1.2/README.md +0 -391
  9. wikifier-4.1.2/wikifier.egg-info/PKG-INFO +0 -423
  10. {wikifier-4.1.2 → wikifier-4.1.3}/CONTRIBUTING.md +0 -0
  11. {wikifier-4.1.2 → wikifier-4.1.3}/LICENSE +0 -0
  12. {wikifier-4.1.2 → wikifier-4.1.3}/MANIFEST.in +0 -0
  13. {wikifier-4.1.2 → wikifier-4.1.3}/diagnostics.html +0 -0
  14. {wikifier-4.1.2 → wikifier-4.1.3}/docs/Basis-v0.3.md +0 -0
  15. {wikifier-4.1.2 → wikifier-4.1.3}/docs/RELEASE_NOTES.md +0 -0
  16. {wikifier-4.1.2 → wikifier-4.1.3}/docs/TRADEOFFS.md +0 -0
  17. {wikifier-4.1.2 → wikifier-4.1.3}/docs/spec.md +0 -0
  18. {wikifier-4.1.2 → wikifier-4.1.3}/docs/v0.4-Execution-Plan.md +0 -0
  19. {wikifier-4.1.2 → wikifier-4.1.3}/docs/v0.4-execution-plan.md +0 -0
  20. {wikifier-4.1.2 → wikifier-4.1.3}/setup.cfg +0 -0
  21. {wikifier-4.1.2 → wikifier-4.1.3}/skills/run.md +0 -0
  22. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/__main__.py +0 -0
  23. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/cli.py +0 -0
  24. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/contracts.py +0 -0
  25. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/daemon.py +0 -0
  26. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/diagnostics.py +0 -0
  27. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/gap1_validation_harness.py +0 -0
  28. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/health.py +0 -0
  29. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/import_cache.py +0 -0
  30. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/locking.py +0 -0
  31. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/mcp/__init__.py +0 -0
  32. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/mcp/server.py +0 -0
  33. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/parsers/__init__.py +0 -0
  34. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/parsers/bree.py +0 -0
  35. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/parsers/cdia.py +0 -0
  36. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/parsers/javascript.py +0 -0
  37. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/parsers/python.py +0 -0
  38. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/resolution.py +0 -0
  39. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/exclude_patterns.txt +0 -0
  40. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/file_health.md +0 -0
  41. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/library.md +0 -0
  42. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/monitored_paths.txt +0 -0
  43. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/pending_updates.md +0 -0
  44. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/wikifier.bat +0 -0
  45. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/wikifier.ps1 +0 -0
  46. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier/scripts/wikifier.sh +0 -0
  47. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier.egg-info/SOURCES.txt +0 -0
  48. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier.egg-info/dependency_links.txt +0 -0
  49. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier.egg-info/entry_points.txt +0 -0
  50. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier.egg-info/requires.txt +0 -0
  51. {wikifier-4.1.2 → wikifier-4.1.3}/wikifier.egg-info/top_level.txt +0 -0
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: wikifier
3
+ Version: 4.1.3
4
+ Summary: Zero-dependency agent-to-agent codebase wiki for LLMs and AI agents. Autonomously maintained via record-change and mark-green for token-efficient lookup of files, dependencies, health, and summaries — across tiny scripts to 50k+ monorepos. Optional MCP server with rich tools for agents.
5
+ Author-email: Aron Amos <aron@example.com>
6
+ Maintainer: Aron Amos
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/IronAdamant/wikifier
9
+ Project-URL: Repository, https://github.com/IronAdamant/wikifier
10
+ Project-URL: Documentation, https://github.com/IronAdamant/wikifier#readme
11
+ Project-URL: Bug Tracker, https://github.com/IronAdamant/wikifier/issues
12
+ Keywords: wiki,documentation,llm,agent,mcp,codebase,health-matrix,zero-dependency,shell,token-efficient,autonomous,record-change,mark-green,agent-wiki,llm-tools,dependency-graph,monorepo
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Topic :: Software Development :: Documentation
24
+ Classifier: Topic :: Software Development :: Version Control
25
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Provides-Extra: mcp
30
+ Requires-Dist: mcp>=1.0.0; extra == "mcp"
31
+ Dynamic: license-file
32
+
33
+ # Wikifier
34
+
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![PyPI version](https://img.shields.io/pypi/v/wikifier.svg)](https://pypi.org/project/wikifier/)
37
+ [![GitHub Stars](https://img.shields.io/github/stars/IronAdamant/wikifier?style=social)](https://github.com/IronAdamant/wikifier/stargazers)
38
+
39
+ **Agent-to-Agent Codebase Wiki — Token-Efficient • Autonomous • Zero-Dependency**
40
+
41
+ Wikifier gives AI agents and LLMs a living, queryable map of any codebase — from tiny scripts to 50k+ file monorepos — so they can look up files, imports, health status, and summaries without dumping full source into context.
42
+
43
+ The goal is token efficiency. It works as a token-saving agent-operated wiki layer that agents maintain themselves through a strict but lightweight workflow. Primary purpose: help LLMs and agents work on real codebases without wasting context on raw files they don't need right now.
44
+
45
+ Key capabilities flow naturally from this:
46
+ - Fast, targeted lookup through small `file_health.md`, `library.md` (with Mermaid dependency graphs and summaries), per-file `*.wiki.md` notes, health matrix, barrel reports, and incremental status.
47
+ - Autonomous maintenance: after editing source, agents use `record-change "the why"` (this is mandatory) to log intent, then `mark-green` once the wiki entry is updated.
48
+ - Support for creating new wiki entries or docs on the fly during agent work.
49
+ - Works great with or without MCP. There's an optional `wikifier-mcp` server that provides rich tools such as `get_project_status`, `get_dependencies`, `get_file_wiki`, `suggest_next_actions`, and `check_changes`.
50
+ - Handles large projects well thanks to incremental updates, directory scoping, and streaming modes. Everything is zero-dependency (pure Python + Bash).
51
+
52
+ **Mandatory agent protocol** (the exact loop agents should follow): `check-changes` → read the compact `file_health.md` + `pending_updates.md` → prioritize → edit → `record-change` → `mark-green` → `update-maps` when imports or structure change. The full LLM-ready details and examples live in `skills/run.md` (v0.5).
53
+
54
+ This entire project (including all the M5 dogfood evidence) was built and operated by agents using exactly this mode. It is deliberately **not** a general-purpose human documentation tool or IDE replacement — agent-to-agent first, always.
55
+
56
+ See `--help`, `skills/run.md`, and the MCP README for concrete usage.
57
+
58
+ ### Intended Use: Strictly Agent-to-Agent (Token-Saving)
59
+
60
+ This is meant **strictly** as an agent-to-agent wiki layer for token saving:
61
+
62
+ - Primary purpose: save tokens for agents/LLMs by letting them consult the health matrix, file wikis, barrels, and incremental status instead of re-reading full sources.
63
+ - Agents autonomously keep everything current: edit source → `record-change "the why"` → update the corresponding wiki entry → `mark-green`.
64
+ - You can create new wiki-maintained files or docs as part of your agent sessions.
65
+ - Typical workflow: run `wikifier check-changes`, read the small `file_health.md` + `pending_updates.md`, prioritize (🔴 then 🟡), do the work, record the change with intent, mark it green, and run `update-maps` when the dependency picture shifts.
66
+ - **It shouldn't be used for anything more than that.** Not general human docs, not an IDE, not for broad non-agent use.
67
+
68
+ The exact loop and LLM workflow are documented in `--help` and `skills/run.md`. All the real-world M5+ evidence in `Findings/` was produced by agents following this protocol precisely.
69
+
70
+ ### Status & Recent Changes
71
+
72
+ M5 broad real-world dogfood (85-90%+) on multiple external 5k–50k+ creative projects is complete. See `Findings/M5-Dogfood-Progress.md`, `M5-Dogfood-Assessment-Report.md`, and `p6_real_world_validation_report.md` for full agent diaries, metrics, 9 Guiding Principles traces, and the M5.3 plan.
73
+
74
+ Recent focus (v4.1.x):
75
+ - Human investigation layer separation (only the clean `index.html` viewer is deployed to targets; `diagnostics.html` is maintainer-only).
76
+ - Mapping & update speed hygiene (faster candidate collection with scandir + git fast-path, consistent excludes, parser micro-opts).
77
+ - Human dashboard UX: prominent Quick actions toolbar with copy-to-clipboard buttons for main commands (check-changes, update-maps, monitor &); big primary buttons in empty states for first-time setup; auto-copy of `wikifier update-maps` command on first render of "no structure map yet" (session-guarded) so it feels automatic on first run of a fresh project. See v4.1.3 notes.
78
+
79
+ Full history moved to `docs/` and `Findings/`. The project stays deliberately lean and agent-first.
80
+
81
+ **v4.1.3 (2026-06)**: Human dashboard command buttons + first-run update-maps UX (very minor polish to the secondary human investigation layer).
82
+ - Added visible "Quick actions" bar with easy one-click copy buttons for the primary commands available to humans using the dashboard (check-changes, update-maps, start monitor). Feedback includes exact pasteable command + "run in this project folder then Refresh" guidance + manual refresh link.
83
+ - Enhanced empty states ("No structure map yet", "No files yet") with prominent primary buttons for the relevant commands (update-maps prioritized, combined first-time setup for files).
84
+ - "Automatically on first run": when the no-map empty state first appears in a browser session, the `wikifier update-maps` command is auto-copied (guarded by sessionStorage) with a note, making the recommended first action feel automatic. Buttons + instructions guide the user to run in terminal and refresh/poll.
85
+ - Existing "Rebuild tree" / "Update data" buttons now use the improved copy+feedback UX. Keeps the clean human view (no dense agent internals).
86
+ - All under protocol (FRESH, record+mark-green with subid=human-dashboard-commands). No new features or scope change. Complements the existing copy snapshot buttons and guidance.
87
+
88
+ **v4.1.2 (2026-06)**: Speed improvements for updates on large projects (scandir/git fast-path in collectors, richer early pruning via `exclude_patterns.txt`, regex hoisting in parsers). Complements scoping, streaming budgets, and incremental dirty + barrel reverse index. No behaviour change.
89
+
90
+ **v4.1.1**: Human layer separation enforcement (only `index.html` copied on init).
91
+
92
+ **v4.1.0**: Structure cleanup (historical docs to `docs/`).
93
+
94
+ **v4.0 + 4.0.1 + M5**: Broad dogfood, MCP hardening, zero-dep enforcement, sustained monitor/subagent foundations. See `Findings/` for details.
95
+
96
+ ---
97
+
98
+ ## 🚀 Installation
99
+
100
+ ## Installation & Quick Start (for Agents & Humans)
101
+
102
+ ```bash
103
+ pip install wikifier
104
+ ```
105
+
106
+ For a project (recommended for agents):
107
+
108
+ ```bash
109
+ # 1. In the target project (or use WIKIFIER_PROJECT_ROOT)
110
+ wikifier init
111
+
112
+ # 2. Focus monitored_paths.txt for large repos (highly recommended)
113
+ # 3. Run the agent loop
114
+ wikifier check-changes
115
+ wikifier health --summary
116
+ # ... edit ...
117
+ wikifier record-change "path/to/file.py" "added feature X because Y (agent task Z)"
118
+ wikifier mark-green "path/to/file.py"
119
+ wikifier update-maps # when imports/structure changed
120
+ ```
121
+
122
+ **For MCP / AI agents** (Claude Desktop, Cursor, Cline, etc.):
123
+
124
+ ```bash
125
+ WIKIFIER_PROJECT_ROOT=/abs/path/to/your/project wikifier-mcp
126
+ ```
127
+
128
+ Or pass `project_root=` on every tool call. Root detection priority: env var > explicit param > upward walk for markers > .mcp.json.
129
+
130
+ Full protocol, examples, and LLM workflow: `skills/run.md` (read this first as an agent).
131
+
132
+ ## What You Get
133
+
134
+ - Token-efficient lookup for agents (health matrix, library.md with Mermaid, file wikis, BRC, incremental status).
135
+ - Autonomous maintenance: `record-change` (the "why") + `mark-green`.
136
+ - Incremental + scoped + resumable for large codebases.
137
+ - Optional MCP server with 23+ tools for agents.
138
+ - Secondary clean `index.html` dashboard (after init) for humans browsing the agent's wiki (chart + file descriptions + copyable snapshots).
139
+ - True zero dependencies.
140
+
141
+ See `skills/run.md` for the exact agent contract and `wikifier/mcp/README.md` for MCP setup.
142
+
143
+ ## Core Commands
144
+
145
+ | Command | Purpose |
146
+ |---------|---------|
147
+ | `wikifier check-changes` | Incremental scan + health/pending update |
148
+ | `wikifier record-change <file> "reason"` | Log why (required after edits) |
149
+ | `wikifier mark-green <file>` | Mark the wiki entry current |
150
+ | `wikifier update-maps` | Rebuild dependency graph + library.md |
151
+ | `wikifier health --summary` | Quick view (use for agents) |
152
+ | `wikifier monitor &` | Background incremental heartbeat |
153
+
154
+ For full power use the Python library (`from wikifier import ...`) or MCP tools directly.
155
+
156
+ ## Links
157
+
158
+ - GitHub: https://github.com/IronAdamant/wikifier
159
+ - PyPI: https://pypi.org/project/wikifier/
160
+ - Agent Protocol: `skills/run.md`
161
+ - MCP: `wikifier/mcp/README.md`
162
+ - Evidence: `Findings/` (M5 dogfood etc.)
163
+
164
+ **For AI search / agents**: Wikifier is a zero-dependency, agent-maintained, token-saving codebase wiki with autonomous `record-change` / `mark-green` updates, MCP tools, and strong support for large monorepos via scoping and streaming.
@@ -0,0 +1,132 @@
1
+ # Wikifier
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![PyPI version](https://img.shields.io/pypi/v/wikifier.svg)](https://pypi.org/project/wikifier/)
5
+ [![GitHub Stars](https://img.shields.io/github/stars/IronAdamant/wikifier?style=social)](https://github.com/IronAdamant/wikifier/stargazers)
6
+
7
+ **Agent-to-Agent Codebase Wiki — Token-Efficient • Autonomous • Zero-Dependency**
8
+
9
+ Wikifier gives AI agents and LLMs a living, queryable map of any codebase — from tiny scripts to 50k+ file monorepos — so they can look up files, imports, health status, and summaries without dumping full source into context.
10
+
11
+ The goal is token efficiency. It works as a token-saving agent-operated wiki layer that agents maintain themselves through a strict but lightweight workflow. Primary purpose: help LLMs and agents work on real codebases without wasting context on raw files they don't need right now.
12
+
13
+ Key capabilities flow naturally from this:
14
+ - Fast, targeted lookup through small `file_health.md`, `library.md` (with Mermaid dependency graphs and summaries), per-file `*.wiki.md` notes, health matrix, barrel reports, and incremental status.
15
+ - Autonomous maintenance: after editing source, agents use `record-change "the why"` (this is mandatory) to log intent, then `mark-green` once the wiki entry is updated.
16
+ - Support for creating new wiki entries or docs on the fly during agent work.
17
+ - Works great with or without MCP. There's an optional `wikifier-mcp` server that provides rich tools such as `get_project_status`, `get_dependencies`, `get_file_wiki`, `suggest_next_actions`, and `check_changes`.
18
+ - Handles large projects well thanks to incremental updates, directory scoping, and streaming modes. Everything is zero-dependency (pure Python + Bash).
19
+
20
+ **Mandatory agent protocol** (the exact loop agents should follow): `check-changes` → read the compact `file_health.md` + `pending_updates.md` → prioritize → edit → `record-change` → `mark-green` → `update-maps` when imports or structure change. The full LLM-ready details and examples live in `skills/run.md` (v0.5).
21
+
22
+ This entire project (including all the M5 dogfood evidence) was built and operated by agents using exactly this mode. It is deliberately **not** a general-purpose human documentation tool or IDE replacement — agent-to-agent first, always.
23
+
24
+ See `--help`, `skills/run.md`, and the MCP README for concrete usage.
25
+
26
+ ### Intended Use: Strictly Agent-to-Agent (Token-Saving)
27
+
28
+ This is meant **strictly** as an agent-to-agent wiki layer for token saving:
29
+
30
+ - Primary purpose: save tokens for agents/LLMs by letting them consult the health matrix, file wikis, barrels, and incremental status instead of re-reading full sources.
31
+ - Agents autonomously keep everything current: edit source → `record-change "the why"` → update the corresponding wiki entry → `mark-green`.
32
+ - You can create new wiki-maintained files or docs as part of your agent sessions.
33
+ - Typical workflow: run `wikifier check-changes`, read the small `file_health.md` + `pending_updates.md`, prioritize (🔴 then 🟡), do the work, record the change with intent, mark it green, and run `update-maps` when the dependency picture shifts.
34
+ - **It shouldn't be used for anything more than that.** Not general human docs, not an IDE, not for broad non-agent use.
35
+
36
+ The exact loop and LLM workflow are documented in `--help` and `skills/run.md`. All the real-world M5+ evidence in `Findings/` was produced by agents following this protocol precisely.
37
+
38
+ ### Status & Recent Changes
39
+
40
+ M5 broad real-world dogfood (85-90%+) on multiple external 5k–50k+ creative projects is complete. See `Findings/M5-Dogfood-Progress.md`, `M5-Dogfood-Assessment-Report.md`, and `p6_real_world_validation_report.md` for full agent diaries, metrics, 9 Guiding Principles traces, and the M5.3 plan.
41
+
42
+ Recent focus (v4.1.x):
43
+ - Human investigation layer separation (only the clean `index.html` viewer is deployed to targets; `diagnostics.html` is maintainer-only).
44
+ - Mapping & update speed hygiene (faster candidate collection with scandir + git fast-path, consistent excludes, parser micro-opts).
45
+ - Human dashboard UX: prominent Quick actions toolbar with copy-to-clipboard buttons for main commands (check-changes, update-maps, monitor &); big primary buttons in empty states for first-time setup; auto-copy of `wikifier update-maps` command on first render of "no structure map yet" (session-guarded) so it feels automatic on first run of a fresh project. See v4.1.3 notes.
46
+
47
+ Full history moved to `docs/` and `Findings/`. The project stays deliberately lean and agent-first.
48
+
49
+ **v4.1.3 (2026-06)**: Human dashboard command buttons + first-run update-maps UX (very minor polish to the secondary human investigation layer).
50
+ - Added visible "Quick actions" bar with easy one-click copy buttons for the primary commands available to humans using the dashboard (check-changes, update-maps, start monitor). Feedback includes exact pasteable command + "run in this project folder then Refresh" guidance + manual refresh link.
51
+ - Enhanced empty states ("No structure map yet", "No files yet") with prominent primary buttons for the relevant commands (update-maps prioritized, combined first-time setup for files).
52
+ - "Automatically on first run": when the no-map empty state first appears in a browser session, the `wikifier update-maps` command is auto-copied (guarded by sessionStorage) with a note, making the recommended first action feel automatic. Buttons + instructions guide the user to run in terminal and refresh/poll.
53
+ - Existing "Rebuild tree" / "Update data" buttons now use the improved copy+feedback UX. Keeps the clean human view (no dense agent internals).
54
+ - All under protocol (FRESH, record+mark-green with subid=human-dashboard-commands). No new features or scope change. Complements the existing copy snapshot buttons and guidance.
55
+
56
+ **v4.1.2 (2026-06)**: Speed improvements for updates on large projects (scandir/git fast-path in collectors, richer early pruning via `exclude_patterns.txt`, regex hoisting in parsers). Complements scoping, streaming budgets, and incremental dirty + barrel reverse index. No behaviour change.
57
+
58
+ **v4.1.1**: Human layer separation enforcement (only `index.html` copied on init).
59
+
60
+ **v4.1.0**: Structure cleanup (historical docs to `docs/`).
61
+
62
+ **v4.0 + 4.0.1 + M5**: Broad dogfood, MCP hardening, zero-dep enforcement, sustained monitor/subagent foundations. See `Findings/` for details.
63
+
64
+ ---
65
+
66
+ ## 🚀 Installation
67
+
68
+ ## Installation & Quick Start (for Agents & Humans)
69
+
70
+ ```bash
71
+ pip install wikifier
72
+ ```
73
+
74
+ For a project (recommended for agents):
75
+
76
+ ```bash
77
+ # 1. In the target project (or use WIKIFIER_PROJECT_ROOT)
78
+ wikifier init
79
+
80
+ # 2. Focus monitored_paths.txt for large repos (highly recommended)
81
+ # 3. Run the agent loop
82
+ wikifier check-changes
83
+ wikifier health --summary
84
+ # ... edit ...
85
+ wikifier record-change "path/to/file.py" "added feature X because Y (agent task Z)"
86
+ wikifier mark-green "path/to/file.py"
87
+ wikifier update-maps # when imports/structure changed
88
+ ```
89
+
90
+ **For MCP / AI agents** (Claude Desktop, Cursor, Cline, etc.):
91
+
92
+ ```bash
93
+ WIKIFIER_PROJECT_ROOT=/abs/path/to/your/project wikifier-mcp
94
+ ```
95
+
96
+ Or pass `project_root=` on every tool call. Root detection priority: env var > explicit param > upward walk for markers > .mcp.json.
97
+
98
+ Full protocol, examples, and LLM workflow: `skills/run.md` (read this first as an agent).
99
+
100
+ ## What You Get
101
+
102
+ - Token-efficient lookup for agents (health matrix, library.md with Mermaid, file wikis, BRC, incremental status).
103
+ - Autonomous maintenance: `record-change` (the "why") + `mark-green`.
104
+ - Incremental + scoped + resumable for large codebases.
105
+ - Optional MCP server with 23+ tools for agents.
106
+ - Secondary clean `index.html` dashboard (after init) for humans browsing the agent's wiki (chart + file descriptions + copyable snapshots).
107
+ - True zero dependencies.
108
+
109
+ See `skills/run.md` for the exact agent contract and `wikifier/mcp/README.md` for MCP setup.
110
+
111
+ ## Core Commands
112
+
113
+ | Command | Purpose |
114
+ |---------|---------|
115
+ | `wikifier check-changes` | Incremental scan + health/pending update |
116
+ | `wikifier record-change <file> "reason"` | Log why (required after edits) |
117
+ | `wikifier mark-green <file>` | Mark the wiki entry current |
118
+ | `wikifier update-maps` | Rebuild dependency graph + library.md |
119
+ | `wikifier health --summary` | Quick view (use for agents) |
120
+ | `wikifier monitor &` | Background incremental heartbeat |
121
+
122
+ For full power use the Python library (`from wikifier import ...`) or MCP tools directly.
123
+
124
+ ## Links
125
+
126
+ - GitHub: https://github.com/IronAdamant/wikifier
127
+ - PyPI: https://pypi.org/project/wikifier/
128
+ - Agent Protocol: `skills/run.md`
129
+ - MCP: `wikifier/mcp/README.md`
130
+ - Evidence: `Findings/` (M5 dogfood etc.)
131
+
132
+ **For AI search / agents**: Wikifier is a zero-dependency, agent-maintained, token-saving codebase wiki with autonomous `record-change` / `mark-green` updates, MCP tools, and strong support for large monorepos via scoping and streaming.
@@ -125,6 +125,25 @@
125
125
  </div>
126
126
  </div>
127
127
 
128
+ <!-- Quick actions: buttons for the main commands (copy to clipboard so user can run in terminal) -->
129
+ <div class="mb-4 px-1">
130
+ <div class="text-[10px] text-slate-400 mb-1">Quick actions — click to copy the command, paste &amp; run in your terminal (this folder), then refresh the page</div>
131
+ <div class="flex flex-wrap gap-2">
132
+ <button onclick="copyCommandForRun('check-changes')"
133
+ class="px-3 py-1.5 text-sm rounded-xl bg-slate-800 hover:bg-slate-700 border border-slate-700 flex items-center gap-x-2">
134
+ <span>Check for changes</span>
135
+ </button>
136
+ <button onclick="copyCommandForRun('update-maps')"
137
+ class="px-3 py-1.5 text-sm rounded-xl bg-emerald-800 hover:bg-emerald-700 border border-emerald-700 text-emerald-300 flex items-center gap-x-2">
138
+ <span>Rebuild structure map</span>
139
+ </button>
140
+ <button onclick="copyCommandForRun('monitor &amp;')"
141
+ class="px-3 py-1.5 text-sm rounded-xl bg-slate-800 hover:bg-slate-700 border border-slate-700 flex items-center gap-x-2">
142
+ <span>Start background monitor</span>
143
+ </button>
144
+ </div>
145
+ </div>
146
+
128
147
  <!-- HERO: The Chart / Tree (what humans see first and clearly) -->
129
148
  <div class="mb-8 bg-slate-900 border border-slate-800 rounded-3xl p-6">
130
149
  <div class="flex items-center justify-between mb-3">
@@ -341,7 +360,13 @@
341
360
  if (!rows || rows.length === 0) {
342
361
  listEl.innerHTML = `<div class="px-5 py-8 text-center">
343
362
  <div class="text-sm text-slate-400">No files in the wiki yet.</div>
344
- <div class="text-xs mt-2 text-slate-500">Run <code class="bg-slate-900 px-1">wikifier check-changes &amp;&amp; wikifier update-maps</code> in this project folder, then refresh.</div>
363
+ <div class="mt-3">
364
+ <button onclick="copyCommandForRun('check-changes &amp;&amp; update-maps', 'wikifier check-changes &amp;&amp; wikifier update-maps')"
365
+ class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-xl text-sm font-medium">
366
+ 📋 Copy first-time setup command
367
+ </button>
368
+ </div>
369
+ <div class="mt-2 text-xs text-slate-500">Run <code class="bg-slate-900 px-1">wikifier check-changes &amp;&amp; wikifier update-maps</code> in this project folder, then refresh.</div>
345
370
  </div>`;
346
371
  return;
347
372
  }
@@ -524,10 +549,30 @@
524
549
  container.innerHTML = `<div class="text-sm p-4 bg-slate-900 border border-slate-700 rounded">
525
550
  <div class="font-semibold mb-1">No structure map yet</div>
526
551
  <div class="text-slate-400">This project hasn't had its import/dependency tree generated yet.</div>
527
- <div class="mt-2 text-xs">Run this in the project folder:</div>
528
- <code class="block mt-1 p-2 bg-slate-950 rounded text-emerald-300">wikifier update-maps</code>
529
- <div class="mt-1 text-[10px] text-slate-500">Then refresh this page. The chart will show your codebase structure.</div>
552
+ <div class="mt-3">
553
+ <button onclick="copyCommandForRun('update-maps')"
554
+ class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-xl text-sm font-medium w-full sm:w-auto">
555
+ 📋 Copy command &amp; run wikifier update-maps (first time)
556
+ </button>
557
+ </div>
558
+ <div class="mt-2 text-[10px] text-slate-400">Run the copied command in your terminal <strong>inside this project folder</strong>, then refresh this page (or wait for the ~30s auto update). This is the recommended first step when you open the dashboard in a new project.</div>
530
559
  </div>`;
560
+
561
+ // "Automatically on the first run": if this is the very first time the user sees the empty map state in this browser session,
562
+ // auto-copy the command for them so it feels automatic, with clear feedback.
563
+ if (!sessionStorage.getItem('wikifier_first_map_auto_copied')) {
564
+ sessionStorage.setItem('wikifier_first_map_auto_copied', '1');
565
+ setTimeout(() => {
566
+ navigator.clipboard.writeText('wikifier update-maps').then(() => {
567
+ // non-intrusive note that we helped
568
+ const note = document.createElement('div');
569
+ note.className = 'mt-2 text-[10px] text-emerald-400';
570
+ note.textContent = '✓ update-maps command auto-copied for first run — paste it in your terminal now.';
571
+ const emptyBox = container.querySelector('div');
572
+ if (emptyBox) emptyBox.appendChild(note);
573
+ }).catch(() => {});
574
+ }, 300);
575
+ }
531
576
  return;
532
577
  }
533
578
  window.libraryMdCache = md;
@@ -611,16 +656,39 @@ Open index.html in the project for the live visual version.
611
656
  // Agents and technical users: use the .md files directly, diagnostics.html, MCP, or CLI.)
612
657
 
613
658
  // Lightweight runCommand for the human dashboard (only the two we surface prominently)
659
+ // Helper to copy a ready-to-paste command and give clear next-step feedback
660
+ function copyCommandForRun(cmd, fullText) {
661
+ const full = fullText || `wikifier ${cmd}`;
662
+ navigator.clipboard.writeText(full).then(() => {
663
+ const msg = document.createElement('div');
664
+ msg.className = `fixed bottom-4 right-4 bg-emerald-900 border border-emerald-700 px-4 py-3 rounded-2xl text-sm z-50 max-w-xs`;
665
+ msg.innerHTML = `
666
+ <div class="font-medium">Copied to clipboard:</div>
667
+ <code class="block mt-1 bg-black/40 px-2 py-1 rounded text-emerald-300 break-all">${full}</code>
668
+ <div class="mt-2 text-xs text-emerald-200">Paste &amp; run it in the terminal <strong>inside this project folder</strong>, then click <span class="underline">Refresh</span> above (or wait ~30s).</div>
669
+ <button onclick="this.closest('.fixed').remove(); window.location.reload()" class="mt-2 text-xs underline">Refresh dashboard now</button>
670
+ `;
671
+ document.body.appendChild(msg);
672
+ // auto remove after a while if user doesn't interact
673
+ setTimeout(() => { if (msg.parentNode) msg.parentNode.removeChild(msg); }, 12000);
674
+ }).catch(() => {
675
+ // Fallback for browsers that block clipboard
676
+ const msg = document.createElement('div');
677
+ msg.className = `fixed bottom-4 right-4 bg-slate-800 border border-slate-700 px-3 py-2 rounded-2xl text-xs z-50`;
678
+ msg.innerHTML = `Run this in the terminal: <code class="bg-black/40 px-1">${full}</code>`;
679
+ document.body.appendChild(msg);
680
+ setTimeout(()=>{ if (msg.parentNode) msg.parentNode.removeChild(msg); }, 4000);
681
+ });
682
+
683
+ // Optimistic: after user likely ran it, the next poll will pick it up
684
+ if (cmd.includes('check') || cmd.includes('health')) setTimeout(() => loadHealthMatrix && loadHealthMatrix(), 800);
685
+ if (cmd.includes('update')) setTimeout(() => loadMermaid && loadMermaid(), 800);
686
+ if (cmd.includes('monitor')) setTimeout(() => loadMonitorStatus && loadMonitorStatus(true), 600);
687
+ }
688
+
689
+ // Legacy / existing buttons still work via the improved helper
614
690
  function runCommand(cmd) {
615
- const msg = document.createElement('div');
616
- msg.className = `fixed bottom-4 right-4 bg-slate-800 border border-slate-700 px-3 py-1.5 rounded-2xl text-xs flex items-center gap-2 z-50`;
617
- msg.innerHTML = `Run <code>wikifier ${cmd}</code> (or <code>./wikifier.sh ${cmd}</code>) in this folder`;
618
- document.body.appendChild(msg);
619
- setTimeout(()=>{msg.style.opacity=0;setTimeout(()=>msg.remove(),900)},1600);
620
-
621
- if (cmd.includes('check') || cmd.includes('health')) setTimeout(() => loadHealthMatrix && loadHealthMatrix(), 600);
622
- if (cmd.includes('update')) setTimeout(() => loadMermaid && loadMermaid(), 500);
623
- if (cmd.includes('monitor')) setTimeout(() => loadMonitorStatus && loadMonitorStatus(true), 400);
691
+ copyCommandForRun(cmd);
624
692
  }
625
693
 
626
694
  // Boot: only what the human view needs (chart + files+descs + tree + monitor). Poll for live feel.
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wikifier"
7
- version = "4.1.2"
8
- description = "Agent-first, zero-dependency, self-maintaining codebase documentation & change tracking system"
7
+ version = "4.1.3"
8
+ description = "Zero-dependency agent-to-agent codebase wiki for LLMs and AI agents. Autonomously maintained via record-change and mark-green for token-efficient lookup of files, dependencies, health, and summaries — across tiny scripts to 50k+ monorepos. Optional MCP server with rich tools for agents."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
11
11
  authors = [
@@ -17,7 +17,9 @@ maintainers = [
17
17
  requires-python = ">=3.8"
18
18
  keywords = [
19
19
  "wiki", "documentation", "llm", "agent", "mcp", "codebase",
20
- "health-matrix", "zero-dependency", "shell"
20
+ "health-matrix", "zero-dependency", "shell", "token-efficient",
21
+ "autonomous", "record-change", "mark-green", "agent-wiki",
22
+ "llm-tools", "dependency-graph", "monorepo"
21
23
  ]
22
24
  classifiers = [
23
25
  "Development Status :: 4 - Beta",
@@ -62,4 +62,4 @@ from .contracts import (
62
62
  compute_acs_confidence,
63
63
  )
64
64
 
65
- __version__ = "4.1.2"
65
+ __version__ = "4.1.3"
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: wikifier
3
+ Version: 4.1.3
4
+ Summary: Zero-dependency agent-to-agent codebase wiki for LLMs and AI agents. Autonomously maintained via record-change and mark-green for token-efficient lookup of files, dependencies, health, and summaries — across tiny scripts to 50k+ monorepos. Optional MCP server with rich tools for agents.
5
+ Author-email: Aron Amos <aron@example.com>
6
+ Maintainer: Aron Amos
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/IronAdamant/wikifier
9
+ Project-URL: Repository, https://github.com/IronAdamant/wikifier
10
+ Project-URL: Documentation, https://github.com/IronAdamant/wikifier#readme
11
+ Project-URL: Bug Tracker, https://github.com/IronAdamant/wikifier/issues
12
+ Keywords: wiki,documentation,llm,agent,mcp,codebase,health-matrix,zero-dependency,shell,token-efficient,autonomous,record-change,mark-green,agent-wiki,llm-tools,dependency-graph,monorepo
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Topic :: Software Development :: Documentation
24
+ Classifier: Topic :: Software Development :: Version Control
25
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Provides-Extra: mcp
30
+ Requires-Dist: mcp>=1.0.0; extra == "mcp"
31
+ Dynamic: license-file
32
+
33
+ # Wikifier
34
+
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![PyPI version](https://img.shields.io/pypi/v/wikifier.svg)](https://pypi.org/project/wikifier/)
37
+ [![GitHub Stars](https://img.shields.io/github/stars/IronAdamant/wikifier?style=social)](https://github.com/IronAdamant/wikifier/stargazers)
38
+
39
+ **Agent-to-Agent Codebase Wiki — Token-Efficient • Autonomous • Zero-Dependency**
40
+
41
+ Wikifier gives AI agents and LLMs a living, queryable map of any codebase — from tiny scripts to 50k+ file monorepos — so they can look up files, imports, health status, and summaries without dumping full source into context.
42
+
43
+ The goal is token efficiency. It works as a token-saving agent-operated wiki layer that agents maintain themselves through a strict but lightweight workflow. Primary purpose: help LLMs and agents work on real codebases without wasting context on raw files they don't need right now.
44
+
45
+ Key capabilities flow naturally from this:
46
+ - Fast, targeted lookup through small `file_health.md`, `library.md` (with Mermaid dependency graphs and summaries), per-file `*.wiki.md` notes, health matrix, barrel reports, and incremental status.
47
+ - Autonomous maintenance: after editing source, agents use `record-change "the why"` (this is mandatory) to log intent, then `mark-green` once the wiki entry is updated.
48
+ - Support for creating new wiki entries or docs on the fly during agent work.
49
+ - Works great with or without MCP. There's an optional `wikifier-mcp` server that provides rich tools such as `get_project_status`, `get_dependencies`, `get_file_wiki`, `suggest_next_actions`, and `check_changes`.
50
+ - Handles large projects well thanks to incremental updates, directory scoping, and streaming modes. Everything is zero-dependency (pure Python + Bash).
51
+
52
+ **Mandatory agent protocol** (the exact loop agents should follow): `check-changes` → read the compact `file_health.md` + `pending_updates.md` → prioritize → edit → `record-change` → `mark-green` → `update-maps` when imports or structure change. The full LLM-ready details and examples live in `skills/run.md` (v0.5).
53
+
54
+ This entire project (including all the M5 dogfood evidence) was built and operated by agents using exactly this mode. It is deliberately **not** a general-purpose human documentation tool or IDE replacement — agent-to-agent first, always.
55
+
56
+ See `--help`, `skills/run.md`, and the MCP README for concrete usage.
57
+
58
+ ### Intended Use: Strictly Agent-to-Agent (Token-Saving)
59
+
60
+ This is meant **strictly** as an agent-to-agent wiki layer for token saving:
61
+
62
+ - Primary purpose: save tokens for agents/LLMs by letting them consult the health matrix, file wikis, barrels, and incremental status instead of re-reading full sources.
63
+ - Agents autonomously keep everything current: edit source → `record-change "the why"` → update the corresponding wiki entry → `mark-green`.
64
+ - You can create new wiki-maintained files or docs as part of your agent sessions.
65
+ - Typical workflow: run `wikifier check-changes`, read the small `file_health.md` + `pending_updates.md`, prioritize (🔴 then 🟡), do the work, record the change with intent, mark it green, and run `update-maps` when the dependency picture shifts.
66
+ - **It shouldn't be used for anything more than that.** Not general human docs, not an IDE, not for broad non-agent use.
67
+
68
+ The exact loop and LLM workflow are documented in `--help` and `skills/run.md`. All the real-world M5+ evidence in `Findings/` was produced by agents following this protocol precisely.
69
+
70
+ ### Status & Recent Changes
71
+
72
+ M5 broad real-world dogfood (85-90%+) on multiple external 5k–50k+ creative projects is complete. See `Findings/M5-Dogfood-Progress.md`, `M5-Dogfood-Assessment-Report.md`, and `p6_real_world_validation_report.md` for full agent diaries, metrics, 9 Guiding Principles traces, and the M5.3 plan.
73
+
74
+ Recent focus (v4.1.x):
75
+ - Human investigation layer separation (only the clean `index.html` viewer is deployed to targets; `diagnostics.html` is maintainer-only).
76
+ - Mapping & update speed hygiene (faster candidate collection with scandir + git fast-path, consistent excludes, parser micro-opts).
77
+ - Human dashboard UX: prominent Quick actions toolbar with copy-to-clipboard buttons for main commands (check-changes, update-maps, monitor &); big primary buttons in empty states for first-time setup; auto-copy of `wikifier update-maps` command on first render of "no structure map yet" (session-guarded) so it feels automatic on first run of a fresh project. See v4.1.3 notes.
78
+
79
+ Full history moved to `docs/` and `Findings/`. The project stays deliberately lean and agent-first.
80
+
81
+ **v4.1.3 (2026-06)**: Human dashboard command buttons + first-run update-maps UX (very minor polish to the secondary human investigation layer).
82
+ - Added visible "Quick actions" bar with easy one-click copy buttons for the primary commands available to humans using the dashboard (check-changes, update-maps, start monitor). Feedback includes exact pasteable command + "run in this project folder then Refresh" guidance + manual refresh link.
83
+ - Enhanced empty states ("No structure map yet", "No files yet") with prominent primary buttons for the relevant commands (update-maps prioritized, combined first-time setup for files).
84
+ - "Automatically on first run": when the no-map empty state first appears in a browser session, the `wikifier update-maps` command is auto-copied (guarded by sessionStorage) with a note, making the recommended first action feel automatic. Buttons + instructions guide the user to run in terminal and refresh/poll.
85
+ - Existing "Rebuild tree" / "Update data" buttons now use the improved copy+feedback UX. Keeps the clean human view (no dense agent internals).
86
+ - All under protocol (FRESH, record+mark-green with subid=human-dashboard-commands). No new features or scope change. Complements the existing copy snapshot buttons and guidance.
87
+
88
+ **v4.1.2 (2026-06)**: Speed improvements for updates on large projects (scandir/git fast-path in collectors, richer early pruning via `exclude_patterns.txt`, regex hoisting in parsers). Complements scoping, streaming budgets, and incremental dirty + barrel reverse index. No behaviour change.
89
+
90
+ **v4.1.1**: Human layer separation enforcement (only `index.html` copied on init).
91
+
92
+ **v4.1.0**: Structure cleanup (historical docs to `docs/`).
93
+
94
+ **v4.0 + 4.0.1 + M5**: Broad dogfood, MCP hardening, zero-dep enforcement, sustained monitor/subagent foundations. See `Findings/` for details.
95
+
96
+ ---
97
+
98
+ ## 🚀 Installation
99
+
100
+ ## Installation & Quick Start (for Agents & Humans)
101
+
102
+ ```bash
103
+ pip install wikifier
104
+ ```
105
+
106
+ For a project (recommended for agents):
107
+
108
+ ```bash
109
+ # 1. In the target project (or use WIKIFIER_PROJECT_ROOT)
110
+ wikifier init
111
+
112
+ # 2. Focus monitored_paths.txt for large repos (highly recommended)
113
+ # 3. Run the agent loop
114
+ wikifier check-changes
115
+ wikifier health --summary
116
+ # ... edit ...
117
+ wikifier record-change "path/to/file.py" "added feature X because Y (agent task Z)"
118
+ wikifier mark-green "path/to/file.py"
119
+ wikifier update-maps # when imports/structure changed
120
+ ```
121
+
122
+ **For MCP / AI agents** (Claude Desktop, Cursor, Cline, etc.):
123
+
124
+ ```bash
125
+ WIKIFIER_PROJECT_ROOT=/abs/path/to/your/project wikifier-mcp
126
+ ```
127
+
128
+ Or pass `project_root=` on every tool call. Root detection priority: env var > explicit param > upward walk for markers > .mcp.json.
129
+
130
+ Full protocol, examples, and LLM workflow: `skills/run.md` (read this first as an agent).
131
+
132
+ ## What You Get
133
+
134
+ - Token-efficient lookup for agents (health matrix, library.md with Mermaid, file wikis, BRC, incremental status).
135
+ - Autonomous maintenance: `record-change` (the "why") + `mark-green`.
136
+ - Incremental + scoped + resumable for large codebases.
137
+ - Optional MCP server with 23+ tools for agents.
138
+ - Secondary clean `index.html` dashboard (after init) for humans browsing the agent's wiki (chart + file descriptions + copyable snapshots).
139
+ - True zero dependencies.
140
+
141
+ See `skills/run.md` for the exact agent contract and `wikifier/mcp/README.md` for MCP setup.
142
+
143
+ ## Core Commands
144
+
145
+ | Command | Purpose |
146
+ |---------|---------|
147
+ | `wikifier check-changes` | Incremental scan + health/pending update |
148
+ | `wikifier record-change <file> "reason"` | Log why (required after edits) |
149
+ | `wikifier mark-green <file>` | Mark the wiki entry current |
150
+ | `wikifier update-maps` | Rebuild dependency graph + library.md |
151
+ | `wikifier health --summary` | Quick view (use for agents) |
152
+ | `wikifier monitor &` | Background incremental heartbeat |
153
+
154
+ For full power use the Python library (`from wikifier import ...`) or MCP tools directly.
155
+
156
+ ## Links
157
+
158
+ - GitHub: https://github.com/IronAdamant/wikifier
159
+ - PyPI: https://pypi.org/project/wikifier/
160
+ - Agent Protocol: `skills/run.md`
161
+ - MCP: `wikifier/mcp/README.md`
162
+ - Evidence: `Findings/` (M5 dogfood etc.)
163
+
164
+ **For AI search / agents**: Wikifier is a zero-dependency, agent-maintained, token-saving codebase wiki with autonomous `record-change` / `mark-green` updates, MCP tools, and strong support for large monorepos via scoping and streaming.