Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
1edba92
docs: initialize
piggggggggy Oct 27, 2025
6f0f2a8
feat(agent): adds agent persona skeletons in `.ai` dir
piggggggggy Oct 27, 2025
c94ed79
refactor: set up monorepo structure
piggggggggy Oct 28, 2025
fcccfd6
feat(agent-orchestrator): add AI agent persona YAML definitions
piggggggggy Oct 28, 2025
ad4f191
feat(agent): add agent tasks and templates, workflows
piggggggggy Oct 29, 2025
c8438ec
feat(agent): add initial agent orchestrator package and ai.config fil…
piggggggggy Oct 29, 2025
6105af9
chore: remove deprecated AI folder
piggggggggy Oct 29, 2025
3a9e66a
feat(agent-engine): implement agent orchestration framework (engine)
piggggggggy Oct 29, 2025
2ff2385
feat(agent-orchestrator): apply adapter pattern for agent invocation
piggggggggy Oct 29, 2025
45cd856
refactor(agent-orchestrator): refactor agent orchestration architectu…
piggggggggy Oct 29, 2025
39a2647
refactor(): enable multi-AI vendor support with MCP interface & add o…
piggggggggy Oct 29, 2025
b92299b
refactor(agent-orch): refactor workflow.yml schema (add context prompts)
piggggggggy Oct 29, 2025
6b8d527
refactor: apply changed workflow schema & add interactive workflow pr…
piggggggggy Oct 29, 2025
ed762f8
refactor(types): apply SSOT to types/index
piggggggggy Oct 29, 2025
34af4b1
refactor(agent-orchestrator): enhance type safety
piggggggggy Oct 29, 2025
9b08e95
refactor: refactor agent adapter load
piggggggggy Oct 29, 2025
331ff64
fix(agent-orchestrator): solve wrong file path issue
piggggggggy Oct 30, 2025
7e4d20c
refactor(schema): restructure schemas (persona/workflow/task) for cle…
piggggggggy Oct 30, 2025
904ae42
refactor(persona): migrate persona mds to changed schema
piggggggggy Oct 30, 2025
63b992f
refactor(workflow): migrate workflow and add tdd_cycle workflow
piggggggggy Oct 30, 2025
a61348c
refactor(task): migrate tasks to new changed task schema
piggggggggy Oct 30, 2025
acbe887
refactor(core): migrate core modules to task-based execution
piggggggggy Oct 30, 2025
b4d6d21
refactor(adapters): update adapters for task-based execution
piggggggggy Oct 30, 2025
c54a42c
refactor(runner): update runner for task-based execution
piggggggggy Oct 30, 2025
bddb6a1
chore: add gray-matter dependency
piggggggggy Oct 30, 2025
7ef5e76
refactor(template): reorganize template files by category
piggggggggy Oct 30, 2025
50f923c
refactor(task): reorganize tasks into categorized directories
piggggggggy Oct 30, 2025
f469c90
refactor: refactor agent orchestration for Claude Code
piggggggggy Oct 30, 2025
c4fe0e9
feat(agent): add agent-designer subagent
piggggggggy Oct 30, 2025
02492d4
feat(core-agent): Introduce agent personas by agent-designer
piggggggggy Oct 30, 2025
7295131
refactor(agent): refactor agent.md with agent-designer
piggggggggy Oct 30, 2025
36ed309
feat(agent): add meta agents
piggggggggy Oct 30, 2025
b657b3c
feat(workflow): add TDD setup workflow by workflow-designer
piggggggggy Oct 30, 2025
6704c32
docs(CLAUDE.md): add project configuration and agent guidelines
piggggggggy Oct 30, 2025
d9dfc42
chore: add wake-up specialist agent
piggggggggy Oct 30, 2025
a503ab1
refactor(agent-designer): enhance agent design with adaptive depth co…
piggggggggy Oct 30, 2025
6b3b646
refactor(agent): add adaptive depth control to analyst and PM agents
piggggggggy Oct 30, 2025
f47f986
refactor(agents): refactor agent definitions (compact)
piggggggggy Oct 30, 2025
9b8d83f
feat(workflows): add TDD workflow definitions
piggggggggy Oct 30, 2025
fbde126
refactor(workflow): add skeleton code generation to TDD setup (RED)
piggggggggy Oct 30, 2025
1299115
refactor(orchestrator): refactor orchestrator agent for session-based…
piggggggggy Oct 30, 2025
f540fe8
refactor: enhance Orchestrator workflow validation
piggggggggy Oct 30, 2025
4229160
fix: update orchestrator prompt for minor fixes
piggggggggy Oct 31, 2025
1de01af
refactor: enforces workflow execution and file governance
piggggggggy Oct 31, 2025
8dc4770
chore: clarify orchestrator agent quality gates
piggggggggy Oct 31, 2025
60c0985
refactor(workflow): refactor TDD workflow for improved clarity
piggggggggy Oct 31, 2025
3752b05
chore: refactor project structure (back to base structure from monorepo)
piggggggggy Oct 31, 2025
aad0c47
refactor(agents): define core identities for agents
piggggggggy Oct 31, 2025
fba1ca8
chore: disable PM report generation in TDD setup
piggggggggy Oct 31, 2025
45611e2
refactor(agent): refine Architect agent guidelines for TDD
piggggggggy Oct 31, 2025
0b9c1df
refactor(workflow): refactor TDD workflow for lean architecture
piggggggggy Oct 31, 2025
4aa1081
refactor(orchestrator-agent): update orchestrator agent's responsibil…
piggggggggy Oct 31, 2025
00b7ef6
feat(agent): introduce agent coach for critical feedback
piggggggggy Oct 31, 2025
49dcff5
refactor: refactor TDD workflows for clarity and safety
piggggggggy Oct 31, 2025
13cf05c
chore: small fix
piggggggggy Oct 31, 2025
12b44c8
refactor: refactor orchestrator agent for session management
piggggggggy Oct 31, 2025
58cc839
refactor: refactor TDD workflows for agent orchestration
piggggggggy Oct 31, 2025
040ba92
chore: update agents to use .ai-output directory
piggggggggy Oct 31, 2025
ed06526
docs: create agent guidelines and project config
piggggggggy Oct 31, 2025
1e07e22
refactor: extend TDD workflows with codebase exploration
piggggggggy Oct 31, 2025
39dbee2
feat(RED): add recurring event functionality with TDD
piggggggggy Oct 31, 2025
f876864
docs(RED) : sets up TDD cycle for recurring events
piggggggggy Oct 31, 2025
5da6a7f
docs: add report on AI-driven TDD
piggggggggy Nov 1, 2025
3c71757
feat(GREEN): implement recurring event functionality
piggggggggy Nov 1, 2025
14a1230
docs: implement recurring event functionality
piggggggggy Nov 1, 2025
7027c73
chore: small fix
piggggggggy Nov 1, 2025
8f7ff0d
feat(REFACTOR): refactor recurring event logic for improved editing
piggggggggy Nov 1, 2025
56c37cb
docs(REFACTOR): refactor recurring event logic for clarity
piggggggggy Nov 1, 2025
cae1408
refactor(workflow): refactor TDD workflows for scope support
piggggggggy Nov 1, 2025
16c7df9
chore: solve lin error
piggggggggy Nov 1, 2025
8c83ef1
feat(RED): add integration tests for recurring event UI
piggggggggy Nov 1, 2025
886ac80
feat(GREEN): add recurring event edit/delete confirmation modal
piggggggggy Nov 1, 2025
1285fd5
docs: add test code instruction document
piggggggggy Nov 1, 2025
84643bb
feat(REFACTOR): add recurring event UI integration tests
piggggggggy Nov 1, 2025
3f31786
chore: add Node.js v22 requirement for tests
piggggggggy Nov 1, 2025
78089cf
docs(REFACTOR): complete TDD cycle 2: recurring event UI
piggggggggy Nov 1, 2025
0a312de
chore: solve lint issue
piggggggggy Nov 1, 2025
935f433
docs: enforce Node.js v22 for testing consistency
piggggggggy Nov 1, 2025
98b0e15
chore: solve minor lint issue
piggggggggy Nov 1, 2025
18646d3
refactor: add test code quality guidelines to agents
piggggggggy Nov 1, 2025
aa935b4
refactor: add orphaned UI check to PM workflow
piggggggggy Nov 2, 2025
243d6b4
feat(RED): add UI integration tests for recurring event form
piggggggggy Nov 2, 2025
5955f9d
feat(RED): enable recurring event form UI
piggggggggy Nov 2, 2025
b04506c
feat(GREEN): implement repeat event form functionality.
piggggggggy Nov 2, 2025
5336f5b
feat(GREEN): implement recurring event form setters
piggggggggy Nov 2, 2025
83ca322
refactor(useEventForm): extract magic values to constants (REFACTOR)
piggggggggy Nov 2, 2025
1710a04
refactor(useEventForm): improve code organization and clarity (REFACTOR)
piggggggggy Nov 2, 2025
5d38ace
feat(REFACTOR): refactor useEventForm hook for clarity
piggggggggy Nov 2, 2025
c21d0cf
fix: add type assertion for MUI component queries
piggggggggy Nov 2, 2025
3fc97a2
refactor: refactor orchestrator to trust agent reports
piggggggggy Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
366 changes: 366 additions & 0 deletions .ai-output/features/F-003/03_design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,366 @@
# F-003: 반복 일정 생성/수정 폼 UI 구현 - Technical Design

