🔄 卡若AI 同步 2026-07-24 09:05 | 更新:更新大文件排除规则;.restore-backups/F22_恢复前_20260723_210051 Skill规则更新;更新SKILL_REGISTRY.md;更新karuo_route.sh;更新SkillSpector扫描处置记录.md;更新对话019f7fde可执行模式复盘.md;更新对话019f7fde通过案例分析.md;更新工具候选与集成规则.md;更新生成业务续执行包.py;更新F22_复扫.json;更新F22_静态扫描.json;更新019f7fde-41d5-7641-9a25-561d9356c193.md;其余1172项见提交文件清单 | 排除 >1MB: 693 个
This commit is contained in:
47
.restore-backups/F22_恢复前_20260723_210051/脚本/工具预检.sh
Executable file
47
.restore-backups/F22_恢复前_20260723_210051/脚本/工具预检.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
set -uo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
RUNTIME="$SKILL_DIR/运行资产"
|
||||
|
||||
check_cmd() {
|
||||
local name="$1"
|
||||
shift
|
||||
if command -v "$1" >/dev/null 2>&1; then
|
||||
printf '已安装\t%s\t' "$name"
|
||||
"$@" 2>&1 | head -n 1
|
||||
else
|
||||
printf '待安装\t%s\n' "$name"
|
||||
fi
|
||||
}
|
||||
|
||||
printf '卡若AI Codex提示词回归工具预检\n'
|
||||
printf '时间\t%s\n' "$(date '+%Y-%m-%d %H:%M:%S %z')"
|
||||
check_cmd 'Codex' codex --version
|
||||
check_cmd 'Node.js' node --version
|
||||
check_cmd 'npm' npm --version
|
||||
if [ -x "$RUNTIME/promptfoo/node_modules/.bin/promptfoo" ]; then
|
||||
printf '已安装\tPromptfoo\t'
|
||||
"$RUNTIME/promptfoo/node_modules/.bin/promptfoo" --version 2>&1 | tail -n 1
|
||||
else
|
||||
printf '待安装\tPromptfoo\n'
|
||||
fi
|
||||
check_cmd 'Garak' garak --version
|
||||
check_cmd 'PyRIT扫描器' pyrit_scan --version
|
||||
check_cmd 'SkillSpector' skillspector --version
|
||||
if [ -x "$RUNTIME/.venv-inspect/bin/inspect" ]; then
|
||||
printf '已安装\tInspect AI\t'
|
||||
"$RUNTIME/.venv-inspect/bin/inspect" --version 2>&1 | head -n 1
|
||||
else
|
||||
printf '待安装\tInspect AI\n'
|
||||
fi
|
||||
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
printf '已安装\tPython\t%s\n' "$(python3 --version 2>&1)"
|
||||
else
|
||||
printf '待安装\tPython\n'
|
||||
fi
|
||||
|
||||
printf '资产目录\t%s\n' "$RUNTIME"
|
||||
printf '提示\t工具环境统一保存在当前 Skill 的运行资产目录;密钥只经环境变量注入。\n'
|
||||
61
.restore-backups/F22_恢复前_20260723_210051/脚本/生成业务续执行包.py
Executable file
61
.restore-backups/F22_恢复前_20260723_210051/脚本/生成业务续执行包.py
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def clean(value: str) -> str:
|
||||
return " ".join(value.replace("\x00", "").split())
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="生成卡若AI项目业务续执行包")
|
||||
parser.add_argument("--task-id", required=True)
|
||||
parser.add_argument("--project", required=True)
|
||||
parser.add_argument("--objective", required=True)
|
||||
parser.add_argument("--scope", required=True)
|
||||
parser.add_argument("--chain", required=True)
|
||||
parser.add_argument("--evidence", default="待补")
|
||||
parser.add_argument("--output", required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
output = Path(args.output).expanduser()
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
text = f"""# 业务续执行包
|
||||
|
||||
- 任务ID:`{clean(args.task_id)}`
|
||||
- 生成时间:{datetime.now().astimezone().isoformat(timespec="seconds")}
|
||||
- 项目:{clean(args.project)}
|
||||
|
||||
## 真实交付目标
|
||||
|
||||
{clean(args.objective)}
|
||||
|
||||
## 范围
|
||||
|
||||
{clean(args.scope)}
|
||||
|
||||
## 已确认技术链
|
||||
|
||||
`{clean(args.chain)}`
|
||||
|
||||
## 当前证据
|
||||
|
||||
{clean(args.evidence)}
|
||||
|
||||
## 执行规则
|
||||
|
||||
1. 先读取项目Skill、需求、现有实现和最近进度。
|
||||
2. 从最后一个有证据的技术节点继续,不重复已完成步骤。
|
||||
3. 只在声明范围内修改。
|
||||
4. 以测试、原始回执和回读完成验收。
|
||||
5. 提示词回归Skill只记录路由与中断层,不接管项目实现。
|
||||
"""
|
||||
output.write_text(text, encoding="utf-8")
|
||||
print(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user