codex-genesis-harness 0.1.1 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -0
- package/.codebase/CURRENT_STATE.md +4 -5
- package/.codebase/DOMAIN_MODELS.md +5 -3
- package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -0
- package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -0
- package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -0
- package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -0
- package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -0
- package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -0
- package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -0
- package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -0
- package/.codebase/README.md +139 -0
- package/.codebase/RECOVERY_POINTS.md +438 -0
- package/.codebase/state.json +37 -0
- package/.codex/skills/genesis-api-sync/SKILL.md +354 -0
- package/.codex/skills/genesis-api-sync/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -0
- package/.codex/skills/genesis-api-sync/examples/example.md +68 -0
- package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -0
- package/.codex/skills/genesis-debug-guide/SKILL.md +479 -0
- package/.codex/skills/genesis-debug-guide/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -0
- package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -0
- package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -0
- package/.codex/skills/genesis-debug-guide/examples/example.md +48 -0
- package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -0
- package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -0
- package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -0
- package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -0
- package/.codex/skills/genesis-docs-automation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -0
- package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -0
- package/.codex/skills/genesis-docs-automation/examples/example.md +59 -0
- package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -0
- package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -0
- package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -0
- package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -0
- package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -0
- package/.codex/skills/genesis-harness/SKILL.md +743 -82
- package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -0
- package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -0
- package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -0
- package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -0
- package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -0
- package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -0
- package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -0
- package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -0
- package/.codex/skills/genesis-harness/scripts/check-architecture-boundaries.sh +23 -23
- package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +24 -24
- package/.codex/skills/genesis-harness/scripts/check-no-debug-logs.sh +21 -21
- package/.codex/skills/genesis-harness/scripts/check-required-planning-files.sh +46 -46
- package/.codex/skills/genesis-harness/scripts/check-spec-changelog.sh +24 -24
- package/.codex/skills/genesis-harness/scripts/check-task-tracking.sh +25 -25
- package/.codex/skills/genesis-harness/scripts/compact-context.sh +54 -0
- package/.codex/skills/genesis-harness/scripts/create-adr.sh +74 -74
- package/.codex/skills/genesis-harness/scripts/create-bug.sh +160 -160
- package/.codex/skills/genesis-harness/scripts/create-feature.sh +217 -217
- package/.codex/skills/genesis-harness/scripts/detect-stack.sh +26 -26
- package/.codex/skills/genesis-harness/scripts/init-planning.sh +750 -719
- package/.codex/skills/genesis-harness/scripts/list-changed-files.sh +12 -12
- package/.codex/skills/genesis-harness/scripts/offload-log.sh +72 -0
- package/.codex/skills/genesis-harness/scripts/run-verification.sh +47 -47
- package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +75 -0
- package/.codex/skills/genesis-harness/scripts/update-state.sh +33 -33
- package/.codex/skills/genesis-harness-engineering/SKILL.md +159 -0
- package/.codex/skills/genesis-harness-engineering/checklists/checklist.md +48 -0
- package/.codex/skills/genesis-harness-engineering/examples/example.md +57 -0
- package/.codex/skills/genesis-harness-engineering/playbooks/harness-evolution.md +99 -0
- package/.codex/skills/genesis-harness-engineering/templates/harness-change-template.md +37 -0
- package/.codex/skills/genesis-observability-automation/SKILL.md +382 -0
- package/.codex/skills/genesis-observability-automation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-observability-automation/examples/example.md +86 -0
- package/.codex/skills/genesis-performance-profiling/SKILL.md +510 -0
- package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-performance-profiling/checklists/optimization-verification.md +199 -0
- package/.codex/skills/genesis-performance-profiling/checklists/performance-baseline.md +183 -0
- package/.codex/skills/genesis-performance-profiling/examples/example.md +234 -0
- package/.codex/skills/genesis-performance-profiling/observability/performance-tracking.md +202 -0
- package/.codex/skills/genesis-performance-profiling/playbooks/load-testing-orchestration.md +593 -0
- package/.codex/skills/genesis-performance-profiling/playbooks/profiling-playbook.md +601 -0
- package/.codex/skills/genesis-performance-profiling/templates/load-test-config-template.md +428 -0
- package/.codex/skills/genesis-performance-profiling/templates/performance-report-template.md +238 -0
- package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -0
- package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -0
- package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -0
- package/.codex/skills/genesis-release-orchestration/examples/example.md +78 -0
- package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -0
- package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -0
- package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -0
- package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -0
- package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -0
- package/.codex/skills/genesis-research-first/SKILL.md +237 -0
- package/.codex/skills/genesis-research-first/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-research-first/examples/example.md +85 -0
- package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -0
- package/.codex/skills/genesis-spec-propagation/agents/openai.yaml +7 -0
- package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -0
- package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -0
- package/.codex/skills/genesis-spec-propagation/examples/example.md +63 -0
- package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -0
- package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -0
- package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -0
- package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -0
- package/.codex/skills/genesis-state-machine/SKILL.md +34 -0
- package/.codex/skills/spec-impact-engine/SKILL.md +504 -0
- package/.codex/skills/spec-impact-engine/agents/openai.yaml +7 -0
- package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +262 -0
- package/.codex/skills/spec-impact-engine/examples/example.md +98 -0
- package/.codex/skills/spec-impact-engine/templates/impact-report.md +248 -0
- package/.codex/skills/spec-impact-engine/templates/migration-guide.md +223 -0
- package/.codex-plugin/plugin.json +7 -7
- package/README.EN.md +730 -0
- package/README.VI.md +723 -0
- package/README.md +266 -107
- package/VERSION +1 -1
- package/bin/genesis-harness.js +20 -11
- package/package.json +62 -43
- package/scripts/README.md +342 -0
- package/scripts/compact-context.sh +54 -0
- package/scripts/detect-changes.sh +152 -0
- package/scripts/install.sh +50 -41
- package/scripts/offload-log.sh +72 -0
- package/scripts/run-evals.sh +70 -43
- package/scripts/run-verify-loop.sh +75 -0
- package/scripts/transition_state.sh +67 -0
- package/scripts/uninstall.sh +52 -43
- package/scripts/validation_gates.sh +46 -0
- package/scripts/verify.sh +165 -73
- package/.codex/skills/harness-engineering-skill/SKILL.md +0 -45
- package/.codex/skills/harness-engineering-skill/checklists/checklist.md +0 -8
- package/.codex/skills/harness-engineering-skill/examples/example.md +0 -4
- package/.codex/skills/harness-engineering-skill/templates/harness-change-template.md +0 -8
- /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/SKILL.md +0 -0
- /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/agents/openai.yaml +0 -0
- /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/checklists/checklist.md +0 -0
- /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/examples/example.md +0 -0
- /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/templates/provider-contract-template.md +0 -0
- /package/.codex/skills/{api-contract-skill → genesis-api-contract}/SKILL.md +0 -0
- /package/.codex/skills/{api-contract-skill → genesis-api-contract}/agents/openai.yaml +0 -0
- /package/.codex/skills/{api-contract-skill → genesis-api-contract}/checklists/checklist.md +0 -0
- /package/.codex/skills/{api-contract-skill → genesis-api-contract}/examples/example.md +0 -0
- /package/.codex/skills/{api-contract-skill → genesis-api-contract}/templates/api-contract-template.md +0 -0
- /package/.codex/skills/{architecture-skill → genesis-architecture}/SKILL.md +0 -0
- /package/.codex/skills/{architecture-skill → genesis-architecture}/agents/openai.yaml +0 -0
- /package/.codex/skills/{architecture-skill → genesis-architecture}/checklists/checklist.md +0 -0
- /package/.codex/skills/{architecture-skill → genesis-architecture}/examples/example.md +0 -0
- /package/.codex/skills/{architecture-skill → genesis-architecture}/templates/architecture-decision-template.md +0 -0
- /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/SKILL.md +0 -0
- /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/agents/openai.yaml +0 -0
- /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/checklists/checklist.md +0 -0
- /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/examples/example.md +0 -0
- /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/templates/map-update-template.md +0 -0
- /package/.codex/skills/{design-spec-skill → genesis-design-spec}/SKILL.md +0 -0
- /package/.codex/skills/{design-spec-skill → genesis-design-spec}/agents/openai.yaml +0 -0
- /package/.codex/skills/{design-spec-skill → genesis-design-spec}/checklists/checklist.md +0 -0
- /package/.codex/skills/{design-spec-skill → genesis-design-spec}/examples/example.md +0 -0
- /package/.codex/skills/{design-spec-skill → genesis-design-spec}/templates/design-spec-template.md +0 -0
- /package/.codex/skills/{docs-skill → genesis-docs}/SKILL.md +0 -0
- /package/.codex/skills/{docs-skill → genesis-docs}/agents/openai.yaml +0 -0
- /package/.codex/skills/{docs-skill → genesis-docs}/checklists/checklist.md +0 -0
- /package/.codex/skills/{docs-skill → genesis-docs}/examples/example.md +0 -0
- /package/.codex/skills/{docs-skill → genesis-docs}/templates/docs-update-template.md +0 -0
- /package/.codex/skills/{harness-engineering-skill → genesis-harness-engineering}/agents/openai.yaml +0 -0
- /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/SKILL.md +0 -0
- /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/agents/openai.yaml +0 -0
- /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/checklists/checklist.md +0 -0
- /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/examples/example.md +0 -0
- /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/templates/orchestration-template.md +0 -0
- /package/.codex/skills/{planning-skill → genesis-planning}/SKILL.md +0 -0
- /package/.codex/skills/{planning-skill → genesis-planning}/agents/openai.yaml +0 -0
- /package/.codex/skills/{planning-skill → genesis-planning}/checklists/checklist.md +0 -0
- /package/.codex/skills/{planning-skill → genesis-planning}/examples/example.md +0 -0
- /package/.codex/skills/{planning-skill → genesis-planning}/templates/plan-template.md +0 -0
- /package/.codex/skills/{release-skill → genesis-release}/SKILL.md +0 -0
- /package/.codex/skills/{release-skill → genesis-release}/agents/openai.yaml +0 -0
- /package/.codex/skills/{release-skill → genesis-release}/checklists/checklist.md +0 -0
- /package/.codex/skills/{release-skill → genesis-release}/examples/example.md +0 -0
- /package/.codex/skills/{release-skill → genesis-release}/templates/release-checklist-template.md +0 -0
- /package/.codex/skills/{research-skill → genesis-research}/SKILL.md +0 -0
- /package/.codex/skills/{research-skill → genesis-research}/agents/openai.yaml +0 -0
- /package/.codex/skills/{research-skill → genesis-research}/checklists/checklist.md +0 -0
- /package/.codex/skills/{research-skill → genesis-research}/examples/example.md +0 -0
- /package/.codex/skills/{research-skill → genesis-research}/templates/research-note-template.md +0 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# Implementation Handoff Template
|
|
2
|
+
|
|
3
|
+
**Purpose**: Document what was implemented, current state, and how to continue if work is paused or passed to another team member.
|
|
4
|
+
|
|
5
|
+
**Use After**: Successful implementation completion, before moving to next phase.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Header
|
|
10
|
+
|
|
11
|
+
**Feature/Bug**: _[Name and reference]_
|
|
12
|
+
**Implemented By**: _Name_
|
|
13
|
+
**Completed Date**: _YYYY-MM-DD_
|
|
14
|
+
**Estimated Handoff Date**: _YYYY-MM-DD_
|
|
15
|
+
**Next Owner**: _Name (if known)_
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Executive Summary
|
|
20
|
+
|
|
21
|
+
_Brief (2-3 sentences) overview of what was implemented._
|
|
22
|
+
|
|
23
|
+
Example:
|
|
24
|
+
```
|
|
25
|
+
Implemented OAuth 2.0 authentication with Google and GitHub providers.
|
|
26
|
+
Added user registration flow, login page, and session management.
|
|
27
|
+
Integrated with existing user database and role system.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## What Was Built
|
|
33
|
+
|
|
34
|
+
### Modules Created
|
|
35
|
+
|
|
36
|
+
List all new files/modules:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
├── src/auth/
|
|
40
|
+
│ ├── oauth-provider.ts (new)
|
|
41
|
+
│ ├── session-manager.ts (new)
|
|
42
|
+
│ └── token-handler.ts (new)
|
|
43
|
+
├── src/ui/pages/
|
|
44
|
+
│ ├── login.tsx (new)
|
|
45
|
+
│ └── register.tsx (new)
|
|
46
|
+
├── tests/
|
|
47
|
+
│ ├── auth.test.ts (new)
|
|
48
|
+
│ └── oauth.integration.test.ts (new)
|
|
49
|
+
└── docs/
|
|
50
|
+
└── AUTH_SETUP.md (new)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Modules Modified
|
|
54
|
+
|
|
55
|
+
List all files changed:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
├── src/app.ts (modified)
|
|
59
|
+
│ └── Added auth middleware
|
|
60
|
+
├── src/db/user-model.ts (modified)
|
|
61
|
+
│ └── Added oauth provider fields
|
|
62
|
+
├── .codebase/API_CONTRACTS.md (updated)
|
|
63
|
+
│ └── Added /auth/* endpoints
|
|
64
|
+
└── package.json (updated)
|
|
65
|
+
└── Added oauth2 dependencies
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Key Features Implemented
|
|
69
|
+
|
|
70
|
+
- [ ] Feature A: Description
|
|
71
|
+
- [ ] Feature B: Description
|
|
72
|
+
- [ ] Feature C: Description
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Current State
|
|
77
|
+
|
|
78
|
+
### ✅ What's Complete
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Implementation:
|
|
82
|
+
✓ OAuth flow implemented
|
|
83
|
+
✓ Database migrations applied
|
|
84
|
+
✓ API endpoints created
|
|
85
|
+
✓ UI components built
|
|
86
|
+
✓ Error handling added
|
|
87
|
+
|
|
88
|
+
Testing:
|
|
89
|
+
✓ Unit tests passing (15/15)
|
|
90
|
+
✓ Integration tests passing (8/8)
|
|
91
|
+
✓ E2E tests passing (5/5)
|
|
92
|
+
✓ Coverage: 85%
|
|
93
|
+
|
|
94
|
+
Documentation:
|
|
95
|
+
✓ API_CONTRACTS.md updated
|
|
96
|
+
✓ README updated with setup instructions
|
|
97
|
+
✓ Database schema documented
|
|
98
|
+
✓ Error handling documented
|
|
99
|
+
|
|
100
|
+
Deployment:
|
|
101
|
+
✓ Code review approved
|
|
102
|
+
✓ All linting passed
|
|
103
|
+
✓ Build successful
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### ⚠️ Known Issues / Limitations
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Issue #1: Rate limiting not yet enforced
|
|
110
|
+
- Status: Identified
|
|
111
|
+
- Severity: Low
|
|
112
|
+
- Next: Implement in next sprint
|
|
113
|
+
- Workaround: None needed, non-blocking
|
|
114
|
+
|
|
115
|
+
Issue #2: Session timeout not configurable
|
|
116
|
+
- Status: Identified
|
|
117
|
+
- Severity: Medium
|
|
118
|
+
- Next: Add config options
|
|
119
|
+
- Workaround: Contact admin to adjust
|
|
120
|
+
|
|
121
|
+
Issue #3: OAuth token refresh edge case
|
|
122
|
+
- Status: Identified, isolated to specific provider
|
|
123
|
+
- Severity: Low
|
|
124
|
+
- Next: Add retry logic
|
|
125
|
+
- Workaround: User re-login
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 📊 Metrics & Status
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Code Quality:
|
|
132
|
+
- Test coverage: 85% (target: 80%)
|
|
133
|
+
- Cyclomatic complexity: Low
|
|
134
|
+
- Code review: Approved
|
|
135
|
+
- Linting: 0 errors
|
|
136
|
+
|
|
137
|
+
Performance:
|
|
138
|
+
- Auth flow latency: 250ms avg
|
|
139
|
+
- Login page load: 1.2s
|
|
140
|
+
- No performance regressions detected
|
|
141
|
+
|
|
142
|
+
Deployment Readiness:
|
|
143
|
+
- Staging: ✓ Deployed, tested
|
|
144
|
+
- Production: Ready
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Files & Artifacts
|
|
150
|
+
|
|
151
|
+
### Documentation
|
|
152
|
+
|
|
153
|
+
- **AUTH_SETUP.md**: Setup instructions for OAuth providers
|
|
154
|
+
- **API_CONTRACTS.md**: Endpoint specifications
|
|
155
|
+
- **.codebase/CURRENT_STATE.md**: Updated implementation status
|
|
156
|
+
- **RECOVERY_POINTS.md**: Resumption points if work pauses
|
|
157
|
+
|
|
158
|
+
### Code Locations
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Authentication logic: src/auth/
|
|
162
|
+
UI components: src/ui/pages/auth/
|
|
163
|
+
Tests: tests/auth/, tests/integration/oauth/
|
|
164
|
+
Database: src/db/migrations/auth-v1.sql
|
|
165
|
+
Configuration: config/oauth-providers.json
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Contracts & Schemas
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
API Contracts: .codebase/API_CONTRACTS.md
|
|
172
|
+
- POST /auth/login
|
|
173
|
+
- POST /auth/register
|
|
174
|
+
- POST /auth/logout
|
|
175
|
+
- GET /auth/callback
|
|
176
|
+
|
|
177
|
+
Database: src/db/schema/users.sql
|
|
178
|
+
- oauth_provider field
|
|
179
|
+
- oauth_id field
|
|
180
|
+
- oauth_email field
|
|
181
|
+
- oauth_metadata field
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## For Next Developer / Phase
|
|
187
|
+
|
|
188
|
+
### To Continue This Work
|
|
189
|
+
|
|
190
|
+
1. **Read These First**:
|
|
191
|
+
```bash
|
|
192
|
+
cat .codebase/CURRENT_STATE.md
|
|
193
|
+
cat AUTH_SETUP.md
|
|
194
|
+
cat RECOVERY_POINTS.md
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
2. **Environment Setup**:
|
|
198
|
+
```bash
|
|
199
|
+
npm install
|
|
200
|
+
npm run db:migrate
|
|
201
|
+
npm test # Should see 28 tests passing
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
3. **Known Issues to Address** (Priority Order):
|
|
205
|
+
- [ ] Rate limiting (Low priority, next sprint)
|
|
206
|
+
- [ ] Configurable timeout (Medium priority)
|
|
207
|
+
- [ ] Token refresh edge case (Low priority)
|
|
208
|
+
|
|
209
|
+
4. **Next Steps**:
|
|
210
|
+
- [ ] Deploy to production (when ready)
|
|
211
|
+
- [ ] Monitor error rates for 24 hours
|
|
212
|
+
- [ ] Gather user feedback
|
|
213
|
+
- [ ] Plan Phase 2: Social login enhancements
|
|
214
|
+
|
|
215
|
+
### Recovery Points
|
|
216
|
+
|
|
217
|
+
See **RECOVERY_POINTS.md** for:
|
|
218
|
+
- Pause points if work interrupted
|
|
219
|
+
- How to resume mid-implementation
|
|
220
|
+
- Rollback procedures if needed
|
|
221
|
+
- Dependencies and blockers
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Testing Status
|
|
226
|
+
|
|
227
|
+
### Test Coverage By Module
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
Authentication (oauth-provider.ts): ✓ 90% (9/10 functions)
|
|
231
|
+
Session management (session-manager.ts): ✓ 85% (6/7 functions)
|
|
232
|
+
Token handling (token-handler.ts): ✓ 100% (5/5 functions)
|
|
233
|
+
UI components (login.tsx, register.tsx): ✓ 75% (styling not tested)
|
|
234
|
+
API endpoints: ✓ 95% (18/19 paths)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Test Execution
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# All tests
|
|
241
|
+
npm test
|
|
242
|
+
|
|
243
|
+
# Specific suite
|
|
244
|
+
npm test -- auth.test.ts
|
|
245
|
+
|
|
246
|
+
# With coverage
|
|
247
|
+
npm test -- --coverage
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Critical Tests to Monitor
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
1. OAuth token refresh flow
|
|
254
|
+
2. Session expiry handling
|
|
255
|
+
3. Concurrent login attempts
|
|
256
|
+
4. Provider callback validation
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Deployment Notes
|
|
262
|
+
|
|
263
|
+
### Prerequisites
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
Required environment variables:
|
|
267
|
+
- OAUTH_GOOGLE_CLIENT_ID
|
|
268
|
+
- OAUTH_GOOGLE_CLIENT_SECRET
|
|
269
|
+
- OAUTH_GITHUB_CLIENT_ID
|
|
270
|
+
- OAUTH_GITHUB_CLIENT_SECRET
|
|
271
|
+
- SESSION_SECRET
|
|
272
|
+
- SESSION_TIMEOUT_MINUTES
|
|
273
|
+
|
|
274
|
+
Database:
|
|
275
|
+
- Run: npm run db:migrate
|
|
276
|
+
- Check: SELECT * FROM migrations; (should see auth-v1)
|
|
277
|
+
|
|
278
|
+
Dependencies:
|
|
279
|
+
- All installed: npm install
|
|
280
|
+
- Versions locked in package-lock.json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Deployment Checklist
|
|
284
|
+
|
|
285
|
+
- [ ] Environment variables configured
|
|
286
|
+
- [ ] Database migrations applied
|
|
287
|
+
- [ ] SSL certificates configured
|
|
288
|
+
- [ ] Rate limiting enabled
|
|
289
|
+
- [ ] Logging configured
|
|
290
|
+
- [ ] Monitoring alerts set up
|
|
291
|
+
- [ ] Rollback plan tested
|
|
292
|
+
|
|
293
|
+
### Rollback Procedure
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# If deployment fails:
|
|
297
|
+
1. Revert git commit: git revert [commit-hash]
|
|
298
|
+
2. Rollback database: npm run db:rollback -- auth-v1
|
|
299
|
+
3. Clear session cache: redis-cli FLUSHDB
|
|
300
|
+
4. Restart app: npm restart
|
|
301
|
+
5. Verify health check: curl https://api/health
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Architecture Decisions
|
|
307
|
+
|
|
308
|
+
### Why This Approach?
|
|
309
|
+
|
|
310
|
+
**Decision 1: OAuth 2.0 via provider-specific libraries**
|
|
311
|
+
- Alternative: Build custom OAuth implementation
|
|
312
|
+
- Chose this because: Security, maintainability, reduces code
|
|
313
|
+
- Tradeoff: Slight vendor lock-in, but worth it
|
|
314
|
+
|
|
315
|
+
**Decision 2: Session-based auth**
|
|
316
|
+
- Alternative: JWT tokens only
|
|
317
|
+
- Chose this because: Server-side logout control, CSRF protection
|
|
318
|
+
- Tradeoff: Slight more server memory, but better security
|
|
319
|
+
|
|
320
|
+
**Decision 3: Async token refresh**
|
|
321
|
+
- Alternative: Refresh on every request
|
|
322
|
+
- Chose this because: Performance, reduces provider calls
|
|
323
|
+
- Tradeoff: Slight risk of stale tokens, mitigated by retry logic
|
|
324
|
+
|
|
325
|
+
See **ARCHITECTURE.md** for full design decisions.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Contact & Questions
|
|
330
|
+
|
|
331
|
+
**Original Developer**: _Name_ (_email_)
|
|
332
|
+
**Current Owner**: _Name_ (_email_)
|
|
333
|
+
**Questions**: See KNOWN_PROBLEMS.md or ask in #[Slack channel]
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Sign-Off
|
|
338
|
+
|
|
339
|
+
- [ ] **Implementation Complete**: ✓ Verified
|
|
340
|
+
- [ ] **All Tests Passing**: ✓ Verified
|
|
341
|
+
- [ ] **Documentation Complete**: ✓ Verified
|
|
342
|
+
- [ ] **Ready for Handoff**: ✓ Verified
|
|
343
|
+
|
|
344
|
+
**Handoff Date**: _YYYY-MM-DD_
|
|
345
|
+
**Handed Off By**: _Name_
|
|
346
|
+
**Received By**: _Name (if applicable)_
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
**Last Updated**: _YYYY-MM-DD_
|
|
351
|
+
**Next Review**: _YYYY-MM-DD_
|