modify gemini template
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Basic validation for the Markdown document harness template.
|
||||
Basic validation for the Gemini CLI Markdown document harness template.
|
||||
|
||||
This check is intentionally lightweight: it verifies that the template files
|
||||
exist and keep the sections that later Harness steps depend on.
|
||||
@@ -20,7 +20,7 @@ ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
REQUIRED_FILES = [
|
||||
"README.md",
|
||||
"AGENTS.md",
|
||||
"GEMINI.md",
|
||||
"docs/PRD.md",
|
||||
"docs/ResearchNote.md",
|
||||
"docs/DraftFeedback.md",
|
||||
@@ -31,14 +31,19 @@ REQUIRED_FILES = [
|
||||
".agents/skills/document-harness/SKILL.md",
|
||||
".agents/skills/document-harness/references/phase-templates.md",
|
||||
".agents/skills/document-review/SKILL.md",
|
||||
".codex/config.toml",
|
||||
".codex/hooks.json",
|
||||
".codex/hooks/pre_tool_guard.py",
|
||||
".codex/hooks/stop_validate.py",
|
||||
".codex/agents/doc_researcher.toml",
|
||||
".codex/agents/doc_drafter.toml",
|
||||
".codex/agents/doc_reviewer.toml",
|
||||
".codex/agents/evidence_checker.toml",
|
||||
".gemini/settings.json",
|
||||
".gemini/hooks/pre_tool_guard.py",
|
||||
".gemini/hooks/validate_docs_after_agent.py",
|
||||
".gemini/agents/doc-researcher.md",
|
||||
".gemini/agents/doc-drafter.md",
|
||||
".gemini/agents/doc-reviewer.md",
|
||||
".gemini/agents/evidence-checker.md",
|
||||
".gemini/commands/harness/plan.toml",
|
||||
".gemini/commands/harness/research.toml",
|
||||
".gemini/commands/harness/draft.toml",
|
||||
".gemini/commands/harness/final.toml",
|
||||
".gemini/commands/harness/review.toml",
|
||||
".gemini/commands/harness/status.toml",
|
||||
]
|
||||
|
||||
REQUIRED_DIRS = [
|
||||
@@ -48,18 +53,23 @@ REQUIRED_DIRS = [
|
||||
".agents/skills",
|
||||
".agents/skills/document-harness",
|
||||
".agents/skills/document-review",
|
||||
".codex",
|
||||
".codex/hooks",
|
||||
".codex/agents",
|
||||
".gemini",
|
||||
".gemini/commands",
|
||||
".gemini/commands/harness",
|
||||
".gemini/hooks",
|
||||
".gemini/agents",
|
||||
]
|
||||
|
||||
REQUIRED_SECTIONS = {
|
||||
"README.md": [
|
||||
"## 핵심 아이디어",
|
||||
"## Codex 구성",
|
||||
"## Gemini CLI 구성",
|
||||
"## 빠른 시작",
|
||||
"## 자동 실행 방식",
|
||||
"## 피드백 게이트",
|
||||
"## Gemini CLI Skills",
|
||||
"## Gemini CLI Subagents",
|
||||
"## Hooks",
|
||||
"## 검증",
|
||||
],
|
||||
"docs/PRD.md": [
|
||||
@@ -83,15 +93,23 @@ REQUIRED_SECTIONS = {
|
||||
"## 쟁점과 상반된 주장",
|
||||
"## 확인 필요",
|
||||
],
|
||||
"AGENTS.md": [
|
||||
"GEMINI.md": [
|
||||
"## 목적",
|
||||
"## Codex 구성",
|
||||
"## Gemini CLI 구성",
|
||||
"## 기본 산출물",
|
||||
"## 문서 작성 규칙",
|
||||
"## Codex 작업 규칙",
|
||||
"## Gemini CLI 작업 규칙",
|
||||
"## 권장 워크플로우",
|
||||
"## 명령어",
|
||||
],
|
||||
"docs/ARCHITECTURE.md": [
|
||||
"## 디렉토리 구조",
|
||||
"## 데이터 흐름",
|
||||
"## Step 설계 패턴",
|
||||
"## Gemini CLI 구성 책임",
|
||||
"## 상태 관리",
|
||||
"## 파일 책임",
|
||||
],
|
||||
".agents/skills/document-harness/SKILL.md": [
|
||||
"# Document Harness Skill",
|
||||
"## Operating Rules",
|
||||
@@ -107,11 +125,24 @@ REQUIRED_SECTIONS = {
|
||||
}
|
||||
|
||||
REQUIRED_JSON_FILES = [
|
||||
".codex/hooks.json",
|
||||
".gemini/settings.json",
|
||||
]
|
||||
|
||||
REQUIRED_TOML_FILES = [
|
||||
".gemini/commands/harness/plan.toml",
|
||||
".gemini/commands/harness/research.toml",
|
||||
".gemini/commands/harness/draft.toml",
|
||||
".gemini/commands/harness/final.toml",
|
||||
".gemini/commands/harness/review.toml",
|
||||
".gemini/commands/harness/status.toml",
|
||||
]
|
||||
|
||||
FORBIDDEN_FILES = [
|
||||
"AGENTS.md",
|
||||
".codex/config.toml",
|
||||
".codex/hooks.json",
|
||||
".codex/hooks/pre_tool_guard.py",
|
||||
".codex/hooks/stop_validate.py",
|
||||
".codex/agents/doc_researcher.toml",
|
||||
".codex/agents/doc_drafter.toml",
|
||||
".codex/agents/doc_reviewer.toml",
|
||||
@@ -132,6 +163,8 @@ def markdown_file_has_valid_start(path: Path) -> bool:
|
||||
return True
|
||||
if first == "---" and path.name == "SKILL.md":
|
||||
return True
|
||||
if first == "---" and path.parent.name == "agents":
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@@ -151,7 +184,12 @@ def main() -> int:
|
||||
|
||||
if path.suffix == ".md":
|
||||
if not markdown_file_has_valid_start(path):
|
||||
errors.append(f"markdown file must start with a level-1 heading or Skill frontmatter: {rel}")
|
||||
errors.append(f"markdown file must start with a level-1 heading, Skill frontmatter, or agent frontmatter: {rel}")
|
||||
|
||||
for rel in FORBIDDEN_FILES:
|
||||
path = ROOT / rel
|
||||
if path.exists():
|
||||
errors.append(f"forbidden legacy file remains: {rel}")
|
||||
|
||||
for rel, sections in REQUIRED_SECTIONS.items():
|
||||
path = ROOT / rel
|
||||
|
||||
Reference in New Issue
Block a user