> ## Documentation Index
> Fetch the complete documentation index at: https://harisfazillah.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HOWTO: generate-walkthrough - Session Scribe

> OKF-compliant documentation for HOWTO-GENERATE-WALKTHROUGH.md. Deep State of Mind framework. Deep State of Mind framework. Deep State of Mind framework.

# docs/tools/HOWTO-GENERATE-WALKTHROUGH.md

> **Standard: DSOM For My AI Protocol v6.1 | Cognitive Automation**
> **Tools:** `generate-walkthrough.ps1`, `generate-walkthrough.sh`
> **Platforms:** Windows Native (T1), Linux/WSL2 (T2)

***

## 1. Purpose

`generate-walkthrough` is the **Session Summarizer** of the DSOM ecosystem. It automates the extraction of "Accomplishments" from your Git history and your `task.md` file, formatting them into a standardised "Session Anchor" block ready to be pasted into `walkthrough.md`.

**Use it to:**

* Automatically harvest all commit messages from "Today".
* Identify all tasks marked as `(SELESAI)` in your `task.md`.
* Ensure consistent formatting for your daily mental anchors.
* Reduce the manual overhead of the End-of-Day consolidation ritual.

**Location:**

* `tools/generate-walkthrough.ps1` (Windows)
* `tools/generate-walkthrough.sh` (Linux/WSL2)

***

## 2. Prerequisites

| Requirement | Minimum          | Notes                                           |
| :---------- | :--------------- | :---------------------------------------------- |
| Protocol    | DSOM 5.0+        | Expects `[x]` and `(SELESAI)` markers in tasks. |
| Git         | Yes              | Used to harvest today's commit logs.            |
| Brain Dir   | `.agents/brain/` | Must contain the `task.md` file.                |

***

## 3. Usage

### 3.1 Standard Generation

```powershell theme={null}

# Windows (T1)

.\tools\generate-walkthrough.ps1

```

```bash theme={null}

# WSL2 / Linux (T2)

bash tools/generate-walkthrough.sh

```

***

## 4. Operation Workflow (Harvesting Logic)

1. **Git Harvest:** Scans `git log` since `today`. It automatically filters out internal `chore(hibernation)` commits to keep the output high-density.
2. **Task Harvest:** Greps for lines containing `[x]` and the tag **`(SELESAI)`** (Malay for Complete) to identify finished work.
3. **Block Generation:** Prints a Markdown snippet to the console.

***

## 5. Reading the Output

The tool prints a block like this:

```markdown theme={null}

## 🏁 Session Anchor: 2026-04-08 (Auto-Generated)

- **Accomplished:**
    - [x] Initialise project (SELESAI)
    - feat(ui): add modern glassmorphism
- **Current State:** [UPDATE ME]
- **Mental Anchor:** [UPDATE ME]

```

**Instruction:** Copy this entire block and paste it at the TOP of your **`.agents/brain/walkthrough.md`** file during your End-of-Day ritual. Fill in the `[UPDATE ME]` fields manually to provide the AI with logical context for the next session.

***

## 6. Related Documents

| Document                                                                                                                               | Purpose                                        |
| :------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| [`.agents/brain/walkthrough.md`](https://github.com/linuxmalaysia/deep-state-of-mind-for-my-ai/blob/main/.agents/brain/walkthrough.md) | The target file for the generated output.      |
| [`docs/EOD-RITUAL.md`](../EOD-RITUAL)                                                                                                  | Where this tool fits in the session close-out. |

***

*Standard: DSOM For My AI Protocol v6.1 | Harisfazillah Jamel | LinuxMalaysia*
*Document Version: v1.0 | Created: 2026-04-08*

***

*Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-04*
*Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0*


## Related topics

- [HOWTO: reanimate - AI Context Handshake](/tools/howto-reanimate.md)
- [🛠️ HOWTO: Operating DSOM FastMCP Knowledge Server](/tools/howto-mcp-server.md)
- [[AGENT] DSOM Cognitive Digital Twin: Project Operational Protocol (v2.0)](/governance/ai-cognitive-twin-protocol.md)
- [HOWTO: init-brain - Cognitive Infrastructure Bootstrap](/tools/howto-init-brain.md)
- [HOWTO: hibernation - Legacy Safety Verifier](/tools/howto-hibernation.md)
