|
| 1 | +--- |
| 2 | +name: f-stack-info-search |
| 3 | +description: F-Stack information search skill. Use when gathering evidence for issue analysis, bug location, or feature research in the F-Stack/f-stack repository. Contains five parts: check project architecture docs and knowledge graph (three-layer architecture docs LAYER1/2/3 and KNOWLEDGE_GRAPH_WIKI under docs/), check commit history (local git log search for fixing commits + DPDK upstream), check related Issues and PRs (first check the local issue analysis archives docs/f-stack-issue-ana.md and docs/zh_cn/f-stack-issue-ana.md, then gh search issues/prs + DPDK Patchwork), check public resources (DPDK Bugzilla/Patchwork/inbox.dpdk.org/web search), and internal/external information search for general analysis and research tasks (tech blogs/WeChat articles/tech communities/internal knowledge bases/iWiki, bilingual keyword construction and three-way evidence convergence). Invoked by the search step of the f-stack-issue-process skill; can also be used standalone. Trigger words: check commit history, search for information, check related issues, check public resources, git log search, gh search, architecture docs, knowledge graph, research information. |
| 4 | +--- |
| 5 | + |
| 6 | +# F-Stack Information Search Skill |
| 7 | + |
| 8 | +Gather evidence for F-Stack issue analysis, bug location, and feature research. Invoked by the search step of the f-stack-issue-process skill; can also be used standalone. |
| 9 | + |
| 10 | +## Environment Preparation |
| 11 | + |
| 12 | +- GitHub Token configured (GH_TOKEN environment variable) |
| 13 | +- Official F-Stack repository cloned to /data/workspace/f-stack |
| 14 | +- gh CLI installed |
| 15 | + |
| 16 | +## Part 1: Check Architecture Docs and Knowledge Graph |
| 17 | + |
| 18 | +Before searching code, first consult f-stack's existing three-layer architecture docs and knowledge graph (`/data/workspace/f-stack/docs/`) to quickly locate the layers, modules, interfaces, and functions involved, narrowing the later search scope. |
| 19 | + |
| 20 | +Three-layer architecture docs (bilingual, identical content): |
| 21 | + |
| 22 | +- Layer1 system overview: `01-LAYER1-ARCHITECTURE.md` (Chinese) / `F-Stack_Architecture_Layer1_System_Overview.md` (English) |
| 23 | +- Layer2 interface specification: `02-LAYER2-INTERFACES.md` (Chinese) / `F-Stack_Architecture_Layer2_Interface_Specification.md` (English) |
| 24 | +- Layer3 function index: `03-LAYER3-FUNCTIONS.md` (Chinese) / `F-Stack_Architecture_Layer3_Function_Index.md` (English) |
| 25 | + |
| 26 | +Knowledge graph: |
| 27 | + |
| 28 | +- `KNOWLEDGE_GRAPH_WIKI.md`: knowledge graph wiki |
| 29 | +- `F-Stack_Knowledge_Base_Summary.md`: knowledge base overview |
| 30 | + |
| 31 | +Usage: |
| 32 | + |
| 33 | +- Locate the involved layers and components (e.g. protocol stack layer, DPDK abstraction layer, interface layer) by keyword/module name in the architecture docs |
| 34 | +- Use the knowledge graph to locate related code paths and functions, then narrow the git log / gh search scope accordingly |
| 35 | +- The Chinese and English content is identical; consult either language |
| 36 | + |
| 37 | +## Part 2: Check Commit History |
| 38 | + |
| 39 | +Search for related fixes in the local F-Stack repository. |
| 40 | + |
| 41 | +```bash |
| 42 | +cd /data/workspace/f-stack |
| 43 | + |
| 44 | +# Search commit messages by keyword |
| 45 | +git log --all --oneline --grep='<keyword>' |
| 46 | + |
| 47 | +# Search change history by file path |
| 48 | +git log --all --oneline -- <file path> |
| 49 | + |
| 50 | +# Search for fixing commits |
| 51 | +git log --all --oneline --grep='fix' --grep='<keyword>' --all-match |
| 52 | + |
| 53 | +# View the details of a commit |
| 54 | +git show <commit-hash> |
| 55 | +``` |
| 56 | + |
| 57 | +Also check f-stack's own modifications to DPDK (the local dpdk/ directory is a plain directory inside the f-stack repository with **no DPDK upstream commit history**; git log can only find f-stack's own few modifications): |
| 58 | + |
| 59 | +```bash |
| 60 | +# f-stack's own modifications to dpdk/ (not upstream commits) |
| 61 | +git log --all --oneline -- dpdk/ |
| 62 | +git show <commit-hash> |
| 63 | +``` |
| 64 | + |
| 65 | +Checking DPDK upstream fixes must go through external channels (no upstream history locally): |
| 66 | + |
| 67 | +```bash |
| 68 | +# Search fixing commits in the official DPDK repository |
| 69 | +gh search commits '<keyword>' -R DPDK/dpdk --limit 20 |
| 70 | +``` |
| 71 | + |
| 72 | +Or use the DPDK Patchwork API (see Part 3), DPDK Bugzilla/mailing lists (see Part 4). |
| 73 | + |
| 74 | +Points of interest: |
| 75 | + |
| 76 | +- Whether DPDK upstream has fixing commits (Fixes/fix/patch) after the version mentioned in the issue |
| 77 | +- Whether the fix has been backported to the version in use (F-Stack currently uses DPDK 24.11.6) |
| 78 | +- Whether f-stack's dpdk/ has a corresponding local patch or a missed port |
| 79 | + |
| 80 | +## Part 3: Check Related Issues and PRs |
| 81 | + |
| 82 | +First check the local issue analysis archives (highest priority, avoid re-analyzing): |
| 83 | + |
| 84 | +- Chinese: docs/zh_cn/f-stack-issue-ana.md |
| 85 | +- English: docs/f-stack-issue-ana.md |
| 86 | + |
| 87 | +When looking for similar issues, first search these two archives for existing analysis records (issue number, keyword, error symptom). If found, cite the existing conclusion directly; if not, analyze and supplement. The Chinese and English archives stay in sync. |
| 88 | + |
| 89 | +```bash |
| 90 | +export GH_TOKEN='<token>' |
| 91 | + |
| 92 | +# Search related issues (open + closed) |
| 93 | +gh search issues '<keyword>' -R F-Stack/f-stack --limit 20 |
| 94 | + |
| 95 | +# Search related PRs (especially merged ones) |
| 96 | +gh search prs '<keyword>' -R F-Stack/f-stack --limit 20 |
| 97 | + |
| 98 | +# View a specific PR |
| 99 | +gh pr view <NUMBER> -R F-Stack/f-stack |
| 100 | + |
| 101 | +# View a PR's diff |
| 102 | +gh pr diff <NUMBER> -R F-Stack/f-stack |
| 103 | +``` |
| 104 | + |
| 105 | +DPDK upstream Patchwork (when tracking upstream patches): |
| 106 | + |
| 107 | +- API: `https://patches.dpdk.org/api/patches/?q=<keyword>` |
| 108 | +- Fetch with the WebFetch tool |
| 109 | + |
| 110 | +## Part 4: Check Public Resources |
| 111 | + |
| 112 | +Search the following sources by priority: |
| 113 | + |
| 114 | +1. DPDK Bugzilla: https://bugs.dpdk.org |
| 115 | +2. DPDK Patchwork: https://patches.dpdk.org |
| 116 | +3. DPDK mailing list archive: https://inbox.dpdk.org (prefer the API to avoid the Anubis bot) |
| 117 | +4. Web search: Stack Overflow, CSDN, GitHub global search |
| 118 | + |
| 119 | +Note: sites like lore.kernel.org may be blocked by the Anubis bot; prefer API endpoints or inbox.dpdk.org. |
| 120 | + |
| 121 | +## Part 5: Internal/External Information Search for General Analysis and Research Tasks |
| 122 | + |
| 123 | +For general tasks such as issue analysis, bug location, and feature research, after completing the previous four parts, further search internal and external resources such as tech websites, blogs, and WeChat articles for cross-validation and background. |
| 124 | + |
| 125 | +### 5.1 Search goals |
| 126 | + |
| 127 | +- Existing analysis and solutions for similar problems (pitfalls others hit, fix ideas) |
| 128 | +- Explanations and implementation details of related features (to understand the design intent) |
| 129 | +- Upstream/community discussion and handling of the problem |
| 130 | +- Industry best practices and performance data (for design reference) |
| 131 | + |
| 132 | +### 5.2 Search channels (by priority) |
| 133 | + |
| 134 | +1. External technical resources (web_search / web_fetch): |
| 135 | + - GitHub issues / wiki / discussions (F-Stack, DPDK, FreeBSD upstream repositories) |
| 136 | + - Tech blogs and personal sites (e.g. medium, dev.to, personal tech blogs) |
| 137 | + - Tech communities (Stack Overflow, Server Fault, Unix & Linux SE, CSDN, Zhihu, Juejin, SegmentFault) |
| 138 | + - WeChat official account articles (search on weixin.sogou.com, then web_fetch the article body) |
| 139 | +2. Internal knowledge bases (RAG_search, if enterprise knowledge bases are connected): search internal best practices, historical handling records, and internal component docs |
| 140 | +3. Tencent internal iWiki (if iWiki documents are involved, use the iwiki-doc skill to search docs, spaces, and directory trees on iwiki.woa.com) |
| 141 | + |
| 142 | +### 5.3 Keyword construction |
| 143 | + |
| 144 | +- Search in both Chinese and English, one round each; construct Chinese and English keywords separately |
| 145 | +- Combinations: `<tech term> + <version>` (e.g. "DPDK 24.11 RSS hash"), `<exact error message>` (pasting the original log/error text gives the highest hit rate), `<function name> + <symptom>` (e.g. "rte_thash_adjust_tuple misqueue"), `<issue title keyword> + fix/regression` |
| 146 | +- Add qualifiers: `site:github.com`, `site:stackoverflow.com`, `inurl:blog`, etc. |
| 147 | +- Mind version timeliness: prefer resources close in time to the version in use (F-Stack v2.0 / DPDK 24.11.6 / FreeBSD 15.0) to avoid outdated conclusions |
| 148 | + |
| 149 | +### 5.4 Cross-validation and evidence convergence |
| 150 | + |
| 151 | +- Three-way evidence convergence: internal docs + external resources + actual code/testing, mutually confirming |
| 152 | +- External conclusions must be checked against the local actual code; **where they conflict, the actual code is authoritative** |
| 153 | +- Mark external resources with source and publication time; conclusions from a single source are marked "only this source, not double-verified" |
| 154 | +- Honestly mark what cannot be verified as "unverified/not executed"; never speculate |
| 155 | + |
| 156 | +## Search Output Requirements |
| 157 | + |
| 158 | +- For each source, give the query terms and a summary of hits, with concrete links or commit hashes |
| 159 | +- Cross-validation: converge evidence from code/docs/external data sources; where they conflict, the actual code is authoritative |
| 160 | +- Honestly mark items that cannot be verified or where the environment is insufficient as "unverified/not executed"; never speculate |
| 161 | +- Never include real IPs in the output (use placeholders like `<DPDK_NIC_IP>`) |
0 commit comments