Add cross-project pattern registry for retrieval-augmented generalization

- Create patterns/ directory with README, manifest, and 10 initial patterns
  covering Ollama JSON fallback, API escaping, deprecation, PTY auth,
  queue-poll, LLM-as-parser, credential rotation, reverse proxy binding,
  human approval gates, and transient retry.
- Wire pattern loading into architecture/pipeline.js based on task tags.
- Update architecture/orchestrator.js to load patterns and surface them in
  the system prompt.
- Update MEMORY.md, ARCHITECTURE.md, and CONTEXT.md to document the registry
  and record the decision.
This commit is contained in:
JC Beasley
2026-08-06 12:46:09 -07:00
parent d8989f9371
commit 0bd719ab91
17 changed files with 676 additions and 32 deletions
+29
View File
@@ -0,0 +1,29 @@
# Pattern: API Version Deprecation
## Symptom
An integration that worked yesterday starts returning 400/401/404 or generic errors. Vendor documentation mentions an older API version is deprecated or sunset. Calls using the old version silently stop working or return migration messages.
## Affected Projects
- LinkedIn content automation (LinkedIn REST API version deprecation)
## Root Cause
External SaaS APIs version their endpoints and periodically retire old versions. Hard-coded version strings in workflows or apps become liabilities when the vendor changes the supported window.
## Standard Fix
1. Record the API version in use at design time, plus where to check for deprecation notices (vendor developer portal, changelog, email alerts).
2. Centralize API version strings in environment variables or config, not scattered through code.
3. Subscribe to vendor developer changelogs or status pages.
4. Plan version migration as a tracked task rather than an emergency fix.
5. Add a lightweight health check that verifies the integration still responds with expected schema/version fields.
## When to Apply
- Every new external API integration.
- Any existing integration that has no documented API version or deprecation monitoring.
## Verification
- Vendor docs show the version is current and supported.
- Health check returns expected version/schema fields.
- A deprecation monitoring source is identified and checked.
## Related Patterns
- `credential-rotation-recovery`