SuperAPI AI Directory

harness-build-core-manifest

Agents & models

View repository

Updated 10-15 23:47

About this skill

harness-build-core-manifest Build core rules checklist

Core Capabilities

  1. Check whether harness-init is complete
  2. Create AGENTS_MANIFEST.md (≤60 lines)
  3. Define architecture layering rules
  4. Define naming conventions
  5. Define PR merge requirements

Prerequisites

  • harness-init is complete
  • .EnjoyHarness/GLOBAL_STATE.md exists

Execution Steps

Step 1: Check prerequisites

Use the Read tool to read:.EnjoyHarness/GLOBAL_STATE.md

Check conditions:

  • File exists
  • status: active

If not initialized:

❌ 错误: 系统未初始化
💡 请先运行: harness-init

Step 2: Create AGENTS_MANIFEST.md

Use the Write tool to create the file:AGENTS_MANIFEST.md

Content (≤60 lines):

# AGENTS_MANIFEST - 核心规则清单

## 架构分层规则(7条)
1. Types → Config → Repo → Service → Runtime → UI
2. 每层仅依赖直接下层
3. 禁止跨层调用
4. 公共接口必须在 Types 层
5. 配置必须在 Config 层
6. 业务逻辑在 Service 层
7. UI 仅处理展示逻辑

## 命名规范(6条)
1. 技能命名: harness-{verb}-{target} 或 harness-{noun}
2. 文件命名: 小写+连字符 (harness-init.md)
3. 目录命名: 小写+连字符 (skills/harness-init/)
4. 状态文件: 大写+下划线 (GLOBAL_STATE.md)
5. Manifest 文件: {NAME}_MANIFEST.md
6. Git 分支: feature/{task-id} 或 fix/{task-id}

## PR合并要求(5条)
1. 所有测试必须通过
2. 代码覆盖率 ≥ 80%
3. 无架构违规(通过 harness-enforce-architecture-guardrails)
4. 无高危安全漏洞
5. 至少 1 个 reviewer 批准

## 迭代限制(2条)
1. 最大迭代次数: 100次(可配置)
2. 熔断机制: 迭代次数≥100 → 强制停止

## 错误处理(3条)
1. 同一任务失败≥3次 → 停止尝试
2. 系统级错误 → 进入真实阻塞升级链路
3. 所有操作必须留痕到 EVENT_LOG.md

总计: 23条核心规则(≤60行)

Step 3: Update event log

Use the Edit tool to append content to:.EnjoyHarness/EVENT_LOG.md

Append content:

2026-03-28T10:45:00+08:00 | SKILL_START | harness-build-core-manifest | 开始构建核心规则 | SUCCESS
2026-03-28T10:45:00+08:00 | SKILL_COMPLETE | harness-build-core-manifest | 核心规则构建完成 | SUCCESS

Step 4: Update event count

Use the Edit tool to update:.EnjoyHarness/EVENT_LOG.md

old_string: total_events: 2 new_string: total_events: 4

Step 5: Update skill registry

Use the Edit tool to update:.EnjoyHarness/SKILL_REGISTRY.md

old_string: - [ ] harness-build-core-manifest - 构建核心规则技能 new_string: - [x] harness-build-core-manifest - 构建核心规则技能 ✅

Step 6: Output completion information

Use the Bash tool to output:

echo ""
echo "✅ harness-build-core-manifest 完成!"
echo ""
echo "📋 核心规则文件:"
echo "  - AGENTS_MANIFEST.md"
echo ""
echo "📊 规则统计:"
echo "  - 架构分层规则: 7条"
echo "  - 命名规范: 6条"
echo "  - PR合并要求: 5条"
echo "  - 迭代限制: 2条"
echo "  - 错误处理: 3条"
echo "  - 总计: 23条核心规则"
echo ""
echo "🎯 下一步:"
echo "  运行 harness-build-context-index 完成上下文索引构建"
echo ""

Success Criteria

  • AGENTS_MANIFEST.md file exists
  • File line count ≤ 60 lines
  • Number of rules ≤ 25
  • No ambiguous statements (all rules verifiable)
  • Skill registry updated

Failure Fallback

  • harness-init not complete → terminate execution, prompt to run harness-init
  • File creation failed → record error to EVENT_LOG.md, trigger retry

Linkages

  • Prerequisite: harness-init
  • Auto-trigger: harness-build-context-index, harness-enforce-architecture-guardrails

Iteration Count

Estimated iterations for this skill execution: about 5 (Write 1 + Edit 3 + Read 1)

Test Cases

Test 1: Prerequisite check

Input: Run on an uninitialized system Expected output: Error prompt "System not initialized" Verification method: Run after deleting GLOBAL_STATE.md

Test 2: File line count verification

Input: Execute harness-build-core-manifest Expected output: AGENTS_MANIFEST.md ≤ 60 lines Verification method: wc -l AGENTS_MANIFEST.md

Test 3: Rule completeness

Input: Read AGENTS_MANIFEST.md Expected output: Includes architecture layering, naming conventions, PR merge requirements Verification method: grep -c "条$" AGENTS_MANIFEST.md

Test 4: Skill registry update

Input: Read SKILL_REGISTRY.md Expected output: harness-build-core-manifest marked as complete Verification method: grep "harness-build-core-manifest" .EnjoyHarness/SKILL_REGISTRY.md

Test 5: Event log recording

Input: Read EVENT_LOG.md Expected output: Includes harness-build-core-manifest start and completion events Verification method: grep "harness-build-core-manifest" .EnjoyHarness/EVENT_LOG.md