@syntesseraai/pi-feature-factory

Pi extension package for Feature Factory tool-orchestrated phase delegation

Packages

Package details

extensionskillprompt

Install @syntesseraai/pi-feature-factory from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@syntesseraai/pi-feature-factory
Package
@syntesseraai/pi-feature-factory
Version
0.2.41
Published
May 29, 2026
Downloads
6,302/mo · 6,302/wk
Author
joe__syntessera
License
MIT
Types
extension, skill, prompt
Size
289.6 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ],
  "skills": [
    "./assets/skills"
  ],
  "prompts": [
    "./prompts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@syntesseraai/pi-feature-factory

Pi package for Feature Factory orchestration. It reuses OpenCode Feature Factory assets as source material, then runs the workflow in Pi as a tool-orchestrated coordinator.

No Pi subagents, ACP runtime, or fixed phase state machine are required.

Install & Update

pi install npm:@syntesseraai/pi-feature-factory

For local development:

pi install -l ./packages/pi-extension

Deploying phase definitions

ff-pi-deploy reads definitions from assets/agents/, rewrites them as user-editable Pi phase definitions, and writes them to:

${PI_CODING_AGENT_DIR:-~/.pi/agent}/ff-phases/

Usage:

npm run deploy-pi
npm run deploy-pi -- -y
npm run deploy-pi -- --list-models
npm run deploy-pi -- --list-native-models
npm run deploy-pi -- --list-delegate-agents

Deploy writes native Pi phase files plus delegate CLI config in frontmatter:

runtime: "native"
model: "openai-codex/gpt-5.4-mini"
delegate_agent: "codex"
delegate_model: "openai/gpt-5.4-mini-fast"
delegate_mode: "implement"
delegate_reasoning: "high"
delegate_temperature: 0.4
delegate_write_policy: "workspace-write"

Running Feature Factory

/feature-factory I need to change X, Y, Z

When /feature-factory starts, the extension temporarily enables generated phase tools such as:

ff_phase_planning
ff_phase_building
ff_phase_code_reviewing
ff_phase_documenting
ff_phase_full_reviewing

The coordinator model receives the Feature Factory prompt and decides which phase tools to call. Phase tool output is fed back into the coordinator, which determines the next step itself. When the coordinator turn ends, the extension restores the previous Pi tool set, so normal Pi sessions cannot accidentally invoke Feature Factory phase tools.

Phase Tools

Each phase tool accepts only task input:

{
  task: string;
  files?: string[];
}

Agent/model/reasoning/temperature/write-policy settings come from the phase frontmatter, not the tool call. The phase markdown body is injected into the delegated CLI prompt automatically.

CLI Delegation

Phase tools run the configured CLI directly in ctx.cwd:

delegate_agent Command shape
claude-code claude -p - --output-format stream-json --model <model>
codex codex exec --sandbox <mode> -m <model> -
gemini-cli gemini --prompt - --output-format json -m <model>
opencode opencode run --format json -m <model> -

MCP config is not written into CLI config files. Where supported, it is passed dynamically for the run only (Claude Code uses --mcp-config <temp-file> --strict-mcp-config).

What it provides

  • /feature-factory slash command
  • Generated phase tools enabled only during /feature-factory
  • User-editable phase definitions in ff-phases/
  • CLI delegation to Claude Code, Codex, Gemini CLI, and OpenCode
  • Skill loading from assets/skills

Architecture

Module Purpose
index.ts Extension entry point, /feature-factory, scoped phase-tool activation
phase-definitions.ts Loads deployed phase markdown and phase-tool config
cli-agents.ts Registers phase tools and runs configured CLI workers
ff-pi-deploy.js Generates user-editable phase definitions with delegate frontmatter

Asset sync

npm run sync:assets
npm run sync:assets:source

npm run build runs sync:assets:source first and then type-checks the extension. sync:assets:source mirrors agents/, skills/, and AGENTS.md from packages/opencode-plugin; missing command assets are skipped because the plugin no longer ships them.`