**Feature ID**: F-003
**Status**: Design Phase (TDD RED)
**Created**: 2025-11-02

---

## 1. Codebase Context

### Existing Hook Patterns Observed

**Pattern Analysis from `useEventForm.ts`**:
- **State Management**: All form fields use individual `useState` hooks
- **Setter Export**: Both state values AND setters are exported in return object
- **Naming Convention**: Camel case for state (`repeatType`), setter prefix `set` (`setRepeatType`)
- **Initialization**: Supports `initialEvent` parameter for edit mode
- **Type Safety**: Strict TypeScript types from `types.ts` (`RepeatType`, `RepeatInfo`)

**Current State** (Lines 16-19):
```typescript
const [isRepeating, setIsRepeating] = useState(initialEvent?.repeat.type !== 'none');
const [repeatType, setRepeatType] = useState<RepeatType>(initialEvent?.repeat.type || 'none');
const [repeatInterval, setRepeatInterval] = useState(initialEvent?.repeat.interval || 1);
const [repeatEndDate, setRepeatEndDate] = useState(initialEvent?.repeat.endDate || '');
```

**Problem**:
- State declarations exist (lines 16-19)
- Setters exported in return object (lines 90, 92, 94)
- But in `App.tsx` lines 122-126, the setters are commented out
- This causes runtime errors at lines 569, 584, 594 where the commented setters are called

---

## 2. API Contracts

### TypeScript Signatures

**`useEventForm` Return Type Enhancement**:

```typescript
interface UseEventFormReturn {
// ... existing fields ...

// Repeat State (already present)
isRepeating: boolean;
setIsRepeating: (value: boolean) => void;

repeatType: RepeatType;
setRepeatType: (type: RepeatType) => void; // ← Currently commented in App.tsx

repeatInterval: number;
setRepeatInterval: (interval: number) => void; // ← Currently commented in App.tsx

repeatEndDate: string;
setRepeatEndDate: (date: string) => void; // ← Currently commented in App.tsx

// ... existing fields ...
}
```

### Function Signatures (Skeleton)

```typescript
// These already exist in useEventForm.ts but are commented out in App.tsx
const setRepeatType = (type: RepeatType): void => {
throw new Error('NotImplementedError: setRepeatType');
};

const setRepeatInterval = (interval: number): void => {
throw new Error('NotImplementedError: setRepeatInterval');
};

const setRepeatEndDate = (date: string): void => {
throw new Error('NotImplementedError: setRepeatEndDate');
};
```

---

## 3. Architecture Decisions

### ADR-001: Uncomment vs Rewrite Strategy

**Decision**: Uncomment existing setters in `App.tsx` instead of rewriting

