用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/a5c-ai/babysitter --skill a3-problem-solver命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | a3-problem-solver |
| description | A3 problem-solving skill for structured problem analysis and countermeasure development. |
| allowed-tools | Bash(*) Read Write Edit Glob Grep WebFetch |
| metadata | {"author":"babysitter-sdk","version":"1.0.0","category":"continuous-improvement","backlog-id":"SK-IE-040"} |
| graph | {"domains":["domain:industrial-engineering"],"skillAreas":["skill-area:statistical-analysis","skill-area:organizational-design","skill-area:data-analysis"],"roles":["role:operations-analyst","role:research-engineer"]} |
You are a3-problem-solver - a specialized skill for A3 problem-solving including structured problem analysis and countermeasure development.
This skill enables AI-powered A3 problem-solving including:
from dataclasses import dataclass
from typing import List, Dict, Optional
from datetime import datetime
from enum import Enum
class A3Type(Enum):
PROBLEM_SOLVING = "problem_solving"
PROPOSAL = "proposal"
STATUS_REPORT = "status_report"
@dataclass
class A3Document:
title: str
owner: str
date: datetime
a3_type: A3Type
mentor: Optional[str] = None
def create_a3_template(doc: A3Document):
"""
Create A3 template structure
A3 is a single 11x17 page summarizing problem-solving thinking
"""
if doc.a3_type == A3Type.PROBLEM_SOLVING:
template = {
"header": {
"title": doc.title,
"owner": doc.owner,
"date": doc.date.strftime("%Y-%m-%d"),
"mentor": doc.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 doc.a3_type == A3Type.PROPOSAL:
template = {
"header": {"title": doc.title, "owner": doc.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 template
def develop_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 not in observations or not 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 statement.lower() word solution_words)
{
: statement,
: observations,
: {
: (observations[]) > ,
: (char.isdigit() char observations[]),
: has_solution_bias,
: has_solution_bias
}
}
():
guidance = {
: ,
: ,
: ,
: ,
:
}
{m: guidance.get(m, ) m missing}
def analyze_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 data
if 'metrics' in data:
for metric, values in data['metrics'].items():
if isinstance(values, list):
import numpy as np
analysis['performance_data'][metric] = {
'current': values[-1] if values else None,
'average': round(np.mean(values), 2),
'trend': 'improving' if len(values) > 1 and values[-1] > values[0] else 'declining',
'variability': round(np.std(values), 2)
}
else:
analysis[][metric] = {: values}
data data:
analysis[] = {
: data[],
: data[],
: data[] - data[],
: ((data[] - data[]) / data[] * , )
}
data:
obs data[]:
analysis[].append({
: obs,
: categorize_observation(obs)
})
analysis
():
obs_lower = observation.lower()
(w obs_lower w [, , ]):
(w obs_lower w [, , ]):
(w obs_lower w [, , ]):
(w obs_lower w [, , ]):
:
def five_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 in enumerate(whys):
analysis["why_chain"].append({
"level": i + 1,
"question": f"Why #{i+1}",
"answer": why
})
if len(whys) >= 3:
analysis["root_cause"] = whys[-1]
analysis["quality"] = "sufficient" if len(whys) >= 5 else "may need more depth"
else:
analysis["quality"] = "insufficient - continue asking why"
return analysis
def fishbone_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 = {
: {: , : causes_by_category.get(, [])},
: {: , : causes_by_category.get(, [])},
: {: , : causes_by_category.get(, [])},
: {: , : causes_by_category.get(, [])},
: {: , : causes_by_category.get(, [])},
: {: , : causes_by_category.get(, [])}
}
total_causes = ((c[]) c categories.values())
priority_categories = (
[(k, (v[])) k, v categories.items()],
key= x: x[],
reverse=
)
{
: problem,
: categories,
: total_causes,
: [p[] p priority_categories p[] > ],
: priority_categories
}
def develop_countermeasures(root_causes: List[str], constraints: Dict = None):
"""
Develop countermeasures for root causes
"""
constraints = constraints or {}
countermeasures = []
for i, cause in enumerate(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)
}
}
def generate_countermeasure_options():
options = [
,
,
,
]
options
():
score =
countermeasure:
score +=
countermeasure:
score +=
constraints.get():
countermeasure:
score +=
constraints.get():
countermeasure countermeasure:
score +=
{
: score,
: score > score >
}
def create_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 in enumerate(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[])
actions.append({
: (uuid.uuid4())[:],
: cm[],
: action[],
: action[],
: cm.get(, owner),
: current_date.strftime(),
: end_date.strftime(),
: ,
:
})
current_date = end_date
{
: actions,
: (actions),
: {
: start_date.strftime(),
: actions[-][] actions start_date.strftime()
},
: extract_milestones(actions)
}
():
milestones = []
verify_actions = [a a actions a[] == ]
va verify_actions:
milestones.append({
: ,
: va[]
})
milestones
def compile_a3(template: Dict, sections: Dict):
"""
Compile complete A3 document
"""
# Populate template with section content
a3 = template.copy()
# Left side
if 'background' in sections:
a3['left_side']['1_background']['content'] = sections['background']
if 'current_condition' in sections:
a3['left_side']['2_current_condition']['content'] = sections['current_condition'].get('summary', '')
a3['left_side']['2_current_condition']['data'] = sections['current_condition'].get('data', [])
if 'goal' in sections:
a3['left_side']['3_goal']['content'] = sections['goal'].get('statement', '')
a3['left_side']['3_goal']['metric'] = sections['goal'].get('metric', '')
a3['left_side']['3_goal']['target'] = sections['goal'].get('target', '')
a3[][][] = sections[].get(, )
sections:
a3[][][] = sections[].get(, )
a3[][][] = sections[].get(, [])
sections:
a3[][][] = sections[]
sections:
a3[][][] = sections[]
sections:
a3[][][] = sections[].get(, [])
a3[][][] = sections[].get(, )
a3
This skill integrates with the following processes:
a3-problem-solving-project.jsroot-cause-analysis.jscontinuous-improvement-program.js{
"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"