Goal
Strip all LLM-related code, config, and cache from phpMan. After this:
- phpMan is a pure documentation server: man/perldoc/info/pydoc/ri → raw HTML/Markdown/JSON/MCP
- 0 LLM calls in any request path
- Cache is for storage only, not enhancement
Why now
The 2026-07-14 myblog MT→markdown migration made it clear that LLM work is dominated by task management, prompt versioning, and flow orchestration — concerns that don't belong in a doc server. Same prompts serve phpMan, myblog, and future projects via the new standalone llm_enhance repo (#222).
Code to delete from phpMan.php
enhanceManPage()
callLLM()
cleanEmojiHtml()
formatMarkdownToHTML(), formatInlineMarkdown()
renderTocSidebar() (the LLM-enhanced HTML TOC version)
- The
--enhance CLI flag (formerly phpMan.php --enhance=...)
Config to delete from phpman.config.php.example
LLM_API_KEY
LLM_API_URL
LLM_MODEL
LLM_MAX_TOKENS
PHPMAN_ENHANCE_MAX_CHARS
Schema migration
Drop from cache SQLite table:
emoji_html column
emoji_md column
(One-time migration; backup .phpman/cache/db.sqlite first.)
Files to delete
cli/batch-enhance.php (moved to llm_enhance as Python CLI)
test/unit/test_enhance.php (LLM-related tests)
Docs to update
docs/01-PRODUCT.md §2.12 — already updated to "Moved to External Project"
docs/02-UI-DESIGN.md — drop emoji-related theme tokens if any
docs/05-PLAN.md — already documents this as Phase F
- README.md — point users to
llm_enhance for enhanced output
Validation
php test/run_all.php passes (target: ~323/323, was 349 minus 26 LLM tests)
phpMan.php request path: grep -E 'callLLM|enhanceMan|emoji_' phpMan.php returns 0 matches
phpMan.php line count reduced by ~300-500 lines
- Manual smoke:
/man/ls, /perldoc/File::Path, /search/foo all return raw output, no LLM involvement
Version
Tag v5.0.0 (major bump — removed features). No backport path; users wanting emoji enhancement install llm_enhance separately.
Rollback
All original code is in git history (v4.0..v4.9). git revert v5.0.0..HEAD restores it. llm_enhance repo is independent and unaffected.
Related
Goal
Strip all LLM-related code, config, and cache from phpMan. After this:
Why now
The 2026-07-14 myblog MT→markdown migration made it clear that LLM work is dominated by task management, prompt versioning, and flow orchestration — concerns that don't belong in a doc server. Same prompts serve phpMan, myblog, and future projects via the new standalone
llm_enhancerepo (#222).Code to delete from phpMan.php
enhanceManPage()callLLM()cleanEmojiHtml()formatMarkdownToHTML(),formatInlineMarkdown()renderTocSidebar()(the LLM-enhanced HTML TOC version)--enhanceCLI flag (formerlyphpMan.php --enhance=...)Config to delete from phpman.config.php.example
LLM_API_KEYLLM_API_URLLLM_MODELLLM_MAX_TOKENSPHPMAN_ENHANCE_MAX_CHARSSchema migration
Drop from
cacheSQLite table:emoji_htmlcolumnemoji_mdcolumn(One-time migration; backup
.phpman/cache/db.sqlitefirst.)Files to delete
cli/batch-enhance.php(moved tollm_enhanceas Python CLI)test/unit/test_enhance.php(LLM-related tests)Docs to update
docs/01-PRODUCT.md§2.12 — already updated to "Moved to External Project"docs/02-UI-DESIGN.md— drop emoji-related theme tokens if anydocs/05-PLAN.md— already documents this as Phase Fllm_enhancefor enhanced outputValidation
php test/run_all.phppasses (target: ~323/323, was 349 minus 26 LLM tests)phpMan.phprequest path:grep -E 'callLLM|enhanceMan|emoji_' phpMan.phpreturns 0 matchesphpMan.phpline count reduced by ~300-500 lines/man/ls,/perldoc/File::Path,/search/fooall return raw output, no LLM involvementVersion
Tag v5.0.0 (major bump — removed features). No backport path; users wanting emoji enhancement install
llm_enhanceseparately.Rollback
All original code is in git history (v4.0..v4.9).
git revert v5.0.0..HEADrestores it.llm_enhancerepo is independent and unaffected.Related
docs/01-PRODUCT.md§2.12docs/05-PLAN.md§3 Phase F (Cleanup phpMan, week 4)