@slopus/beer 0.1.2 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_workflows/_index.d.ts +1 -1
- package/dist/_workflows/_index.js +7 -7
- package/dist/_workflows/bootstrap.d.ts +1 -1
- package/dist/_workflows/bootstrap.js +14 -14
- package/dist/_workflows/checkpointWorkflow.d.ts +1 -1
- package/dist/_workflows/checkpointWorkflow.js +2 -2
- package/dist/_workflows/context/context.d.ts +2 -2
- package/dist/_workflows/context/context.js +11 -11
- package/dist/_workflows/context/context.spec.js +1 -1
- package/dist/_workflows/context/utils/contextApplyConfig.d.ts +1 -1
- package/dist/_workflows/context/utils/contextApplyConfig.js +1 -1
- package/dist/_workflows/context/utils/contextApplyConfig.spec.js +1 -1
- package/dist/_workflows/context/utils/contextAskGithubRepo.d.ts +1 -1
- package/dist/_workflows/context/utils/contextAskGithubRepo.js +3 -3
- package/dist/_workflows/context/utils/contextAskGithubRepo.spec.js +1 -1
- package/dist/_workflows/context/utils/contextGitignoreEnsure.spec.js +1 -1
- package/dist/_workflows/context/utils/progressMultilineStart.spec.js +1 -1
- package/dist/_workflows/planWorkflow.d.ts +1 -1
- package/dist/_workflows/planWorkflow.js +9 -9
- package/dist/_workflows/prompts/PROMPT_AGENTS_MD.md +168 -0
- package/dist/_workflows/prompts/PROMPT_DECISIONS.md +372 -0
- package/dist/_workflows/prompts/PROMPT_PRODUCT_NAME.md +101 -0
- package/dist/_workflows/prompts/PROMPT_PRODUCT_PITCH.md +197 -0
- package/dist/_workflows/prompts/PROMPT_PRODUCT_PITCH_FINAL.md +44 -0
- package/dist/_workflows/prompts/PROMPT_PROJECT_BLUEPRINT.md +469 -0
- package/dist/_workflows/prompts/PROMPT_README.md +101 -0
- package/dist/_workflows/prompts/PROMPT_RESEARCH.md +407 -0
- package/dist/_workflows/prompts/PROMPT_RESEARCH_PROBLEMS.md +296 -0
- package/dist/_workflows/prompts/PROMPT_TECHNOLOGY_STACK.md +460 -0
- package/dist/_workflows/prompts/PROMPT_TECHNOLOGY_STACK_FINAL.md +48 -0
- package/dist/_workflows/ralphLoopWorkflow.d.ts +1 -1
- package/dist/_workflows/ralphLoopWorkflow.js +5 -5
- package/dist/_workflows/ralphWorkflow.d.ts +1 -1
- package/dist/_workflows/ralphWorkflow.js +5 -5
- package/dist/_workflows/researchWorkflow.d.ts +1 -1
- package/dist/_workflows/researchWorkflow.js +3 -3
- package/dist/_workflows/steps/generate.d.ts +2 -2
- package/dist/_workflows/steps/generate.js +3 -3
- package/dist/_workflows/steps/generateCommit.d.ts +1 -1
- package/dist/_workflows/steps/generateCommit.js +2 -2
- package/dist/_workflows/steps/generateDocument.d.ts +2 -2
- package/dist/_workflows/steps/generateDocument.js +3 -3
- package/dist/_workflows/steps/generateFrontmatter.d.ts +2 -2
- package/dist/_workflows/steps/generateFrontmatter.js +1 -1
- package/dist/_workflows/steps/generateProgressMessageResolve.d.ts +1 -1
- package/dist/_workflows/steps/generateReadme.d.ts +1 -1
- package/dist/_workflows/steps/generateReadme.js +2 -2
- package/dist/_workflows/steps/ralphExecute.d.ts +1 -1
- package/dist/_workflows/steps/ralphExecute.js +2 -2
- package/dist/_workflows/steps/ralphLoopExecute.d.ts +1 -1
- package/dist/_workflows/steps/ralphLoopExecute.js +2 -2
- package/dist/_workflows/steps/ralphLoopPlanGenerate.d.ts +1 -1
- package/dist/_workflows/steps/ralphLoopPlanGenerate.js +3 -3
- package/dist/_workflows/steps/ralphLoopPlanPathResolve.d.ts +1 -1
- package/dist/_workflows/steps/ralphLoopReviewRound.d.ts +1 -1
- package/dist/_workflows/steps/ralphLoopReviewRound.js +2 -2
- package/dist/_workflows/steps/ralphPlan.d.ts +1 -1
- package/dist/_workflows/steps/ralphPlan.js +6 -6
- package/dist/_workflows/steps/ralphPlanPathResolve.d.ts +1 -1
- package/dist/_workflows/steps/ralphReview.d.ts +1 -1
- package/dist/_workflows/steps/ralphReview.js +4 -4
- package/dist/main.js +5 -5
- package/dist/modules/ai/aiOutputExtract.spec.js +1 -1
- package/dist/modules/ai/generate.d.ts +2 -2
- package/dist/modules/ai/generate.js +5 -5
- package/dist/modules/ai/generate.spec.js +1 -1
- package/dist/modules/ai/generate.unit.spec.js +1 -1
- package/dist/modules/ai/generateEventTypes.d.ts +2 -2
- package/dist/modules/ai/generateFile.d.ts +2 -2
- package/dist/modules/ai/generateFile.js +2 -2
- package/dist/modules/ai/generateFile.spec.js +1 -1
- package/dist/modules/ai/generatePureSessionCreate.d.ts +3 -3
- package/dist/modules/ai/generatePureSessionCreate.js +1 -1
- package/dist/modules/ai/generatePureSessionCreate.spec.js +1 -1
- package/dist/modules/ai/generatePureText.d.ts +2 -2
- package/dist/modules/ai/generatePureText.js +5 -5
- package/dist/modules/ai/generatePureText.spec.js +1 -1
- package/dist/modules/ai/generateSessionCreate.d.ts +2 -2
- package/dist/modules/ai/generateSessionCreate.js +1 -1
- package/dist/modules/ai/generateSessionCreate.spec.js +1 -1
- package/dist/modules/ai/generateText.d.ts +2 -2
- package/dist/modules/ai/generateText.js +1 -1
- package/dist/modules/ai/generateText.spec.js +1 -1
- package/dist/modules/ai/generateVerify.spec.js +1 -1
- package/dist/modules/ai/providerGenerate.d.ts +3 -3
- package/dist/modules/ai/providerGenerate.js +2 -2
- package/dist/modules/ai/providerGenerate.spec.js +2 -2
- package/dist/modules/ai/providerGenerate.unit.spec.js +1 -1
- package/dist/modules/ai/providers/commandJSONL.d.ts +1 -1
- package/dist/modules/ai/providers/commandJSONL.js +2 -2
- package/dist/modules/ai/providers/commandJSONL.spec.js +1 -1
- package/dist/modules/ai/providers/piProviderGenerate.d.ts +1 -1
- package/dist/modules/ai/providers/piProviderGenerate.js +1 -1
- package/dist/modules/ai/providers/piProviderGenerate.spec.js +1 -1
- package/dist/modules/beer/beerOriginalPathResolve.spec.js +1 -1
- package/dist/modules/beer/beerSettingsRead.d.ts +1 -1
- package/dist/modules/beer/beerSettingsRead.spec.js +1 -1
- package/dist/modules/beer/beerSettingsTypes.d.ts +2 -2
- package/dist/modules/beer/beerSettingsWrite.d.ts +1 -1
- package/dist/modules/git/gitPush.js +1 -1
- package/dist/modules/git/gitRemoteEnsure.js +1 -1
- package/dist/modules/git/gitRepoCheckout.js +1 -1
- package/dist/modules/git/gitRepoCheckout.spec.js +2 -2
- package/dist/modules/git/gitRepoEnsure.js +1 -1
- package/dist/modules/git/gitRepoEnsure.spec.js +1 -1
- package/dist/modules/git/gitStageAndCommit.js +1 -1
- package/dist/modules/git/gitignoreEnsure.spec.js +1 -1
- package/dist/modules/github/githubCliEnsure.js +2 -2
- package/dist/modules/github/githubOwnerChoicesGet.js +1 -1
- package/dist/modules/github/githubRepoCreate.js +1 -1
- package/dist/modules/github/githubRepoExists.js +1 -1
- package/dist/modules/github/githubRepoNameResolve.d.ts +1 -1
- package/dist/modules/github/githubRepoNameResolve.js +1 -1
- package/dist/modules/github/githubRepoNameResolve.spec.js +1 -1
- package/dist/modules/github/githubRepoParse.d.ts +1 -1
- package/dist/modules/github/githubRepoParse.spec.js +1 -1
- package/dist/modules/github/githubRepoStatusGet.d.ts +1 -1
- package/dist/modules/github/githubRepoStatusGet.js +2 -2
- package/dist/modules/github/githubViewerGet.js +2 -2
- package/dist/modules/plan/planPromptChildren.d.ts +2 -2
- package/dist/modules/plan/planPromptChildren.spec.js +1 -1
- package/dist/modules/plan/planPromptDocument.d.ts +2 -2
- package/dist/modules/plan/planPromptDocument.spec.js +1 -1
- package/dist/modules/plan/planPromptPicker.d.ts +1 -1
- package/dist/modules/plan/planPromptPicker.js +1 -1
- package/dist/modules/plan/planPromptPicker.spec.js +1 -1
- package/dist/modules/plan/planPromptRoot.d.ts +1 -1
- package/dist/modules/plan/planPromptRoot.spec.js +1 -1
- package/dist/modules/plan/planSourceDocumentsResolve.d.ts +1 -1
- package/dist/modules/plan/planSourceDocumentsResolve.spec.js +1 -1
- package/dist/modules/providers/providerDetect.d.ts +1 -1
- package/dist/modules/providers/providerDetect.js +2 -2
- package/dist/modules/providers/providerDetect.spec.js +1 -1
- package/dist/modules/providers/providerModelSelect.d.ts +1 -1
- package/dist/modules/providers/providerModelSelect.spec.js +1 -1
- package/dist/modules/providers/providerModelsGet.d.ts +1 -1
- package/dist/modules/providers/providerModelsGet.js +1 -1
- package/dist/modules/providers/providerModelsGet.spec.js +1 -1
- package/dist/modules/providers/providerPriorityList.d.ts +1 -1
- package/dist/modules/providers/providerPriorityList.spec.js +1 -1
- package/dist/modules/sandbox/sandboxInferenceFilesystemPolicy.d.ts +1 -1
- package/dist/modules/sandbox/sandboxInferenceFilesystemPolicy.js +1 -1
- package/dist/modules/sandbox/sandboxInferenceFilesystemPolicy.spec.js +1 -1
- package/dist/modules/sandbox/sandboxInferenceGet.d.ts +2 -2
- package/dist/modules/sandbox/sandboxInferenceGet.js +1 -1
- package/dist/modules/sandbox/sandboxPassthrough.d.ts +1 -1
- package/dist/modules/sandbox/sandboxPassthrough.spec.js +1 -1
- package/dist/modules/tree/treeChildrenParse.d.ts +1 -1
- package/dist/modules/tree/treeChildrenRead.d.ts +1 -1
- package/dist/modules/tree/treeChildrenRead.spec.js +1 -1
- package/dist/modules/tree/treeChildrenWrite.d.ts +1 -1
- package/dist/modules/tree/treeChildrenWrite.spec.js +1 -1
- package/dist/modules/tree/treeInferenceProgressRun.d.ts +1 -1
- package/dist/modules/tree/treeInferenceProgressRun.js +1 -1
- package/dist/modules/tree/treeInferenceProgressRun.spec.js +1 -1
- package/dist/modules/tree/treeLeafPick.d.ts +1 -1
- package/dist/modules/tree/treeLeafPick.js +8 -8
- package/dist/modules/tree/treeLeafPick.spec.js +1 -1
- package/dist/modules/tree/treeNodeExpand.d.ts +1 -1
- package/dist/modules/tree/treeNodeExpand.js +8 -8
- package/dist/modules/tree/treeNodeExpand.spec.js +3 -3
- package/dist/modules/tree/treeNodePathResolve.d.ts +1 -1
- package/dist/modules/tree/treeNodeRead.d.ts +1 -1
- package/dist/modules/tree/treeNodeRead.spec.js +1 -1
- package/dist/modules/tree/treeNodeSlug.spec.js +1 -1
- package/dist/modules/tree/treeNodeWrite.d.ts +1 -1
- package/dist/modules/tree/treeNodeWrite.spec.js +1 -1
- package/dist/modules/tree/treeSearchRun.d.ts +1 -1
- package/dist/modules/tree/treeSearchRun.js +12 -12
- package/dist/modules/tree/treeSearchRun.spec.js +3 -3
- package/dist/modules/tree/treeSearchTypes.d.ts +1 -1
- package/dist/modules/tree/treeStateLeaves.d.ts +1 -1
- package/dist/modules/tree/treeStateLeaves.spec.js +1 -1
- package/dist/modules/tree/treeStateRead.d.ts +1 -1
- package/dist/modules/tree/treeStateRead.js +2 -2
- package/dist/modules/tree/treeStateRead.spec.js +1 -1
- package/dist/modules/tree/treeStateRender.d.ts +1 -1
- package/dist/modules/tree/treeStateRender.spec.js +1 -1
- package/dist/modules/util/asyncLock.spec.js +1 -1
- package/dist/modules/util/commandRun.d.ts +1 -1
- package/dist/modules/util/commandRun.js +2 -2
- package/dist/modules/util/commandRun.spec.js +1 -1
- package/dist/modules/util/pathLock.js +2 -2
- package/dist/modules/util/pathLock.spec.js +1 -1
- package/dist/modules/util/pathLockOverlap.spec.js +1 -1
- package/dist/release/releaseRun.js +3 -3
- package/dist/release/releaseVersionPrompt.js +3 -3
- package/dist/text/text.d.ts +2 -2
- package/dist/text/text.js +1 -1
- package/dist/text/text.spec.js +1 -1
- package/dist/text/textGenBuild.js +1 -1
- package/dist/text/textGenGenerate.spec.js +1 -1
- package/dist/types.d.ts +9 -9
- package/dist/types.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
You are refining a product pitch using a deep research report that validates and enriches the original claims. Your goal is to produce the **final version** of the product pitch — same structure, same density, same tone — but now grounded in external evidence.
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
- **Output File Path**: {outputPath}
|
|
6
|
+
- **Original source repository:** {sourceFullName} (Use a `gh` tool to look into issues)
|
|
7
|
+
- **Local checkout path:** {originalCheckoutPath}
|
|
8
|
+
|
|
9
|
+
**Input documents — read all before starting:**
|
|
10
|
+
|
|
11
|
+
- **Draft Product Pitch**: {productPitchPath} — the initial pitch you are refining. This is your starting structure.
|
|
12
|
+
- **Deep Research Report**: {deepResearchReportPath} — external validation and competitive analysis. Use this to strengthen, correct, or nuance claims in the draft.
|
|
13
|
+
- **Research Summary**: {researchPath} — original project analysis.
|
|
14
|
+
- **Unresolved Problems**: {unresolvedProblemsPath} — gaps and flaws in the original.
|
|
15
|
+
- **Key Decisions**: {decisionsPath} — decision catalog from the original.
|
|
16
|
+
|
|
17
|
+
## What to do
|
|
18
|
+
|
|
19
|
+
1. **Read the draft pitch.** This is your template. Preserve its structure, sections, and tone.
|
|
20
|
+
2. **Read the deep research report.** Extract:
|
|
21
|
+
- Competitive landscape findings — update "The Problem" and "What the Original Got Wrong" with real competitors and comparisons
|
|
22
|
+
- Market validation — if the report confirms the problem is real and widespread, cite the evidence
|
|
23
|
+
- Technical validation — if architectural choices are confirmed as sound (or questioned), incorporate that
|
|
24
|
+
- User evidence — if forums/discussions confirm pain points, weave that into relevant sections
|
|
25
|
+
3. **Refine each section** using the research:
|
|
26
|
+
- Strengthen claims that the research supports with specific citations
|
|
27
|
+
- Soften or remove claims the research contradicts
|
|
28
|
+
- Add new insights the research revealed that the draft missed
|
|
29
|
+
- Update the competitive landscape with real tool names and comparisons
|
|
30
|
+
4. **Strip the frontmatter.** The draft pitch has YAML frontmatter — do NOT include it in the final version. The final pitch is clean markdown, no frontmatter.
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- **Same structure.** Do not add or remove sections. The output must have the same headings as the draft.
|
|
35
|
+
- **Same density.** Same word limits per section. If the draft was 200 lines, the final should be 200 lines.
|
|
36
|
+
- **Same tone.** Confident, specific, slightly amused, dense. No corporate creep.
|
|
37
|
+
- **Evidence over assertion.** Where the research provides evidence, cite it. Where it contradicts the draft, fix the draft.
|
|
38
|
+
- **Still honest about the original.** The deep research may reveal that the original's problems are even worse (or less bad) than we thought. Update accordingly.
|
|
39
|
+
- **No product name.** Continue using "{Project Name}" as placeholder.
|
|
40
|
+
- **Banned words:** revolutionary, powerful, seamless, robust, cutting-edge, next-generation, best-in-class, blazing-fast, game-changing, disruptive, leverage.
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
|
|
44
|
+
Output only raw markdown. No YAML frontmatter. No preamble, no explanation, no commentary outside the document structure.
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
You are a Staff Engineer who has shipped systems used by hundreds of developers and maintained them for years. You think in dependency graphs, not feature lists. You know that the difference between a codebase an AI agent can build reliably and one it fumbles through is not cleverness — it is structure, isolation, and predictability.
|
|
2
|
+
|
|
3
|
+
Your task is to produce a **project blueprint** for a new product that will be **built entirely by AI coding agents**. This is not a planning document for humans to interpret. This is the literal specification an agent reads before creating the first file. Every decision must optimize for one thing: **can an agent implement one feature, test it, and move to the next without breaking anything or needing context from the rest of the codebase?**
|
|
4
|
+
|
|
5
|
+
**Critical constraints:**
|
|
6
|
+
- The product is **unnamed**. Use `{Project Name}` as placeholder.
|
|
7
|
+
- The product has **no code yet**. This blueprint defines what the codebase will look like when complete.
|
|
8
|
+
- **Every file must be listed.** Not "a utils folder" — the actual filenames, paths, and one-line purposes.
|
|
9
|
+
- **Dependency direction matters more than grouping.** Files that depend on nothing go at the bottom of the tree. Files that depend on everything go at the top. The agent builds bottom-up.
|
|
10
|
+
- **Testability is the organizing principle.** If something can't be tested in isolation, it's in the wrong place.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
- **Output File Path**: {outputPath}
|
|
15
|
+
- **Original source repository:** {sourceFullName} (Use a `gh` tool to look into issues)
|
|
16
|
+
- **Local checkout path:** {originalCheckoutPath}
|
|
17
|
+
|
|
18
|
+
You have read-only access to the local checkout of the **original project** — the one we studied. We are not forking it. We are building a new product informed by everything we learned from dissecting it.
|
|
19
|
+
|
|
20
|
+
Research documents have already been generated by analyzing the original project. Read them before starting:
|
|
21
|
+
|
|
22
|
+
- **Research Summary**: {researchPath} — architecture, dependencies, conventions, hidden knowledge.
|
|
23
|
+
- **Unresolved Problems**: {unresolvedProblemsPath} — open questions, risks, contradictions, gaps.
|
|
24
|
+
- **Key Decisions**: {decisionsPath} — every significant decision. What to keep, what to reverse, what to drop.
|
|
25
|
+
- **Product Pitch**: {productPitchPath} — description of the new product, its features, philosophy, and goals.
|
|
26
|
+
- **Technology Stack**: {technologyStackPath} — runtime, tools, dependencies, and build pipeline for the new product.
|
|
27
|
+
|
|
28
|
+
## The Core Principle: Agent-Buildable Architecture
|
|
29
|
+
|
|
30
|
+
An AI agent operates in a single context window. It sees a task, reads relevant files, writes code, runs tests, and moves on. The architecture must be designed so that:
|
|
31
|
+
|
|
32
|
+
1. **Each feature is implementable in one context.** The agent reads 3-5 files, writes 1-2 files, runs tests, done. If implementing a feature requires understanding 20 files across 6 directories — the architecture has failed.
|
|
33
|
+
|
|
34
|
+
2. **Dependencies flow one direction.** Lower layers never import from higher layers. An agent working on a utility function never needs to know about workflows or commands.
|
|
35
|
+
|
|
36
|
+
3. **Pure functions are the default.** A function that takes input and returns output is trivially testable by an agent. A function that reads environment variables, calls APIs, and writes files requires setup, mocking, and teardown — three things agents do poorly.
|
|
37
|
+
|
|
38
|
+
4. **Files are small and single-purpose.** One exported function per file. The agent reads the filename, knows what it does, reads the file, understands it completely. No scrolling, no "where does this helper come from", no "which of the 8 exports do I need".
|
|
39
|
+
|
|
40
|
+
5. **Tests live next to code.** The agent writes `foo.ts`, then writes `foo.spec.ts` in the same directory. No navigating to a separate test tree. No wondering where the test goes.
|
|
41
|
+
|
|
42
|
+
6. **Global state is explicit and fine.** Singletons, registries, module-level state — all acceptable when clearly documented. The alternative (dependency injection containers, provider trees, context objects threaded through 12 layers) creates more confusion for agents than a well-named global.
|
|
43
|
+
|
|
44
|
+
7. **Build order is implementation order.** The file tree is organized so the agent can build from the bottom up — utilities first, then domain logic, then integration, then orchestration, then commands. Each layer only depends on layers below it.
|
|
45
|
+
|
|
46
|
+
## Research Methodology
|
|
47
|
+
|
|
48
|
+
### Phase 1: Understand the Product
|
|
49
|
+
|
|
50
|
+
1. **Read all research documents.** Extract:
|
|
51
|
+
- Every feature the product must have (from the product pitch)
|
|
52
|
+
- Every technical domain it touches (from the technology stack)
|
|
53
|
+
- Every pattern that worked in the original (from key decisions)
|
|
54
|
+
- Every pattern that failed in the original (from unresolved problems)
|
|
55
|
+
|
|
56
|
+
2. **Read the technology stack document.** Extract:
|
|
57
|
+
- Runtime and package manager
|
|
58
|
+
- Build pipeline and commands
|
|
59
|
+
- Testing framework and patterns
|
|
60
|
+
- All dependencies and their purposes
|
|
61
|
+
- The complete `package.json` structure
|
|
62
|
+
|
|
63
|
+
3. **Catalog every capability** the product needs. For each: what it does, what it depends on, what data it needs, whether it's pure or has side effects.
|
|
64
|
+
|
|
65
|
+
### Phase 2: Design the Dependency Graph
|
|
66
|
+
|
|
67
|
+
4. **Identify the layers.** Every codebase has natural layers. The layers for this product should follow this hierarchy (bottom to top):
|
|
68
|
+
|
|
69
|
+
- **Layer 0: Types** — shared type definitions, no logic, no imports from other layers
|
|
70
|
+
- **Layer 1: Utilities** — pure helper functions, zero domain knowledge, zero side effects
|
|
71
|
+
- **Layer 2: Domain logic** — pure functions that encode business rules, depend only on types and utilities
|
|
72
|
+
- **Layer 3: Integrations** — functions with side effects (file I/O, HTTP, git, APIs), depend on types/utils/domain
|
|
73
|
+
- **Layer 4: Orchestration** — workflows and pipelines that compose domain logic and integrations
|
|
74
|
+
- **Layer 5: Commands / Entry points** — CLI commands, main entry point, depend on everything below
|
|
75
|
+
|
|
76
|
+
Each layer may only import from layers below it. Never sideways within the same layer unless files are in the same domain folder.
|
|
77
|
+
|
|
78
|
+
5. **Map features to layers.** For each product feature:
|
|
79
|
+
- What pure logic does it need? → Layer 2
|
|
80
|
+
- What external interactions does it need? → Layer 3
|
|
81
|
+
- What coordination does it need? → Layer 4
|
|
82
|
+
- What user-facing interface does it need? → Layer 5
|
|
83
|
+
|
|
84
|
+
6. **Design the domain boundaries.** Group related files into domain folders. Each domain folder is a self-contained unit with:
|
|
85
|
+
- Its own types (if domain-specific)
|
|
86
|
+
- Its own pure functions
|
|
87
|
+
- Its own integration functions (if it touches external systems)
|
|
88
|
+
- A clear, minimal public surface (what other domains import from it)
|
|
89
|
+
|
|
90
|
+
### Phase 3: Design Every File
|
|
91
|
+
|
|
92
|
+
7. **For each domain, list every file.** Not categories — actual filenames with the prefix-naming convention:
|
|
93
|
+
- `domainVerb.ts` — one exported function
|
|
94
|
+
- `domainVerb.spec.ts` — unit test for that function
|
|
95
|
+
- `domainTypes.ts` — domain-specific type definitions
|
|
96
|
+
|
|
97
|
+
8. **For each file, determine:**
|
|
98
|
+
- What it exports (one function, one type, one constant)
|
|
99
|
+
- What it imports (which files, which layers)
|
|
100
|
+
- Whether it's pure or has side effects
|
|
101
|
+
- Whether it needs a test (pure functions always, side-effect functions when meaningful)
|
|
102
|
+
- What an agent needs to read before writing this file (its dependencies)
|
|
103
|
+
|
|
104
|
+
9. **Verify bottom-up buildability.** Walk through the file list in implementation order. For each file:
|
|
105
|
+
- Can an agent implement this file by reading only files that already exist?
|
|
106
|
+
- Can an agent test this file without mocking more than 1-2 things?
|
|
107
|
+
- If no to either: restructure until the answer is yes.
|
|
108
|
+
|
|
109
|
+
### Phase 4: Define Code Principles
|
|
110
|
+
|
|
111
|
+
10. **Extract principles from what worked and what failed.** For each principle:
|
|
112
|
+
- What evidence from the original project supports it?
|
|
113
|
+
- What concrete rule does it create for the agent?
|
|
114
|
+
- What does violation look like? (so the agent can self-check)
|
|
115
|
+
|
|
116
|
+
11. **Define naming conventions with examples.** For each naming pattern:
|
|
117
|
+
- The pattern (prefix notation, verb placement, etc.)
|
|
118
|
+
- 3-5 real examples using actual filenames from the blueprint
|
|
119
|
+
- The anti-pattern (what NOT to do)
|
|
120
|
+
|
|
121
|
+
12. **Define file-writing guidelines.** Concrete rules for:
|
|
122
|
+
- Maximum file length
|
|
123
|
+
- Import ordering
|
|
124
|
+
- Export patterns
|
|
125
|
+
- Comment style and when to comment
|
|
126
|
+
- Error handling strategy
|
|
127
|
+
- How to handle optional parameters
|
|
128
|
+
- How to handle async operations
|
|
129
|
+
|
|
130
|
+
### Phase 5: Validate
|
|
131
|
+
|
|
132
|
+
13. **Trace 3 features end-to-end.** Pick 3 different features from the product pitch. For each:
|
|
133
|
+
- List the exact files the agent would read
|
|
134
|
+
- List the exact files the agent would write
|
|
135
|
+
- List the exact test commands the agent would run
|
|
136
|
+
- Verify it fits in one context window (under 10 files total)
|
|
137
|
+
|
|
138
|
+
14. **Check for circular dependencies.** Walk the import graph. If A imports B and B imports A (even indirectly) — restructure.
|
|
139
|
+
|
|
140
|
+
15. **Check for orphan files.** Every file should be imported by at least one other file (except entry points and tests). Dead code in a blueprint is a design error.
|
|
141
|
+
|
|
142
|
+
## Output Format
|
|
143
|
+
|
|
144
|
+
Produce a single markdown file **with YAML frontmatter**. The frontmatter contains metadata about the blueprint. The body is the blueprint itself. Every section is required.
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
---
|
|
148
|
+
layers:
|
|
149
|
+
- name: types
|
|
150
|
+
description: "Shared type definitions, no logic"
|
|
151
|
+
- name: utilities
|
|
152
|
+
description: "Pure helpers, zero domain knowledge"
|
|
153
|
+
- name: domain
|
|
154
|
+
description: "Pure business logic functions"
|
|
155
|
+
- name: integrations
|
|
156
|
+
description: "Side-effect functions (I/O, HTTP, git, APIs)"
|
|
157
|
+
- name: orchestration
|
|
158
|
+
description: "Workflows composing domain + integrations"
|
|
159
|
+
- name: commands
|
|
160
|
+
description: "CLI commands and entry points"
|
|
161
|
+
totalFiles: {count of all source files in the tree}
|
|
162
|
+
totalTestFiles: {count of all test files in the tree}
|
|
163
|
+
domains: [{list of domain folder names}]
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
# {Project Name} — Project Blueprint
|
|
167
|
+
|
|
168
|
+
{One sentence: what this blueprint defines and what it optimizes for.}
|
|
169
|
+
|
|
170
|
+
## Architecture Overview
|
|
171
|
+
|
|
172
|
+
{One dense paragraph, max 100 words. The shape of the codebase — how many layers, how many domains, how dependencies flow. End with: "An agent implements features bottom-up: types, then utilities, then domain logic, then integrations, then orchestration, then commands."}
|
|
173
|
+
|
|
174
|
+
### Dependency Rule
|
|
175
|
+
|
|
176
|
+
{State the rule clearly in one sentence. Then show the layer diagram:}
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
Layer 5: Commands ──────────────┐
|
|
180
|
+
Layer 4: Orchestration ─────────┤
|
|
181
|
+
Layer 3: Integrations ──────────┤ imports ↓ only
|
|
182
|
+
Layer 2: Domain Logic ──────────┤
|
|
183
|
+
Layer 1: Utilities ─────────────┤
|
|
184
|
+
Layer 0: Types ─────────────────┘
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
{One sentence: what happens when an agent violates this rule and how to detect it.}
|
|
188
|
+
|
|
189
|
+
## Project Structure
|
|
190
|
+
|
|
191
|
+
{The complete file tree. Every single file. Use tree notation with comments. The root directory name, folder structure, and organization must be derived from the technology stack document — not assumed. Show every file with its purpose, purity annotation, and layer:}
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
{src}/
|
|
195
|
+
├── {entryPoint}.ts # Entry point [io] [L5]
|
|
196
|
+
├── {types file}.ts # Shared type definitions [pure] [L0]
|
|
197
|
+
│
|
|
198
|
+
├── {domain}/ # {one-line domain description}
|
|
199
|
+
│ ├── {domainVerb}.ts # {what the function does} [pure|io] [L{layer}]
|
|
200
|
+
│ ├── {domainVerb}.spec.ts # tests for {domainVerb}
|
|
201
|
+
│ ├── {domainTypes}.ts # {what types it defines} [pure] [L0]
|
|
202
|
+
│ ...
|
|
203
|
+
│
|
|
204
|
+
├── util/ # Domain-agnostic pure helpers
|
|
205
|
+
│ ├── {utilName}.ts # {what it does} [pure] [L1]
|
|
206
|
+
│ ├── {utilName}.spec.ts # tests
|
|
207
|
+
│ ...
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
{IMPORTANT: List EVERY file. Not "..." for repetition. Every source file, every test file, every config file. Mark each with [pure] or [io] and its layer [L0]-[L5]. The folder structure above is illustrative — derive the actual structure from the technology stack document and product requirements.}
|
|
211
|
+
|
|
212
|
+
## Implementation Order
|
|
213
|
+
|
|
214
|
+
{A numbered list showing the exact order an agent should implement files. Group by phase:}
|
|
215
|
+
|
|
216
|
+
### Phase 1: Foundation (no dependencies)
|
|
217
|
+
{List files in order. These import nothing from the project — only external packages.}
|
|
218
|
+
|
|
219
|
+
1. `{src}/{types file}.ts` — Central type definitions
|
|
220
|
+
2. `{src}/util/{first-util}.ts` — {what it does}
|
|
221
|
+
3. `{src}/util/{first-util}.spec.ts` — Test it
|
|
222
|
+
...
|
|
223
|
+
|
|
224
|
+
### Phase 2: Domain Logic (depends on Phase 1)
|
|
225
|
+
{List files that depend only on types and utilities.}
|
|
226
|
+
|
|
227
|
+
### Phase 3: Integrations (depends on Phase 1-2)
|
|
228
|
+
{List files with side effects.}
|
|
229
|
+
|
|
230
|
+
### Phase 4: Orchestration (depends on Phase 1-3)
|
|
231
|
+
{List workflow files.}
|
|
232
|
+
|
|
233
|
+
### Phase 5: Commands & Entry (depends on everything)
|
|
234
|
+
{List CLI commands and main.ts.}
|
|
235
|
+
|
|
236
|
+
{End with: total file count and how many can be tested in complete isolation (no mocks needed).}
|
|
237
|
+
|
|
238
|
+
## Code Principles
|
|
239
|
+
|
|
240
|
+
{Numbered list of principles. Each principle has: the rule, the why, the evidence from the original project, and what violation looks like. Be concrete.}
|
|
241
|
+
|
|
242
|
+
### 1. One Exported Function Per File
|
|
243
|
+
|
|
244
|
+
**Rule:** Each `.ts` file exports exactly one public function (or one type definition, or one constant). Internal helpers within the file are fine.
|
|
245
|
+
|
|
246
|
+
**Why:** An agent reads a filename, knows the function, reads the file, understands it completely. No ambiguity about which export to use or which imports matter.
|
|
247
|
+
|
|
248
|
+
**Evidence:** {Cite from the original project's research — did this work or did monolith files cause problems?}
|
|
249
|
+
|
|
250
|
+
**Violation looks like:** A file with 3+ exported functions, an agent importing the wrong one, or a file that's "the X and Y and Z module."
|
|
251
|
+
|
|
252
|
+
### 2. Prefix Notation for Names
|
|
253
|
+
|
|
254
|
+
**Rule:** Function and file names use `domainVerb` format — noun first, verb second. File names match function names exactly.
|
|
255
|
+
|
|
256
|
+
**Why:** Autocomplete groups related functions together. File explorer clusters domain files alphabetically. Import statements are self-documenting.
|
|
257
|
+
|
|
258
|
+
**Examples from this blueprint:**
|
|
259
|
+
{List 5+ real examples from the file tree above, e.g., `userCreate` not `createUser`}
|
|
260
|
+
|
|
261
|
+
**Anti-pattern:**
|
|
262
|
+
{List the wrong (verb-first) versions of those same examples}
|
|
263
|
+
|
|
264
|
+
### 3. Pure Functions First
|
|
265
|
+
|
|
266
|
+
**Rule:** Default to pure functions (input → output, no side effects). Isolate I/O into clearly named files (`{domain}Write.ts`, `{domain}Fetch.ts`, `{domain}Run.ts`). Never mix pure logic with I/O in the same function.
|
|
267
|
+
|
|
268
|
+
**Why:** Pure functions are trivially testable — no mocks, no setup, no teardown. An agent writes the function, writes 5 assertions, runs the test, done. I/O functions require environment setup that agents handle poorly.
|
|
269
|
+
|
|
270
|
+
**Evidence:** {Cite from original project — where did mixing cause problems?}
|
|
271
|
+
|
|
272
|
+
**Test implication:** Every pure function gets a `.spec.ts`. I/O functions get tests only when the behavior is complex enough to warrant mocking.
|
|
273
|
+
|
|
274
|
+
### 4. Small Files, Hard Limit
|
|
275
|
+
|
|
276
|
+
**Rule:** No file exceeds 200 lines. Preferred range: 30-100 lines. If a function approaches 200 lines, extract helpers into their own files.
|
|
277
|
+
|
|
278
|
+
**Why:** An agent's context window is precious. A 50-line file is fully comprehensible in one read. A 500-line file requires scrolling, re-reading, and loses the agent's attention on the important parts.
|
|
279
|
+
|
|
280
|
+
**Evidence:** {Cite from original project — did large files cause problems?}
|
|
281
|
+
|
|
282
|
+
### 5. Explicit Global State Is Fine
|
|
283
|
+
|
|
284
|
+
**Rule:** Module-level singletons, registries, and configuration objects are acceptable. Document what they hold and who mutates them. Prefer this over threading context objects through 8 function parameters.
|
|
285
|
+
|
|
286
|
+
**Why:** Dependency injection and context-passing create layers of indirection that confuse agents. A well-named global (`const providers = new Map<string, Provider>()`) is easier for an agent to find and use than a context parameter that was created 6 function calls up the stack.
|
|
287
|
+
|
|
288
|
+
**When NOT to use:** For values that change per-request or per-test-run. Those must be parameters.
|
|
289
|
+
|
|
290
|
+
### 6. No Hidden Behavior
|
|
291
|
+
|
|
292
|
+
**Rule:** Functions do what their name says, nothing more. No side effects in getters. No lazy initialization hidden inside accessors. No "helpful" caching that changes behavior on second call. No auto-retry. No silent fallbacks.
|
|
293
|
+
|
|
294
|
+
**Why:** An agent trusts function names. If a function named `settingsRead()` also writes a default file when one doesn't exist, the agent won't know — and will be confused when a file appears that it didn't create.
|
|
295
|
+
|
|
296
|
+
**Violation looks like:** A function named `get` or `read` that also writes, creates, initializes, or mutates.
|
|
297
|
+
|
|
298
|
+
### 7. Errors Are Loud
|
|
299
|
+
|
|
300
|
+
**Rule:** Throw errors immediately on invalid input. Never return null/undefined to signal failure when the caller expects success. Never swallow errors with try/catch unless the recovery is explicit and documented.
|
|
301
|
+
|
|
302
|
+
**Why:** An agent debugging a failure needs a clear stack trace pointing to the exact problem. A silently-swallowed error that causes a mysterious failure 10 functions later is impossible for an agent to diagnose.
|
|
303
|
+
|
|
304
|
+
**Exception:** Functions whose name explicitly signals fallibility (`parse` returning `null`, `tryConnect` returning `undefined`).
|
|
305
|
+
|
|
306
|
+
### 8. Tests Are Specifications
|
|
307
|
+
|
|
308
|
+
**Rule:** Tests describe behavior, not implementation. Test name format: `it("{does something} when {condition}")`. No testing of internal helpers directly — test through the public function.
|
|
309
|
+
|
|
310
|
+
**Why:** An agent reading a test file should understand what the function does without reading the implementation. Tests are the first documentation the agent reads when modifying existing code.
|
|
311
|
+
|
|
312
|
+
{Continue with additional principles specific to this product...}
|
|
313
|
+
|
|
314
|
+
## Code Style
|
|
315
|
+
|
|
316
|
+
### File Template
|
|
317
|
+
|
|
318
|
+
{Show the exact structure of a typical source file — imports, documentation, function, export. Use the language and import conventions defined in the technology stack document:}
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
{import type declarations}
|
|
322
|
+
{import utility/dependency declarations}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* {One sentence: what this function does.}
|
|
326
|
+
* {One sentence: preconditions or expectations.}
|
|
327
|
+
*/
|
|
328
|
+
export function domainVerb(input: InputType): OutputType {
|
|
329
|
+
// implementation
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
{Replace the above with a concrete example using the project's actual language, import style, and conventions.}
|
|
334
|
+
|
|
335
|
+
### Naming Conventions
|
|
336
|
+
|
|
337
|
+
{Define a naming convention table with concrete examples from this blueprint. Cover at minimum: source files, functions, types, type files, test files, constants, and boolean variables. Use actual filenames from the project structure above — not generic placeholders. Format:}
|
|
338
|
+
|
|
339
|
+
| What | Convention | Example | Anti-pattern |
|
|
340
|
+
|------|-----------|---------|-------------|
|
|
341
|
+
| Files | {pattern} | {real example from this blueprint} | {what NOT to do} |
|
|
342
|
+
| Functions | {pattern} | {real example} | {anti-pattern} |
|
|
343
|
+
| ... | ... | ... | ... |
|
|
344
|
+
|
|
345
|
+
### Import Ordering
|
|
346
|
+
|
|
347
|
+
{Define exact import ordering rules appropriate for the project's language and module system. General structure:}
|
|
348
|
+
1. Standard library / built-in modules
|
|
349
|
+
2. External packages / third-party dependencies
|
|
350
|
+
3. Shared type imports
|
|
351
|
+
4. Internal imports by layer (lowest layer first)
|
|
352
|
+
5. Relative imports (same directory)
|
|
353
|
+
|
|
354
|
+
{Show a concrete example using the project's actual language and import conventions.}
|
|
355
|
+
|
|
356
|
+
### Comment Rules
|
|
357
|
+
|
|
358
|
+
- **Function-level JSDoc:** Required on every exported function. Two lines max: what it does, what it expects.
|
|
359
|
+
- **Inline comments:** Only for non-obvious logic. If the code needs a comment to explain what it does, consider renaming or restructuring first.
|
|
360
|
+
- **No TODO comments:** Either fix it now or create an issue. TODOs in blueprints are unfinished work.
|
|
361
|
+
- **No commented-out code:** Delete it. Git remembers.
|
|
362
|
+
|
|
363
|
+
### Error Handling
|
|
364
|
+
|
|
365
|
+
{Define the error handling strategy with concrete examples in the project's language. Cover at minimum:}
|
|
366
|
+
- How to throw errors with context (good)
|
|
367
|
+
- Why returning null for unexpected failures is bad
|
|
368
|
+
- Why swallowing errors silently is bad
|
|
369
|
+
- When explicit fallibility in function names is acceptable
|
|
370
|
+
|
|
371
|
+
{Show code examples using actual function names from this blueprint.}
|
|
372
|
+
|
|
373
|
+
### Async Patterns
|
|
374
|
+
|
|
375
|
+
{If the project's language supports async operations, define patterns for:}
|
|
376
|
+
- Preferred async syntax (e.g., async/await vs raw promises/futures)
|
|
377
|
+
- How to handle concurrent operations
|
|
378
|
+
- How to handle mutual exclusion
|
|
379
|
+
- Rules against fire-and-forget async calls
|
|
380
|
+
|
|
381
|
+
{Skip this section if the project's language does not have async operations.}
|
|
382
|
+
|
|
383
|
+
## Domain Reference
|
|
384
|
+
|
|
385
|
+
{For each domain folder in the project structure, a brief section:}
|
|
386
|
+
|
|
387
|
+
### {domain}/ — {one-line description}
|
|
388
|
+
|
|
389
|
+
**Responsibility:** {What this domain owns, in 1-2 sentences.}
|
|
390
|
+
|
|
391
|
+
**Dependencies:** {What layers/domains it imports from.}
|
|
392
|
+
|
|
393
|
+
**Public surface:** {List the functions other domains are allowed to import.}
|
|
394
|
+
|
|
395
|
+
**Testing strategy:** {How files in this domain are tested — pure assertions, mocked I/O, integration tests?}
|
|
396
|
+
|
|
397
|
+
**Key types:**
|
|
398
|
+
| Type | File | Purpose |
|
|
399
|
+
|------|------|---------|
|
|
400
|
+
| ... | ... | ... |
|
|
401
|
+
|
|
402
|
+
## Feature Implementation Traces
|
|
403
|
+
|
|
404
|
+
{For each of 3 representative features, show the exact agent workflow:}
|
|
405
|
+
|
|
406
|
+
### Feature: {Feature Name}
|
|
407
|
+
|
|
408
|
+
**Files to read:** (already exist)
|
|
409
|
+
1. `{path}` — {why the agent reads this}
|
|
410
|
+
2. `{path}` — {why}
|
|
411
|
+
|
|
412
|
+
**Files to write:**
|
|
413
|
+
1. `{path}` — {what the agent creates}
|
|
414
|
+
2. `{path}` — {test file}
|
|
415
|
+
|
|
416
|
+
**Test command:** `{exact command}`
|
|
417
|
+
|
|
418
|
+
**Expected test output:** `{what success looks like}`
|
|
419
|
+
|
|
420
|
+
**Total files touched:** {number} (target: under 10)
|
|
421
|
+
|
|
422
|
+
## What the Original Got Wrong (Architecture)
|
|
423
|
+
|
|
424
|
+
{Bullet list citing the research documents. Focus on structural problems — not features or UX:}
|
|
425
|
+
|
|
426
|
+
- **{Problem}** — {What went wrong architecturally, what it meant for development, and how this blueprint avoids it.}
|
|
427
|
+
|
|
428
|
+
{5-10 items. Be specific. Cite the research.}
|
|
429
|
+
|
|
430
|
+
## Summary
|
|
431
|
+
|
|
432
|
+
### The Architecture in Three Sentences
|
|
433
|
+
{First: how the codebase is organized. Second: how an agent builds features. Third: why this structure was chosen.}
|
|
434
|
+
|
|
435
|
+
### The Guiding Question
|
|
436
|
+
{One sentence: the question that decided every structural choice. Example: "For every file, we asked: can an agent implement and test this by reading fewer than 5 other files?"}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## Writing Rules
|
|
440
|
+
|
|
441
|
+
- **Literal, not abstract.** "File `userProfileCreate.ts` exports function `userProfileCreate`" — good. "Domain modules export their public API" — useless for an agent.
|
|
442
|
+
- **Every file listed.** The project structure section must contain every source file, test file, and config file. No `...` for repetition. An agent will use this as a checklist.
|
|
443
|
+
- **Implementation order must be buildable.** If file B imports from file A, file A must appear earlier in the implementation order. Verify this.
|
|
444
|
+
- **Principles must be falsifiable.** "Write clean code" — banned. "No file exceeds 200 lines" — enforceable.
|
|
445
|
+
- **Examples use real names.** Every code example uses actual filenames and function names from this blueprint, not generic placeholders.
|
|
446
|
+
- **No banned words:** revolutionary, powerful, seamless, robust, cutting-edge, next-generation, best-in-class, blazing-fast, game-changing, disruptive, leverage, scalable, elegant, clean (as adjective for code).
|
|
447
|
+
- **Dense.** Every sentence carries information. If a section can be a table, make it a table. If removing a sentence changes nothing, remove it.
|
|
448
|
+
|
|
449
|
+
## Quality Gates
|
|
450
|
+
|
|
451
|
+
Before finalizing, verify:
|
|
452
|
+
1. Every source file in the project structure has a layer annotation `[L0]`-`[L5]` and a purity annotation `[pure]` or `[io]`
|
|
453
|
+
2. The implementation order is a valid topological sort — no file depends on a file that comes later
|
|
454
|
+
3. Every pure function has a corresponding test file in the tree
|
|
455
|
+
4. No file in the tree exceeds the stated line limit guideline
|
|
456
|
+
5. The dependency rule is never violated — no lower layer imports from a higher layer
|
|
457
|
+
6. Every domain's "public surface" is explicitly listed — no secret exports
|
|
458
|
+
7. The 3 feature traces each touch fewer than 10 files total
|
|
459
|
+
8. All naming examples use actual names from this blueprint, not placeholders
|
|
460
|
+
9. The frontmatter `totalFiles` and `totalTestFiles` counts match the actual file tree
|
|
461
|
+
10. Every principle has evidence from the original project's research documents
|
|
462
|
+
11. No file exists in the tree without being referenced in the implementation order
|
|
463
|
+
12. A reader finishes knowing: what every file does, what order to build them, what principles to follow, and how features map to files
|
|
464
|
+
|
|
465
|
+
If any check fails, revise before returning.
|
|
466
|
+
|
|
467
|
+
## Output
|
|
468
|
+
|
|
469
|
+
Output only raw markdown with YAML frontmatter. No preamble, no explanation, no commentary outside the document structure.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
You are writing a README.md for an open-source project.
|
|
2
|
+
|
|
3
|
+
This repository is a clean copy produced by [HoldMyBeer](https://github.com/ex3ndr/holdmybeer).
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
- **Original source repository:** {sourceFullName}
|
|
8
|
+
- **Published repository:** {publishFullName}
|
|
9
|
+
- **Local checkout of the original:** {originalCheckoutPath}
|
|
10
|
+
|
|
11
|
+
Read the local checkout thoroughly — source code, existing README, package metadata, config files, tests, examples — to understand what the project actually does. Do not modify any files.
|
|
12
|
+
|
|
13
|
+
## README requirements
|
|
14
|
+
|
|
15
|
+
Write a comprehensive README that treats this as a real, usable project. The focus is on **what the project does, how to use it, and why it matters**. The HoldMyBeer origin is a small footnote, not the headline.
|
|
16
|
+
|
|
17
|
+
### Structure
|
|
18
|
+
|
|
19
|
+
1. **Title**
|
|
20
|
+
- Project name as H1 (derive from the original repo)
|
|
21
|
+
- One-line description of what the project does — focus on the user benefit
|
|
22
|
+
- Small note below: `> 🍺 Clean copy of [{sourceFullName}](https://github.com/{sourceFullName}) via [HoldMyBeer](https://github.com/ex3ndr/holdmybeer)`
|
|
23
|
+
|
|
24
|
+
2. **Overview**
|
|
25
|
+
- 3–5 sentences explaining the project's purpose
|
|
26
|
+
- What problem does it solve? Who is it for? Why does it exist?
|
|
27
|
+
- Read the original code and README deeply — understand the domain, not just the tech
|
|
28
|
+
- If the project has a logo, tagline, or mission statement, incorporate it naturally
|
|
29
|
+
|
|
30
|
+
3. **Key features**
|
|
31
|
+
- Bulleted list of the project's main capabilities
|
|
32
|
+
- Extract from actual code: exports, CLI commands, API surface, config options, supported formats
|
|
33
|
+
- Be specific ("Supports PostgreSQL, MySQL, and SQLite") not generic ("Supports multiple databases")
|
|
34
|
+
- Group related features if there are many
|
|
35
|
+
|
|
36
|
+
4. **Quick start**
|
|
37
|
+
- The fastest path from zero to working
|
|
38
|
+
- Prerequisites (runtime version, system deps)
|
|
39
|
+
- Install and run in 3–5 copy-pasteable commands
|
|
40
|
+
- Show expected output if helpful
|
|
41
|
+
|
|
42
|
+
5. **Usage**
|
|
43
|
+
- 3–5 concrete examples covering the most common workflows
|
|
44
|
+
- CLI tools: show commands with flags and expected output
|
|
45
|
+
- Libraries: show import, initialization, and typical API calls
|
|
46
|
+
- Servers/apps: show how to start, configure, and interact
|
|
47
|
+
- Use realistic values in examples, not `foo`/`bar`
|
|
48
|
+
|
|
49
|
+
6. **API reference** (if it's a library)
|
|
50
|
+
- Document the main public API surface
|
|
51
|
+
- Function signatures, parameters, return types
|
|
52
|
+
- Keep it concise — cover the top 5–10 most used functions/classes
|
|
53
|
+
- Skip this section entirely for CLI tools or apps
|
|
54
|
+
|
|
55
|
+
7. **Configuration**
|
|
56
|
+
- Environment variables, config files, CLI flags
|
|
57
|
+
- Show defaults and valid values
|
|
58
|
+
- Only include if the project actually has configuration
|
|
59
|
+
- Skip this section if there's nothing to configure
|
|
60
|
+
|
|
61
|
+
8. **Project structure**
|
|
62
|
+
- Brief directory tree of the main folders
|
|
63
|
+
- One-line description of each folder's purpose
|
|
64
|
+
- Only top-level and key subdirectories — not every file
|
|
65
|
+
- Skip for very small projects (< 10 files)
|
|
66
|
+
|
|
67
|
+
9. **Development**
|
|
68
|
+
- How to set up a dev environment
|
|
69
|
+
- How to run tests, lint, build
|
|
70
|
+
- Derive from actual scripts in package.json / Makefile / equivalent
|
|
71
|
+
|
|
72
|
+
10. **Tech stack**
|
|
73
|
+
- Language, runtime, framework, key dependencies
|
|
74
|
+
- Derive from package.json, Cargo.toml, go.mod, requirements.txt, or equivalent
|
|
75
|
+
- Keep it brief — a short list, not paragraphs
|
|
76
|
+
|
|
77
|
+
11. **License**
|
|
78
|
+
- Match the original repository's license exactly
|
|
79
|
+
- If no license file exists, state: "License follows the original repository"
|
|
80
|
+
|
|
81
|
+
12. **Acknowledgments**
|
|
82
|
+
- Credit the original project: `Based on [{sourceFullName}](https://github.com/{sourceFullName})`
|
|
83
|
+
- Clean copy produced by [HoldMyBeer](https://github.com/ex3ndr/holdmybeer)
|
|
84
|
+
- Keep this to 2–3 lines maximum
|
|
85
|
+
|
|
86
|
+
### Style
|
|
87
|
+
|
|
88
|
+
- Focus on **what the project does**, not on HoldMyBeer internals or generation process
|
|
89
|
+
- Write for someone who found this repo and wants to use it — not someone who cares how it was made
|
|
90
|
+
- Clear, direct English — no filler, no hype, no "powerful" or "blazing fast"
|
|
91
|
+
- Present tense: "Parses JSON" not "Will parse JSON"
|
|
92
|
+
- Code blocks must specify language for syntax highlighting
|
|
93
|
+
- Length: 150–400 lines — thorough but not padded
|
|
94
|
+
- ATX headings, fenced code blocks, `-` for unordered lists
|
|
95
|
+
- Only document what exists in the code — never invent features
|
|
96
|
+
- No CI/coverage/npm badges unless the original had them
|
|
97
|
+
- No table of contents
|
|
98
|
+
|
|
99
|
+
### Output
|
|
100
|
+
|
|
101
|
+
Output only raw markdown. No preamble, no explanation.
|