self-improvement-ci

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Self-Improvement CI

CI自我改进

Install

安装

bash
npx skills add pskoett/pskoett-ai-skills/self-improvement-ci
bash
npx skills add pskoett/pskoett-ai-skills/self-improvement-ci

Purpose

用途

Run self-improvement in CI without interactive chat loops:
  • Inspect PR check results and CI failures
  • Ingest learning candidates from
    simplify-and-harden-ci
  • Deduplicate recurring patterns by stable
    pattern_key
  • Emit promotion-ready suggestions for agent context/system prompts
Use
self-improvement
for interactive/local sessions.
在CI中运行自我改进,无需交互式聊天循环:
  • 检查PR检查结果和CI故障
  • simplify-and-harden-ci
    中导入学习候选内容
  • 通过稳定的
    pattern_key
    去除重复出现的模式
  • 生成可用于推广的建议,供Agent上下文/系统提示使用
在交互式/本地会话中使用
self-improvement

Context Limitation (Important)

上下文限制(重要)

CI agents do not have peak task context from the original implementation session. Use this skill to aggregate recurring patterns across runs, not to infer nuanced one-off intent.
Implications:
  • Favor stable
    pattern_key
    recurrence signals over single-run conclusions
  • Require recurrence thresholds before promotion
  • Route uncertain or high-impact recommendations to interactive review
CI Agent不具备原始实现会话中的峰值任务上下文。请使用此技能聚合多次运行中的重复模式,而非推断细微的一次性意图。
影响:
  • 优先考虑稳定的
    pattern_key
    重复信号,而非单次运行的结论
  • 达到重复阈值后再进行推广
  • 将不确定或高影响的建议转至交互式审核

Prerequisites

前置条件

  1. GitHub Actions enabled for the repository
  2. GitHub CLI authenticated (
    gh auth status
    )
  3. gh-aw
    installed for authoring/validation:
bash
gh extension install github/gh-aw
  1. 仓库已启用GitHub Actions
  2. GitHub CLI已完成认证(执行
    gh auth status
    验证)
  3. 已安装
    gh-aw
    用于创作/验证:
bash
gh extension install github/gh-aw

CI Contract

CI约定

The CI skill must:
  1. Read only PR-scoped data (checks, workflow outcomes, existing learning entries)
  2. Avoid direct code modifications in CI
  3. Emit machine-readable learning output
  4. Recommend promotion only when recurrence thresholds are met
此CI技能必须:
  1. 仅读取PR范围内的数据(检查结果、工作流输出、现有学习条目)
  2. 避免在CI中直接修改代码
  3. 生成机器可读的学习输出
  4. 仅在达到重复阈值时建议推广

Output Schema

输出 Schema

yaml
self_improvement_ci:
  source:
    pr_number: 123
    commit_sha: "abc123"
  candidates:
    - pattern_key: "harden.input_validation"
      source: "simplify-and-harden-ci"
      recurrence_count: 3
      first_seen: "2026-02-01"
      last_seen: "2026-02-20"
      severity: "high"
      suggested_rule: "Validate and bound-check external inputs before use."
      promotion_ready: true
  summary:
    candidates_total: 4
    promotion_ready_total: 1
    followup_required: true
yaml
self_improvement_ci:
  source:
    pr_number: 123
    commit_sha: "abc123"
  candidates:
    - pattern_key: "harden.input_validation"
      source: "simplify-and-harden-ci"
      recurrence_count: 3
      first_seen: "2026-02-01"
      last_seen: "2026-02-20"
      severity: "high"
      suggested_rule: "Validate and bound-check external inputs before use."
      promotion_ready: true
  summary:
    candidates_total: 4
    promotion_ready_total: 1
    followup_required: true

Recurrence and Promotion Rules

重复与推广规则

  • Track recurrence by
    pattern_key
  • Default threshold for promotion:
    • recurrence_count >= 3
    • seen in
      >= 2
      distinct tasks/runs
    • within a 30-day window
  • Promotion targets:
    • CLAUDE.md
    • AGENTS.md
    • .github/copilot-instructions.md
    • SOUL.md
      /
      TOOLS.md
      when using openclaw workspace memory
  • 通过
    pattern_key
    跟踪重复出现的情况
  • 默认推广阈值:
    • recurrence_count >= 3
    • >= 2
      个不同任务/运行中出现
    • 处于30天时间窗口内
  • 推广目标文件:
    • CLAUDE.md
    • AGENTS.md
    • .github/copilot-instructions.md
    • 使用openclaw工作区内存时的
      SOUL.md
      /
      TOOLS.md

Authoring Workflow (gh-aw)

创作工作流(gh-aw)

Example-only templates live in
references/workflow-example.md
. Keep examples outside
.github/workflows
until you explicitly decide to enable CI automation.
When ready:
  1. Copy the template into
    .github/workflows/self-improvement-ci.md
  2. Customize tool access, outputs, and policy thresholds
  3. Validate:
bash
gh aw compile --validate --strict
  1. Trigger test run manually:
bash
gh aw run self-improvement-ci --push
仅作示例的模板位于
references/workflow-example.md
中。在你明确决定启用CI自动化前,请将示例放在
.github/workflows
目录之外。
准备就绪后:
  1. 将模板复制到
    .github/workflows/self-improvement-ci.md
  2. 自定义工具权限、输出和策略阈值
  3. 验证:
bash
gh aw compile --validate --strict
  1. 手动触发测试运行:
bash
gh aw run self-improvement-ci --push

Integration with Other Skills

与其他技能的集成

  • Pair with
    simplify-and-harden-ci
    to ingest
    simplify_and_harden.learning_loop.candidates
  • Feed promoted patterns back into
    self-improvement
    memory workflow for durable prevention rules
  • simplify-and-harden-ci
    搭配使用,导入
    simplify_and_harden.learning_loop.candidates
  • 将已推广的模式反馈至
    self-improvement
    内存工作流,以生成持久化的预防规则