66
77## Overview
88
9- DevMap MVP provides four core project commands and one configuration command:
9+ DevMap MVP provides five core project commands and one configuration command:
1010
1111* ` devmap init `
12- * ` devmap analyze `
13- * ` devmap ask `
12+ * ` devmap analyze `
13+ * ` devmap ask `
14+ * ` devmap onboarding `
1415* ` devmap doctor `
1516* ` devmap config model `
1617
17- No additional product commands should be added until the MVP is shipped.
18+ Additional product commands should wait until the MVP is shipped unless the PRD
19+ explicitly promotes them into the ` 0.1.0 ` scope.
1820
1921Future commands are documented in:
2022
@@ -395,9 +397,9 @@ Running quick analysis first...
395397
396398Then continue answering the question.
397399
398- ### Stale Snapshot Behavior
399-
400- If project files changed after last analyze:
400+ ### Stale Snapshot Behavior
401+
402+ If project files changed after last analyze:
401403
402404``` txt
403405Project changed since last analyze.
@@ -407,12 +409,78 @@ Use existing snapshot or re-analyze first?
407409[1] Use existing snapshot
408410[2] Re-analyze now
409411```
410-
411- ---
412-
412+
413+ ---
414+
415+ ## ` devmap onboarding `
416+
417+ Generate a project onboarding guide from the current snapshot.
418+
419+ Alias: ` devmap onboard `
420+
421+ ### Purpose
422+
423+ ` devmap onboarding ` turns ` .devmap/snapshot.json ` into a practical reading
424+ guide for humans and AI agents. It should help answer:
425+
426+ > Where should I start reading this project?
427+
428+ ### Usage
429+
430+ ``` bash
431+ devmap onboarding
432+ devmap onboarding --write
433+ devmap onboarding --write --language id
434+ devmap onboarding --json
435+ ```
436+
437+ ### Responsibilities
438+
439+ * Read ` .devmap/snapshot.json `
440+ * Use ` project ` , ` onboarding.recommendedPath ` , ` features ` , ` flows ` ,
441+ ` criticalFiles ` , and ` changeImpact `
442+ * Include a concise project narrative from snapshot facts, with a trimmed
443+ architecture note when useful
444+ * Surface entry points, external services, and critical files before the
445+ reading path
446+ * Print a readable terminal guide by default
447+ * Show a follow-up hint explaining that ` --write ` creates ` ONBOARDING.md `
448+ * Write ` ONBOARDING.md ` when ` --write ` is passed
449+ * Ask for Indonesian or English when writing from an interactive terminal and
450+ no language is provided
451+ * Use ` --language en ` or ` --language id ` to skip the prompt
452+ * Emit one structured JSON document when ` --json ` is passed
453+ * Warn when the snapshot is stale
454+
455+ ### Output Sections
456+
457+ 1 . What This Project Does
458+ 2 . Mental Model
459+ 3 . Main Concepts
460+ 4 . Important Areas to Understand
461+ 5 . Key Flows
462+ 6 . Where to Start
463+
464+ ### Rules
465+
466+ * Do not invent files that are not present in the snapshot
467+ * Prefer snapshot-derived paths over generic advice
468+ * Avoid placeholder wording such as ` not inferred yet ` ; omit unavailable fields
469+ * Explain what each important file is responsible for and why it should be read
470+ * Avoid raw metadata dumps such as scores, import counts, and exported symbol
471+ lists in human onboarding output
472+ * Keep the guide useful without requiring an AI call
473+ * Treat ` devmap flow ` and full docs generation as future commands
474+ * Include snapshot freshness and agent navigation policy in JSON output
475+ * Keep ` --json ` non-interactive; never prompt in machine-readable mode
476+ * Default generated onboarding language is English; use ` --language id ` for
477+ Bahasa Indonesia
478+
479+ ---
480+
413481## ` devmap doctor `
414-
415- Run diagnostics for DevMap setup.
482+
483+ Run diagnostics for DevMap setup.
416484
417485### Purpose
418486
@@ -542,6 +610,7 @@ devmap init --json
542610devmap analyze --json
543611devmap analyze --deep --json
544612devmap ask " where is authentication handled?" --json
613+ devmap onboarding --json
545614devmap doctor --json
546615devmap config model auto --json
547616```
@@ -559,8 +628,9 @@ Contract:
559628 DevMap JSON document
560629
561630` analyze --json ` returns the project snapshot. ` ask --json ` returns the answer,
562- selected files, model, and token usage. ` doctor --json ` returns diagnostics and
563- issues as structured fields.
631+ selected files, model, and token usage. ` onboarding --json ` returns guide
632+ metadata and Markdown. ` doctor --json ` returns diagnostics and issues as
633+ structured fields.
564634
565635---
566636
@@ -575,8 +645,7 @@ They are not part of the current MVP command scope.
575645| ` devmap features ` | Detect implemented project features |
576646| ` devmap explain ` | Explain folders, modules, and architecture |
577647| ` devmap flow ` | Explain system flows as narrative steps |
578- | ` devmap docs ` | Generate project documentation |
579- | ` devmap onboard ` | Generate onboarding guide |
648+ | ` devmap docs ` | Generate project documentation |
580649| ` devmap deadcode ` | Detect unused files, exports, and functions |
581650| ` devmap report ` | Generate project health report |
582651| ` devmap watch ` | Auto-update snapshot on file changes |
0 commit comments