**Rationale**:
- The state management infrastructure already exists in `useEventForm.ts` (lines 17-19)
- Setters are properly exported (lines 90, 92, 94)
- The issue is purely in `App.tsx` where they're commented out (lines 122-126)
- Uncommenting is safer than rewriting - preserves existing working code

**Consequences**:
- Minimal risk of breaking existing functionality
- Faster implementation (just uncomment 3 lines)
- Maintains consistency with existing codebase patterns

**Alternatives Rejected**:
- **Full rewrite of repeat logic**: Unnecessary complexity, higher risk
- **Create new hook**: Violates single responsibility - form state should be in useEventForm

---

### ADR-002: State Initialization Strategy

**Decision**: Use existing `useState` initialization from `initialEvent?.repeat.*`

**Rationale**:
- Current pattern already handles both create and edit modes
- `initialEvent?.repeat.type || 'none'` provides safe default
- Consistent with other form fields (title, date, etc.)

**Consequences**:
- Edit mode automatically populates repeat fields
- Create mode defaults to non-repeating (`type: 'none'`)
- No additional initialization logic needed

---

### ADR-003: Integration with App.tsx

**Decision**: No changes to UI JSX (lines 562-599), only uncomment destructured setters

**Rationale**:
- UI code is already complete but commented out (lines 562-599)
- Comment explicitly says "8주차 과제" (Week 8 assignment)
- Uncommenting setters enables the existing UI to work

**Consequences**:
- UI will become functional immediately after uncommenting
- No need to modify rendering logic or event handlers
- Maintains original design intent

---

## 4. Test Architecture (Structure Only)

### What to Test

**Unit Tests** (Not in scope for RED phase - only examples):
1. `setRepeatType` updates state correctly
2. `setRepeatInterval` validates positive integers
3. `setRepeatEndDate` handles date string format

**Integration Tests** (Target: `src/__tests__/integration/recurring-form.test.tsx`):
1. Checkbox toggle shows/hides repeat fields
2. RepeatType selector changes type state
3. RepeatInterval input updates interval
4. RepeatEndDate picker sets end date
5. Form submission includes repeat data

### Test Structure Example

```typescript
// src/__tests__/integration/recurring-form.test.tsx

describe('Recurring Event Form UI', () => {
it('should show repeat fields when checkbox is checked', () => {
// Arrange: Render form
// Act: Check "반복 일정" checkbox
// Assert: Repeat fields visible
});

it('should update repeatType when user selects type', () => {
// Arrange: Enable repeat checkbox
// Act: Select "매주" from dropdown
// Assert: repeatType state = 'weekly'
});

it('should update repeatInterval via input field', () => {
// Arrange: Enable repeat checkbox
// Act: Type "3" in interval field
// Assert: repeatInterval state = 3
});

it('should update repeatEndDate via date picker', () => {
// Arrange: Enable repeat checkbox
// Act: Select date "2025-12-31"
// Assert: repeatEndDate state = "2025-12-31"
});

it('should include repeat data in form submission', async () => {
// Arrange: Fill form with repeat enabled
// Act: Submit form
// Assert: saveEvent called with repeat: { type, interval, endDate }
});
});
```

### Test Execution Prerequisites

**CRITICAL**: Before running tests, verify Node.js version:
```bash
node -v # Must output v22.x.x
nvm use 22 # If not v22
```

### Test Coverage Target

- **RED Phase**: 5 integration tests (example above)
- **GREEN Phase**: Tests will fail with NotImplementedError
- **REFACTOR Phase**: Add edge case tests (invalid intervals, past end dates)

---

## 5. Implementation Strategy

### Phase 1: Uncomment App.tsx Setters (2 minutes)

**File**: `src/App.tsx`

**Lines 122-126** - Current:
```typescript
repeatType,
// setRepeatType,
repeatInterval,
// setRepeatInterval,
repeatEndDate,
// setRepeatEndDate,
```

**Change to**:
```typescript
repeatType,
setRepeatType,
repeatInterval,
setRepeatInterval,
repeatEndDate,
setRepeatEndDate,
```

---

### Phase 2: Verify Setter Usage (No changes needed)

**File**: `src/App.tsx`

**Lines 569, 584, 594** - Already correct:
```typescript
// Line 569
onChange={(e) => setRepeatType(e.target.value as RepeatType)}

// Line 584
onChange={(e) => setRepeatInterval(Number(e.target.value))}

// Line 594
onChange={(e) => setRepeatEndDate(e.target.value)}
```

These calls will work once setters are uncommented in Phase 1.

---

### Phase 3: Skeleton Code in useEventForm.ts (5 minutes)

**File**: `src/hooks/useEventForm.ts`

**Goal**: Replace default React setters with NotImplementedError stubs

**Current** (lines 17-19):
```typescript
const [repeatType, setRepeatType] = useState<RepeatType>(initialEvent?.repeat.type || 'none');
const [repeatInterval, setRepeatInterval] = useState(initialEvent?.repeat.interval || 1);
const [repeatEndDate, setRepeatEndDate] = useState(initialEvent?.repeat.endDate || '');
```

**Strategy**: Keep useState for state management, override setters with stubs

**Pattern**:
```typescript
const [repeatType, _setRepeatType] = useState<RepeatType>(initialEvent?.repeat.type || 'none');
const setRepeatType = (type: RepeatType): void => {
throw new Error('NotImplementedError: setRepeatType');
};
```

This allows:
- State to exist (no crashes on initial render)
- Tests to import and call setters
- Tests to fail properly with NotImplementedError
- Dev to implement actual logic in GREEN phase

---

### Phase 4: Update resetForm and editEvent (No changes needed)

**File**: `src/hooks/useEventForm.ts`

**Lines 50-52**: `resetForm` already resets repeat state
```typescript
setRepeatType('none');
setRepeatInterval(1);
setRepeatEndDate('');
```

**Lines 66-68**: `editEvent` already populates repeat state
```typescript
setRepeatType(event.repeat.type);
setRepeatInterval(event.repeat.interval);
setRepeatEndDate(event.repeat.endDate || '');
```

Once skeleton setters are implemented, these will throw NotImplementedError (expected in RED phase).

---

### Phase 5: Verify TypeScript Compilation

```bash
# Should compile without errors
npm run build

# Runtime will fail with NotImplementedError (expected)
```

---

## 6. Handoff Summary for QA

### What's Implemented (RED Phase)

1. **Skeleton Setters**: `setRepeatType`, `setRepeatInterval`, `setRepeatEndDate` throw NotImplementedError
2. **App.tsx Integration**: Setters uncommented, UI fully wired
3. **Type Safety**: All TypeScript types properly declared

### What to Test

1. Create 5 integration tests (see Section 4 examples)
2. Verify tests fail with NotImplementedError
3. Ensure Node.js v22 is active before running tests

### Expected Behavior

- **UI Renders**: Repeat fields visible when checkbox checked
- **Calls Fail**: All setter calls throw NotImplementedError
- **Tests Fail**: All tests should fail in RED phase

### Next Phase (GREEN)

Dev will implement actual state update logic in setters to make tests pass.

---

## 7. Files Modified

| File | Change | Lines |
|------|--------|-------|
| `src/App.tsx` | Uncomment setters | 122-126 |
| `src/hooks/useEventForm.ts` | Add NotImplementedError stubs | 17-19 |

---

## 8. Validation Checklist

- [ ] TypeScript compiles without errors
- [ ] App.tsx imports setters correctly
- [ ] useEventForm exports setters in return object
- [ ] Skeleton setters throw NotImplementedError
- [ ] Existing tests still pass (non-repeat functionality)
- [ ] New tests written (5 integration tests)
- [ ] Node.js v22 verified before test execution

---

**End of Design Document**
Loading
Loading