Skip to content

Commit 38fd6b8

Browse files
authored
Merge branch 'main' into develop
2 parents 6c3bf67 + cfe9759 commit 38fd6b8

1 file changed

Lines changed: 57 additions & 38 deletions

File tree

examples/wiki_as_README.md

Lines changed: 57 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Comprehensive documentation for the Wiki As Readme project, covering its feature
1919

2020
---
2121

22-
<a name="introduction-to-wiki-as-readme"></a>
22+
<a name="project-overview"></a>
2323

2424
<details>
2525
<summary>Relevant source files</summary>
@@ -33,7 +33,7 @@ The following files were used as context for generating this wiki page:
3333
- [pyproject.toml](pyproject.toml)
3434
</details>
3535

36-
# Introduction to Wiki As Readme
36+
# Project Overview
3737

3838
**Wiki As Readme** is an AI-powered documentation tool designed to transform any codebase into a comprehensive wiki or `README.md` file within minutes. It serves as a "drop-in" solution for automated, high-quality technical documentation by emphasizing universal compatibility across various Large Language Models (LLMs), Git platforms, and deployment environments. The project's core purpose is to reduce the manual effort associated with maintaining up-to-date project documentation by leveraging AI for deep context analysis and structured content generation.
3939
Sources: [README.md](Introduction section), [CLAUDE.md](Project Overview)
@@ -305,7 +305,7 @@ Sources: [README.md](1. GitHub Action (Recommended) section), [README.md](POST /
305305

306306
---
307307

308-
<a name="core-features-overview"></a>
308+
<a name="universal-compatibility"></a>
309309

310310
<details>
311311
<summary>Relevant source files</summary>
@@ -319,7 +319,7 @@ The following files were used as context for generating this wiki page:
319319
- [src/prompts/wiki_structure_generator.yaml](src/prompts/wiki_structure_generator.yaml)
320320
</details>
321321

322-
# Core Features Overview
322+
# Universal Compatibility
323323

324324
This document outlines the core features and architectural components of the wiki generation system. The system automates the creation of technical documentation by analyzing a software repository, determining a logical wiki structure, and generating detailed page content using Large Language Models (LLMs). It addresses the challenge of producing comprehensive, accurate, and engineer-friendly documentation from source code.
325325

@@ -509,14 +509,19 @@ The system incorporates error handling at various stages to ensure robustness an
509509
* **File Saving:** `WikiGenerationService.save_to_file` includes a `try-except` block to handle potential `OSError` during file system operations.
510510
Sources: [src/services/wiki_generator.py](validate_request), [src/services/wiki_generator.py](_initialize_and_determine), [src/services/structure_analyzer.py](determine_wiki_structure), [src/services/structure_analyzer.py](generate_page_content), [src/services/structure_analyzer.py](_build_error_placeholder), [src/services/wiki_generator.py](save_to_file)
511511

512-
---
512+
B -- "OpenRouter" --> K["Prefix: openrouter/"]
513+
K --> L["Set OPENROUTER_API_KEY"]
514+
L --> E
513515

514516
<a name="github-action-usage"></a>
515517

516-
<details>
517-
<summary>Relevant source files</summary>
518+
B -- "Ollama" --> O["Prefix: ollama/"]
519+
O --> P{"LLM_BASE_URL?"}
520+
P -- "Yes" --> Q["Set api_base"]
521+
Q --> E
518522

519-
The following files were used as context for generating this wiki page:
523+
B -- "Unsupported" --> R["Raise ValueError"]
524+
```
520525
521526
- [.github/workflows/wiki-as-readme-action.yml](.github/workflows/wiki-as-readme-action.yml)
522527
- [.github/workflows/version-sync.yml](.github/workflows/version-sync.yml)
@@ -1675,14 +1680,15 @@ The system incorporates several mechanisms for handling errors during LLM intera
16751680
* **User-Friendly Error Placeholders**: As per the design plan, if an LLM call fails, the raw error string is replaced with a user-friendly Markdown placeholder in the final wiki output, guiding the user on potential next steps.
16761681
Sources: [docs/plans/2026-02-25-llm-timeout-handling-design.md](Error Placeholder Format section)
16771682

1678-
---
1683+
1. **Wiki Generation:** It makes an internal HTTP POST request to the `/api/v1/wiki/generate/file` endpoint of the same application. This request includes details like `repo_owner`, `repo_name`, `repo_url`, and desired language/view options. A timeout of 60 seconds is applied to accommodate generation time.
1684+
2. **Result Extraction:** Upon successful generation, it extracts the markdown content from the response.
1685+
3. **GitHub Update:** It then calls `update_github_readme` to commit the newly generated markdown content to the specified GitHub repository.
16791686

16801687
<a name="git-&-notion-integrations"></a>
16811688

1682-
<details>
1683-
<summary>Relevant source files</summary>
1689+
### Updating GitHub `WIKI.md` (`update_github_readme`)
16841690

1685-
The following files were used as context for generating this wiki page:
1691+
This function handles the interaction with the GitHub API to commit the generated markdown:
16861692

16871693
- [src/providers/github.py](src/providers/github.py)
16881694
- [src/providers/gitlab.py](src/providers/gitlab.py)
@@ -2276,6 +2282,7 @@ sequenceDiagram
22762282
GA-->>BT: "200/201 OK"
22772283
BT->>BT: "Log Success/Failure"
22782284
```
2285+
Sources: [src/api/v1/endpoints/wiki.py](get_wiki_generation_status)
22792286

22802287
### GitHub Update Mechanism
22812288

@@ -2317,7 +2324,9 @@ Triggers an asynchronous wiki generation task. The generated Markdown content is
23172324
**Request Body:** `WikiGenerationRequest`
23182325
**Response Body:** `WikiGenerationResponse`
23192326

2320-
| Parameter | Type | Description |
2327+
This model represents the immediate response after successfully initiating a wiki generation task.
2328+
2329+
| Field | Type | Description |
23212330
|---|---|---|
23222331
| `message` | `str` | A message indicating the status of the request. |
23232332
| `task_id` | `str` | The ID of the background task initiated. |
@@ -2669,44 +2678,51 @@ The Korean LangGraph Wiki includes:
26692678
* **빠른 시작 ("Quickstart"):** Provides installation instructions and a simple workflow example. Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/langgraph_readme_ko.md](빠른 시작)
26702679
* **핵심 이점 ("Core Benefits"):** Lists key advantages such as durable execution, human-in-the-loop, comprehensive memory, debugging with LangSmith, and production-ready deployment. Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/langgraph_readme_ko.md](핵심 이점)
26712680

