mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-07-21 18:33:22 -07:00
5e48e98293
- Add /plan2code-3b-review: 5-step post-implementation review with adaptive scope, 11 dimensions, reference-file architecture, and Plan/Apply/Verify fixes - Unify workflow/skill file naming to single-dash (drop -- and --- conventions) - Add Devin platform support and CLAUDE.md MANDATORY FIRST STEP template - Guide agents to use semantic anchors over line numbers in workflow prompts - Bump version to 1.14.0
2.1 KiB
2.1 KiB
Code Style & Gotchas
Part of AGENTS.md — project guidance for AI coding agents.
Code Style
- install.js: CommonJS, Node.js built-ins only (no external deps), ANSI colors via
COLORSconstant, readline-based prompts - plan2code-loop & plan2code-metrics: TypeScript + ESM, built with tsup (target ES2022, moduleResolution: bundler)
- External deps:
@inquirer/prompts,chalk,execa,ora - Interactive CLI via
@inquirer/prompts(select, input, confirm)
- External deps:
- File operations: Synchronous fs in all packages
Gotchas / Pitfalls
- Version sync: When adding a new version to
CHANGELOG.md, also updateversion.jsonandpackage.jsonto match. The installer displays the version fromversion.jsonin its header. - Loop
.gitignoresetup:ensureGitignore()runs at startup inController.run()as a pre-flight step, not just insidecreateTaskCommit(). This is critical for phase mode where the Node controller doesn't handle commits — without it,git add -Awould stage spec files. - Workflow file character limit: All
src/plan2code-*.mdfiles must be ≤ 11,000 characters. A husky pre-commit hook enforces this. The 11,000 limit leaves buffer for platform-specific YAML headers (106-142 chars) to stay under Windsurf's 12,000 char limit. - Metrics internal prompts have no char limit: Files in
plan2code-metrics/src/prompts/are NOT subject to the 11,000 char limit — onlysrc/plan2code-*.mdconsumer-facing prompts are. - User Feedback table format: The
## User Feedbackmarkdown table inoverview.mdhas a strict format the collector regex depends on. Field names must be exactlyRating,Reason,Went Well,Went Poorly. Pipe characters in values must be escaped as\|. - Reference file sizing guideline: Files in
src/plan2code-*-references/directories target ~100-200 lines each (soft guideline; evaluate splitting above 300). They are NOT subject to the 11,000 character limit. The pre-commit hook (validate-char-count.js) only checkssrc/plan2code-*.mdflat files — subdirectory contents are automatically excluded.