一键导入
knowledge-build
Orchestrates parallel KB generation using spatial analysis and a map-reduce architecture with incremental and feature-learning modes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Orchestrates parallel KB generation using spatial analysis and a map-reduce architecture with incremental and feature-learning modes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agent-only canonical output templates for rp1 artifacts. Load when producing structured markdown to ensure format consistency and routing metadata.
Ask about rp1 capabilities, discover skills, and get workflow guidance.
Evidence-gated tech debt and bloat detection. Scouts signals, ranks by materiality, validates by refutation, reports up to 5 findings with actions.
Synchronizes user-facing documentation with the current knowledge base through validate -> stale gate -> scan -> approval -> process orchestration.
Analyzes systems holistically to provide strategic recommendations balancing cost, quality, performance, complexity, and business objectives with quantified trade-offs.
Bootstrap a new project with charter discovery and tech stack scaffolding for greenfield development.
| name | knowledge-build |
| description | Orchestrates parallel KB generation using spatial analysis and a map-reduce architecture with incremental and feature-learning modes. |
| allowed-tools | Bash(echo *), Bash(rp1 *), Bash(git *), Bash(jq *), Bash(wc *), Bash(mkdir *) |
| metadata | {"category":"knowledge","is_workflow":true,"arcade_tracked":false,"workflow":{"run_policy":"fresh","identity_args":[]},"version":"2.2.1","tags":["documentation","analysis","planning","core","parallel"],"created":"2025-10-25T00:00:00.000Z","updated":"2026-04-09T00:00:00.000Z","author":"cloud-on-prem/rp1","arguments":[{"name":"FEATURE_ID","type":"string","required":false,"description":"Feature ID to incorporate learnings from an archived or active feature into KB"}],"sub_agents":["rp1-base:kb-spatial-analyzer","rp1-base:kb-concept-extractor","rp1-base:kb-architecture-mapper","rp1-base:kb-interaction-mapper","rp1-base:kb-module-analyzer","rp1-base:kb-pattern-extractor"]} |
§ROLE: KB orchestrator. Update kbRoot, not workRoot.
projectRoot, kbRoot, and workRoot values from the generated Workflow Bootstrap section.kbRoot:
index.mdconcept_map.mdarchitecture.mdinteraction-model.mdmodules.mdpatterns.mdstate.jsonmeta.jsonindex.md is orchestrator-owned. Never delegate it.state.json is shareable. meta.json is local-only and SHOULD be gitignored.node_modules/, .git/, build/, dist/, cli/dist/, target/, .next/, __pycache__/, vendor/, .venv/, .rp1/context/FULL means wide evidence collection, not blank-slate regeneration.FULL.kbRoot if missing.FEATURE_ID is non-empty:
MODE=FEATURE_LEARNING.{workRoot}/archives/features/{FEATURE_ID}{workRoot}/features/{FEATURE_ID}requirements.mddesign.mdfield-notes.md if presenttasks.mdFILES_MODIFIED from tasks.md implementation summaries.
Accept patterns like **Files**: and **Files Modified**:.FILES_MODIFIED is empty: explain that feature learning needs a concrete file scope, stop.FEATURE_CONTEXT with:
files_modifiedFILE_SCOPE=FILES_MODIFIEDFILE_DIFFS={}INITIAL_MESSAGE=Feature learning build for {FEATURE_ID}{kbRoot}/state.json if it exists.CURRENT_COMMIT via git rev-parse HEAD.state.json:
MODE=FULLFILE_SCOPE=[]FILE_DIFFS={}INITIAL_MESSAGE=First-time KB generation with parallel analysis (10-15 min)OLD_COMMIT=state.json.git_commitREPO_TYPE=state.json.repo_type // "single-project"repo_root + current_project_path from {kbRoot}/meta.jsonstate.json for those local fields only if meta.json is absentOLD_COMMIT == CURRENT_COMMIT:
KB is up-to-date (commit {CURRENT_COMMIT}). No regeneration needed. and stopREPO_TYPE=monorepo, run diff from repo_root and filter to current_project_path unless it is . or emptygit_commit in state.jsonNo in-scope changes. Updated commit reference ({OLD_COMMIT} -> {CURRENT_COMMIT}). and stopFULL and INCREMENTAL.> 50 -> MODE=FULL<= 50 -> MODE=INCREMENTALMODE=FULL:
INITIAL_MESSAGE=Large change set ({N} files). Wide reconcile (10-15 min)FILE_SCOPE=<scoped changed files>FILE_DIFFS as path -> git diff OLD_COMMIT CURRENT_COMMIT -- pathMODE=INCREMENTAL:
INITIAL_MESSAGE=Changes detected since last build ({OLD_COMMIT} -> {CURRENT_COMMIT}). Analyzing {N} changed files (2-5 min)FILE_SCOPE=<scoped changed files>FILE_DIFFS as path -> git diff OLD_COMMIT CURRENT_COMMIT -- pathINITIAL_MESSAGE.{% dispatch_agent "rp1-base:kb-spatial-analyzer" %} Use the computed build inputs from the parent orchestrator.
FULL, INCREMENTAL, or FEATURE_LEARNING)FULLindex_files, concept_files, arch_files, interaction_files, module_filesrepo_typemonorepo_projectstotal_files_scannedindex_filesconcept_filesarch_filesinteraction_filesmodule_fileslocal_meta
Do not echo placeholder tokens.
{% enddispatch_agent %}repo_typemonorepo_projectslocal_meta.repo_rootlocal_meta.current_project_pathPATTERN_FILES = unique(concept_files + module_files)INTERACTION_FILES = unique(interaction_files)FILE_DIFFS{% dispatch_agent "rp1-base:kb-concept-extractor", background %} Use the parent-computed inputs.
concept_map.md
{% enddispatch_agent %}{% dispatch_agent "rp1-base:kb-architecture-mapper", background %} Use the parent-computed inputs.
architecture.md
{% enddispatch_agent %}{% dispatch_agent "rp1-base:kb-interaction-mapper", background %} Use the parent-computed inputs.
interaction-model.md
{% enddispatch_agent %}{% dispatch_agent "rp1-base:kb-module-analyzer", background %} Use the parent-computed inputs.
modules.md
{% enddispatch_agent %}{% dispatch_agent "rp1-base:kb-pattern-extractor", background %} Use the parent-computed inputs.
patterns.mdpatterns.md MUST stay <=150 lines
{% enddispatch_agent %}plugins/base/skills/artifact-templates/templates/knowledge-base/ (fall back to rp1-base:artifact-templates SKILL.md index if a direct path fails).concept_map.mdarchitecture.mdinteraction-model.mdmodules.mdpatterns.mdarchitecture.md Mermaid diagram via rp1-base:mermaid.
{kbRoot}/concept_map.md{kbRoot}/architecture.md{kbRoot}/interaction-model.md{kbRoot}/modules.md{kbRoot}/patterns.mdindex.md directly from aggregated results plus measured line counts.{kbRoot}/index.md last.{kbRoot}/state.json with:
strategy=parallel-map-reducerepo_typemonorepo_projectsgenerated_atgit_commitfiles_analyzedlanguagesmetrics{kbRoot}/meta.json with:
repo_rootcurrent_project_pathmeta.json is local-only. Write it, but do not register it anywhere.Fatal errors:
FILES_MODIFIED in feature modeOn any fatal error:
User-visible output only:
Final report must include:
Knowledge Base Generated SuccessfullyFeature Learnings CapturedPartial KB Generated.rp1/context/