Skip to content

docs(file-formats): align claudecode skill paths/scheduled-task order with code emission#1648

Closed
Chen17-sq wants to merge 1 commit into
dyoshikawa:mainfrom
Chen17-sq:docs/1618-unify-paths-scheduled-task-order
Closed

docs(file-formats): align claudecode skill paths/scheduled-task order with code emission#1648
Chen17-sq wants to merge 1 commit into
dyoshikawa:mainfrom
Chen17-sq:docs/1618-unify-paths-scheduled-task-order

Conversation

@Chen17-sq
Copy link
Copy Markdown

Summary

Addresses item 4 from #1618 (review findings for PR #1604, the Claude Code skills paths field).

ClaudecodeSkill.toRulesyncSkill emits the claudecode section in this order:

// src/features/skills/claudecode-skill.ts:122-130
const claudecodeSection = {
  ...(frontmatter["allowed-tools"] && { ... }),
  ...(frontmatter.model && { model: frontmatter.model }),
  ...(frontmatter["disable-model-invocation"] !== undefined && { ... }),
  ...(frontmatter.paths !== undefined && { paths: frontmatter.paths }),               // ← paths
  ...(this.relativeDirPath === CLAUDE_SCHEDULED_TASKS_DIR_PATH && { "scheduled-task": true }), // ← scheduled-task
};

Object spread order determines the YAML key order in serialized output, so generated skill files put paths before scheduled-task. But docs/reference/file-formats.md had them swapped (scheduled-task then paths), which made the example diverge from the actual generated output users see in their working tree.

This PR moves the paths: block in the doc example up so the YAML key order matches the spread order in code. No code change, no schema change, no URL change.

skills/rulesync/file-formats.md is auto-regenerated from docs/ by scripts/sync-skill-docs.ts (wired through lint-staged on every docs/**/*.md commit) and is included in this PR for that reason.

Test plan

  • pnpm cicheck (fmt + oxlint + eslint + tsgo + 5550 vitest + sync-skill-docs check + cspell + secretlint) passes locally on Node 22.
  • Diff is a single key reorder in docs/reference/file-formats.md plus the mirrored regeneration in skills/rulesync/file-formats.md.

Refs #1618 (item 4 of 6 — the other follow-ups in that issue are out of scope here).

… with code emission

Addresses item 4 in dyoshikawa#1618. ClaudecodeSkill.toRulesyncSkill emits paths before scheduled-task in its claudecode-section spread (src/features/skills/claudecode-skill.ts lines 128-129), but the file-formats reference documented them in the opposite order. Swap the doc example so the YAML keys appear in the same order users actually see in generated SKILL.md files.

Doc-only change; skills/rulesync/file-formats.md is regenerated by the lint-staged sync script.
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Unfortunately, you currently have 5 open PRs (including this one), which exceeds the limit of 2 for external contributors.

Please wait for an existing PR to be reviewed/merged, or close one before opening a new one. See CONTRIBUTING.md for details.

@Chen17-sq
Copy link
Copy Markdown
Author

Closing this proactively — the github-actions bot flagged that I'm well over the 2-PR limit for external contributors documented in CONTRIBUTING.md. I opened these nine PRs in one batch without spotting that rule first, which was my mistake — sorry for the noise.

The patch in this PR is ready as-is (pnpm cicheck green, lint-staged green, pre-commit pnpm dev generate green) and stays small enough for a quick read; reopening is one click.

Keeping #1643 (refactor(utils): consolidate isPlainObject, addresses #1638) and #1644 (refactor(copilot-rule): reuse toPosixPath, addresses #1603) as my current two. I'll reopen this one — addressing #1618 item 4 — once a slot frees up.

@Chen17-sq Chen17-sq closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant