Skip to content

feat(core-file-discovery): build FileNode tree from discovered files [task/03] - #22

Closed
YamiDaisuke wants to merge 7 commits into
core-file-discovery-task/02-define-file-node-modelfrom
core-file-discovery-task/03-build-file-node-tree
Closed

feat(core-file-discovery): build FileNode tree from discovered files [task/03]#22
YamiDaisuke wants to merge 7 commits into
core-file-discovery-task/02-define-file-node-modelfrom
core-file-discovery-task/03-build-file-node-tree

Conversation

@YamiDaisuke

Copy link
Copy Markdown
Owner

Summary

Adds buildFileTree(at:) to Sources/Core/ — constructs a FileNode directory tree from a folder path, placing directory nodes before file nodes at each level, with unit tests covering a multi-level nested structure.

Changes

  • Sources/Core/FileTreeBuilder.swift (new): buildFileTree(at:) public function and private buildNode helper
  • Tests/CoreTests/FileTreeBuilderTests.swift (new): three tests covering multi-level structure, root-level files, and directory-before-file ordering

Related Task

docs/specs/core-file-discovery.md · TASK-03

Stack

Target branch: core-file-discovery-task/02-define-file-node-model
Upstream PR: #21

Checklist

  • All acceptance criteria from the task are met
  • Code follows conventions in docs/ARCHITECTURE.md
  • Tests added or updated where required by spec or architecture
  • Only changes related to this task are included
  • Spec task status updated to done

Generated by Claude Code

claude and others added 7 commits June 6, 2026 21:47
Replaced .claude/commands/ym/task-runner.md with skeleton version:
- Git Workflow section now defers branch naming and stacking rules
  entirely to .ym/STACKED_PR_WORKFLOW.md
- Developer step 1 defers branch creation to Scrum Master instructions
- Scrum Master process adds explicit step to derive branch name and
  PR target from STACKED_PR_WORKFLOW.md before assigning

Scripts, templates, STACKED_PR_WORKFLOW.md, PULL_REQUEST_TEMPLATE.md,
and restack.yml refreshed from skeleton (no content changes detected).
All agent files identical to skeleton — no changes.

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L
…view [task/04] (#19)

* feat(core-markdown-parsing): wire renderer into TUI single-file view

TUIRenderer.renderFile(at:) loads a MarkdownDocument and renders it
via ANSIRenderer, printing ANSI-styled output to stdout. main.swift
now calls this for TUI mode when the path is a single file, replacing
the stub info-print with actual rendered markdown.

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L

* chore(tasklin): move ticket 1cc6263d through In Progress → Done

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L

---------

Co-authored-by: Claude <noreply@anthropic.com>
…sk/01] (#20)

* feat(core-file-discovery): implement recursive .md file discovery

Adds discoverMarkdownFiles(in:) to Core — enumerates a directory tree
using FileManager, skips hidden directories via .skipsHiddenFiles, filters
for .md files, and returns results sorted alphabetically by path.
Throws DiscoveryError.notADirectory if the given URL is not a directory.

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L

* chore(tasklin): move ticket ec0653c4 through In Progress → Done

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L

---------

Co-authored-by: Claude <noreply@anthropic.com>
Adds buildFileTree(at:) which calls discoverMarkdownFiles then constructs
a FileNode directory tree: directories sorted alphabetically before files
at each level, recursive subdirectories resolved by walking paths upward.
Unit tests cover a multi-level nested structure, root-level files, and
directory-before-file ordering regardless of alphabetical sort order.

https://claude.ai/code/session_01BuCBWNQyhdp6BGmAQXik5L
@github-actions

Copy link
Copy Markdown

♻️ Branch core-file-discovery-task/03-build-file-node-tree was automatically rebased onto main after core-file-discovery-task/02-define-file-node-model merged.

@github-actions
github-actions Bot force-pushed the core-file-discovery-task/03-build-file-node-tree branch from e55f257 to 036f8af Compare June 16, 2026 01:30
@YamiDaisuke
YamiDaisuke deleted the branch core-file-discovery-task/02-define-file-node-model June 16, 2026 01:35
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