Shared Coding Contract
- Refer to Shared Coding Workflow Contract in
../lcs-shared/contract.mdfor folder conventions, Handoff format, and token optimization. - Target outputs are saved directly to
.lcs/work-items/onboarding.mdand.lcs/work-items/onboarding-map.md.
Purpose
- Automate initial onboarding documentation for an existing project.
- Scan repository structure, analyze configuration files, identify entry points, setup commands, and testing patterns.
- Produce a single high-quality overview document at
.lcs/work-items/onboarding.mdand a structural map document at.lcs/work-items/onboarding-map.md.
Trigger
- Activate when user requests "onboard project", "generate project docs", "buat dokumentasi onboarding", "summarize codebase", "lcs-onboarding", or similar.
OKF Frontmatter & Writing Safety
- When creating
onboarding.mdoronboarding-map.md, include YAML frontmatter following the schema in../lcs-shared/contract.md. These are singleton artifacts (no timestamp folder) —sourcefield references explore.md or direct user input. - Follow the Artifact Writing Safety rules in contract.md — generate content first, write one file, verify, stop on failure.
Trigger
Activate when user requests related to this skill's purpose. See description field in YAML frontmatter for trigger phrases.
Behavior Checklist
- Scan the repository for crucial configuration files (e.g. package.json, requirements.txt, Cargo.toml, go.mod) and readme files.
- Identify technology stack, language, main framework, and entrypoints.
- Discover local setup commands, run commands, build commands, and test commands.
- Extract primary environment variables or configuration options.
- Create
.lcs/work-items/directory if it does not exist. - Write the unified onboarding report to
.lcs/work-items/onboarding.mdmatching the Output Template. - Write the structural map report to
.lcs/work-items/onboarding-map.mdlisting impacted or key files, their functions, and system relations. - Update
.lcs/state.mdtimestamp/session note only (project-level isolation):- Do NOT change
current_work,current_phase, orwork_items— a selected managed work item stays selected and keeps its phase. - Do NOT add an onboarding registry entry.
last_session_note: Generated onboarding documentation at .lcs/work-items/onboarding.md and onboarding-map.mdtimestamp: <current-ISO-timestamp>
- Do NOT change
- End with the canonical Handoff section.
Output Template 1: .lcs/work-items/onboarding.md Must be written in English.
Project Onboarding:1. Overview
- Language & Stack: <Languages, primary framework>
- Core Purpose:
- Key Entrypoints:
<file-path>:
2. Setup & Local Development
Prerequisites
Installation
<install command>
Running Locally
<run command>
Environment Variables
| Variable | Description | Default / Example |
|---|---|---|
VAR_NAME |
3. Architecture & Code Structure
Component Directory Map
path/:another_path/:
High-level Flow
<brief description of request/data flow>
4. Testing
Running Tests
<test command>
Coverage
Output Template 2: .lcs/work-items/onboarding-map.md This file maps the key files and components in the project. Must be written in English.
Codebase Map:Description
<One-line area summary of what this module/feature/codebase does>
Key Files
This section lists only the existing files that are key to the architecture.
- Configuration Files:
path/to/config-file.ext
- Entrypoints & Core Files:
path/to/core-file.ext
- Skills:
path/to/skill/SKILL.md
Rationale
<file-path>:<file-path>:
System Relations
<One-line explanation of how features/modules interact with other parts of the system>
Chain of Truth Report
Level: Standard
Sources Checked
- Repository configuration files (package.json, README, etc.)
.lcs/state.mdif present
Assumptions
- [unverified by default] Repository follows standard project layout.
- [unverified by default] Listed setup commands are current.
Plan Before Action
- Scan repository structure.
- Extract stack, entrypoints, setup/run/test commands.
- Write onboarding.md and onboarding-map.md.
- Update state.md.
Actions Taken
Verification
- Confirmed output files exist at declared paths.
- Manual review: key sections populated, no [TODO] left without reason.
Confidence
<high/medium/low> —
Handoff
Next recommended skill: lcs-explore Next file to read: .lcs/work-items/onboarding.md Current phase: onboarding Current confidence: high Blocking questions: None Risks to carry forward: None Source of Truth Bundle: .lcs/state.md, onboarding.md, onboarding-map.md Must Preserve IDs: None Unresolved IDs: None Suggested next command: Explore feature atau buat PRD
Chain of Truth Level
Level: Standard
This skill follows the LCS Chain of Truth protocol at the declared level.