Skip to content

fix(takt): enforce 1:1 feature-to-facet mapping#1541

Merged
dyoshikawa merged 2 commits intomainfrom
fix-takt
Apr 22, 2026
Merged

fix(takt): enforce 1:1 feature-to-facet mapping#1541
dyoshikawa merged 2 commits intomainfrom
fix-takt

Conversation

@dyoshikawa
Copy link
Copy Markdown
Owner

Summary

  • Switch takt target from many-to-many feature/facet mapping to a strict 1:1 mapping:
    • rules.takt/facets/policies/
    • commands.takt/facets/instructions/
    • subagents.takt/facets/personas/
    • skills.takt/facets/knowledge/ (changed from instructions/)
  • Remove takt.facet frontmatter override entirely; keep takt.name for filename overrides and path-traversal guard.
  • Drop collision-detection plumbing between commands and skills in generate.ts since the two features no longer share an output directory.
  • Update docs (docs/tools/takt.md, docs/reference/file-formats.md), skill-docs mirror, gitignore registry, and e2e/unit tests to match the new mapping.

Test plan

  • pnpm cicheck (fmt / lint / typecheck / unit + integration tests / sync-skill-docs / cspell / secretlint)
  • pnpm test:e2e (335 tests)
  • Tool × Feature happy-path e2e matrix for takt preserved

🤖 Generated with Claude Code

…rides

Each rulesync feature now maps to a single dedicated takt facet directory.
skills default changes from .takt/facets/instructions/ to .takt/facets/knowledge/.
Drop takt.facet frontmatter override and the commands-vs-skills collision
handling that is no longer reachable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 22, 2026 10:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enforces a strict 1:1 mapping between Rulesync features and Takt facet directories, removing the previously supported many-to-many takt.facet override and the collision-handling logic that was required when commands and skills shared an output directory.

Changes:

  • Remove takt.facet support across Takt generators and Rulesync frontmatter schemas; keep takt.name (with safety validation) for filename overrides.
  • Update Takt output mapping so each feature writes to its own dedicated facet directory (notably skillsknowledge/).
  • Simplify generation + gitignore logic and update unit/e2e tests and documentation accordingly.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib/generate.ts Removes Takt commands/skills collision pre-pass and filtering now that outputs no longer overlap.
src/features/takt-shared.ts Drops shared takt.facet resolver helper; keeps only takt.name safety validation.
src/features/takt-shared.test.ts Removes tests for the deleted facet resolver helper.
src/features/subagents/takt-subagent.ts Fixes subagents to .takt/facets/personas/ with no facet override.
src/features/subagents/takt-subagent.test.ts Removes facet-override tests and asserts fixed personas output dir.
src/features/subagents/rulesync-subagent.ts Removes takt.facet from subagent frontmatter schema.
src/features/skills/takt-skill.ts Fixes skills to emit only under .takt/facets/knowledge/ (no facet override).
src/features/skills/takt-skill.test.ts Updates expectations to knowledge facet; removes facet-override tests.
src/features/skills/rulesync-skill.ts Removes takt.facet from skill frontmatter typing/schema.
src/features/rules/takt-rule.ts Fixes rules to emit only under .takt/facets/policies/ (no facet override).
src/features/rules/takt-rule.test.ts Updates expectations to fixed policies facet; removes facet-override tests.
src/features/rules/rulesync-rule.ts Removes takt.facet from rule frontmatter schema.
src/features/commands/takt-command.ts Fixes commands to .takt/facets/instructions/ with no facet override.
src/features/commands/takt-command.test.ts Removes facet-override tests and asserts fixed instructions output dir.
src/features/commands/rulesync-command.ts Removes takt.facet from command frontmatter schema.
src/e2e/e2e-takt.spec.ts Replaces collision-focused e2e coverage with a 1:1 mapping matrix + shared-stem no-collision test.
src/e2e/e2e-skills.spec.ts Updates takt skill output path expectations to .takt/facets/knowledge/.
src/cli/commands/gitignore-entries.ts Updates takt gitignore registry to match new fixed facet directories.
src/cli/commands/gitignore-entries.test.ts Adjusts registry dedupe test commentary to reflect removal of shared-dir behavior.
skills/rulesync/file-formats.md Updates the skill-docs mirror to document removal of takt.facet and fixed directories.
docs/tools/takt.md Updates Takt tool docs to 1:1 mapping and removes collision section.
docs/reference/file-formats.md Updates reference docs to remove takt.facet and document fixed facet directories.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dyoshikawa dyoshikawa merged commit ef96d76 into main Apr 22, 2026
9 checks passed
@dyoshikawa dyoshikawa deleted the fix-takt branch April 22, 2026 12:39
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.

2 participants