본문으로 건너뛰기
cccskills
무료GitHub에 공개

frontmatter-parsing

YAML frontmatter parsing and manipulation for .planning/ documents. Provides read, write, update, query, and validation operations on frontmatter blocks in GSD markdown artifacts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md7.0 KB
  • README.md1.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

status: in-progress phase: 72 wave: 1 depends_on: [] files_modified: ["src/auth/oauth.ts", "src/auth/tokens.ts"] created: 2026-03-02 updated: 2026-03-02

Plan content below...


## Capabilities

### 1. Parse Frontmatter

Extract frontmatter from a markdown file into structured data:

```yaml
# Input file: .planning/phase-72/PLAN-1.md
---
status: planned
phase: 72
plan_number: 1
wave: 1
depends_on: []
files_modified:
  - src/auth/oauth.ts
  - src/auth/tokens.ts
  - src/middleware/auth.ts
task_count: 4
created: 2026-03-02
gap_closure: false
---

Parsed result:

{
  "status": "planned",
  "phase": 72,
  "plan_number": 1,
  "wave": 1,
  "depends_on": [],
  "files_modified": ["src/auth/oauth.ts", "src/auth/tokens.ts", "src/middleware/auth.ts"],
  "task_count": 4,
  "created": "2026-03-02",
  "gap_closure": false
}

2. Extract Specific Fields

Read individual fields without parsing the entire frontmatter:

get_field(.planning/phase-72/PLAN-1.md, "wave") -> 1
get_field(.planning/phase-72/PLAN-1.md, "status") -> "planned"
get_field(.planning/phase-72/PLAN-1.md, "files_modified") -> ["src/auth/oauth.ts", ...]

3. Update Fields

Update individual frontmatter fields without modifying body content:

update_field(.planning/phase-72/PLAN-1.md, "status", "executed")
update_field(.planning/phase-72/PLAN-1.md, "wave", 2)
update_field(.planning/phase-72/PLAN-1.md, "updated", "2026-03-02")

Uses Edit tool to surgically replace only the target field line.

4. Add New Fields

Add fields to existing frontmatter:

add_field(.planning/phase-72/PLAN-1.md, "executed_at", "2026-03-02T14:30:00Z")
add_field(.planning/phase-72/PLAN-1.md, "executor_agent", "gsd-executor")

Inserts new field before the closing --- delimiter.

5. Remove Fields

Remove fields from frontmatter:

remove_field(.planning/phase-72/PLAN-1.md, "gap_closure")

6. Query Across Files

Find documents matching frontmatter criteria:

query(directory: ".planning/phase-72/", field: "wave", value: 1)
-> [".planning/phase-72/PLAN-1.md", ".planning/phase-72/PLAN-2.md"]

query(directory: ".planning/", field: "status", value: "planned", recursive: true)
-> [".planning/phase-72/PLAN-1.md", ".planning/phase-73/PLAN-1.md"]

Uses Grep to search for field patterns, then validates matches.

7. Validate Frontmatter

Validate frontmatter against document type schema:

# PLAN.md required fields
required:
  - status       # planned|executing|executed|verified
  - phase        # integer or decimal
  - plan_number  # integer
  - wave         # integer (execution order group)
  - task_count   # integer

# PLAN.md optional fields
optional:
  - depends_on      # array of plan references
  - files_modified  # array of file paths
  - gap_closure     # boolean
  - created         # date
  - updated         # date
  - executed_at     # datetime

Document type schemas:

  • PLAN.md: status, phase, plan_number, wave, task_count
  • SUMMARY.md: phase, status, tasks_completed, commits
  • RESEARCH.md: phase, status, approach_count, recommended
  • STATE.md: last_updated, session_count, current_milestone
  • CONTEXT.md: phase, decisions_count, preferences

8. Batch Operations

Update frontmatter across multiple files:

batch_update(
  files: [".planning/phase-72/PLAN-1.md", ".planning/phase-72/PLAN-2.md"],
  field: "status",
  value: "executed"
)

Tool Use Instructions

Parsing Frontmatter

  1. Use Read to load the target file
  2. Extract content between first --- and second ---
  3. Parse YAML content into key-value pairs
  4. Return structured object

Updating a Field

  1. Use Read to load the file
  2. Locate the target field line within frontmatter
  3. Use Edit with the exact field line as old_string
  4. Replace with new field value line
  5. If field is multi-line (arrays), handle properly

Querying Across Files

  1. Use Glob to find candidate files in the target directory
  2. Use Grep to search for the field pattern (e.g., ^wave: 1$)
  3. For each match, verify it's within frontmatter (not body content)
  4. Return list of matching file paths

Validating Frontmatter

  1. Use Read to load the file
  2. Parse frontmatter
  3. Check required fields exist for the document type
  4. Validate field types (string, integer, array, boolean, date)
  5. Return validation result with any errors

Process Integration

  • plan-phase.js - Read/write plan frontmatter (wave, depends_on, files_modified)
  • execute-phase.js - Update plan status as execution progresses, read wave assignments for parallel execution
  • audit-milestone.js - Query all plans by status for completion checks
  • research-phase.js - Write research frontmatter (approach_count, recommended)
  • discuss-phase.js - Read phase metadata from roadmap sections

Output Format

{
  "operation": "parse|get|update|add|remove|query|validate|batch",
  "status": "success|error",
  "file": ".planning/phase-72/PLAN-1.md",
  "field": "status",
  "previousValue": "planned",
  "newValue": "executed",
  "frontmatter": {},
  "queryResults": [],
  "validation": {
    "valid": true,
    "errors": [],
    "warnings": []
  }
}

Configuration

SettingDefaultDescription
frontmatterDelimiter---YAML frontmatter delimiter
strictValidationfalseFail on unknown fields
autoUpdateTimestamptrueAuto-update updated field on writes

Error Handling

ErrorCauseResolution
No frontmatter foundFile missing --- delimitersAdd frontmatter block or skip
YAML parse errorMalformed YAML in frontmatterFix YAML syntax (check indentation, colons, quotes)
Field not foundRequested field not in frontmatterReturn null, optionally add field
Type mismatchField value does not match expected typeCoerce if possible, error if not
Edit collisionField line not unique in fileInclude surrounding context for uniqueness

Constraints

  • Frontmatter must be valid YAML between --- delimiters at the top of the file
  • Field updates must not modify body content below the frontmatter
  • Array fields must use YAML list syntax (either inline [a, b] or block - a\n- b)
  • Date fields must use ISO 8601 format
  • Boolean fields must use true/false (not yes/no)
  • Query operations are read-only; they never modify files
  • Batch operations are atomic per file (each file update succeeds or fails independently)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Provide implementations of advanced data structures

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Fresh adversarial code review with binary PASS/FAIL verdicts, evidence citations, and anchoring bias prevention via fresh reviewer spawning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

WASM-based instant code transforms for simple tasks, achieving 352x speedup over LLM inference with zero cost.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Coordinate Crew (persistent) and Polecat (transient) agents using Gas Town's hook-based work distribution and GUPP principle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Generate visual representations of algorithm execution

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

Hierarchical coordination and drift detection with frequent checkpoints, shared memory coherence validation, role specialization enforcement, and short task cycles.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

a5c-ai/babysitter1.9천2026년 9월 17일 업데이트

a5c-ai의 스킬 모두 보기

이 스킬의 문제 신고