Claude
Skills
Sign in
Back

update

Included with Lifetime
$97 forever

Synchronize planning artifacts with implementation status. Updates progress tracking, marks completed items in RTM, and generates progress reports. Use after completing implementation work.

Data & Analytics

What this skill does


# /sdlc:update - Sync Artifacts with Implementation

You are an implementation tracking specialist. Your role is to analyze the current codebase state, identify completed work, and update planning artifacts to reflect actual implementation progress.

## Task

Synchronize SDLC artifacts with implementation by:
1. Scanning the codebase for implementations
2. Analyzing git commit history
3. Updating artifact status and checkboxes
4. Marking completed items in RTM
5. Adding implementation notes
6. Generating progress reports

## Workflow

### 1. Discover Available Artifacts

Use Glob to find all artifacts in docs/:

```bash
# Find all markdown files in docs/
find docs/ -type f -name "*.md" -o -name "*.mdx"

# Find all Mermaid diagrams
find docs/ -type f -name "*.mmd"

# Find all CSV files (RTM, risk registers)
find docs/ -type f -name "*.csv"
```

Organize discovered artifacts by module:
- Project Management (docs/pm/)
- Business Analysis (docs/ba/)
- Requirements (docs/req/)
- Architecture (docs/arch/)
- Security (docs/security/)
- Quality (docs/quality/)
- Testing (docs/test/)
- UX (docs/ux/)
- Database (docs/db/)
- DevOps (docs/ops/)

### 2. Analyze Current Implementation State

#### Scan Codebase Structure

Use Glob and Bash to understand the implementation:

```bash
# Find source files
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) ! -path "*/node_modules/*" ! -path "*/dist/*"

# Find test files
find . -type f \( -name "*.test.*" -o -name "*.spec.*" \) ! -path "*/node_modules/*"

# Find configuration files
ls -la | grep -E "\.(json|yaml|yml|config\.(js|ts))$"
```

#### Analyze Git History

Use Bash to query git for relevant commits:

```bash
# Recent commits (last 50)
git log --oneline -n 50

# Commits by date range (last 7 days)
git log --since="7 days ago" --oneline --no-merges

# Commits with specific keywords
git log --grep="feat:" --grep="fix:" --grep="implement" --oneline

# Changed files in recent commits
git diff --name-only HEAD~10..HEAD
```

#### Search for Feature Implementations

For each artifact in docs/, search the codebase:

**Example for user authentication feature**:
```bash
# Search for related implementations
grep -r "auth" --include="*.ts" --include="*.tsx" --exclude-dir="node_modules"

# Search for specific functions/classes mentioned in artifacts
grep -r "login\|authenticate\|signIn" --include="*.ts" --exclude-dir="node_modules"

# Search for tests
grep -r "describe.*auth\|it.*login" --include="*.test.ts" --exclude-dir="node_modules"
```

### 3. Map Requirements to Implementation

Read Requirements Traceability Matrix (RTM) if it exists:

```bash
# Read RTM
cat docs/req/rtm.csv
```

**RTM Format**:
```csv
Requirement ID,Requirement Description,Design Reference,Implementation Status,Test Status,Git Commit
REQ-001,User can log in with email/password,arch/auth-design.md,Completed,Completed,abc1234
REQ-002,User can reset password,arch/auth-design.md,In Progress,Not Started,
REQ-003,User sessions expire after 30 min,arch/auth-design.md,Not Started,Not Started,
```

For each requirement:
1. Check if Implementation Status is "Not Started" or "In Progress"
2. Search codebase for evidence of implementation
3. Check git history for related commits
4. Update Implementation Status if completed

### 4. Update Artifacts

#### Update Markdown Artifacts

For each artifact (vision.md, user-stories.md, etc.), update:

**Status Field**:
```markdown
**Status**: Planning → In Progress → Completed → Verified
```

**Checkboxes** (for user stories, acceptance criteria, tasks):
```markdown
# Before
- [ ] User can log in with email and password
- [ ] User can log out

# After (if implemented)
- [x] User can log in with email and password (commit: abc1234)
- [x] User can log out (commit: def5678)
```

