Reverse-engineer Product Decision Records (PDRs) from an existing codebase and documentation using multi-agent feature-area analysis (brownfield). Use when documenting product decisions inferred from an already-built product.
npx skills add https://github.com/tikalk/adlc-team-skills --skill product-init
Reverse-engineers product decisions from an existing product using a three-phase analysis pipeline:
Output: Individual PDR-{NNN}.md files (status Discovered) in .adlc/drafts/pdr/ with an auto-generated pdr.md index.
/product-specify instead)/product-clarify instead)Run setup script to resolve paths and detect feature-areas:
sh: scripts/bash/setup-product-init.sh [--json]
ps: scripts/powershell/setup-product-init.ps1
Setup output (JSON):
{
"REPO_ROOT": "/path/to/project",
"PDR_DRAFTS_DIR": "/path/to/project/.adlc/drafts/pdr",
"PRD_FILE": "/path/to/project/PRD.md",
"feature_areas": ["core", "business", "growth"],
"next_pdr": "001"
}
Create directories:
mkdir -p "{REPO_ROOT}/.adlc/drafts/pdr"
mkdir -p "{REPO_ROOT}/.adlc/product"
Detect feature-areas from three sources:
| Source | Detection Pattern |
|---|---|
| Directory Structure | src/auth/, features/payments/, modules/ |
| Documentation | README sections, existing PRD, ROADMAP |
| Pricing Tiers | Starter/Pro/Enterprise feature mapping |
Present detected areas:
## Detected Feature-Areas
| # | Feature-Area | Sources | Evidence |
|---|--------------|---------|----------|
| 1 | **Core** | Directory + Docs | src/users/, README "Core Features" |
| 2 | **Business** | Directory + Pricing | src/billing/, pricing.md tiers |
Reply: Y to confirm, n for monolithic, or suggest changes.
Threshold Logic:
For each feature-area in order:
Progress report per area:
Discovery Agent: business feature-area
├── Directory signals: 4
├── Documentation signals: 2
├── Pricing signals: 1
└── Status: ✓ Completed
For each feature-area:
1. Cross-Area Pattern Detection:
{
"pattern_id": "P001",
"pattern_name": "Admin Persona",
"feature_area_presence": {"core": true, "business": true},
"is_cross_area": true
}
2. Inconsistency Detection:
3. PDR Generation: High-strategic patterns (>0.7) and cross-area patterns (≥2 areas)
For each discovered PDR:
{REPO_ROOT}/.adlc/drafts/pdr/PDR-{NNN}.mdPDR file format (individual file, no frontmatter):
## PDR-001: [Decision Title]
### Status
**Discovered** (Inferred from existing product)
### Date
YYYY-MM-DD
### Owner
[Inferred from codebase/authors]
### Category
[Problem | Persona | Scope | Metric | Prioritization | Business Model | Feature | NFR]
### Feature-Area
[core | business | growth | ...]
### Cross-Feature-Area Metadata
- **Appears in**: [business, growth]
- **Cross-area count**: 2
- **Is cross-area pattern**: ✓
### ⚠️ Inconsistency Flags
*None* (or flag details if detected)
### Context
**Problem/Opportunity:**
[Clear description]
**Market Forces:**
- [Market factor 1]
- [Customer feedback]
### Decision
**Decision Statement:**
[Clear statement]
**Rationale:**
[Why this option]
### Consequences
#### Positive
- [Benefit 1]
#### Negative
- [Trade-off 1]
#### Risks
- [Risk with mitigation]
### Success Metrics
| Metric | Target | Measurement Method |
|--------|--------|-------------------|
| [Metric] | [Target] | [Method] |
### Alternatives Considered
#### Option A: [Alternative Name]
**Description:** [Brief description]
**Trade-offs:** [Neutral comparison]
Generate {REPO_ROOT}/.adlc/drafts/pdr/pdr.md from all PDR-*.md files:
# For each PDR-*.md file, extract ID, title, status, date
# Build index table
Index format:
# Product Decision Records
## PDR Index
| ID | Feature-Area | Category | Status | Date | Owner |
|----|--------------|----------|--------|------|-------|
| PDR-001 | business | Business Model | Discovered | 2026-01-20 | [Inferred] |
| PDR-002 | core | Persona | Discovered | 2026-01-20 | [Inferred] |
---
## Cross-Feature-Area Analysis Summary
### Cross-Area Patterns
| Pattern | Feature-Areas | PDR |
|---------|---------------|-----|
| Admin Persona | core, business | PDR-002 |
### Inconsistencies Flagged
| Flag ID | Type | PDRs Affected | Severity |
|---------|------|---------------|----------|
| FLG-001 | Priority Conflict | PDR-003 | Medium |
---
*Individual PDR files are in this directory (PDR-*.md)*
## Product Init Complete ✓
### Execution Stats
- **Feature-areas analyzed**: 3
- **Discovery Agent runs**: 3
- **Pattern Agent runs**: 3
- **Synthesis Agent runs**: 1
### PDRs Generated
| Category | Count | Cross-Area |
|----------|-------|------------|
| Business Model | 2 | ✓ |
| Persona | 3 | ✓ |
| Problem | 2 | |
| Prioritization | 1 | |
| **With Inconsistency Flags** | **2** | |
### Next Steps
1. Review PDRs: `{REPO_ROOT}/.adlc/drafts/pdr/`
2. **Resolve inconsistencies**: Run `/product-clarify`
3. Generate PRD: Run `/product-implement`
{REPO_ROOT}/.adlc/drafts/pdr/ for existing PDR-*.md filesState file: {REPO_ROOT}/.adlc/product/state.json
{
"version": "1.0",
"command": "product-init",
"created_at": "2026-01-20T10:00:00Z",
"phase": "completed",
"feature_areas": [
{"id": "core", "name": "Core", "progress": {"discovery": "completed", "pattern": "completed"}}
],
"pdrs_generated": 9,
"cross_area_patterns": 5,
"inconsistencies": 2
}
PDR_DRAFTS_DIR — {REPO_ROOT}/.adlc/drafts/pdr (individual PDR files)PDR_INDEX — {REPO_ROOT}/.adlc/drafts/pdr/pdr.md (auto-generated index)PRD_FILE — {REPO_ROOT}/PRD.mdSTATE_FILE — {REPO_ROOT}/.adlc/product/state.json| Rationalization | Reality |
|-----------------|---------|
| "The code is self-documenting." | Code shows *how*, not *why*. PDRs capture rationale that code cannot. |
| "I'll just read the README." | READMEs describe features, not decisions. PDRs capture the decision tree. |
| "Brownfield products don't need PDRs." | Every product has implicit decisions. Making them explicit prevents repeated mistakes. |
.adlc/drafts/pdr/ directory existsPDR-*.md file created with status "Discovered"pdr.md index auto-generated with correct table.adlc/product/state.jsonTake tikalk/product-init from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.