Summary
Refactor apm init to create only minimal apm.yml by default, removing all template scaffolding. This aligns APM with npm's behavior where npm init creates only package.json.
Current Behavior
- Creates full scaffold:
apm.yml, hello-world.prompt.md, feature-implementation.prompt.md, README.md, .apm/ directory structure
- Prompts to overwrite files in existing projects
- Single mode with template-heavy defaults
Target Behavior
- Creates only
apm.yml with auto-detected metadata
- No template files, no example prompts, no README generation
- Works cleanly in brownfield projects without file pollution
- Supports optional project name argument
Expected Commands
apm init # Minimal apm.yml in current directory
apm init -y # Skip prompts, use auto-detected defaults
apm init my-project # Create my-project/ with minimal apm.yml
Implementation Requirements
Auto-Detection System
- Extract project name from directory name or git repository
- Extract author from
git config user.name
- Extract description from git repository description if available
- Fallback to sensible defaults for all fields
Minimal apm.yml Output
name: <auto-detected>
version: 1.0.0
description: <auto-detected or default>
author: <from git config or "Developer">
dependencies:
apm: []
mcp: []
scripts: {}
Code Changes
- Remove template file creation logic (
_create_project_files)
- Remove template loading (
_load_template_file)
- Simplify to single minimal mode
- Update argument parsing to accept optional project name
- Add auto-detection utilities
- Update tests to reflect minimal behavior
Breaking Changes
- Users relying on automatic template generation will need to adapt
- Template files (
hello-world.prompt.md, etc.) no longer created
.apm/ directory structure no longer auto-generated
Acceptance Criteria
Related
Part of npm-parity redesign for brownfield adoption (issue #TBD)
Summary
Refactor
apm initto create only minimalapm.ymlby default, removing all template scaffolding. This aligns APM with npm's behavior wherenpm initcreates onlypackage.json.Current Behavior
apm.yml,hello-world.prompt.md,feature-implementation.prompt.md,README.md,.apm/directory structureTarget Behavior
apm.ymlwith auto-detected metadataExpected Commands
Implementation Requirements
Auto-Detection System
git config user.nameMinimal apm.yml Output
Code Changes
_create_project_files)_load_template_file)Breaking Changes
hello-world.prompt.md, etc.) no longer created.apm/directory structure no longer auto-generatedAcceptance Criteria
apm initcreates onlyapm.ymlin current directoryapm init -yskips all prompts using auto-detected defaultsapm init my-projectcreatesmy-project/directory withapm.ymlRelated
Part of npm-parity redesign for brownfield adoption (issue #TBD)