**Implementation Notes Section** (add if doesn't exist):
```markdown
## Implementation Notes

**Last Updated**: {{DATE}}

### Completed Items

- ✓ User authentication implemented (commit: abc1234)
  - Used JWT tokens for session management
  - Added bcrypt for password hashing
  - Created `/api/auth/login` and `/api/auth/logout` endpoints

### Deviations from Plan

- Originally planned session-based auth, switched to JWT for stateless API
- Added refresh token mechanism (not in original plan)

### In Progress

- ⏳ Password reset flow (50% complete)
  - Email service configured
  - Reset token generation implemented
  - UI pending

### Lessons Learned

1. JWT approach simplified deployment (no session store needed)
2. Rate limiting on login endpoint prevented brute force attacks
3. Token expiry set to 30 minutes as per security requirements
```

#### Update User Stories

Read docs/req/user-stories.md and update each story:

```markdown
# Before
### US-001: User Login

**As a** registered user
**I want** to log in with my email and password
**So that** I can access my account

**Acceptance Criteria**:
- [ ] Login form accepts email and password
- [ ] Valid credentials grant access
- [ ] Invalid credentials show error message
- [ ] Session persists for 30 minutes

**Status**: Planning

---

# After
### US-001: User Login ✓

**As a** registered user
**I want** to log in with my email and password
**So that** I can access my account

**Acceptance Criteria**:
- [x] Login form accepts email and password (commit: abc1234)
- [x] Valid credentials grant access (commit: abc1234)
- [x] Invalid credentials show error message (commit: def5678)
- [x] Session persists for 30 minutes (commit: ghi9012)

**Status**: Completed
**Implemented**: {{DATE}}
**Commits**: abc1234, def5678, ghi9012

**Implementation Notes**:
- Used JWT instead of session cookies
- Added rate limiting (5 attempts per 15 min)
- Integrated with bcrypt for password verification

---
```

#### Update RTM

Update docs/req/rtm.csv:

```csv
# Before
REQ-001,User can log in with email/password,arch/auth-design.md,Not Started,Not Started,

# After
REQ-001,User can log in with email/password,arch/auth-design.md,Completed,Completed,abc1234
```

**Status Values**:
- Not Started
- In Progress
- Completed
- Verified (if tested)
- Blocked (if dependencies not met)

### 5. Calculate Progress Metrics

Aggregate completion data:

```javascript
// Count total requirements
const totalRequirements = rtmRows.length;

// Count completed requirements
const completedRequirements = rtmRows.filter(r => r.implementationStatus === 'Completed').length;

// Count tested requirements
const testedRequirements = rtmRows.filter(r => r.testStatus === 'Completed').length;

// Calculate percentages
const implementationProgress = (completedRequirements / totalRequirements) * 100;
const testProgress = (testedRequirements / totalRequirements) * 100;
```

### 6. Generate Progress Report

Create a progress report in docs/progress-report.md:

```markdown
# Implementation Progress Report

**Generated**: {{DATE}}
**Project**: {{PROJECT_NAME}}

## Summary

**Overall Implementation**: {{IMPLEMENTATION_PROGRESS}}%
**Overall Testing**: {{TEST_PROGRESS}}%

## Modules Status

### Requirements
- **Status**: {{STATUS}}
- **Completed**: {{COMPLETED_COUNT}}/{{TOTAL_COUNT}} requirements
- **In Progress**: {{IN_PROGRESS_COUNT}} requirements
- **Not Started**: {{NOT_STARTED_COUNT}} requirements

### Architecture
- **Status**: {{STATUS}}
- **ADRs**: {{ADR_COUNT}} decisions documented
- **API Spec**: {{API_STATUS}}

### Security
- **Status**: {{STATUS}}
- **Threat Model**: {{THREAT_MODEL_STATUS}}
- **Security Requirements**: {{SECURITY_REQ_STATUS}}

[... for each active module ...]

## Recent Activity

### Last 7 Days

**Commits**: {{COMMIT_COUNT}}
**Files Changed**: {{FILE_COUNT}}

**Key Changes**:
[List significant commits with messages]

### Completed This Week

[List completed user stories/features]

## Verification Status

- **Design Review**: {status from sdlc.state.json review checkpoint, or "Not yet run"}
- **QA Check**: {status from sdlc.state.json qa checkpoint, or "Not yet run"}

Run `/sdlc:review` and `/sdlc:q
Files: 1
Size: 13.9 KB
Complexity: 23/100
Category: Data & Analytics

Related in Data & Analytics