Status: Accepted Date: 2025-08-30 Author: Claude Code Agent Context: Configuration refactoring mission - Phase 2 design
Multi-user adoption of Piper Morgan is blocked by hardcoded Notion workspace values scattered throughout the codebase. Phase 1 audit identified 5 hardcoded Notion IDs across 5 files, with 4 HIGH-risk values that completely prevent other developers from using ADR publishing, integration tests, and debugging tools.
Strategic Context:
This ADR documents 5 critical strategic decisions made for the configuration architecture:
Extend PIPER.user.md vs separate configuration files
Chosen: Extend existing PIPER.user.md with YAML section Rationale:
Alternative Rejected: Separate notion_config.yaml file
Categorization of configuration fields by criticality
Chosen: Required (ADR database, default parent) vs Optional (development, validation)** Rationale:
Implementation:
notion.adrs.database_id, notion.publishing.default_parentnotion.development.*, notion.validation.*, notion.behavior.*Fail-fast vs graceful degradation
Chosen: Fail-fast error handling with actionable guidance Rationale:
Implementation: ConfigurationError class with resolution steps array
Manual vs automated migration from hardcoded values
Chosen: Manual migration with comprehensive documentation Rationale:
Implementation: Migration guide with explicit value mappings from audit findings
Validation complexity levels
Chosen: Tiered validation (basic → enhanced → full) Rationale:
Implementation:
notion:
# REQUIRED: Core functionality
publishing:
default_parent: "" # Maps: debug_parent.py:19
adrs:
database_id: "" # Maps: fields.py:12 + adr.py:12
# OPTIONAL: Development & testing
development:
test_parent: "" # Maps: test_publish_command.py:18
debug_parent: "" # Maps: debug_parent.py:19 (duplicate usage)
mock_mode: false
# OPTIONAL: Validation & behavior
validation:
level: "basic" # basic|enhanced|full
connectivity_check: true
behavior:
confirm_overwrites: true
Complete mapping of Phase 1 audit findings to configuration schema:
| File:Line | Hardcoded Value | Configuration Path | Migration Status |
|---|---|---|---|
fields.py:12 |
25e11704d8bf80deaac2f806390fe7da |
notion.adrs.database_id |
✅ Required field |
adr.py:12 |
25e11704d8bf80deaac2f806390fe7da |
notion.adrs.database_id |
✅ Same database |
tests/publishing/test_publish_command.py:18 |
25d11704d8bf81dfb37acbdc143e6a80 |
notion.development.test_parent |
✅ Optional field |
tests/integration/test_publish_gaps.py:21 |
25d11704d8bf8135a3c9c732704c88a4 |
notion.development.test_parent |
✅ Environment fallback |
tests/debug_parent.py:19 |
25d11704d8bf80c8a71ddbe7aba51f55 |
notion.publishing.default_parent |
✅ Required field |
Coverage: 100% of hardcoded values mapped to configuration schema Risk mitigation: 4 HIGH-risk and 1 MEDIUM-risk values all configurable User impact: Complete multi-user enablement achieved through configuration
See ADR-034: Plugin Architecture Implementation for the plugin configuration system that extends the PIPER.user.md approach documented in this ADR. The plugin system adds a new YAML section to PIPER.user.md:
## 🔌 Plugin Configuration
plugins:
enabled:
- github
- slack
- notion
- calendar
This maintains the user-centric configuration philosophy established in this ADR while enabling dynamic plugin management.
Decision Date: August 30, 2025 Next Actions: Implement Phase 3 - Configuration loader with comprehensive test suite Review Schedule: Post-implementation review after Phase 5 completion