Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
"""
Create A3 template structure
A3 is a single 11x17 page summarizing problem-solving thinking
"""
if
"header"
"title"
"owner"
"date"
"%Y-%m-%d"
"mentor"
"revision"
1
"left_side"
"1_background"
"section"
"Background"
"prompt"
"Why is this important? What is the business context?"
"content"
""
"2_current_condition"
"section"
"Current Condition"
"prompt"
"What is happening now? Include data and visual."
"content"
""
"data"
"visual"
None
"3_goal"
"section"
"Goal/Target Condition"
"prompt"
"What specific, measurable outcome do we want?"
"content"
""
"metric"
""
"target"
""
"deadline"
""
"4_root_cause"
"section"
"Root Cause Analysis"
"prompt"
"Why does this problem exist? (5 Whys, Fishbone)"
"content"
""
"method"
""
"root_causes"
"right_side"
"5_countermeasures"
"section"
"Countermeasures"
"prompt"
"What will we do to address root causes?"
"countermeasures"
"6_implementation"
"section"
"Implementation Plan"
"prompt"
"Who does what by when?"
"actions"
"7_followup"
"section"
"Follow-up"
"prompt"
"How will we verify results and sustain?"
"check_dates"
"success_criteria"
""
elif
"header"
"title"
"owner"
"left_side"
"1_background"
"section"
"Background/Context"
"2_current_condition"
"section"
"Current Situation"
"3_proposal"
"section"
"Proposal"
"4_analysis"
"section"
"Analysis/Rationale"
"right_side"
"5_plan"
"section"
"Implementation Plan"
"6_cost_benefit"
"section"
"Cost-Benefit Analysis"
"7_risks"
"section"
"Risks and Mitigation"
return
2. Problem Statement Development
defdevelop_problem_statement(observations: Dict):
"""
Develop clear, specific problem statement
observations: {
'what': description of the problem,
'where': location/process,
'when': when it occurs,
'extent': magnitude/frequency,
'impact': business impact
}
"""# Validate completeness
required = ['what', 'where', 'when', 'extent', 'impact']
missing = [r for r in required if r notin observations ornot observations[r]]
if missing:
return {
"status": "incomplete",
"missing_elements": missing,
"guidance": get_problem_statement_guidance(missing)
}
# Construct problem statement
statement = f"{observations['what']} is occurring in {observations['where']}. "
statement += f"This happens {observations['when']}, with {observations['extent']}. "
statement += f"The impact is {observations['impact']}."# Check for solution bias
solution_words = ['should', 'need to', 'must', 'implement', 'install']
has_solution_bias = any(word in statement.lower() for word in solution_words)
return {
"problem_statement": statement,
"elements": observations,
"quality_check": {
"is_specific": len(observations['what']) > 20,
"is_measurable": any(char.isdigit() for char in observations['extent']),
"has_solution_bias": has_solution_bias,
"recommendation": "Remove solution references"if has_solution_bias else"Good problem statement"
}
}
defget_problem_statement_guidance(missing: list):
guidance = {
'what': "Describe what is wrong or not working as expected",
'where': "Specify the location, process, or system affected",
'when': "When does the problem occur? Patterns, triggers?",
'extent': "How big is the problem? Frequency, percentage, quantity?",
'impact': "What is the business impact? Cost, customer, safety?"
}
return {m: guidance.get(m, "") for m in missing}
3. Current Condition Analysis
defanalyze_current_condition(data: Dict, process_description: str):
"""
Document and analyze current condition
"""
analysis = {
"process_overview": process_description,
"performance_data": {},
"observations": [],
"process_map": None,
"visual_representation": None
}
# Analyze provided dataif'metrics'in data:
for metric, values in data['metrics'].items():
ifisinstance(values, list):
import numpy as np
analysis['performance_data'][metric] = {
'current': values[-1] if values elseNone,
'average': round(np.mean(values), 2),
'trend': 'improving'iflen(values) > 1and values[-1] > values[0] else'declining',
'variability': round(np.std(values), 2)
}
else:
analysis['performance_data'][metric] = {'current': values}
# Gap analysisif'target'in data and'current'in data:
analysis['gap'] = {
'target': data['target'],
'current': data['current'],
'gap_size': data['target'] - data['current'],
'gap_percent': round((data['target'] - data['current']) / data['target'] * 100, 1)
}
# Observations from gembaif'observations'in data:
for obs in data['observations']:
analysis['observations'].append({
'observation': obs,
'category': categorize_observation(obs)
})
return analysis
defcategorize_observation(observation: str):
"""Categorize observation type"""
obs_lower = observation.lower()
ifany(w in obs_lower for w in ['wait', 'idle', 'delay']):
return'waiting'elifany(w in obs_lower for w in ['error', 'defect', 'mistake']):
return'quality'elifany(w in obs_lower for w in ['search', 'find', 'look for']):
return'searching'elifany(w in obs_lower for w in ['move', 'walk', 'transport']):
return'motion'else:
return'process'
4. Root Cause Analysis
deffive_whys_analysis(problem: str, whys: List[str]):
"""
Conduct 5 Whys analysis
whys: list of answers to successive "why" questions
"""
analysis = {
"problem": problem,
"why_chain": [],
"root_cause": None
}
for i, why inenumerate(whys):
analysis["why_chain"].append({
"level": i + 1,
"question": f"Why #{i+1}",
"answer": why
})
iflen(whys) >= 3:
analysis["root_cause"] = whys[-1]
analysis["quality"] = "sufficient"iflen(whys) >= 5else"may need more depth"else:
analysis["quality"] = "insufficient - continue asking why"return analysis
deffishbone_analysis(problem: str, causes_by_category: Dict):
"""
Conduct fishbone (Ishikawa) analysis
causes_by_category: {
'man': [causes],
'machine': [causes],
'method': [causes],
'material': [causes],
'measurement': [causes],
'environment': [causes]
}
"""# 6M categories
categories = {
'man': {'name': 'People', 'causes': causes_by_category.get('man', [])},
'machine': {'name': 'Equipment', 'causes': causes_by_category.get('machine', [])},
'method': {'name': 'Process', 'causes': causes_by_category.get('method', [])},
'material': {'name': 'Materials', 'causes': causes_by_category.get('material', [])},
'measurement': {'name': 'Measurement', 'causes': causes_by_category.get('measurement', [])},
'environment': {'name': 'Environment', 'causes': causes_by_category.get('environment', [])}
}
# Count and prioritize
total_causes = sum(len(c['causes']) for c in categories.values())
priority_categories = sorted(
[(k, len(v['causes'])) for k, v in categories.items()],
key=lambda x: x[1],
reverse=True
)
return {
"problem": problem,
"categories": categories,
"total_causes_identified": total_causes,
"priority_categories": [p[0] for p in priority_categories if p[1] > 0],
"recommendation": f"Focus investigation on {priority_categories[0][0]} ({priority_categories[0][1]} causes)"if priority_categories else"Identify more potential causes"
}
5. Countermeasure Development
defdevelop_countermeasures(root_causes: List[str], constraints: Dict = None):
"""
Develop countermeasures for root causes
"""
constraints = constraints or {}
countermeasures = []
for i, cause inenumerate(root_causes):
cm = {
"root_cause": cause,
"countermeasures": [],
"selected": None
}
# Generate countermeasure options
options = generate_countermeasure_options(cause)
for opt in options:
evaluation = evaluate_countermeasure(opt, constraints)
cm["countermeasures"].append({
"description": opt,
"evaluation": evaluation
})
# Select best option
best = max(cm["countermeasures"], key=lambda x: x["evaluation"]["score"])
cm["selected"] = best["description"]
countermeasures.append(cm)
return {
"countermeasures": countermeasures,
"summary": {
"root_causes_addressed": len(root_causes),
"countermeasures_identified": sum(len(cm["countermeasures"]) for cm in countermeasures)
}
}
defgenerate_countermeasure_options(root_cause: str):
"""Generate potential countermeasures (simplified)"""
options = [
f"Eliminate: Remove the cause of {root_cause}",
f"Prevent: Add controls to prevent {root_cause}",
f"Detect: Add early detection for {root_cause}",
f"Mitigate: Reduce impact when {root_cause} occurs"
]
return options
defevaluate_countermeasure(countermeasure: str, constraints: Dict):
"""Evaluate countermeasure feasibility"""# Simplified scoring
score = 50# Base scoreif'Eliminate'in countermeasure:
score += 30# Elimination is bestelif'Prevent'in countermeasure:
score += 20# Consider constraintsif constraints.get('low_cost'):
if'Detect'in countermeasure:
score += 10if constraints.get('quick_implementation'):
if'Mitigate'in countermeasure or'Detect'in countermeasure:
score += 10return {
"score": score,
"feasibility": "high"if score > 70else"medium"if score > 50else"low"
}
6. Implementation Planning
defcreate_implementation_plan(countermeasures: List[Dict], owner: str):
"""
Create implementation plan with tasks and timeline
"""import uuid
from datetime import datetime, timedelta
actions = []
start_date = datetime.now()
for i, cm inenumerate(countermeasures):
# Create actions for each countermeasure
base_actions = [
{"phase": "Prepare", "duration_days": 5, "description": f"Prepare to implement: {cm['description']}"},
{"phase": "Implement", "duration_days": 10, "description": f"Implement: {cm['description']}"},
{"phase": "Verify", "duration_days": 5, "description": f"Verify effectiveness of: {cm['description']}"},
{"phase": "Standardize", "duration_days": 5, "description": f"Standardize: {cm['description']}"}
]
current_date = start_date
for action in base_actions:
end_date = current_date + timedelta(days=action['duration_days'])
actions.append({
"id": str(uuid.uuid4())[:8],
"countermeasure": cm['description'],
"phase": action['phase'],
"description": action['description'],
"owner": cm.get('owner', owner),
"start_date": current_date.strftime("%Y-%m-%d"),
"due_date": end_date.strftime("%Y-%m-%d"),
"status": "Not Started",
"percent_complete": 0
})
current_date = end_date
return {
"actions": actions,
"total_actions": len(actions),
"timeline": {
"start": start_date.strftime("%Y-%m-%d"),
"end": actions[-1]["due_date"] if actions else start_date.strftime("%Y-%m-%d")
},
"milestones": extract_milestones(actions)
}
defextract_milestones(actions):
"""Extract key milestones from actions"""
milestones = []
verify_actions = [a for a in actions if a['phase'] == 'Verify']
for va in verify_actions:
milestones.append({
"milestone": f"Verify: {va['countermeasure'][:30]}...",
"date": va['due_date']
})
return milestones
This skill integrates with the following processes:
a3-problem-solving-project.js
root-cause-analysis.js
continuous-improvement-program.js
Output Format
{"a3_document":{"title":"Reduce Assembly Defects","owner":"John Smith","revision":3},"sections":{"problem_statement":"Assembly defects at 2.5% vs target of 1%","current_condition":{"defect_rate":2.5,"gap":1.5},"root_causes":["Missing torque verification","Unclear work instructions"],"countermeasures":["Install torque sensors","Update standard work"],"implementation":{"actions":8,"duration_weeks":6}},"status":{"phase":"Implementation","percent_complete":65}}
Best Practices
PDCA thinking - A3 is the artifact, thinking is the process