Automated Codebase Interview, API Generator & Dual-Engine Publishing Platform (MkDocs Material & Docsify)
Building accurate, maintainable, secure, and browsable documentation for the era of Human-Agent Collaboration.
π Official Website β’ π Documentation β’ π€ Partner (Alwkala) β’ β‘ Commands β’ π‘οΈ Security Guarantees β’ π Read in Arabic (Ψ¨Ψ§ΩΨΉΨ±Ψ¨ΩΨ©)
Note
TidyFactor Doc is a deterministic documentation engine and Docsify architecture suite built for AI coding agents (Google Antigravity, Claude Code, Cursor, Codex, Windsurf). It systematically interviews a codebaseβparsing source AST docblocks, Git commit rationale, runtime environment variables, and error patternsβto produce pristine, browsable /docs portals with zero manual drift, zero credential leaks, and zero broken local paths.
| For Developers & Tech Leads | For AI Coding Agents | For Open-Source & Enterprise |
|---|---|---|
| Zero Manual Writing: Non-destructive codebase analysis extracts architecture, API signatures, and setup flows directly from source. | Token-Efficient Routing: Router SKILL.md (~350 tokens) dispatches isolated workflows with exact memory context. |
Instant Docsify Portal: One command transforms /docs into a responsive, searchable documentation website. |
| Zero Sensitive Leakage: Enforces automated redaction of API keys, passwords, database credentials, and production IPs. | Fact-Grounded Only: Agents are constrained from hallucinating signatures or parametersβeverything traces to findings. | Universal Polyglot: Native templates for PHP 8+, TypeScript, JavaScript ES Modules, and React/Vue/Next components. |
Clean Relative Linking: Eliminates broken file:/// and machine paths (C:\...), guaranteeing portable markdown. |
Deterministic Validation: Every workflow has an explicit checklist and manifest tracking in docs/.doc-manifest.json. |
Bilingual by Design: Native LTR/RTL support with curated typography pairings (Inter + Cairo/Tajawal). |
tidyfactor-doc structures documentation generation into 4 sequential, deterministic phases:
graph LR
P1["1. Init (Scaffold)"] --> P2["2. Collect (Interview)"]
P2 --> P3["3. Generate (Authoring)"]
P3 --> P4["4. Docsify (Publish)"]
[ Phase 1: init ] ββ> Creates /docs directory tree & .doc-manifest.json
β
[ Phase 2: collect ] β> Gathers 5 dimensions (Code AST, Git History, Env, Personas, Errors) into docs/.collected/
β
[ Phase 3: generate ] β> Produces API refs, Guides, Inline comments, or Root README from collected facts
β
[ Phase 4: docsify ] β> Assembles index.html & _sidebar.md for instant static browser preview & hosting
| Intent & User Request | Command | Loaded Workflow & Memory | Output Artifact |
|---|---|---|---|
| "Set up docs for this project" / "scaffold /docs" | init |
workflows/init-docs.mdmemory/doc-tree.md |
/docs scaffold, docs/.doc-manifest.json, docs/README.md |
| "Document this codebase" / "gather facts for module X" | collect |
workflows/collect.mdmemory/collection-sources.md |
docs/.collected/<target>.md (5-dimensional structured analysis) |
| "Write API reference" / "generate docs for endpoints" | generate |
workflows/generate-api.mdmemory/doc-templates.mdmemory/stacks/*.md |
docs/api/<target>.md (parameter tables, returns, errors, examples) |
| "Write setup guide" / "create architecture runbook" | generate |
workflows/generate-guide.mdmemory/doc-templates.md |
docs/guides/<purpose-slug>.md (focused, single-purpose guide) |
| "Generate project README" / "update root README" | generate |
workflows/generate-readme.mdmemory/doc-templates.md |
Root README.md (overview, install, env vars, quick start) |
| "Add inline docblocks" / "document public functions" | generate |
workflows/generate-inline.mdmemory/stacks/*.md |
Direct source code edit with PHPDoc / JSDoc / TSDoc comments |
| "Turn /docs into Docsify site" / "deploy doc portal" | docsify |
workflows/docsify.mdmemory/docsify-config.md |
docs/index.html + docs/_sidebar.md (instant web portal) |
In modern AI agent workflows, sensitive credentials and private configurations frequently leak into documentation. tidyfactor-doc implements strict, non-negotiable redaction rules (Constraint 6):
| Secret / Sensitive Category | Prohibited Leaks | Mandatory Safe Replacement |
|---|---|---|
| API Tokens & Secret Keys | sk_live_948f98a7c1b2... |
EXAMPLE_TOKEN_1234567890ABCDEFGH or YOUR_API_KEY |
| Passwords & DB Credentials | RootP@ssw0rd2026! |
your_secret_password |
| Server & Host IPs | 192.168.1.50, 45.33.21.99 |
203.0.113.1 (RFC 5737 documentation prefix) |
| Workstation File URIs | file:///C:/path/to/project/... |
./docs/guides/ or project-root/ |
| Internal Development URLs | http://localhost:8080/admin |
https://api.example.com or http://localhost:PORT |
| User Home Directories | /home/developer/workspace/... |
~/project or /path/to/project |
To guarantee that documentation renders flawlessly on GitHub, GitLab, Docsify, and local markdown viewers, tidyfactor-doc enforces Constraint 7:
- β Zero Absolute Drive Paths: Never output
file:///URLs or workstation drive letters (C:\...,/Users/...). - β
Clean Markdown Relative Links: All internal document links use standard relative paths (e.g.
[Architecture Guide](./guides/architecture.md)). - β
Docsify Persistent Subfolder Routing: Configures
alias: { '/.*/_sidebar.md': '/_sidebar.md' }with root-relative leading slashes (/guides/...,/api/...) to eliminate 404 broken sidebars when navigating deep routes. - β
Localized Docs Inside Root: Localized files reside inside
/docs(e.g.docs/README.ar.md), never linking outside the/docsboundary.
Every project initialized and maintained by tidyfactor-doc strictly adheres to the flattened, no-empty-structures hierarchy:
project-root/
βββ README.md # Project overview & quick start (Root)
βββ docs/ # Single documentation root
βββ README.md # Doc-site landing page & introduction
βββ README.ar.md # Arabic localized overview (optional)
βββ index.html # Docsify single-page application entry point
βββ _sidebar.md # Auto-generated categorized navigation tree
βββ .doc-manifest.json # Machine-readable sync & state manifest
βββ .collected/ # Raw interview findings (intermediate artifact)
β βββ core.md
β βββ auth-module.md
βββ api/ # Public API & endpoint specifications
β βββ authentication.md
β βββ billing.md
βββ guides/ # Targeted developer & user guides
βββ architecture.md
βββ developer-setup.md
βββ deployment-runbook.md
{
"project": "my-saas-platform",
"stacks": ["php", "ts", "react"],
"collected": {
"auth": "2026-08-20T14:30:00Z",
"core": "2026-08-20T14:32:00Z"
},
"generated": {
"docs/api/auth.md": "2026-08-20T14:35:00Z",
"docs/guides/developer-setup.md": "2026-08-20T14:36:00Z",
"README.md": "2026-08-20T14:37:00Z"
}
}Add tidyfactor-doc to your active workspace or global agent registry:
npx @tidyfactor/cli-doc add-skillTrigger the skill in your preferred AI Coding Assistant:
| Agent / IDE | Invocation Example |
|---|---|
| Google Antigravity | /tidyfactor-doc or "Document this codebase and build a Docsify site" |
| Claude Code | /tidyfactor-doc init or "Generate API docs for src/Core" |
| Cursor & Windsurf | @tidyfactor-doc Set up /docs and interview this PHP module |
| Codex CLI | tidyfactor-doc generate API reference |
Preview your Docsify documentation portal in real time:
# Using PHP built-in server
php -S localhost:3001 -t docs
# Or using Docsify CLI / Python
npx docsify-cli serve docs
python -m http.server 3001 -d docs- π Official Website: https://tidyfactor.com/
- π Official Documentation: https://tidyfactor.com/documentation
- π€ Official Partner Website: Alwkala Digital Agency
- π GitHub Organization: github.com/TidyFactor
- π§ Business Inquiries: hello@tidyfactor.com
- π± WhatsApp: +20 101 665 6899
- π Phone: +20 101 665 6899
- π Location: Cairo, Egypt
Licensed under the Apache License 2.0. Copyright (c) 2026 TidyFactor & Alwkala.