2672-
### Simple Workflow Example (Korean)
2673-
2674-
The quickstart section includes the same Python example for creating a simple workflow:
2675-
2676-
```python
2677-
from langgraph.graph import START, StateGraph
2678-
from typing_extensions import TypedDict
2681+
### Supported Versions
26792682

2683+
Only the **latest release** of "Wiki As Readme" is officially supported for security updates. Users and contributors are encouraged to always use the most recent version to benefit from the latest security patches and features.
26802684

2681-
class State(TypedDict):
2682-
text: str
2685+
| Version | Supported |
2686+
|---|---|
2687+
| Latest | :white_check_mark: |
2688+
| Older | :x: |
26832689

2690+
Sources: [SECURITY.md](SECURITY.md)
26842691

2685-
def node_a(state: State) -> dict:
2686-
return {"text": state["text"] + "a"}
2692+
### How to Report a Vulnerability
26872693

2694+
To report a security vulnerability, please follow these steps:
2695+
1. **Do NOT** report vulnerabilities through public GitHub issues or pull requests. This could expose the vulnerability before a fix is available, putting users at risk.
2696+
2. **Email your report** directly to the project maintainer at: **catuscio@hotmail.com**.
2697+
3. **Include comprehensive details** in your email. This should cover:
2698+
* A clear description of the vulnerability.
2699+
* Steps to reproduce the issue.
2700+
* The version of "Wiki As Readme" affected.
2701+
* Any potential impact or exploit scenarios.
2702+
* If possible, provide a proof-of-concept.
26882703

2689-
def node_b(state: State) -> dict:
2690-
return {"text": state["text"] + "b"}
2704+
The project team aims to acknowledge your report within 48 hours and will keep you updated on the progress of the fix.
2705+
Sources: [SECURITY.md](SECURITY.md)
26912706

2707+
## Code Quality and Pre-commit Hooks
26922708

2693-
graph = StateGraph(State)
2694-
graph.add_node("node_a", node_a)
2695-
graph.add_node("node_b", node_b)
2696-
graph.add_edge(START, "node_a")
2697-
graph.add_edge("node_a", "node_b")
2709+
To maintain high code quality, consistency, and prevent common issues, "Wiki As Readme" utilizes `pre-commit` hooks. These hooks automatically run checks on your code before you commit it, ensuring that contributions adhere to project standards.
26982710

26992711
print(graph.compile().invoke({"text": ""}))
27002712
# {'text': 'ab'}
27012713
```
27022714
Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/langgraph_readme_ko.md](간단한 워크플로우 생성)
27032715
2704-
### Workflow Diagram (Korean)
2716+
The project's pre-commit configuration is defined in `.pre-commit-config.yaml`. It currently uses `ruff` for both linting and formatting Python code.
27052717
2706-
```mermaid
2707-
graph TD
2708-
A["Start"] --> B["node_a"];
2709-
B --> C["node_b"];
2718+
```yaml
2719+
repos:
2720+
- repo: https://github.com/astral-sh/ruff-pre-commit
2721+
rev: v0.11.13
2722+
hooks:
2723+
- id: ruff
2724+
args: [--fix]
2725+
- id: ruff-format
27102726
```
27112727
Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/langgraph_readme_ko.md](워크플로우 시각화)
27122728

@@ -2723,7 +2739,7 @@ The "Wiki As Readme" documentation includes:
27232739
* **Usage Modes:** Covers using the tool as a GitHub Action, with Docker Compose, for local Python development, and as a server with webhooks. Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/wiki_as_README.md](Using as a GitHub Action)
27242740
* **Project Architecture Overview:** Provides an overview of the system's components (Streamlit Frontend, FastAPI Backend, LiteLLM, Pydantic, Mermaid.js) and their interactions. Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/wiki_as_README.md](Project Architecture Overview)
27252741

2726-
### System Architecture Diagram
2742+
### Ruff Linting and Formatting
27272743

27282744
```mermaid
27292745
graph TD
@@ -2737,7 +2753,10 @@ graph TD
27372753
```
27382754
Sources: [https://github.com/langchain-ai/langgraph/blob/main/examples/wiki_as_README.md](Project Architecture Overview)
27392755

2740-
### GitHub Action Workflow Diagram
2756+
**To set up pre-commit hooks locally:**
2757+
1. Ensure you have `pre-commit` installed (`pip install pre-commit`).
2758+
2. Navigate to the root of your project directory.
2759+
3. Run `pre-commit install`.
27412760

27422761
```mermaid
27432762
sequenceDiagram

0 commit comments

Comments
 (0)