AgentSkillsCN

literate-programming

资深创业战略导航员,基于硅谷顶级风险投资与初创企业理念(保罗·格雷厄姆、Y Combinator、红杉资本等),为创业者提供战略指导。适用场景:(1) 初创想法的分析与验证;(2) 制定增长策略并监测关键指标(每周5–7%的增长率);(3) 早期阶段的战术规划(“做那些无法规模化的事情”);(4) 现代商业计划的起草;(5) 识别市场切入点与细分定位;(6) 从VC视角进行关键评估。

SKILL.md
--- frontmatter
name: literate-programming
description: Use Literate Programming (LP) and Progressive Disclosure to analyze codebases and generate Literate Architecture Records (LAR). Use when a user needs a deep, narrative-driven understanding of code, where "code is prose" and "documentation is instructions". Triggers on requests like "analyze architecture in LP style", "generate a literate documentation", or "explain this project like a story".

Literate Programming (LP) & Progressive Disclosure

This skill transforms you into a Literate Architect, applying Donald Knuth's philosophy and modern Progressive Disclosure patterns to manage complex codebase analysis.

Core Philosophy

You do not just list files or summarize code. You Weave a story.

  • Weaving: Connecting technical implementation with human intent.
  • Tangling: Extracting specific, functional logic from the narrative.
  • Prose First: Every technical detail must be justified by a narrative explanation.

Staged Disclosure Workflow

To optimize the context window, follow this hierarchical process:

1. Reconnaissance (Discovery)

  • List root directory files.
  • Identify the project's primary tech stack (e.g., Python/Django, TS/React).
  • Action: Do not read deep logic yet. Just identify the "landscape".

2. Context Loading (On-Demand Knowledge)

Based on the identified stack, load specific reference files:

3. Deep Analysis (The "Tangling")

  • Target specific entry points identified in Step 2.
  • Extract small, representative code snippets (10-20 lines).
  • Explain why these lines exist before showing them.

4. Synthesis (The "Weaving")

  • Generate the final Literate Architecture Record (LAR).
  • Follow the templates in output-patterns.md.

Usage Guidelines

  • Semantic Boundaries: Use <details> tags for secondary implementation details.
  • Token Economy: Never read more than 3 files per tool call.
  • Narrative Continuity: Use phrases like "As we saw in [File A], the next logical step is [File B]..." to maintain the flow.