AgentSkillsCN

one-day-build

在 5–8 小时内构建可投入生产的项目基础。采用架构驱动的人机协作编程工作流程,以整洁的架构、全面的测试与文档,助力全新项目的启动。适用于以下场景:(1) 从零开始创建新项目;(2) 当用户说“让我们从头开始构建 X”、“帮我进行架构设计”、“与我一起进行配对编程”时;(3) 当您需要结构化的基础框架时。本技能不适用于快速修复、单文件变更,或对现有代码库的修改。

SKILL.md
--- frontmatter
name: one-day-build
description: Production-ready project foundation in 5-8 hours. Architecture-driven human-AI pair programming workflow for bootstrapping greenfield projects with clean architecture, comprehensive tests, and documentation. Use when (1) starting new projects from scratch, (2) user says "let's build X from scratch", "help me architect", "pair program with me", (3) need structured foundations. NOT for quick fixes, single-file changes, or existing codebase modifications.
license: MIT

One Day Build

Production-ready project foundation in a single session (5-8 hours).

Philosophy: Architecture first → Document decisions → Refactor ruthlessly → Test what differs

Quick Reference

PhaseDurationFocusExit Criteria
1. Intent30 minWhat & Why3-5 user stories documented
2. Architecture60-90 minHowAGENTS.md with decisions
3. Foundation2-3 hrsBuild1 feature working, >80% coverage
4. Refinement1-2 hrsFixBugs fixed, code cleaned
5. Testing60 minVerifyTest factories, fast suite
6. Docs30 minRecordREADME + AGENTS.md current

Phase Workflow

1. Intent Clarification

Ask clarifying questions until requirements are concrete:

  • Vision, constraints, tech preferences?
  • Must-have vs nice-to-have?
  • Sample data available?
code
User: "I want to build a stock price tracker"
→ "Which APIs? Real-time or daily? CLI, web, or both? Alerts needed?"
→ Result: Yahoo Finance API, daily updates, CLI + web dashboard, email alerts

Checklist: [ ] 3-5 user stories [ ] Constraints doc [ ] Priority list

2. Architecture Design

Propose 2-3 approaches with trade-offs. Document in AGENTS.md.

Key decisions:

  • Patterns: Template Method (workflows), Strategy (algorithms), Factory (creation)
  • Extensibility: How to add new data sources/formats?
  • Config: What's configurable vs hardcoded?

Checklist: [ ] AGENTS.md created [ ] Interfaces defined [ ] Config schema

3. Foundation Implementation

  1. Setup (15 min) - structure, deps, git
  2. Core (45 min) - base classes, error handling
  3. First feature (60 min) - complete with real data
  4. Tests (30 min) - fixtures, >80% coverage

Checklist: [ ] 1 feature works [ ] Tests pass [ ] Makefile ready

4. Problem-Driven Refinement

Cycle: Discover → Analyze → Design → Implement → Validate

Only refactor when problems emerge. Don't pre-optimize.

code
Bug: Year 1948 showing as 2025
→ Root cause: No year validation
→ Fix: Add _is_valid_year() + test

Checklist: [ ] Bug fixed [ ] Regression test added [ ] Docs updated

5. Testing Architecture

Goal: Make testing easier than not testing.

python
# Factory pattern - one line = full test suite
TestStockFetcher = create_fetcher_tests(StockFetcher, sample_data, expected)

Checklist: [ ] Test utilities exist [ ] <5s run time [ ] >80% coverage

6. Documentation Sync

Maintain: AGENTS.md (decisions), TODO.md (backlog), README.md (usage)

Principle: If not documented, it doesn't exist.

Checklist: [ ] Examples work [ ] Decisions recorded [ ] Next steps clear

Roles

AgentHuman
Propose options with trade-offsChoose direction
Implement and testProvide domain knowledge
Document decisionsValidate against real use
Challenge assumptionsAccept/reject trade-offs

Variations

ScenarioUse Phases
Greenfield1-6 (full)
Legacy refactor3-5
Feature addition2-5
Bug hunt4-5

Anti-Patterns

ProblemFix
Analysis paralysisTime-box design to 90 min
Premature optimizationSolve today's problems only
Doc debtDocument decisions immediately
Scope creepAdd to TODO.md, stay focused

For detailed role breakdowns and examples, see references/phases.md.