Skip to content

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

Open
YamiDaisuke wants to merge 2 commits into
mainfrom
core-file-discovery-task/03-build-file-node-tree
Open

feat(core-file-discovery): build FileNode tree from discovered files [task/03]#25
YamiDaisuke wants to merge 2 commits into
mainfrom
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: main (TASK-01 and TASK-02 already merged)

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

Re-opened: original PR #22 was auto-closed when the stacked base branch was deleted after task/02 merged.


Generated by Claude Code

claude added 2 commits June 16, 2026 01:30
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
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