Language: This skill is written in English for universal compatibility. Always respond in the user's language unless explicitly requested otherwise. If uncertain about the user's language, ask for clarification.
Reinforce Workflow
Reinforce existing documents by adding new information to incomplete documentation generated by reverse-engineering or manual creation.
💡 Recommended Model
Sonnet recommended (document merging task) / Opus for complex reasoning
→ Token-efficient: only processes documents + user input, no code analysis
🔄 Tool Fallback
| Tool | Alternative when unavailable |
|---|---|
| Read | Request file path from user → ask for copy-paste |
| AskQuestion | "Please select: 1) OptionA 2) OptionB 3) OptionC" format |
📁 Document Structure
projectRoot/
└── docs/
└── {serviceName}/
├── spec.md # ← Input/Output
├── arch.md # ← Input/Output
└── trace.md
⚠️ When to Use
- •After reverse: Fill gaps marked with ❓ in incomplete documents
- •New information acquired: Reflect information learned later
- •Error correction: Fix incorrectly inferred content
Phase 0: Skill Entry
0-0. Model Recommendation (Display at start)
💡 This skill recommends the Sonnet model. Document + new information merging task doesn't require high-performance model. Use Opus if complex reasoning is needed.
Input:
- •
docs/{serviceName}/spec.md- •
docs/{serviceName}/arch.md- •New information to add
Output: Updated spec.md, arch.md
0-1. Document Input
Use AskQuestion to check for existing documents:
{
"title": "Start Document Reinforcement",
"questions": [
{
"id": "has_docs",
"prompt": "Do you have documents to reinforce?",
"options": [
{"id": "yes", "label": "Yes - I will provide file paths with @"},
{"id": "no", "label": "No - I don't have documents"}
]
}
]
}
- •
no→ Guide to reverse skill - •
yes→ Request spec.md, arch.md file paths
0-2. Extract serviceName
Extract serviceName from input file path:
- •Input:
docs/alert/spec.md - •Extract:
serviceName = "alert"
Phase 1: Analyze Existing Documents
1-1. Load Documents
Read spec.md and arch.md
1-2. Identify Unconfirmed Items
Extract items marked with:
- •
❓ Needs confirmation - •
❓ Unconfirmed - •
❓ Inferred - •Items with "low" confidence
- •Empty sections
1-3. Report Current Status
## Current Document Status
### spec.md
| Section | Status |
|---------|--------|
| Goal | ✅ Confirmed / ❓ Inferred / ❌ Unconfirmed |
| Non-goals | {status} |
| Feature Specification | {status} |
| Priority | {status} |
### arch.md
| Section | Status |
|---------|--------|
| Summary | {status} |
| Code Mapping | ✅ Extracted |
| API Spec | ✅ Extracted |
| Risks & Tradeoffs | {status} |
### Items Needing Reinforcement
1. {Item 1} - {current status}
2. {Item 2} - {current status}
Phase 2: Collect New Information
2-1. Select Reinforcement Type
Use AskQuestion to determine information type:
{
"title": "What information do you want to add?",
"questions": [
{
"id": "reinforce_type",
"prompt": "Select the type of content to reinforce",
"options": [
{"id": "fill_blank", "label": "Fill gaps - Items marked with ❓"},
{"id": "correct", "label": "Fix errors - Correct incorrectly inferred content"},
{"id": "add_new", "label": "Add new info - Information learned later"},
{"id": "guided", "label": "Guided mode - Ask me questions one by one"}
]
}
]
}
2-2. Process by Type
fill_blank (Fill gaps):
For each unconfirmed item, use AskQuestion:
{
"title": "Fill Unconfirmed Items",
"questions": [
{
"id": "item_1",
"prompt": "Please provide information about {unconfirmed item 1}\nCurrent status: ❓ Needs confirmation",
"options": [
{"id": "answer", "label": "I'll provide the information"},
{"id": "skip", "label": "I don't know yet - Skip"}
]
}
]
}
correct (Fix errors):
"What content is incorrect? Please tell me the section to fix and the correct content."
add_new (Add new information):
"Please provide the information to add. Describe freely, and I will reflect it in the appropriate section."
guided (Guided mode): Ask about unconfirmed items in sequence
Phase 3: Classify Information
3-1. Analyze User Input
Analyze and classify user-provided information:
| Information Type | Target Document |
|---|---|
| Business purpose/intent | spec.md - Goal, Non-goals |
| Feature description/behavior | spec.md - Feature Specification |
| Priority/importance | spec.md - Priority |
| Technical decision rationale | arch.md - Risks & Tradeoffs |
| Architecture changes | arch.md - Architecture, Code Mapping |
| API changes | arch.md - API Spec |
3-2. Confirm Classification (If Ambiguous)
Use AskQuestion to clarify:
{
"title": "Classify Information",
"questions": [
{
"id": "classify",
"prompt": "Your input:\n\"{user input summary}\"\n\nWhere should this information be reflected?",
"options": [
{"id": "requirements", "label": "Requirements (spec.md)"},
{"id": "arch", "label": "Architecture (arch.md)"},
{"id": "both", "label": "Both"},
{"id": "auto", "label": "You decide"}
]
}
]
}
Phase 4: Update Documents
4-1. Update spec.md (If Applicable)
| Section | Update Method |
|---|---|
| Goal | Inferred → Confirmed (remove ❓) |
| Non-goals | Empty → Fill with content |
| Feature Specification | Add/modify |
| Priority | Empty → Fill with content |
| Unclear Items | Remove resolved items |
4-2. Update arch.md (If Applicable)
| Section | Update Method |
|---|---|
| Summary | Confirm Goal/Non-goals |
| Scope | Clarify scope |
| Risks & Tradeoffs | Empty → Fill with content |
| Other | Fix errors |
4-3. Update Status Markers
- •
❓ Needs confirmation→ Replace with content - •
❓ Inferred→ Change to✅ Confirmed(if user confirmed) - •Confidence "low" → Change to "high" (if user confirmed)
4-4. Add Reinforcement Record
Add reinforcement history at the bottom of documents:
---
## Reinforcement History
| Date | Type | Changes |
|------|------|---------|
| {date} | fill_blank | Confirmed Goal, Non-goals |
| {date} | add_new | Added Risks section |
Phase 5: Save and Complete
5-1. Confirm Changes
## Changes to be Applied
### spec.md
| Section | Before | After |
|---------|--------|-------|
| {section} | {previous state} | {new content} |
### arch.md
| Section | Before | After |
|---------|--------|-------|
| {section} | {previous state} | {new content} |
Ask user for confirmation:
"I will update the documents with these changes. Proceed?"
5-2. Save Files
docs/{serviceName}/spec.md (updated)
docs/{serviceName}/arch.md (updated)
5-3. Completion Report
## Document Reinforcement Complete
### Update Summary
| Document | Changed Sections | Change Type |
|----------|-----------------|-------------|
| spec.md | {sections} | {fill_blank/correct/add_new} |
| arch.md | {sections} | {fill_blank/correct/add_new} |
### Current Completion Rate
| Document | Before | After |
|----------|--------|-------|
| spec.md | {N}% | {N}% |
| arch.md | {N}% | {N}% |
### Remaining Unconfirmed Items
| Item | Document |
|------|----------|
| {item} | {document} |
### Next Steps
- **Need more reinforcement**: Run `reinforce` again
- **Documents complete**: Can now use sync/enhance/build
Integration Flow
[reverse] → Incomplete documents
│
▼
[reinforce] ←──┐
│ │ (repeat)
▼ │
Reinforced ────┘
documents
│
▼ (when complete)
Can use sync/enhance/build
Important Notes
- •
Can be used without reverse
- •Also works on manually created documents
- •However, "fill gaps" mode unavailable if no ❓ markers
- •
Incremental reinforcement
- •No need to fill all information at once
- •Re-run reinforce whenever new information becomes available
- •
No code re-reading
- •Unlike reverse, no code analysis
- •Only processes existing documents + user input
- •Token-efficient
- •
Reinforcement history management
- •All reinforcements are logged
- •Can track change history later