飞机取证分析_pp-airframe

📅 2026/7/20 10:24:08
飞机取证分析_pp-airframe
以下为本文档的中文说明该技能用于从公开公共记录进行飞机取证分析——包括尾号档案、机队研究、机型级安全记录和事故历史追踪。Printing Presspp是一套CLI和MCP工具集此技能专注于航空器领域的数据挖掘和取证分析。用户可以利用此技能查询飞机的注册信息、所有权历史、维修记录和安全事件为航空安全研究、飞机采购尽职调查或事故调查提供数据支持。适用于航空安全研究员、飞机买家、保险公司和航空记者需要获取公开飞机记录的场景。该技能通过整合多个公开数据源提供全面的飞机历史档案查询服务。该技能提供了详细的操作指南和最佳实践帮助用户快速上手并深入掌握。通过系统的功能模块划分和丰富的应用场景说明用户可以在实际项目中有效运用该技能提升工作效率。该技能注重实用性和可操作性涵盖从基础配置到高级功能的完整知识体系满足不同层次用户的学习需求。持续更新和优化的内容确保用户始终能够接触到最新的技术发展和行业实践。通过此技能的学习和应用用户可以减少摸索时间快速获得可用的解决方案将精力集中在核心业务逻辑和创新工作上从而在技术快速迭代的环境中保持竞争力。该技能的模块化设计使其易于扩展和定制用户可以根据自身需求灵活调整应用方式实现最大化的价值产出。该技能整合了常见的设计模式和最佳实践提供了清晰的学习路径和参考资料帮助用户在短时间内建立起完整的知识框架并有能力在实际项目中灵活运用所学内容解决问题。airframe — Printing Press CLIPrerequisites: Install the CLIThis skill drives theairframe-pp-clibinary.You must verify the CLI is installed before invoking any command from this skill.If it is missing, install it first:Install via the Printing Press installer. It defaults binaries to$HOME/.local/binon macOS/Linux and%LOCALAPPDATA%\\Programs\\PrintingPress\\binon Windows:npx-ymvanhorn/printing-press-libraryinstallairframe --cli-onlyVerify:airframe-pp-cli --versionEnsure the reported install directory is on$PATHfor the agent/runtime that will invoke this skill.If thenpxinstall fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):goinstallgithub.com/mvanhorn/printing-press-library/library/developer-tools/airframe/cmd/airframe-pp-clilatestIf--versionreports “command not found” after install, the runtime cannot see the binary directory on$PATH. Do not proceed with skill commands until verification succeeds.The two-tier model (read this first, every invocation)TierDatasetInstall requirementAnswers questions like1FAA Aircraft Registrynone— justairframe-pp-cli“Who owns N12345?” • “How old is this plane?” • “What aircraft does Berkshire Hathaway own?” • “What type is this Mode-S code?”2NTSB CAROL accident databasemdbtoolspackage“How safe is a Cessna 172?” • “Crash history for the Boeing 737 MAX 8” • “Has tail N12345 ever been in an incident?” • “Probable cause of event ERA22LA001”airframe flight identadditionally requiresflight-goat-pp-cliinstalled FLIGHT_GOAT_API_KEY_AUTHset,and only works within ~72 hours of departure(airlines don’t assign a specific tail to a flight before then). For pre-purchase or pre-booking “is my flight safe” questions, use a Tier 2 model-level lookup with the equipment type from the booking site.Step 0 — Always run doctor firstBefore answering any user question, run:airframe-pp-cli doctor--jsonParse the JSON to determine:db_exists— has the user ever synced?sync_meta— which sources (faa_master, ntsb_avall) are present and how fresh?mdbtools.detected— can we serve Tier 2 questions?flight_goat.detected— can we serveflight identquestions?Branch from herebased on what the user actually asked.Decision tree (use this to drive every user interaction)A) User asks a Tier 1 question and Tier 1 is missingExample: “Who owns N628TS?” butairframe-pp-cli doctorshows db_existsfalse or sync_meta is empty.Tell the user: “I need to download the FAA registry first (~80 MB, ~30 seconds, no setup needed).”Offer to runairframe-pp-cli syncfor them.After sync completes, answer their original question.B) User asks a Tier 1 question and Tier 1 is readyJust answer it directly:airframe-pp-clitailN628TS airframe-pp-cli ownerBerkshire--limit20C) User asks a Tier 2 question (safety / accident / NTSB) andmdbtoolsis missingThis is the most important branch — handle it with care.Surface a clear explanation:“To answer that, I need NTSB accident data, which requires themdbtoolspackage (NTSB ships their data in Microsoft Access format). It’s a one-time install — would you like me to install it for you?”If the user says yes, detect their OS and run the right command:# Detect OSuname-s# → Darwin for macOS, Linux for Linux# Detect Linux distribution if Linuxcat/etc/os-release2/dev/null|grep-E^IDThen proposebefore running:OS detectedCommand to runmacOS (Darwin)brew install mdbtoolsUbuntu / Debian (IDubuntu,IDdebian)sudo apt update sudo apt install -y mdbtoolsFedora (IDfedora)sudo dnf install -y mdbtoolsRHEL / Rocky / Alma (IDrhel/IDrocky/IDalmalinux)sudo dnf install -y mdbtoolsArch (IDarch)yay -S --noconfirm mdbtools(AUR — needsyayorparu; if neither is present, tell the user to install one first)Important:never runsudocommands without first showing the user what you plan to run and confirming. The--noconfirmforyayis OK because the user has already opted in once.Aftermdbtoolsinstalls, run:airframe-pp-clisync--sourceallThen answer the original question.D) User asks a Tier 2 question andmdbtoolsis present but NTSB hasn’t been synceddoctorshowsmdbtools.detectedtrue, butsync_metahas nontsb_avallrow.Tell the user: “I have the NTSB ingest tool installed but haven’t synced the data yet. Would you like me to run that now? It’s ~90 MB and takes about a minute.”If yes:airframe-pp-clisync--sourcentsbE) User asks a flight-ident question —first, check the 72-hour gateExamples: “Is UA1234 safe?”, “What plane will I be on for AA200?”, “Is my flight on DL5678 tomorrow OK?”Critical context:Airlines don’t assign a specific tail to a flight until ~48–72 hours before departure. If the user is more than 72 hours from their flight (or shopping a ticket they haven’t booked yet), looking up the specific tail isimpossible— there is no tail yet. Don’t burn a flight-goat call on it.Step 1 — establish when the flight is.Ask the user (or infer from context):“When is the flight? Tail assignments are made 48–72 hours before departure — if you’re shopping or it’s further out than that, I’ll point you at the model-level safety lookup instead, which is more reliable for that horizon.”Step 2 — branch:Flight is 72 hours away or hypothetical→ recommend the model-level fallback. Most airline booking sites tell you the equipment type (e.g. “Boeing 737 MAX 8” or “Airbus A321neo”). Run:airframe-pp-cli modelBoeing 737 MAX 8This answers the user’s underlying question (“is the type of plane I’ll be on safe?”) and needs no flight-goat at all. (It still needs Tier 2 / mdbtools for safety data — fall through to branch C if missing.)Flight is ≤72 hours away OR the user is asking about a flight that already happened (post-incident research)→ proceed with flight-goat resolution. Continue to step 3.Step 3 — flight-goat present? If not, install it.Ifflight_goat.detectedfalse, tell the user:“To resolve a specific flight ident (like UA1234) to a tail number, I needflight-goat-pp-cli. Would you like me to install it? It also requires a FlightAware AeroAPI key — that part you’ll need to provide.”If yes:goinstallgithub.com/mvanhorn/printing-press-library/library/travel/flight-goat/cmd/flight-goat-pp-clilatestStep 4 —FLIGHT_GOAT_API_KEY_AUTHset? If not, explain the cost.If the env var is unset, tell the user that flight-goat routes through FlightAware’s AeroAPI (paid service) and they’ll need to sign up at flightaware.com/aeroapi to get a key. Don’t push past without explicit direction.Step 5 — run the lookup.airframe-pp-cli flight UA1234Note that the result may includemultiple recent tailsthat have flown the same ident over the past 14 days — flight-goat returns the history, not just the next scheduled flight. For post-incident research, look at the date-aligned tail; for pre-departure curiosity, look at the most recent one.CommandsCommandTierWhat it doessync [flags]bothDownload bulk data, replace local tables, VACUUMtail N-number1 (2 enriches)Aircraft dossier accident historyowner name1Aircraft fleet by registered ownermodel make [model]2Aggregate NTSB events by modelevent event-id2One NTSB eventflight ident1 flight-goatResolve ident → tail → enrichsearch query12 --with-ftsFTS5 searchdoctor—Health checkAll commands accept--json,--sele ct dotted-path, and--db-path.Trigger-phrase → tier mappingFor fast classification of what the user is asking.Most user questions are answered by Tier 1 or Tier 2 alone— the flight-goat path is the exception, not the rule.Tier 1 phrases→ just need FAA sync“who owns N…”, “who owns the plane with tail N…”“what aircraft does own”, “ fleet”“how old is this plane”, “when was this tail manufactured”“what type/model is N…”, “what’s the Mode-S for N…”“find aircraft registered to name/state/LLC”Tier 2 phrases→ need NTSB mdbtools“how safe is a ”, “is the safe”, “safety record of ”“accident history for ”, “crash history of ”“ever had an incident with this tail” (when N-number is known)“NTSB events for”, “show me event ERA…”“fatal accidents in this year”“crashes in last ”Tier 1 flight-goat phrases→ require ident resolution andonly work within ~72 hours of departure“is UA1234 safe”(only useful if flight is within 72 hours)“what plane is United 1234 today/tomorrow”“my flight is DL567 in a few hours — what aircraft”“what tails did UA89 fly last week”(post-incident — always works)For any “is my flight safe” / “what plane will I be on” question,always ask when the flight is first. If the user is shopping or the flight is more than 72 hours out, redirect to a model-level lookup (airframe-pp-cli model equipment-type) using the equipment type from the user’s booking site. Most airline booking pages display the aircraft type for every flight at search time.Output and agent mode--agent(--json --compact --no-input --no-color --yes) is the default mode for programmatic consumption. The envelope is{meta, results}matchingsec-edgar. Use--select results.aircraft.owner_nameto extract a single field.Caveats to surface to the userFAA owner data may be a Delaware LLC shell. airframe reports the registry value verbatim; it is not a beneficial-ownership tool.NTSB only investigates incidents meeting their reporting threshold — “no events” is not “perfect record.”flightrequires a paid AeroAPI key via flight-goat. FAA NTSB are free; ident-to-tail resolution is what costs.