@drafthq/draft
Advanced tools
@@ -15,3 +15,3 @@ { | ||
| "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.", | ||
| "version": "3.5.2", | ||
| "version": "3.5.3", | ||
| "author": { | ||
@@ -18,0 +18,0 @@ "name": "mayurpise" |
| { | ||
| "name": "draft", | ||
| "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.", | ||
| "version": "3.5.2", | ||
| "version": "3.5.3", | ||
| "author": { | ||
@@ -6,0 +6,0 @@ "name": "mayurpise" |
@@ -5,3 +5,3 @@ { | ||
| "description": "Context-Driven Development: draft specs and plans before implementation. Structured workflows for features and fixes.", | ||
| "version": "3.5.2", | ||
| "version": "3.5.3", | ||
| "skills": "./skills/", | ||
@@ -8,0 +8,0 @@ "agents": "./core/agents/", |
| --- | ||
| type: Subsystem | ||
| title: "{PROJECT_NAME} — Wiki" | ||
| description: > | ||
| Root index of the project wiki. Start here, then route into | ||
| overview/, systems/, features/, reference/, or entrypoints/ via the | ||
| Concept Map. Open a concept only when its description matches the task. | ||
| resource: . | ||
| tags: [index] | ||
| timestamp: "{ISO_TIMESTAMP}" | ||
| okf_version: "0.1" | ||
| okf_types_version: "0.1" | ||
| --- | ||
| <!-- OKF §6/§11: an index file carries NO concept frontmatter; the root index.md | ||
| may declare ONLY `okf_version`. The frozen concept-`type` vocabulary version | ||
| is tracked here in the body (not in frontmatter) so bumping it stays visible | ||
| without violating the index-frontmatter rule. | ||
| okf-types-version: 0.1 --> | ||
| # {PROJECT_NAME} — Wiki | ||
@@ -16,0 +12,0 @@ |
@@ -1,12 +0,3 @@ | ||
| --- | ||
| type: Subsystem | ||
| title: "{SECTION_TITLE}" | ||
| description: > | ||
| Section index. Lists every concept in this section with its one-line | ||
| routing description so an agent can pick the right page without opening | ||
| each one. {SECTION_PURPOSE} | ||
| resource: . | ||
| tags: [index] | ||
| timestamp: "{ISO_TIMESTAMP}" | ||
| --- | ||
| <!-- OKF §6: an index file contains NO frontmatter. This page is a reserved | ||
| navigation index, not a concept — its Concepts table is tool-generated. --> | ||
@@ -13,0 +4,0 @@ # {SECTION_TITLE} |
+1
-1
| { | ||
| "name": "@drafthq/draft", | ||
| "version": "3.5.2", | ||
| "version": "3.5.3", | ||
| "description": "Context-Driven Development for AI coding agents — install Draft into Claude Code, Cursor, Codex, or opencode.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -125,2 +125,13 @@ #!/usr/bin/env bash | ||
| { | ||
| # OKF §9.1/§9.2: every non-reserved .md needs parseable frontmatter with a | ||
| # non-empty `type`. coverage.md is tool-generated and not a code concept, so | ||
| # it uses a descriptive (non-frozen) type; okf-validate.sh exempts it from the | ||
| # frozen-vocab check via is_meta_page (basename + the marker below). | ||
| echo "---" | ||
| echo "type: Report" | ||
| echo "title: Component Coverage" | ||
| echo "description: Coverage of required components by wiki pages — which are documented, stubbed, or missing." | ||
| echo "resource: ." | ||
| echo "---" | ||
| echo "" | ||
| echo "<!-- okf:coverage-generated -->" | ||
@@ -134,3 +145,3 @@ echo "# Component Coverage" | ||
| echo "|-----------|-----------|--------|--------|" | ||
| local cid status fanin | ||
| local cid status fanin link | ||
| while IFS=$'\t' read -r cid required reason ftype fanin; do | ||
@@ -141,4 +152,11 @@ [[ -z "$cid" ]] && continue | ||
| bl="$(body_lines "$BUNDLE/$cid")" | ||
| # coverage.md lives in systems/; link relative to it. Concepts in | ||
| # other sections (entrypoints/, reference/, …) need a ../ prefix, | ||
| # otherwise the link dangles and fails structure validation. | ||
| case "$cid" in | ||
| systems/*) link="${cid#systems/}";; | ||
| *) link="../$cid";; | ||
| esac | ||
| if [[ "$bl" -ge "$MIN_STUB_LINES" ]]; then | ||
| echo "| \`${cid%.md}\` | [page](${cid#systems/}) | Full | ${fanin} |" | ||
| echo "| \`${cid%.md}\` | [page](${link}) | Full | ${fanin} |" | ||
| else | ||
@@ -145,0 +163,0 @@ echo "| \`${cid%.md}\` | ${cid} | **STUB (${bl} lines)** | ${fanin} |" |
@@ -112,2 +112,13 @@ #!/usr/bin/env bash | ||
| # Human-facing title for a page: frontmatter `title`, else the first `# H1` in the | ||
| # body, else the bundle-relative path. Index files are frontmatter-less under OKF | ||
| # §6, so the H1 fallback keeps the rendered TOC / nav readable. | ||
| page_title() { | ||
| local t; t="$(get_yaml_field "$1" title)" | ||
| if [[ -z "$t" ]]; then | ||
| t="$(strip_frontmatter "$1" | grep -m1 -E '^#[[:space:]]+' | sed -E 's/^#[[:space:]]+//')" | ||
| fi | ||
| printf '%s' "$t" | ||
| } | ||
| # Coverage-honesty banner, sourced from okf-coverage-check.sh's JSON report. | ||
@@ -163,3 +174,3 @@ # Silent when no report is supplied (keeps the view backward-compatible). | ||
| fi | ||
| title="$(get_yaml_field "$BUNDLE/$rel" title)" | ||
| title="$(page_title "$BUNDLE/$rel")" | ||
| [[ -n "$title" ]] || title="$rel" | ||
@@ -188,6 +199,10 @@ local anchor; anchor="$(printf '%s' "$title" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')" | ||
| echo "|---------|------|---------------|" | ||
| local rel type title desc | ||
| local rel base type title desc | ||
| while IFS= read -r -d '' page; do | ||
| rel="${page#"$BUNDLE/"}" | ||
| [[ "$(basename "$rel")" == "index.md" ]] && continue | ||
| base="$(basename "$rel")" | ||
| # Meta pages are not routable concepts (reserved index/log + the typed, | ||
| # tool-generated coverage page). | ||
| [[ "$base" == "index.md" || "$base" == "log.md" || "$base" == "coverage.md" ]] && continue | ||
| grep -q '<!-- okf:coverage-generated -->' "$page" 2>/dev/null && continue | ||
| type="$(get_yaml_field "$page" type)" | ||
@@ -336,3 +351,3 @@ [[ -n "$type" ]] || continue | ||
| rel="${page#"$BUNDLE/"}" | ||
| title="$(get_yaml_field "$page" title)"; [[ -n "$title" ]] || title="$rel" | ||
| title="$(page_title "$page")"; [[ -n "$title" ]] || title="$rel" | ||
| type="$(get_yaml_field "$page" type)" | ||
@@ -339,0 +354,0 @@ printf '%s: {"title": %s, "type": %s, "md": %s},\n' \ |
@@ -138,2 +138,11 @@ #!/usr/bin/env bash | ||
| # Meta pages are NOT concepts: reserved index.md/log.md (OKF §6/§7) carry no | ||
| # concept frontmatter, and the tool-generated coverage page uses a descriptive | ||
| # (non-frozen) type. Exempt them from the frozen-vocab + required-field + body | ||
| # checks, and don't count them as concepts. The template-token (§3b) and | ||
| # cross-link (§4) scans below still cover them. | ||
| if is_meta_page "$base" "$page"; then | ||
| continue | ||
| fi | ||
| type_val="$(get_yaml_field "$page" "type")" | ||
@@ -145,8 +154,6 @@ | ||
| if [[ -z "$type_val" ]]; then | ||
| if ! is_meta_page "$base" "$page"; then | ||
| if [[ "$(nonblank_body_lines "$page")" -eq 0 ]]; then | ||
| add_error "$rel: empty page (no frontmatter type, no body) — every wiki page must be a real concept" | ||
| else | ||
| add_error "$rel: untyped page (missing frontmatter 'type:') — not a valid concept page" | ||
| fi | ||
| if [[ "$(nonblank_body_lines "$page")" -eq 0 ]]; then | ||
| add_error "$rel: empty page (no frontmatter type, no body) — every wiki page must be a real concept" | ||
| else | ||
| add_error "$rel: untyped page (missing frontmatter 'type:') — not a valid concept page" | ||
| fi | ||
@@ -153,0 +160,0 @@ continue |
@@ -80,3 +80,4 @@ ## Init — OKF Taxonomy Emitter (DRAFT_INIT_MODE=okf) | ||
| Every concept carries a `type` from this frozen set (changing it churns every | ||
| file; versioned via `index.md` frontmatter `okf_types_version`): | ||
| file; versioned via the `okf-types-version` comment in the wiki root `index.md` | ||
| body — OKF §6/§11 permit only `okf_version` in an index file's frontmatter): | ||
@@ -107,2 +108,12 @@ | type | Maps to | Home | | ||
| **Meta pages are not concepts.** Index files (`wiki/index.md` and every | ||
| `<section>/index.md`) carry **no concept frontmatter**: per OKF §6 an index file | ||
| has no frontmatter, and per §11 the root `index.md` may declare **only** | ||
| `okf_version`. The tool-generated `systems/coverage.md` is a non-reserved file, so | ||
| OKF §9.1/§9.2 require it to carry a typed frontmatter block; it uses a descriptive | ||
| `type: Report` and is exempt from the frozen vocabulary via `is_meta_page` | ||
| (basename + the `<!-- okf:coverage-generated -->` marker). `okf-validate.sh` | ||
| short-circuits all meta pages before the concept checks, so they are never | ||
| vocab-checked or counted as concepts. | ||
| ## Concept granularity (resolves open decision 1) | ||
@@ -109,0 +120,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
3541946
0.11%