Skip to content

Scaffold individual primitives as reusable packages with apm init --type #60

@vineethsoma

Description

@vineethsoma

Feature Request: Scaffold individual primitives as reusable packages

Problem Statement

Currently, apm init creates a full project structure with all primitive types. However, developers often want to create and reuse individual primitive types (agents, skills, instructions, context, memory) as standalone, installable packages without creating an entire project structure.

Proposed Solution

Add a --type flag to apm init to scaffold individual primitive types as APM-compatible packages that can be installed into other projects.

Proposed Syntax:

apm init --type="agent" --name="fullstack-engineer"
apm init --type="skill" --name="security-audit"
apm init --type="context" --name="api-standards"
apm init --type="memory" --name="team-contacts"
apm init --type="instruction" --name="python-standards"

Expected Behavior

Each command should generate:

For --type="agent":

fullstack-engineer/
├── apm.yml
├── SKILL.md
├── README.md
└── .apm/
    └── agents/
        └── fullstack-engineer.agent.md

For --type="skill":

security-audit/
├── apm.yml
├── SKILL.md
├── README.md
└── .apm/
    └── (no agents, skills are typically SKILL.md only)

For --type="instruction":

python-standards/
├── apm.yml
├── SKILL.md
├── README.md
└── .apm/
    └── instructions/
        └── python-standards.instructions.md

Use Cases

  1. Reusable Agent Library: Create and share specialized agents across projects

    apm init --type="agent" --name="security-auditor"
    apm install you/security-auditor
  2. Coding Standards Packages: Package language-specific or domain standards

    apm init --type="instruction" --name="typescript-standards"
    apm install you/typescript-standards
  3. Team Knowledge Base: Create context packages with architectural decisions

    apm init --type="context" --name="microservices-patterns"
    apm install you/microservices-patterns

Benefits

  • Granular Reusability: Create focused, single-purpose packages instead of monolithic projects
  • Better Organization: Cleaner separation of concerns
  • Easier Discovery: Smaller packages are easier to find and understand
  • Developer Experience: Simpler workflow for creating specialized primitives

Acceptance Criteria

  • apm init --type=<primitive_type> --name=<package_name> creates appropriate scaffold
  • Supported types: agent, skill, instruction, context, memory
  • Generated apm.yml is properly formatted and installable
  • Generated SKILL.md includes helpful template content
  • Generated README.md explains the primitive's purpose
  • Generated primitive file (.agent.md, .instructions.md, etc.) includes proper frontmatter
  • Scaffolded packages can be installed via apm install
  • Documentation updated with examples

Related Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageNew issue, not yet reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions