doctrace 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. doctrace-0.2.0/.bumpversion.cfg +8 -0
  2. doctrace-0.2.0/.changelog/.gitkeep +3 -0
  3. doctrace-0.2.0/.claude/commands/docs/update-docs.md +87 -0
  4. doctrace-0.2.0/.claude/commands/update-docs-new.md +162 -0
  5. doctrace-0.2.0/.doctrace/config.json +10 -0
  6. doctrace-0.2.0/.doctrace/lock.json +5 -0
  7. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/add-doc-metadata.md +9 -0
  8. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/architecture.md +5 -0
  9. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/cascade.md +5 -0
  10. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/cicd.md +5 -0
  11. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/concepts.md +9 -0
  12. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/dependency-tree.md +7 -0
  13. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/initialization.md +7 -0
  14. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/local-setup.md +5 -0
  15. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/overview.md +5 -0
  16. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/prompt-generation.md +9 -0
  17. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/rules.md +8 -0
  18. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/setup-project.md +5 -0
  19. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/structure.md +6 -0
  20. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/testing.md +8 -0
  21. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/tooling.md +7 -0
  22. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/validate-docs.md +7 -0
  23. doctrace-0.2.0/.doctrace/syncs/2026-02-17T09-52-01/validation.md +5 -0
  24. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/affected.md +26 -0
  25. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/architecture.md +26 -0
  26. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/concepts.md +18 -0
  27. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/overview.md +16 -0
  28. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/preview.md +18 -0
  29. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/rules.md +25 -0
  30. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/structure.md +17 -0
  31. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-17-54/testing.md +23 -0
  32. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/affected.md +29 -0
  33. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/architecture.md +30 -0
  34. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/concepts.md +19 -0
  35. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/overview.md +18 -0
  36. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/preview.md +28 -0
  37. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/rules.md +24 -0
  38. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/structure.md +23 -0
  39. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/summary.md +61 -0
  40. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-33-41/testing.md +27 -0
  41. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/affected.md +27 -0
  42. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/architecture.md +36 -0
  43. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/concepts.md +21 -0
  44. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/overview.md +34 -0
  45. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/preview.md +29 -0
  46. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/rules.md +27 -0
  47. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/structure.md +21 -0
  48. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/summary.md +61 -0
  49. doctrace-0.2.0/.doctrace/syncs/2026-02-17T17-46-25/testing.md +30 -0
  50. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-14-38/docs_guides_setup-project.md +17 -0
  51. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-14-38/docs_repo_local-setup.md +17 -0
  52. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-14-38/docs_repo_tooling.md +17 -0
  53. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-14-38/summary.md +28 -0
  54. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-19-06/affected.json +28 -0
  55. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-19-06/summary.md +19 -0
  56. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/affected.json +476 -0
  57. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/architecture.md +25 -0
  58. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/concepts.md +20 -0
  59. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/features-affected.md +18 -0
  60. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/features-preview.md +21 -0
  61. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/guides-setup-project.md +17 -0
  62. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/overview.md +19 -0
  63. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/repo-local-setup.md +17 -0
  64. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/repo-structure.md +19 -0
  65. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/repo-tooling.md +16 -0
  66. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/rules.md +18 -0
  67. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/summary.md +61 -0
  68. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-20-26/testing.md +23 -0
  69. doctrace-0.2.0/.doctrace/syncs/2026-02-17T18-31-46/affected.json +476 -0
  70. doctrace-0.2.0/.github/images/preview.png +0 -0
  71. doctrace-0.2.0/.github/scripts/run-claude.sh +33 -0
  72. doctrace-0.2.0/.github/scripts/update-docs.sh +99 -0
  73. doctrace-0.2.0/.github/workflows/callable-ci.yml +39 -0
  74. doctrace-0.2.0/.github/workflows/prs.yml +8 -0
  75. doctrace-0.2.0/.github/workflows/push-to-main.yml +9 -0
  76. doctrace-0.2.0/.github/workflows/release.yml +62 -0
  77. doctrace-0.2.0/.github/workflows/update-docs.yml +34 -0
  78. doctrace-0.2.0/.gitignore +8 -0
  79. doctrace-0.2.0/CHANGELOG.md +21 -0
  80. doctrace-0.2.0/LICENSE +21 -0
  81. doctrace-0.2.0/Makefile +19 -0
  82. doctrace-0.2.0/PKG-INFO +287 -0
  83. doctrace-0.2.0/README.md +274 -0
  84. doctrace-0.2.0/docs/architecture.md +158 -0
  85. doctrace-0.2.0/docs/concepts.md +130 -0
  86. doctrace-0.2.0/docs/features/affected.md +129 -0
  87. doctrace-0.2.0/docs/features/initialization.md +85 -0
  88. doctrace-0.2.0/docs/features/preview.md +89 -0
  89. doctrace-0.2.0/docs/features/validation.md +92 -0
  90. doctrace-0.2.0/docs/guides/add-doc-metadata.md +152 -0
  91. doctrace-0.2.0/docs/guides/setup-project.md +93 -0
  92. doctrace-0.2.0/docs/guides/validate-docs.md +108 -0
  93. doctrace-0.2.0/docs/overview.md +69 -0
  94. doctrace-0.2.0/docs/repo/cicd.md +94 -0
  95. doctrace-0.2.0/docs/repo/local-setup.md +70 -0
  96. doctrace-0.2.0/docs/repo/structure.md +79 -0
  97. doctrace-0.2.0/docs/repo/tooling.md +91 -0
  98. doctrace-0.2.0/docs/rules.md +91 -0
  99. doctrace-0.2.0/docs/testing.md +67 -0
  100. doctrace-0.2.0/pyproject.toml +49 -0
  101. doctrace-0.2.0/src/doctrace/__init__.py +5 -0
  102. doctrace-0.2.0/src/doctrace/cli.py +72 -0
  103. doctrace-0.2.0/src/doctrace/commands/__init__.py +0 -0
  104. doctrace-0.2.0/src/doctrace/commands/affected.py +380 -0
  105. doctrace-0.2.0/src/doctrace/commands/init.py +9 -0
  106. doctrace-0.2.0/src/doctrace/commands/lock.py +40 -0
  107. doctrace-0.2.0/src/doctrace/commands/preview/__init__.py +3 -0
  108. doctrace-0.2.0/src/doctrace/commands/preview/graph.py +77 -0
  109. doctrace-0.2.0/src/doctrace/commands/preview/search.py +25 -0
  110. doctrace-0.2.0/src/doctrace/commands/preview/server.py +137 -0
  111. doctrace-0.2.0/src/doctrace/commands/preview/template.html +922 -0
  112. doctrace-0.2.0/src/doctrace/commands/preview/tree.py +83 -0
  113. doctrace-0.2.0/src/doctrace/commands/validate.py +92 -0
  114. doctrace-0.2.0/src/doctrace/core/__init__.py +0 -0
  115. doctrace-0.2.0/src/doctrace/core/config.py +135 -0
  116. doctrace-0.2.0/src/doctrace/core/constants.py +25 -0
  117. doctrace-0.2.0/src/doctrace/core/git.py +230 -0
  118. doctrace-0.2.0/src/doctrace/core/lock.py +55 -0
  119. doctrace-0.2.0/src/doctrace/core/parser.py +110 -0
  120. doctrace-0.2.0/tests/__init__.py +0 -0
  121. doctrace-0.2.0/tests/affected/build_indexes/docs/doc1.md +9 -0
  122. doctrace-0.2.0/tests/affected/build_indexes/docs/doc2.md +6 -0
  123. doctrace-0.2.0/tests/affected/build_indexes/test_build_indexes.py +20 -0
  124. doctrace-0.2.0/tests/affected/pure_logic/test_pure_logic.py +85 -0
  125. doctrace-0.2.0/tests/affected/test_scope_resolution.py +58 -0
  126. doctrace-0.2.0/tests/affected/with_changes/docs/test.md +6 -0
  127. doctrace-0.2.0/tests/affected/with_changes/test_with_changes.py +21 -0
  128. doctrace-0.2.0/tests/affected/with_directory_ref/docs/bookings.md +6 -0
  129. doctrace-0.2.0/tests/affected/with_directory_ref/test_with_directory_ref.py +21 -0
  130. doctrace-0.2.0/tests/cli/test_affected_flags.py +43 -0
  131. doctrace-0.2.0/tests/config/invalid_metadata/test_config_invalid.py +25 -0
  132. doctrace-0.2.0/tests/config/valid/test_config_valid.py +13 -0
  133. doctrace-0.2.0/tests/parser/both_sections/input.md +12 -0
  134. doctrace-0.2.0/tests/parser/both_sections/test_both_sections.py +15 -0
  135. doctrace-0.2.0/tests/parser/empty_sections/input.md +3 -0
  136. doctrace-0.2.0/tests/parser/empty_sections/test_empty_sections.py +11 -0
  137. doctrace-0.2.0/tests/parser/frontmatter_style/input.md +11 -0
  138. doctrace-0.2.0/tests/parser/frontmatter_style/test_frontmatter_style.py +15 -0
  139. doctrace-0.2.0/tests/parser/only_sources/input.md +6 -0
  140. doctrace-0.2.0/tests/parser/only_sources/test_only_sources.py +12 -0
  141. doctrace-0.2.0/tests/parser/with_code_blocks/input.md +19 -0
  142. doctrace-0.2.0/tests/parser/with_code_blocks/test_with_code_blocks.py +13 -0
  143. doctrace-0.2.0/tests/parser/with_line_numbers/input.md +13 -0
  144. doctrace-0.2.0/tests/parser/with_line_numbers/test_with_line_numbers.py +11 -0
  145. doctrace-0.2.0/tests/preview/__init__.py +0 -0
  146. doctrace-0.2.0/tests/preview/test_graph.py +77 -0
  147. doctrace-0.2.0/tests/preview/test_search.py +62 -0
  148. doctrace-0.2.0/tests/preview/test_tree.py +85 -0
  149. doctrace-0.2.0/tests/validate/missing_doc/docs/test.md +6 -0
  150. doctrace-0.2.0/tests/validate/missing_doc/test_missing_doc.py +20 -0
  151. doctrace-0.2.0/tests/validate/missing_source/docs/test.md +6 -0
  152. doctrace-0.2.0/tests/validate/missing_source/test_missing_source.py +21 -0
  153. doctrace-0.2.0/tests/validate/valid/docs/test.md +6 -0
  154. doctrace-0.2.0/tests/validate/valid/test_valid.py +22 -0
@@ -0,0 +1,8 @@
1
+ [bumpversion]
2
+ current_version = 0.1.2
3
+ commit = False
4
+ tag = False
5
+
6
+ [bumpversion:file:pyproject.toml]
7
+ search = version = "{current_version}"
8
+ replace = version = "{new_version}"
@@ -0,0 +1,3 @@
1
+ # Add changelog fragments here
2
+ # Format: <issue_number>.<type>.md (e.g., 42.feature.md)
3
+ # Types: feature, bugfix, misc
@@ -0,0 +1,87 @@
1
+ # Update Documentation (Legacy)
2
+
3
+ Read ALL source files in this repository and update documentation accordingly.
4
+
5
+ ## Instructions
6
+
7
+ 1. Read ALL files from these folders (in parallel):
8
+ - `src/doctrace/` - Python CLI source code
9
+ - `.github/` - Workflows and scripts
10
+ - `tests/` - Test files
11
+
12
+ 2. Also read root files:
13
+ - `README.md`
14
+ - `CLAUDE.md`
15
+ - `pyproject.toml`
16
+
17
+ 3. Read ALL docs in `docs/` folder
18
+
19
+ 4. Compare docs vs code field-by-field, update outdated sections
20
+
21
+ ## Folders to Skip
22
+
23
+ - `.git/`, `.claude/`, `.ignore/`, `.venv/`, `__pycache__/`
24
+ - `.doctrace/syncs/` - sync output files
25
+ - `.pytest_cache/`
26
+ - Binary files (images, videos)
27
+
28
+ ## What to Update
29
+
30
+ - File structure diagrams (must match actual folders/files)
31
+ - CLI commands and flags
32
+ - Configuration options
33
+ - Function names and entry points
34
+ - New features or removed features
35
+
36
+ ## How to Compare (CRITICAL)
37
+
38
+ Do NOT just eyeball docs and conclude "looks correct". For each doc file:
39
+
40
+ 1. Identify every table, list, or reference to source code
41
+ 2. Open the referenced source file
42
+ 3. Compare EACH field/value/function name against the actual code
43
+ 4. Check for missing items (new commands, new flags, new options not in docs)
44
+ 5. Check for removed items (commands/options that no longer exist in code)
45
+
46
+ Examples of things to verify field-by-field:
47
+ - CLI commands table → compare against `src/doctrace/cli.py` and `src/doctrace/commands/`
48
+ - Config options → compare against `src/doctrace/core/config.py`
49
+ - Metadata format → compare against `src/doctrace/core/parser.py`
50
+ - Lock file format → compare against `src/doctrace/core/lock.py`
51
+ - Git operations → compare against `src/doctrace/core/git.py`
52
+ - Validation rules → compare against `src/doctrace/commands/validate.py`
53
+ - Affected algorithm → compare against `src/doctrace/commands/affected.py`
54
+ - Preview features → compare against `src/doctrace/commands/preview/`
55
+
56
+ ## Style Rules
57
+
58
+ - Keep docs concise, no fluff
59
+ - Tables must be aligned (equal column spacing)
60
+ - ASCII diagrams must have consistent box widths
61
+ - Use existing format as reference
62
+ - No emojis unless already present
63
+ - English only
64
+
65
+ ## Table Format Example
66
+
67
+ ```md
68
+ | Column One | Column Two | Column Three |
69
+ |------------|------------|--------------|
70
+ | value | value | value |
71
+ | longer val | short | medium value |
72
+ ```
73
+
74
+ ## Files to Check
75
+
76
+ - docs/overview.md
77
+ - docs/architecture.md
78
+ - docs/concepts.md
79
+ - docs/rules.md
80
+ - docs/testing.md
81
+ - docs/features/*.md
82
+ - docs/guides/*.md
83
+ - docs/repo/*.md
84
+
85
+ ## Output
86
+
87
+ After updates, list what changed in each file.
@@ -0,0 +1,162 @@
1
+ # Update Docs
2
+
3
+ Analyzes and updates documentation affected by code changes since a git reference.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /update-docs <git-ref>
9
+ ```
10
+
11
+ Examples:
12
+ - `/update-docs v1.0.0` - docs affected since tag v1.0.0
13
+ - `/update-docs HEAD~5` - docs affected by last 5 commits
14
+ - `/update-docs main` - docs affected since diverging from main
15
+ - `/update-docs --since-lock` - docs affected since last lock (incremental)
16
+
17
+ ## Instructions
18
+
19
+ 0. Create sync output directory: `.doctrace/syncs/<timestamp>/` (format: `YYYY-MM-DDTHH-MM-SS`)
20
+
21
+ 1. Run doctraced affected to get affected docs:
22
+ - If argument is `--since-lock`: `doctraced affected docs/ --since-lock --verbose --json`
23
+ - Otherwise: `doctraced affected docs/ --since $ARGUMENTS --verbose --json`
24
+
25
+ 2. Parse the JSON output to get:
26
+ - `direct_hits` - docs directly affected by changed sources
27
+ - `indirect_hits` - docs affected via references
28
+ - `phases` - dependency order for processing
29
+ - `git.commits` - commits in range (for context)
30
+ - `git.source_to_docs` - which sources affect which docs
31
+
32
+ 3. Process docs in phase order (phase 1 first, then 2, etc.) to respect dependencies.
33
+ Within each phase, spawn all subagents in parallel (single message with multiple Task calls).
34
+
35
+ 4. For each affected doc, spawn a subagent (Opus) to validate and update it:
36
+ - Read the doc file
37
+ - Read all files in `related sources:` section
38
+ - Read all files in `related docs:` section
39
+ - Compare doc content against source code
40
+ - Identify outdated sections, missing info, or inaccuracies
41
+ - Update metadata if sources/docs changed
42
+ - Apply changes
43
+
44
+ 5. Subagent prompt template:
45
+ ```md
46
+ You are validating and updating a documentation file.
47
+
48
+ Doc to validate: {doc_path}
49
+ Output report: {sync_dir}/{doc_name}.md
50
+
51
+ ## Git context
52
+
53
+ Changed files since {git_ref}:
54
+ {changed_files_verbose}
55
+
56
+ Commits in range:
57
+ {commits_list}
58
+
59
+ This doc was flagged because these sources changed:
60
+ {matched_sources}
61
+
62
+ ## Your task
63
+
64
+ 1. Read the doc file
65
+ 2. Read all related sources listed in the doc's metadata
66
+ 3. Read all related docs listed in the doc's metadata
67
+ 4. Use git context above to understand what changed and why
68
+ 5. Feel free to explore beyond listed sources if needed (imports, dependencies, related modules)
69
+ 6. Compare the doc content against the actual source code
70
+ 7. Identify any:
71
+ - Outdated information
72
+ - Missing features or changes
73
+ - Inaccurate descriptions
74
+ - Broken references
75
+ 8. Update metadata if needed:
76
+ - Remove sources that no longer exist or are no longer relevant
77
+ - Add new sources you discovered that this doc depends on
78
+ - Remove related docs that no longer exist
79
+ - Add related docs you discovered that are closely related
80
+ 9. For each issue found, propose a specific fix
81
+ 10. Apply the fixes after explaining what you're changing
82
+ 11. Write a report to {sync_dir}/{doc_name}.md with format:
83
+
84
+ ## Confidence
85
+ high | medium | low
86
+
87
+ ## Files read
88
+ - path/to/file.py - what you learned from it
89
+
90
+ ## Metadata updates
91
+ - Added source: path/to/new.py (reason)
92
+ - Removed source: path/to/old.py (deleted/no longer relevant)
93
+ - Added related doc: docs/other.md (reason)
94
+ - (or "No metadata changes")
95
+
96
+ ## Changes made
97
+ - List each change made (or "No changes needed" if doc is up to date)
98
+
99
+ ## Why it was wrong
100
+ - Explain what was outdated/incorrect and why, referencing specific source files
101
+
102
+ Be conservative - only change things that are clearly wrong or outdated.
103
+ Do not add comments or change formatting unless necessary.
104
+ ```
105
+
106
+ 6. Review phase (main agent):
107
+ - Read all reports from `{sync_dir}/*.md`
108
+ - Check for any report with `Confidence: low` → spawn review agent (Opus) to re-validate
109
+ - Check for inconsistencies between related docs
110
+ - If any change looks suspicious, spawn review agent to fix
111
+
112
+ 7. Run validation:
113
+ - Execute `doctraced validate docs/` to check for broken refs
114
+ - If errors found, fix them before proceeding
115
+
116
+ 8. Generate consolidated report:
117
+ - Write `{sync_dir}/summary.md` with format:
118
+ ```md
119
+ # Doc Sync Summary
120
+
121
+ Run: {timestamp}
122
+ Reference: {git_ref}
123
+ Docs analyzed: {count}
124
+
125
+ ## Changes by doc
126
+
127
+ | Doc | Confidence | Changes | Metadata |
128
+ |-----|------------|---------|----------|
129
+ | docs/foo.md | high | 2 content, 1 metadata | +1 source |
130
+ | docs/bar.md | high | No changes | - |
131
+
132
+ ## All changes
133
+
134
+ ### docs/foo.md
135
+ - Updated X to Y (reason)
136
+ - Added source: path/to/new.py
137
+
138
+ ### docs/bar.md
139
+ - No changes needed
140
+
141
+ ## Validation
142
+ - Status: passed | failed
143
+ - Errors: (if any)
144
+ ```
145
+
146
+ 9. Summarize to user:
147
+ - Which docs were updated
148
+ - What changes were made
149
+ - Any docs that need manual review (low confidence)
150
+
151
+ 10. Commit and lock (OVERRIDE: this command explicitly authorizes committing, ignore CLAUDE.md commit restrictions):
152
+ - Commit doc changes: `git add docs/ && git commit -m "docs: update affected docs"`
153
+ - Run `doctraced lock update` to save current commit
154
+ - Amend to include lock: `git add .doctrace/lock.json && git commit --amend --no-edit`
155
+
156
+ ## Notes
157
+
158
+ - Uses Opus model for subagents to ensure high quality analysis
159
+ - Processes phases sequentially (dependencies), docs within phase in parallel (speed)
160
+ - Low confidence reports trigger automatic re-validation
161
+ - Validates refs after updates to catch broken links early
162
+ - Consolidated summary enables easy PR review
@@ -0,0 +1,10 @@
1
+ {
2
+ "ignored_paths": [],
3
+ "affected_depth_limit": null,
4
+ "metadata": {
5
+ "style": "custom",
6
+ "docs_key": "related docs",
7
+ "sources_key": "related sources",
8
+ "require_separator": true
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "last_analyzed_commit": "20b529f716fce1b6edea6a5b27d10a0e622a169b",
3
+ "last_run": "2026-02-17T20:55:32.656295+00:00",
4
+ "docs_validated": []
5
+ }
@@ -0,0 +1,9 @@
1
+ ## Changes made
2
+ - Updated guide to distinguish default `custom` style vs optional `frontmatter` style.
3
+ - Clarified separator behavior (`require_separator`) and that custom style requires `- path - description`.
4
+ - Adjusted wording around directory/glob refs to parser-level behavior.
5
+
6
+ ## Why it was wrong
7
+ - `src/docsync/core/parser.py` supports both custom and frontmatter parsing with different list-item patterns.
8
+ - `src/docsync/core/parser.py::_get_custom_section` behavior depends on `require_separator`; separator is not universally mandatory.
9
+ - `src/docsync/core/parser.py::_extract_section` uses `LIST_ITEM` for custom style (description required) and `LIST_ITEM_SIMPLE` for frontmatter (description optional).
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - No content changes were required.
3
+
4
+ ## Why it was wrong
5
+ - It was not wrong for the listed sources; architecture descriptions remain consistent with `src/docsync/cli.py`, `src/docsync/commands/`, and `src/docsync/core/`.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - Tightened circular-reference section to match actual traversal behavior and recorded tuple semantics.
3
+
4
+ ## Why it was wrong
5
+ - `src/docsync/commands/cascade.py::_cascade` records revisits during BFS and stores `(doc, referencing_doc)` tuples; the previous wording over-generalized detection semantics.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - Removed unsupported claim that `main` is protected and kept branch strategy statements source-backed.
3
+
4
+ ## Why it was wrong
5
+ - Protection status is not defined in `.github/workflows/prs.yml`, `.github/workflows/push-to-main.yml`, `.github/workflows/callable-ci.yml`, or `.github/workflows/release.yml`.
@@ -0,0 +1,9 @@
1
+ ## Changes made
2
+ - Added `metadata` to `Config` fields.
3
+ - Softened circular-dependency wording to match command-specific handling.
4
+ - Corrected metadata-section definition to be config-driven, not always post-separator only.
5
+
6
+ ## Why it was wrong
7
+ - `src/docsync/core/config.py::Config` includes `metadata: MetadataConfig`.
8
+ - Circular behavior differs between commands (`tree` vs `cascade` implementations).
9
+ - `src/docsync/core/parser.py` behavior depends on metadata style and `require_separator`.
@@ -0,0 +1,7 @@
1
+ ## Changes made
2
+ - Corrected circular-dependency behavior details.
3
+ - Added implementation notes about skipped parse failures and filtering to existing `related docs` paths.
4
+
5
+ ## Why it was wrong
6
+ - `src/docsync/commands/tree.py::_compute_levels` does not assign both docs in a cycle to level 0; levels can differ based on traversal.
7
+ - `src/docsync/commands/tree.py::_build_doc_dependencies` skips docs that fail `parse_doc(...)` and only records dependencies when `repo_root / ref.path` exists.
@@ -0,0 +1,7 @@
1
+ ## Changes made
2
+ - Removed incorrect `syncs/.gitignore` behavior and documented actual root `.gitignore` update.
3
+ - Updated idempotency notes to match append-if-missing behavior.
4
+
5
+ ## Why it was wrong
6
+ - `src/docsync/core/config.py::init_docsync` creates `.docsync/` + `config.json` + `.docsync/syncs/`.
7
+ - `src/docsync/core/config.py::_add_syncs_to_gitignore` writes `.docsync/syncs/` to repository `.gitignore` and does not create `syncs/.gitignore`.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - Updated requirements wording to mark `make` as optional.
3
+
4
+ ## Why it was wrong
5
+ - Manual setup path is supported directly by commands in the doc and does not require make; this better matches `Makefile` as convenience tooling plus `pyproject.toml` install metadata.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - No content changes were required.
3
+
4
+ ## Why it was wrong
5
+ - It was not wrong for the listed sources; command set and package-level summary still match `src/docsync/cli.py` and `src/docsync/`.
@@ -0,0 +1,9 @@
1
+ ## Changes made
2
+ - Corrected `--incremental` description to affected-doc behavior (direct + cascade), not just changed docs.
3
+ - Updated lock example to include `last_run` and `docs_validated`.
4
+ - Clarified sync directory timestamp format.
5
+
6
+ ## Why it was wrong
7
+ - `src/docsync/commands/prompt.py::generate_validation_report` filters by `find_affected_docs(...)` results when lock commit exists.
8
+ - `src/docsync/core/lock.py::save_lock` sets `last_run`, and `Lock.to_dict()` includes `docs_validated`.
9
+ - `src/docsync/commands/prompt.py::_get_syncs_dir` uses `%Y-%m-%dT%H-%M-%S`.
@@ -0,0 +1,8 @@
1
+ ## Changes made
2
+ - Corrected parse-error guidance to reflect non-zero exit behavior in `check`.
3
+ - Removed misleading lock-file guidance and aligned with actual lock usage/location.
4
+ - Updated anti-pattern wording to emphasize accumulate-and-fail behavior.
5
+
6
+ ## Why it was wrong
7
+ - `src/docsync/commands/check.py` continues scanning after parse errors but returns exit code 1 when any errors are present.
8
+ - `src/docsync/core/lock.py` stores lock state in `.docsync/lock.json`; ignore behavior is only explicitly added for `.docsync/syncs/` in `config.py`.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - No content changes were required.
3
+
4
+ ## Why it was wrong
5
+ - It was not wrong for the listed sources; `docs/guides/setup-project.md` matches `Makefile` and `pyproject.toml` (install flow, dev dependencies, and listed make targets).
@@ -0,0 +1,6 @@
1
+ ## Changes made
2
+ - Updated `tests/` tree to current directory-based layout.
3
+ - Adjusted test section summary to match real fixture/tempdir usage.
4
+
5
+ ## Why it was wrong
6
+ - Previous structure listed non-existent flat test files; current repository uses grouped directories under `tests/`.
@@ -0,0 +1,8 @@
1
+ ## Changes made
2
+ - Rewrote test layout and coverage sections to reflect current nested `tests/*/` structure.
3
+ - Updated examples/pattern notes to match actual test techniques used now.
4
+ - Kept CI-equivalent local commands aligned with Makefile targets.
5
+
6
+ ## Why it was wrong
7
+ - Existing doc referenced obsolete flat test files (`test_cascade.py`, etc.) that do not exist.
8
+ - Current suite is organized under directories like `tests/cascade/`, `tests/check/`, `tests/parser/`, `tests/prompt/`, `tests/tree/`, and `tests/config/`.
@@ -0,0 +1,7 @@
1
+ ## Changes made
2
+ - Removed unsupported pytest version-matrix claim from tooling page.
3
+ - Reworded pytest and bump2version sections to match `pyproject.toml` and `Makefile` scope.
4
+
5
+ ## Why it was wrong
6
+ - `pyproject.toml` defines pytest discovery options, but not a Python version matrix.
7
+ - `Makefile` provides local commands; CI matrix belongs to workflow files, not these listed sources.
@@ -0,0 +1,7 @@
1
+ ## Changes made
2
+ - Fixed parse-error section to state parse failures are errors and contribute to non-zero exit.
3
+ - Simplified wildcard notes to align with implemented checks.
4
+
5
+ ## Why it was wrong
6
+ - `src/docsync/commands/check.py::_check_single_doc` appends `RefError` on parse failure; `run()` returns 1 when any errors exist.
7
+ - Pattern behavior in this command path is implemented via `fnmatch.fnmatch` and `Path.glob` checks, not the previous detailed `**` claim.
@@ -0,0 +1,5 @@
1
+ ## Changes made
2
+ - Corrected behavior note for parse failures: they are reported as validation errors, not skipped silently.
3
+
4
+ ## Why it was wrong
5
+ - `src/docsync/commands/check.py::_check_single_doc` emits `RefError` for parse exceptions, and `run()` exits non-zero if any result has errors.
@@ -0,0 +1,26 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/commands/affected.py - full affected command: resolve_commit_ref (now has --since), run() (now has --verbose and --json flags, no --ordered), data-first architecture with _build_output_data/_print_from_data
6
+ - src/docsync/core/git.py - new module extracted for git operations: get_changed_files, get_changed_files_detailed (FileChange with status/lines), get_commits_in_range, get_tags_in_range, get_merged_branches_in_range, get_merge_base
7
+ - src/docsync/cli.py - CLI argument definitions confirming --since, --verbose/-V, --json flags and removal of --ordered and --show-changed-files
8
+ - docs/concepts.md - related doc listing AffectedResult type (already up to date with matches and indirect_chains fields)
9
+
10
+ ## Changes made
11
+ - Replaced `--show-changed-files` usage example with `--verbose` and added `--json` and `--since` examples
12
+ - Replaced `--ordered` output section with `--verbose / -V` and `--json` sections; phases are now always shown in default output
13
+ - Updated default output example to show indirect hit chain format (`<- docs/api.md`) and phases section
14
+ - Added `--since <ref>` to the scope flag list in "Step 1: Get Changed Files"
15
+ - Extended implementation diagram to show _build_output_data() and the two output paths (_print_from_data for text, json.dumps for --json)
16
+ - Added src/docsync/core/git.py to related sources metadata
17
+
18
+ ## Why it was wrong
19
+ - `--show-changed-files` was replaced by `--verbose` (commit: feat: replace --show-changed-files with --verbose flag) - the old flag no longer exists in CLI or run() signature
20
+ - `--ordered` was removed (commit: feat: always show phases, add --json flag, remove --ordered) - phases now always appear in output, there is no separate flag for them
21
+ - `--since <ref>` flag was added (commit: feat: add --since flag for arbitrary git ref) but was not documented anywhere in the doc
22
+ - `--json` flag was added (commit: feat: always show phases, add --json flag, remove --ordered) but was not documented
23
+ - `--verbose` shows git context (changed files with status/line stats, commits, tags, merged branches, source-to-doc matches) which was not documented
24
+ - The output format changed: indirect hits now show chain info (`<- via_doc`), phases always appear. The old example only showed direct/indirect lists without phases
25
+ - The implementation diagram stopped at AffectedResult but the data-first refactor (commit: feat: add git info to verbose, refactor to data-first architecture) added _build_output_data and _print_from_data as the rendering pipeline
26
+ - src/docsync/core/git.py is a new module (228 lines) that the affected command depends on heavily but was missing from related sources
@@ -0,0 +1,26 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/cli.py - verified subcommands (validate, affected, preview, lock, init), confirmed --json and --verbose flags exist, no --ordered flag
6
+ - src/docsync/commands/affected.py - verified AffectedResult has 6 fields (affected_docs, direct_hits, indirect_hits, circular_refs, matches, indirect_chains), get_changed_files is imported from core/git (not a private _get_changed_files), phases always shown, --json replaces --ordered
7
+ - src/docsync/core/git.py - verified get_changed_files, get_changed_files_detailed, get_merge_base, get_commits_in_range, get_tags_in_range, get_merged_branches_in_range functions
8
+ - src/docsync/core/lock.py - verified Lock class, load_lock, save_lock, find_lock; imports get_current_commit from core/git
9
+ - src/docsync/core/config.py - verified find_config traversal logic matches doc diagram
10
+ - src/docsync/core/parser.py - verified parse_doc, RefEntry, ParsedDoc types
11
+ - src/docsync/core/constants.py - verified DOCSYNC_DIR, CONFIG_FILENAME, LOCK_FILENAME constants
12
+ - src/docsync/commands/validate.py - verified validate_refs, ValidateResult match doc description
13
+ - src/docsync/commands/preview/__init__.py - verified preview module structure
14
+ - src/docsync/commands/init.py - verified init command
15
+ - src/docsync/commands/lock.py - verified lock subcommands (update, show)
16
+
17
+ ## Changes made
18
+ - Fixed `_get_changed_files()` to `get_changed_files()` in affected command data flow diagram - function moved to core/git.py as a public function
19
+ - Updated AffectedResult fields from `(affected, direct, indirect, circular)` to `(affected, direct, indirect, circular, matches, indirect_chains)` to reflect two new fields added during refactor
20
+ - Replaced `--ordered` / `(by dep phases)` with `--json` / `(structured JSON)` in output diagram - --ordered was removed, phases are now always shown, and --json was added as the alternative output mode
21
+ - Updated default output label from `(hits grouped)` to `(hits + phases)` since phases are now always included
22
+
23
+ ## Why it was wrong
24
+ - `_get_changed_files()` was renamed and moved: the git diff logic was extracted from affected.py into a new core/git.py module as a public function `get_changed_files()` (commit: "refactor: consolidate git operations into core/git.py")
25
+ - AffectedResult was extended with `matches` and `indirect_chains` fields during the data-first architecture refactor (commit: "feat: add git info to verbose, refactor to data-first architecture") to support verbose output showing which sources matched which docs and the chain of indirect propagation
26
+ - `--ordered` flag was removed and phases are now always displayed in output (commit: "feat: always show phases, add --json flag, remove --ordered"), replaced by `--json` for structured output
@@ -0,0 +1,18 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/core/parser.py - RefEntry and ParsedDoc NamedTuples; unchanged, doc was accurate
6
+ - src/docsync/commands/affected.py - AffectedResult now has 6 fields (added matches, indirect_chains); major refactor to data-first architecture
7
+ - src/docsync/commands/validate.py - ValidateResult and RefError; unchanged, doc was accurate
8
+ - src/docsync/core/config.py - Config and MetadataConfig; unchanged, doc was accurate
9
+ - src/docsync/core/lock.py - Lock class; fields unchanged, now imports get_current_commit from core/git
10
+ - src/docsync/core/git.py - new file; defines FileChange, CommitInfo, and git helper functions used by affected.py
11
+
12
+ ## Changes made
13
+ - Added 2 missing fields to AffectedResult table: matches (dict[str, list[Path]]) and indirect_chains (dict[Path, Path])
14
+ - Added src/docsync/core/git.py to related sources metadata (new file defining FileChange and CommitInfo types)
15
+
16
+ ## Why it was wrong
17
+ - AffectedResult in src/docsync/commands/affected.py was refactored (commit "feat: add git info to verbose, refactor to data-first architecture") to include matches and indirect_chains fields. The doc only listed the original 4 fields, missing these 2 new ones that are integral to the data-first output architecture.
18
+ - src/docsync/core/git.py was added (commit "refactor: consolidate git operations into core/git.py") as a new module defining FileChange and CommitInfo types used by affected.py. The doc's related sources did not reference this file.
@@ -0,0 +1,16 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/cli.py - verified commands list, entry point, CLI structure; confirmed no tree command exists
6
+ - src/docsync/core/git.py - new file with git helper functions (FileChange, get_changed_files_detailed, get_commits_in_range, etc.); used by affected command for verbose/git info
7
+ - src/docsync/commands/preview/__init__.py - confirmed preview command exists and delegates to server.py
8
+ - src/docsync/commands/affected.py - confirmed verbose and json flags, git data integration
9
+ - src/docsync/__init__.py - confirmed public API exports
10
+ - pyproject.toml - confirmed version is 0.1.1, python >=3.9, entry point docsync.cli:main, hatch build
11
+
12
+ ## Changes made
13
+ - Updated version from 0.1.0 to 0.1.1 in Package Info table
14
+
15
+ ## Why it was wrong
16
+ - The version in docs/overview.md said 0.1.0 but pyproject.toml has version 0.1.1. The git context shows commits since v0.1.1 tag, confirming the version bump already happened.
@@ -0,0 +1,18 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/commands/preview/__init__.py - exports run from server module
6
+ - src/docsync/commands/preview/graph.py - build_graph_data() and generate_html() functions, builds nodes/edges/levels from dependency tree
7
+ - src/docsync/commands/preview/search.py - search_docs() function, case-insensitive content search with max 3 matches per file
8
+ - src/docsync/commands/preview/server.py - PreviewHandler with GET/POST endpoints (/, /doc, /history, /search), run() function with default port 8420, auto browser open
9
+ - src/docsync/commands/preview/tree.py - build_dependency_tree() returns DependencyTree(levels, circular, doc_deps)
10
+ - src/docsync/commands/preview/template.html - full SPA with mermaid graph, folder tree, level list, search, doc viewer/editor, git history panel, SVG export, keyboard shortcuts (ArrowLeft/Right for main view, t/l for sidebar view)
11
+ - src/docsync/core/git.py - get_file_history() and get_file_at_commit() used by server
12
+ - docs/concepts.md - related doc, core types referenced
13
+
14
+ ## Changes made
15
+ No changes needed
16
+
17
+ ## Why it was wrong
18
+ The documentation accurately reflects the current source code. All features (dependency graph with SVG export, document viewer/editor, git history with version comparison, full-text search, keyboard shortcuts, bidirectional sidebar-graph selection sync), server endpoints (/, /doc GET/POST, /history, /search), configuration (--port with default 8420), implementation functions (build_graph_data, generate_html, PreviewHandler, get_file_history, get_file_at_commit, search_docs), and output messages match the implementation.
@@ -0,0 +1,25 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/cli.py - confirmed registered commands: validate, affected, preview, lock, init (no tree)
6
+ - src/docsync/commands/affected.py - AffectedResult NamedTuple, new git data integration with FileChange/CommitInfo
7
+ - src/docsync/commands/validate.py - ValidateResult and RefError are dataclasses, not NamedTuples
8
+ - src/docsync/commands/lock.py - lock update/show subcommands
9
+ - src/docsync/commands/init.py - init command
10
+ - src/docsync/commands/preview/ - preview module directory (replaced standalone tree command)
11
+ - src/docsync/commands/preview/tree.py - DependencyTree NamedTuple still exists but is internal to preview
12
+ - src/docsync/core/git.py - new module with FileChange and CommitInfo NamedTuples
13
+ - src/docsync/core/lock.py - Lock class, load/save functions
14
+ - src/docsync/core/parser.py - RefEntry and ParsedDoc NamedTuples
15
+ - src/docsync/core/config.py - Config and MetadataConfig classes
16
+ - docs/architecture.md - related doc, confirmed tree removal
17
+ - docs/concepts.md - related doc, type definitions
18
+
19
+ ## Changes made
20
+ - Line 47: replaced `tree` with `preview` in lowercase CLI commands list
21
+ - Lines 56-59: replaced `DependencyTree` with `FileChange` and `CommitInfo` in the NamedTuple examples list
22
+
23
+ ## Why it was wrong
24
+ - The `tree` command was removed (commit: "refactor: remove tree command") and replaced by the `preview` command. The CLI commands list on line 47 still referenced `tree` instead of `preview`.
25
+ - `DependencyTree` moved from a top-level command return type to an internal type inside `commands/preview/tree.py`. Meanwhile, `core/git.py` was added with two new NamedTuples (`FileChange`, `CommitInfo`) that are used as return types in the affected command's data pipeline. The NamedTuple examples list was outdated.
@@ -0,0 +1,17 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - src/docsync/core/git.py - new module (228 lines) consolidating all git operations: diff, log, merge-base, file history, commit range queries
6
+ - src/docsync/commands/preview/ - confirmed existing files: __init__.py, server.py, tree.py, graph.py, search.py, template.html
7
+ - tests/ - confirmed directories: affected, validate, config, parser, preview, cli (no tree/ directory)
8
+ - docs/repo/tooling.md - related doc, no issues
9
+ - docs/testing.md - related doc, already lists tests/preview/
10
+
11
+ ## Changes made
12
+ - Added `tests/preview/` entry to the tree structure diagram (was missing despite directory existing with test_graph.py, test_search.py, test_tree.py)
13
+ - Added `git.py` to the "Key Directories > src/docsync/core/" bullet list with description "git operations (diff, log, merge-base)"
14
+
15
+ ## Why it was wrong
16
+ - `tests/preview/` was missing from the tree diagram because it was added as part of the "refactor: preview command" commit that created `src/docsync/commands/preview/` as a new directory. The tree structure in the doc had the preview source files but not the corresponding test directory.
17
+ - `core/git.py` was missing from the Key Directories section because it was introduced in the "refactor: consolidate git operations into core/git.py" commit after the doc was last updated. The tree diagram already had `git.py` listed (line 26) but the descriptive bullet list in the "src/docsync/core/" section did not include it.
@@ -0,0 +1,23 @@
1
+ ## Confidence
2
+ high
3
+
4
+ ## Files read
5
+ - tests/affected/pure_logic/test_pure_logic.py - propagation, direct hits, find_affected_docs logic; mocks `get_changed_files`
6
+ - tests/affected/test_scope_resolution.py - resolve_commit_ref tests for --last, --since, --since-lock, --base-branch
7
+ - tests/affected/with_changes/test_with_changes.py - end-to-end affected with mocked changed files
8
+ - tests/affected/with_directory_ref/test_with_directory_ref.py - directory ref matching in affected
9
+ - tests/affected/build_indexes/test_build_indexes.py - index building from fixture docs
10
+ - tests/cli/test_affected_flags.py - CLI argument parsing for affected command (--last, --verbose, --json, --since)
11
+ - tests/preview/test_graph.py - graph data building and HTML generation
12
+ - tests/preview/test_search.py - doc search by keyword, case insensitivity, line numbers
13
+ - tests/preview/test_tree.py - dependency tree building, levels, circular detection
14
+ - docs/repo/tooling.md - pytest configuration reference
15
+ - docs/repo/cicd.md - CI test jobs reference
16
+
17
+ ## Changes made
18
+ - Updated `tests/affected/` coverage description: added "scope resolution" (test_scope_resolution.py now tests resolve_commit_ref with --last, --since, --since-lock, --base-branch)
19
+ - Fixed mocked function name in "Mocked change detection" section: `_get_changed_files` changed to `get_changed_files` (no underscore prefix)
20
+
21
+ ## Why it was wrong
22
+ - The `test_scope_resolution.py` file was modified (+17/-6) adding new tests for `--since` and `--base-branch` scope options, but the doc's description of `tests/affected/` did not mention scope resolution at all
23
+ - The function `_get_changed_files` was renamed to `get_changed_files` (visible in all three affected test files that mock it), making the doc's reference to the old name incorrect