beyond-local-file 0.2.2__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.
- beyond_local_file-0.2.2/.gitignore +21 -0
- beyond_local_file-0.2.2/.kiro/hooks/code-review.kiro.hook +13 -0
- beyond_local_file-0.2.2/.kiro/hooks/prepare-release.kiro.hook +13 -0
- beyond_local_file-0.2.2/.kiro/steering/architecture.md +116 -0
- beyond_local_file-0.2.2/.kiro/steering/docstrings.md +55 -0
- beyond_local_file-0.2.2/.kiro/steering/local_file_structure.md +324 -0
- beyond_local_file-0.2.2/.kiro/steering/project_rules.md +40 -0
- beyond_local_file-0.2.2/.kiro/steering/reference_docs.md +270 -0
- beyond_local_file-0.2.2/.pre-commit-config.yaml +9 -0
- beyond_local_file-0.2.2/.python-version +1 -0
- beyond_local_file-0.2.2/CHANGELOG.md +92 -0
- beyond_local_file-0.2.2/LICENSE +21 -0
- beyond_local_file-0.2.2/PKG-INFO +297 -0
- beyond_local_file-0.2.2/README.md +269 -0
- beyond_local_file-0.2.2/demo/README.md +160 -0
- beyond_local_file-0.2.2/demo/demo.gif +0 -0
- beyond_local_file-0.2.2/demo/demo.tape +108 -0
- beyond_local_file-0.2.2/demo/optimize-gif.sh +61 -0
- beyond_local_file-0.2.2/demo/setup-demo.sh +66 -0
- beyond_local_file-0.2.2/demo/test-commands.sh +71 -0
- beyond_local_file-0.2.2/docs/README.md +99 -0
- beyond_local_file-0.2.2/docs/alternatives-comparison.md +402 -0
- beyond_local_file-0.2.2/docs/assets/banner-960x540.png +0 -0
- beyond_local_file-0.2.2/docs/cli-reference.md +385 -0
- beyond_local_file-0.2.2/docs/config-format-clarification.md +145 -0
- beyond_local_file-0.2.2/docs/configuration-reference.md +538 -0
- beyond_local_file-0.2.2/docs/design-divide-and-conquer.md +623 -0
- beyond_local_file-0.2.2/docs/design-model-separation.md +619 -0
- beyond_local_file-0.2.2/docs/design-overview.md +269 -0
- beyond_local_file-0.2.2/docs/development.md +346 -0
- beyond_local_file-0.2.2/docs/platform-support.md +151 -0
- beyond_local_file-0.2.2/docs/windows-support.md +242 -0
- beyond_local_file-0.2.2/local-file/agentic/specs/initiative-definition-spec.md +430 -0
- beyond_local_file-0.2.2/local-file/agentic/specs/task-definition-spec.md +499 -0
- beyond_local_file-0.2.2/local-file/initiatives/README.md +32 -0
- beyond_local_file-0.2.2/local-file/initiatives/platform-resilience.md +117 -0
- beyond_local_file-0.2.2/local-file/initiatives/share-and-impact.md +244 -0
- beyond_local_file-0.2.2/local-file/tasks/auto-review/README.md +64 -0
- beyond_local_file-0.2.2/local-file/tasks/auto-review/index.md +15 -0
- beyond_local_file-0.2.2/local-file/tasks/auto-review/simple_advices.md +46 -0
- beyond_local_file-0.2.2/local-file/tasks/index.md +33 -0
- beyond_local_file-0.2.2/local-file/tasks/manual/README.md +75 -0
- beyond_local_file-0.2.2/local-file/tasks/manual/add-blfrc-config-support.md +44 -0
- beyond_local_file-0.2.2/local-file/tasks/manual/add-cli-completion-for-project-names.md +44 -0
- beyond_local_file-0.2.2/local-file/tasks/manual/implement-reverse-link-command.md +77 -0
- beyond_local_file-0.2.2/local-file/tasks/manual/index.md +16 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/README.md +57 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/CHANGELOG.md +36 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/fix-config-path-resolution-with-uv-run.md +52 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/make-config-global-option.md +60 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/optimize-overwrite-prompt.md +36 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/readme-alias-recommendation.md +25 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/refactor-manager-responsibilities.md +135 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/single-file-copy-to-target.md +52 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/subpath-symlink-mapping.md +92 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/table-format-output.md +68 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/update-demo-tape.md +38 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/update-dev-installation-docs.md +50 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/tasks/manual/update-doc-file-copy-feature.md +66 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260326-18-codebase-structure-for-copy-feature.md +521 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260327-09-refactor-manager-protocol-plan.md +715 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260401-22-test-coverage-analysis.md +477 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260401-23-test-reorganization-plan.md +643 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260402-22-phase-2-alignment-review.md +328 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260402-23-partition-strategy-implementation.md +332 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260402-23-unified-result-types-refactoring.md +443 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260403-00-config-docs-reorganization.md +146 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260403-00-reference-docs-reorganization.md +210 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/analysis/20260403-01-command-rename-symlink-to-link.md +155 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/drafts/20260326-18-single-file-copy-proposal.md +299 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/drafts/20260402-23-architecture-refactoring-comparison.md +775 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260402-00-phase1-completion-summary.md +180 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260402-22-phase-2-completion-summary.md +126 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260402-22-phase-2-final-completion.md +410 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260402-23-documentation-reorganization-summary.md +150 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260403-01-phase2-completion-summary.md +138 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.0/worklog/summaries/20260404-00-task-tracking-system-complete-redesign.md +261 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/CHANGELOG.md +19 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/add-bnf-config-specification.md +89 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/fix-config-option-placement.md +56 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/fix-inconsistent-project-numbering-suffix.md +48 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/fix-mixed-configuration-support.md +38 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/improve-config-reference-clarity.md +70 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/tasks/manual/update-cli-reference-for-v0.2.0.md +31 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/worklog/summaries/20260404-18-fix-mixed-configuration-support.md +62 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/worklog/summaries/20260404-19-add-bnf-config-specification.md +57 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.1/worklog/summaries/20260404-19-improve-configuration-reference-clarity.md +46 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/CHANGELOG.md +41 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/add-progress-tracking-and-link-sync-formatter.md +149 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/add-version-option.md +49 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/add-why-not-alternatives-section.md +67 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/enhance-readme-with-usage-examples.md +35 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/extend-link-sync-formatter-for-copy-strategy.md +159 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/fix-symlink-check-source-verification.md +85 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/migrate-check-operations-to-unified-protocol.md +303 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/migrate-table-formatter-to-unified-protocol.md +447 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/refactor-config-and-processing-models.md +408 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/remove-legacy-manager-methods.md +259 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/remove-legacy-result-types.md +197 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/remove-legacy-symlink-subcommand.md +61 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/tasks/manual/update-docs-for-unified-protocol.md +210 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/analysis/20260405-06-unified-protocol-migration-infeasibility.md +264 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/analysis/20260410-14-unified-protocol-remaining-work.md +227 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/drafts/20260426-18-stow-comparison-draft.md +144 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260412-01-unified-protocol-docs-complete.md +87 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260412-23-initiatives-directory-structure.md +48 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260413-00-initiative-definition-spec.md +80 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260421-14-version-option-implementation.md +60 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260426-18-alternatives-comparison-added.md +96 -0
- beyond_local_file-0.2.2/local-file/tasks/releases/v0.2.2/worklog/summaries/20260426-18-windows-testing-status-clarified.md +150 -0
- beyond_local_file-0.2.2/pyproject.toml +88 -0
- beyond_local_file-0.2.2/scripts/remove_kiro_validates.py +398 -0
- beyond_local_file-0.2.2/src/beyond_local_file/__init__.py +16 -0
- beyond_local_file-0.2.2/src/beyond_local_file/cli.py +165 -0
- beyond_local_file-0.2.2/src/beyond_local_file/config.py +254 -0
- beyond_local_file-0.2.2/src/beyond_local_file/copy_manager.py +287 -0
- beyond_local_file-0.2.2/src/beyond_local_file/formatters.py +530 -0
- beyond_local_file-0.2.2/src/beyond_local_file/git_manager.py +91 -0
- beyond_local_file-0.2.2/src/beyond_local_file/link_strategy_protocol.py +248 -0
- beyond_local_file-0.2.2/src/beyond_local_file/model/__init__.py +21 -0
- beyond_local_file-0.2.2/src/beyond_local_file/model/config.py +87 -0
- beyond_local_file-0.2.2/src/beyond_local_file/model/processing.py +71 -0
- beyond_local_file-0.2.2/src/beyond_local_file/model/translator.py +217 -0
- beyond_local_file-0.2.2/src/beyond_local_file/options.py +51 -0
- beyond_local_file-0.2.2/src/beyond_local_file/project_processor.py +350 -0
- beyond_local_file-0.2.2/src/beyond_local_file/symlink_manager.py +248 -0
- beyond_local_file-0.2.2/src/beyond_local_file/sync_state.py +168 -0
- beyond_local_file-0.2.2/tests/conftest.py +84 -0
- beyond_local_file-0.2.2/tests/integration/test_enhanced_prompt.py +240 -0
- beyond_local_file-0.2.2/tests/property/__init__.py +5 -0
- beyond_local_file-0.2.2/tests/property/test_infrastructure.py +22 -0
- beyond_local_file-0.2.2/tests/property/test_path_resolution.py +366 -0
- beyond_local_file-0.2.2/tests/unit/test_backward_compatibility.py +333 -0
- beyond_local_file-0.2.2/tests/unit/test_cli_commands.py +138 -0
- beyond_local_file-0.2.2/tests/unit/test_link_strategy_protocol.py +208 -0
- beyond_local_file-0.2.2/tests/unit/test_metadata.py +112 -0
- beyond_local_file-0.2.2/tests/unit/test_model_translator.py +401 -0
- beyond_local_file-0.2.2/tests/unit/test_operations.py +269 -0
- beyond_local_file-0.2.2/tests/unit/test_package_structure.py +133 -0
- beyond_local_file-0.2.2/tests/unit/test_symlink_manager.py +350 -0
- beyond_local_file-0.2.2/uv.lock +323 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
.vscode/
|
|
3
|
+
|
|
4
|
+
# Agentic
|
|
5
|
+
/.qoder/specs/
|
|
6
|
+
/.trae/documents/
|
|
7
|
+
|
|
8
|
+
# Python
|
|
9
|
+
__pycache__/
|
|
10
|
+
.venv/
|
|
11
|
+
.hypothesis/
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
dist/
|
|
15
|
+
|
|
16
|
+
# Demo workspace (temporary, regenerated by setup script)
|
|
17
|
+
/demo-workspace/
|
|
18
|
+
|
|
19
|
+
# Demo recordings (keep only the final optimized GIF)
|
|
20
|
+
/demo/*.cast
|
|
21
|
+
/demo/*-unoptimized.gif
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"enabled": true,
|
|
3
|
+
"name": "Code Review",
|
|
4
|
+
"description": "Runs a thorough code review of changed files in src/beyond_local_file/ using the project's review checklist covering architecture, code quality, docstrings, type annotations, Ruff compliance, correctness, tests, and language.",
|
|
5
|
+
"version": "1",
|
|
6
|
+
"when": {
|
|
7
|
+
"type": "userTriggered"
|
|
8
|
+
},
|
|
9
|
+
"then": {
|
|
10
|
+
"type": "askAgent",
|
|
11
|
+
"prompt": "You are a senior Python engineer performing a thorough code review for the `beyond-local-file` project — a CLI tool (Click + Rich) that manages symlinks and Git excludes for local development files across multiple projects.\n\n## Project Context\n\n**Stack:** Python 3.13+, Click 8, Rich 14, PyYAML 6, uv (exclusive package manager), Ruff (linter + formatter), pytest + Hypothesis (tests).\n\n**Architecture:** The project follows a divide-and-conquer strategy with protocol-based composition:\n- **Operations** (SyncOperation, CheckOperation) partition items by strategy and coordinate managers\n- **Managers** (SymlinkManager, CopyManager) implement LinkStrategyManager protocol\n- **Result Types** use composition for strategy-specific details (LinkCreateResult, LinkCheckResult)\n- Operations are responsible for partitioning; managers receive pre-filtered items\n- See `docs/architecture-design.md` for complete architecture documentation\n\n## Review Checklist\n\nReview ALL changed files in `src/beyond_local_file/` against each category below. Be precise: quote the problematic code, state the rule violated, and give a concrete fix.\n\n### 1. Architecture & Responsibility\n- Does each module respect its single responsibility?\n- Are new CLI commands implemented as `CmdOperation` subclasses in `project_processor.py`?\n- Are all fixed option values defined as `StrEnum` in `options.py`? No magic strings elsewhere.\n- Are raw Click strings coerced back to enums at the CLI boundary?\n- Is output formatting decoupled from operations via dedicated formatter classes?\n- Do operations partition items by strategy before delegating to managers?\n- Do managers receive pre-filtered items (not the entire project)?\n- Are result types using composition for strategy-specific details?\n\n### 2. Code Quality & Design\n- Does every function/class follow the single-responsibility principle?\n- Are there deep nesting levels (>3) that should be refactored?\n- Are there any magic values, hardcoded strings, or unexplained constants?\n- Are changes minimal, safe, and behavior-preserving (Martin Fowler refactoring principles)?\n- Is there any unnecessary complexity?\n\n### 3. Docstrings (Google Style)\n- Does every public class, method, function, and module have a complete Google-style docstring?\n- Do docstrings describe behavior from the caller's perspective?\n- Are `Args:`, `Returns:`, and `Raises:` sections present and accurate?\n- For Click commands: is the docstring clean — summary + optional description only, NO `Args:` section?\n- Are there any stale or misleading docstrings?\n\n### 4. Type Annotations\n- Are all function signatures fully annotated?\n- Are `noqa` suppressions present where Click injects args at runtime?\n- Are modern Python 3.13+ union types used?\n- Are `None`-returning procedures explicitly annotated `-> None`?\n\n### 5. Ruff Compliance\n- Would any changed code trigger violations under: `E`, `W`, `F`, `I`, `UP`, `B`, `SIM`, `ANN`, `PL`, `RUF`?\n- Are lines within the 120-character limit?\n- Are imports sorted?\n- Do all `noqa` suppressions include an explanatory comment?\n\n### 6. Correctness & Edge Cases\n- Are symlink path resolutions always absolute?\n- Are config paths resolved relative to the config file's directory?\n- Are target paths resolved relative to CWD?\n- Are missing files, broken symlinks, and non-existent target directories handled gracefully?\n- Is `.git/info/exclude` read/written safely?\n\n### 7. Tests\n- Is there a corresponding test for every new function or behavior change?\n- Do tests cover edge cases?\n- Is test coverage maintained above 80%?\n\n### 8. Language\n- Are all docstrings, inline comments, and docs written in English?\n- Do inline comments explain *why*, not *what*?\n\n### 9. Documentation Gap Analysis\n- Check if changes affect behavior, CLI options, or configuration that should be reflected in:\n - `README.md` (project root)\n - `docs/` directory\n - `.kiro/steering/` files (project rules, steering docs)\n- **New-feature rule:** Determine whether the changes introduce a new feature (new CLI command, new option, new config key, new behavior). If yes, missing documentation for that feature in the appropriate docs and/or steering files is a 🔴 **Must Fix** — without it the feature is effectively invisible.\n- Flag any changed options or modified behavior that lack corresponding documentation updates.\n- Flag any steering files that should be updated to reflect new patterns or conventions introduced by the changes.\n- **Documentation gap detection criteria:**\n 1. **New patterns/conventions:** Changes introduce new coding patterns, architectural conventions, configuration approaches, or tool usage not covered in existing docs\n - Example: New annotation usage, new middleware integration, new exception handling pattern\n 2. **Implicit rules made explicit:** Changes reflect existing but undocumented team conventions\n - Example: Field naming conventions, configuration patterns, scenario-specific handling practices\n 3. **Lessons learned:** Changes fix a common mistake worth documenting to prevent others from repeating it\n - Example: Non-intuitive API behavior, hidden configuration dependencies\n 4. **Steering rule gaps:** Changes involve scenarios not covered in `.kiro/steering/`, potentially causing AI-assisted coding to generate non-compliant code\n 5. **Integration guide gaps or staleness:** Changes affect APIs (add/modify/delete endpoints) but `docs/` lacks corresponding integration guides, or existing guides are inconsistent with implementation\n\nFor each documentation gap found, provide:\n- **Content summary:** One-sentence description of what needs to be added\n- **Target file:** Specific file path (docs/xx.md or .kiro/steering/xx.md)\n- **Rationale:** Why current docs are insufficient and what value the addition provides\n\nIf no documentation gaps are found, state \"No documentation gaps found\" — do not force findings.\n\n## Action Rules\n\n### 🔴 Must Fix — Auto-fix loop\nFor every Must Fix issue you find:\n1. Fix the code yourself immediately.\n2. After fixing, re-run the relevant checklist checks on the changed files.\n3. Repeat until zero Must Fix issues remain.\n4. Report what you fixed and the final state.\n\n### 🟡 Should Fix / 🔵 Consider — Log to simple_advices.md\nFor Should Fix and Consider issues that can be clearly stated in one sentence:\n1. Append each issue to `local-file/tasks/auto-review/simple_advices.md` as a checklist item.\n2. Use this format per entry:\n ```\n - [ ] **[🟡/🔵] <short title>** — `<file>:<line>` — <one-line description of the issue and suggested fix>\n ```\n3. Group entries under a date heading (`## YYYY-MM-DD`) so the file serves as a running log.\n\nFor complex findings requiring detailed description, impact analysis, or multiple solutions:\n1. Create a detailed task file in `local-file/tasks/auto-review/` following the standard task format\n2. Add it to `local-file/tasks/auto-review/index.md`\n\n## Output Format\n\nUse this structure:\n```\n## Code Review Summary\n**Files reviewed:** <list>\n**Overall assessment:** ✅ Approved / ⚠️ Approved with comments / ❌ Changes required\n\n## 🔴 Must Fix (auto-fixed)\nList each issue you found and how you fixed it. If none, state \"No must-fix issues found.\"\n\n## 🟡 Should Fix / 🔵 Consider\nList issues appended to `simple_advices.md` or created as detailed tasks. If none, state \"No advisory issues found.\"\n\n## Documentation Gaps\nList any documentation that needs updating in README.md, docs/, or .kiro/steering/ to reflect the changes. If none, state \"No documentation gaps found.\"\n\n## What's Done Well\n```\n\n## Recommended Commit Message\n\nIf the overall assessment is ✅ Approved or ⚠️ Approved with comments, generate a recommended git commit message following Conventional Commits format:\n- Use appropriate type: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, etc.\n- Include a concise scope in parentheses when relevant (e.g., `feat(cli)`, `fix(symlink)`)\n- Write a clear, imperative subject line (max 72 chars)\n- Add a body with bullet points summarizing key changes if needed\n- Example:\n```\nfeat(cli): add dry-run mode for sync command\n\n- Add --dry-run flag to sync command\n- Display planned actions without executing\n- Update help text and docstrings\n```\n\nIf the assessment is ❌ Changes required (Must Fix issues could not be auto-resolved), skip the commit message and state \"Resolve remaining 🔴 Must Fix issues before committing.\"\n\nBe direct, precise, and constructive. Quote actual code. Focus on substance over style nits unless they violate a hard project rule."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"enabled": true,
|
|
3
|
+
"name": "Prepare Release",
|
|
4
|
+
"description": "Archives completed tasks, generates CHANGELOG entries, and cleans up task indices for the next release",
|
|
5
|
+
"version": "1",
|
|
6
|
+
"when": {
|
|
7
|
+
"type": "userTriggered"
|
|
8
|
+
},
|
|
9
|
+
"then": {
|
|
10
|
+
"type": "askAgent",
|
|
11
|
+
"prompt": "You are preparing a new release for the `beyond-local-file` project. Follow these steps:\n\n## Step 1: Determine Release Version\n\n1. Get the latest git tag: `git describe --tags --abbrev=0`\n2. Ask the user what the next version number should be (e.g., v0.2.0)\n3. Store this as `NEW_VERSION`\n4. Get the date of the last release tag: `git log -1 --format=%ai [last-tag]`\n5. Store this as `LAST_RELEASE_DATE`\n\n## Step 2: Validate All Tests Pass\n\n1. Run the full test suite: `uv run pytest`\n2. If any tests fail:\n - Report the failures to the user\n - STOP the release preparation process immediately\n - Inform the user they must fix all test failures before proceeding with the release\n - Do NOT continue to subsequent steps\n3. Only continue to Step 3 if all tests pass successfully\n\n## Step 3: Identify Completed Tasks\n\n1. Read `local-file/tasks/manual/index.md`\n2. Extract all lines marked with `[x]` (completed tasks)\n3. For each completed task:\n - Extract the task file name from the markdown link\n - Read the full task file from `local-file/tasks/manual/[task-name].md`\n - Extract from the header: Category, Description\n - Extract from sections: Motivation, Expected Behavior\n - Use these to write clear, user-facing changelog entries\n\n## Step 4: Identify Agentic Worklog Files to Archive\n\n1. Find all timestamped files in `local-file/agentic/analysis/`, `local-file/agentic/drafts/`, and `local-file/agentic/summaries/`\n2. For each file with `YYYYMMDD-HH-` prefix:\n - Parse the timestamp from the filename\n - If the timestamp is >= `LAST_RELEASE_DATE` and < current date, mark for archival\n3. Store the list of files to archive\n\n## Step 5: Generate CHANGELOG\n\nCreate `local-file/tasks/releases/${NEW_VERSION}/CHANGELOG.md` with this structure:\n\n```markdown\n# Release ${NEW_VERSION}\n\nRelease Date: [YYYY-MM-DD]\n\n## Features\n- [Feature title] — Brief description from task\n\n## Bug Fixes\n- [Bug title] — Brief description from task\n\n## Usability\n- [Usability improvement] — Brief description from task\n\n## Documentation\n- [Doc update] — Brief description from task\n\n## Code Quality\n- [Refactoring] — Brief description from task\n```\n\nOnly include categories that have completed tasks. Use the task descriptions and motivation to write clear, user-facing changelog entries.\n\n## Step 6: Archive Completed Tasks\n\n1. Create directories:\n - `local-file/tasks/releases/${NEW_VERSION}/tasks/manual/`\n - `local-file/tasks/releases/${NEW_VERSION}/tasks/auto-review/` (if needed)\n2. For each completed manual task file:\n - Copy the file from `local-file/tasks/manual/[task-name].md` to `local-file/tasks/releases/${NEW_VERSION}/tasks/manual/[task-name].md`\n - Delete the original from `local-file/tasks/manual/`\n3. For each completed auto-review detailed task (if any):\n - Copy the file from `local-file/tasks/auto-review/[task-name].md` to `local-file/tasks/releases/${NEW_VERSION}/tasks/auto-review/[task-name].md`\n - Delete the original from `local-file/tasks/auto-review/`\n\n## Step 7: Archive Agentic Worklog Files\n\n1. Create directories:\n - `local-file/tasks/releases/${NEW_VERSION}/worklog/analysis/`\n - `local-file/tasks/releases/${NEW_VERSION}/worklog/drafts/`\n - `local-file/tasks/releases/${NEW_VERSION}/worklog/summaries/`\n2. For each agentic file marked for archival:\n - Move the file from its current location to the corresponding worklog directory\n - Preserve the filename (including timestamp prefix)\n3. This keeps the working agentic directories clean for the next development cycle\n\n## Step 8: Update Task Indices\n\n1. Update `local-file/tasks/manual/index.md`:\n - Remove all lines marked with `[x]` (completed tasks)\n - Keep only uncompleted tasks `[ ]`\n - Preserve category structure\n\n2. Update `local-file/tasks/index.md`:\n - Add a link to the new release under \"Archived Releases\" section:\n ```markdown\n - [${NEW_VERSION}](./releases/${NEW_VERSION}/CHANGELOG.md) — Released YYYY-MM-DD\n ```\n\n## Step 9: Update Project CHANGELOG.md\n\n1. Read the generated `local-file/tasks/releases/${NEW_VERSION}/CHANGELOG.md`\n2. Prepend its content to the root `CHANGELOG.md` file\n3. Ensure proper formatting and separation between releases\n\n## Step 10: Summary\n\nProvide a summary:\n- Number of tasks archived\n- Number of agentic worklog files archived (by type: analysis, drafts, summaries)\n- Categories affected\n- Location of generated CHANGELOG\n- Suggested next steps (review CHANGELOG, commit changes, create git tag)\n\n## Important Notes\n\n- Do NOT create a git tag — the user will do this manually after review\n- Do NOT commit changes — let the user review first\n- Preserve the structure and formatting of all markdown files\n- If no completed tasks exist, inform the user and exit gracefully\n- Auto-review findings in `local-file/tasks/auto-review/simple_advices.md` are NOT archived — they remain as a running log\n- Detailed auto-review tasks (if any exist and are completed) CAN be archived like manual tasks\n- Agentic worklog files are MOVED (not copied) to keep working directories clean\n- Only archive agentic files between the last release date and current date"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: fileMatch
|
|
3
|
+
fileMatchPattern: "src/beyond_local_file/**"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture
|
|
7
|
+
|
|
8
|
+
## Package Layout
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
src/beyond_local_file/
|
|
12
|
+
├── __init__.py # Package metadata (__version__)
|
|
13
|
+
├── cli.py # Click CLI entry point — command groups and options
|
|
14
|
+
├── config.py # YAML config loading and path resolution (Config class)
|
|
15
|
+
├── options.py # StrEnum definitions for CLI option values
|
|
16
|
+
├── link_strategy_protocol.py # Protocol definitions and unified result types
|
|
17
|
+
├── formatters.py # Output formatters: LinkSyncFormatter, LinkCheckFormatter
|
|
18
|
+
├── git_manager.py # GitExcludeManager — reads/writes .git/info/exclude
|
|
19
|
+
├── project_processor.py # ProjectProcessor + CmdOperation subclasses (SyncOperation, CheckOperation)
|
|
20
|
+
├── symlink_manager.py # SymlinkManager — implements LinkStrategyManager protocol
|
|
21
|
+
├── copy_manager.py # CopyManager — implements LinkStrategyManager protocol
|
|
22
|
+
├── sync_state.py # Copy strategy state tracking
|
|
23
|
+
└── model/
|
|
24
|
+
├── config.py # Config models (YAML structure)
|
|
25
|
+
├── processing.py # Processing models (execution structure)
|
|
26
|
+
└── translator.py # Config → Processing translation
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Data Flow
|
|
30
|
+
|
|
31
|
+
1. `cli.py` parses CLI args, calls `load_config()` from `project_processor.py`.
|
|
32
|
+
2. `load_config()` uses `Config` (from `config.py`) to parse YAML and return `dict[str, ProjectConfiguration]`.
|
|
33
|
+
3. `ProjectProcessor.process_all(operation)` iterates projects/targets, creates `Project.from_directory()`, and calls `operation.execute(project, target_path)`.
|
|
34
|
+
4. `SyncOperation` / `CheckOperation` delegate to `SymlinkManager` for the actual symlink and git-exclude work.
|
|
35
|
+
5. Formatters in `formatters.py` handle all output rendering (Rich tables for table mode, click.echo for verbose mode).
|
|
36
|
+
|
|
37
|
+
## Key Design Decisions
|
|
38
|
+
|
|
39
|
+
- Tool and data separation: the CLI is installed once; managed project directories live separately.
|
|
40
|
+
- Config paths resolve relative to the config file's directory; target paths resolve relative to CWD.
|
|
41
|
+
- `CmdOperation` is an abstract base with `execute()` and `verbose_progress` — new commands extend this.
|
|
42
|
+
- `SymlinkManager` owns both symlink logic and `GitExcludeManager` composition.
|
|
43
|
+
- Output formatting is decoupled from operations via dedicated formatter classes.
|
|
44
|
+
|
|
45
|
+
## Result Type Architecture
|
|
46
|
+
|
|
47
|
+
All result types are defined in `link_strategy_protocol.py` as the single source of truth:
|
|
48
|
+
|
|
49
|
+
**Base Result Types:**
|
|
50
|
+
- `LinkCreateResult` — Results from link creation operations
|
|
51
|
+
- `LinkCheckResult` — Results from link check operations
|
|
52
|
+
- `GitExcludeAddResult` — Results from git exclude add operations
|
|
53
|
+
- `GitExcludeCheckResult` — Results from git exclude check operations
|
|
54
|
+
- `OperationProgress` — Progress tracking embedded in operation results
|
|
55
|
+
|
|
56
|
+
**Strategy-Specific Details:**
|
|
57
|
+
- `CopyCreateDetails` — Additional information for copy strategy create operations (e.g., reverse_copied items)
|
|
58
|
+
- `CopyCheckDetails` — Additional information for copy strategy check operations (e.g., sync status details)
|
|
59
|
+
|
|
60
|
+
**Composition Pattern:**
|
|
61
|
+
Base results use composition for strategy-specific details:
|
|
62
|
+
```python
|
|
63
|
+
@dataclass
|
|
64
|
+
class LinkCreateResult:
|
|
65
|
+
created: set[str]
|
|
66
|
+
already_correct: set[str]
|
|
67
|
+
skipped: set[str]
|
|
68
|
+
failed: set[str]
|
|
69
|
+
details: LinkCreateDetails | None = None # Strategy-specific details
|
|
70
|
+
progress: OperationProgress = field(default_factory=...)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Managers create unified result types directly.
|
|
74
|
+
|
|
75
|
+
## Git Exclude Responsibility Pattern
|
|
76
|
+
|
|
77
|
+
Operations are responsible for checking git repository status before calling manager git exclude methods:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
# In operations (project_processor.py)
|
|
81
|
+
if symlink_items:
|
|
82
|
+
manager = SymlinkManager(symlink_items, unit.target_project_path)
|
|
83
|
+
link_result = manager.create_links(self.ask_callback)
|
|
84
|
+
|
|
85
|
+
# Operation checks git repo status
|
|
86
|
+
git_result = None
|
|
87
|
+
if manager.git_manager.is_git_repo():
|
|
88
|
+
git_result = manager.add_git_excludes()
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Managers document this as a PRECONDITION in their docstrings:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
def add_git_excludes(self) -> GitExcludeAddResult:
|
|
95
|
+
"""Add git exclude entries for all managed items (protocol method).
|
|
96
|
+
|
|
97
|
+
PRECONDITION: This method is guaranteed to be called only when the target
|
|
98
|
+
directory is inside a git repository. Callers must check git repo status
|
|
99
|
+
before invoking this method.
|
|
100
|
+
"""
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This design:
|
|
104
|
+
- Keeps managers focused on their core responsibility (managing links)
|
|
105
|
+
- Avoids redundant git repo checks across multiple managers
|
|
106
|
+
- Makes the precondition explicit in the contract
|
|
107
|
+
|
|
108
|
+
## Adding a New CLI Command
|
|
109
|
+
|
|
110
|
+
1. Create a new `CmdOperation` subclass in `project_processor.py`.
|
|
111
|
+
2. Add a new Click command in `cli.py` under the `link` group (or a new group).
|
|
112
|
+
3. If the command has fixed option values, define a `StrEnum` in `options.py`.
|
|
113
|
+
4. Use protocol methods (`create_links()`, `check_links()`, `add_git_excludes()`, `check_git_excludes()`).
|
|
114
|
+
5. Operations must check git repo status before calling git exclude methods.
|
|
115
|
+
6. Use `LinkSyncFormatter` and `LinkCheckFormatter` for output.
|
|
116
|
+
7. All result types come from `link_strategy_protocol.py`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: fileMatch
|
|
3
|
+
fileMatchPattern: "src/beyond_local_file/**"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docstring Conventions
|
|
7
|
+
|
|
8
|
+
## General Rules
|
|
9
|
+
|
|
10
|
+
Every public class, function, method, and module must have a complete docstring using Google style.
|
|
11
|
+
|
|
12
|
+
Docstrings should:
|
|
13
|
+
- Describe purpose from the caller's perspective.
|
|
14
|
+
- Document parameters (type, meaning, default).
|
|
15
|
+
- Specify return value (type and semantics).
|
|
16
|
+
- List possible exceptions or important edge cases.
|
|
17
|
+
- Avoid leaking implementation details.
|
|
18
|
+
|
|
19
|
+
Example:
|
|
20
|
+
```python
|
|
21
|
+
def process_data(path: str | Path, /, *, timeout: int = 30) -> dict[str, Any]:
|
|
22
|
+
"""Load and process configuration from the given path.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
path: Path to the configuration file (str or Path object).
|
|
26
|
+
timeout: Maximum time in seconds to wait for I/O operations.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
Dictionary containing the parsed and normalized configuration.
|
|
30
|
+
|
|
31
|
+
Raises:
|
|
32
|
+
FileNotFoundError: If the file does not exist.
|
|
33
|
+
ValueError: If the file contains invalid YAML.
|
|
34
|
+
"""
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Click CLI Commands
|
|
38
|
+
|
|
39
|
+
Click uses the function docstring as `--help` text. Keep it clean:
|
|
40
|
+
|
|
41
|
+
- Do NOT include an `Args:` section — Click documents arguments/options via decorators and `help=` parameters.
|
|
42
|
+
- Use only a short summary line and optionally a longer description paragraph.
|
|
43
|
+
|
|
44
|
+
Example:
|
|
45
|
+
```python
|
|
46
|
+
@cli.command()
|
|
47
|
+
@click.argument("project_name", required=False)
|
|
48
|
+
@click.option("--verbose", is_flag=True, help="Enable verbose output.")
|
|
49
|
+
def deploy(project_name, verbose): # noqa: ANN001 -- click injects args at runtime
|
|
50
|
+
"""Deploy the project to the target environment.
|
|
51
|
+
|
|
52
|
+
Reads configuration from the default config file and deploys all
|
|
53
|
+
configured targets unless a specific project name is provided.
|
|
54
|
+
"""
|
|
55
|
+
```
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: always
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# local-file Directory Convention
|
|
6
|
+
|
|
7
|
+
This file defines the storage and organization conventions for the `local-file/` directory.
|
|
8
|
+
|
|
9
|
+
## Directory Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
local-file/
|
|
13
|
+
├── agentic/ # Kiro-generated content
|
|
14
|
+
│ ├── analysis/ # Technical analysis reports (timestamped, flat)
|
|
15
|
+
│ ├── drafts/ # Informal plans, drafts, proposals (timestamped, flat)
|
|
16
|
+
│ ├── specs/ # Formal specification files (no timestamps, flat)
|
|
17
|
+
│ └── summaries/ # Task completion summaries (timestamped, flat)
|
|
18
|
+
├── initiatives/ # Strategic work items (not in changelog/release cycle)
|
|
19
|
+
│ ├── README.md # Documentation
|
|
20
|
+
│ └── *.md # Initiative files (e.g., share-and-impact.md)
|
|
21
|
+
└── tasks/ # Task tracking system
|
|
22
|
+
├── index.md # Main hub linking to all task groups
|
|
23
|
+
├── manual/ # User-created tasks
|
|
24
|
+
├── auto-review/ # Auto-generated review findings
|
|
25
|
+
└── releases/ # Archived completed tasks by release
|
|
26
|
+
└── v0.x.x/ # Example release
|
|
27
|
+
├── CHANGELOG.md
|
|
28
|
+
├── tasks/ # Archived tasks
|
|
29
|
+
│ ├── manual/
|
|
30
|
+
│ └── auto-review/
|
|
31
|
+
└── worklog/ # Archived agentic files
|
|
32
|
+
├── analysis/
|
|
33
|
+
├── drafts/
|
|
34
|
+
└── summaries/
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Agentic Directory (`local-file/agentic/`)
|
|
40
|
+
|
|
41
|
+
Kiro-generated content organized by purpose. All files in `analysis/`, `drafts/`, and `summaries/` use `YYYYMMDD-HH-` prefix for chronological ordering (GMT+8 timezone).
|
|
42
|
+
|
|
43
|
+
### analysis/
|
|
44
|
+
|
|
45
|
+
**Purpose:** Technical analysis reports generated at the start of or during a chat conversation.
|
|
46
|
+
|
|
47
|
+
**When to write:** When analyzing codebase structure, investigating issues, or exploring technical approaches before implementation.
|
|
48
|
+
|
|
49
|
+
**Examples:**
|
|
50
|
+
- Codebase structure analysis
|
|
51
|
+
- Performance bottleneck investigation
|
|
52
|
+
- Dependency analysis
|
|
53
|
+
- Architecture exploration
|
|
54
|
+
|
|
55
|
+
**Naming:** `YYYYMMDD-HH-descriptive-title.md` using GMT+8 timezone (e.g., `20260326-18-codebase-structure-for-copy-feature.md`)
|
|
56
|
+
|
|
57
|
+
**Structure:** Flat directory - no subdirectories
|
|
58
|
+
|
|
59
|
+
### drafts/
|
|
60
|
+
|
|
61
|
+
**Purpose:** Informal implementation plans, design proposals, or when explicitly asked to draft something.
|
|
62
|
+
|
|
63
|
+
**When to write:**
|
|
64
|
+
- Creating informal design proposals
|
|
65
|
+
- Drafting API specifications
|
|
66
|
+
- Sketching implementation approaches
|
|
67
|
+
- When user explicitly asks to "draft" something
|
|
68
|
+
|
|
69
|
+
**Examples:**
|
|
70
|
+
- Design proposals
|
|
71
|
+
- OpenAPI spec drafts
|
|
72
|
+
- Implementation approach sketches
|
|
73
|
+
- Architecture alternatives
|
|
74
|
+
|
|
75
|
+
**Naming:** `YYYYMMDD-HH-descriptive-title.md` using GMT+8 timezone (e.g., `20260326-18-single-file-copy-proposal.md`)
|
|
76
|
+
|
|
77
|
+
**Structure:** Flat directory - no subdirectories
|
|
78
|
+
|
|
79
|
+
### specs/
|
|
80
|
+
|
|
81
|
+
**Purpose:** Formal specification files that define formats, conventions, and standards.
|
|
82
|
+
|
|
83
|
+
**When to write:** When creating formal specifications for:
|
|
84
|
+
- File formats
|
|
85
|
+
- API specifications
|
|
86
|
+
- Configuration formats
|
|
87
|
+
- Task definitions
|
|
88
|
+
- Coding conventions
|
|
89
|
+
|
|
90
|
+
**Examples:**
|
|
91
|
+
- `task-definition-spec.md`
|
|
92
|
+
- `config-format-spec.md`
|
|
93
|
+
- `api-specification.md`
|
|
94
|
+
|
|
95
|
+
**Naming:** Use `-spec.md` suffix for specification files (no timestamp prefix - specs are timeless)
|
|
96
|
+
|
|
97
|
+
**Structure:** Flat directory - no subdirectories
|
|
98
|
+
|
|
99
|
+
### summaries/
|
|
100
|
+
|
|
101
|
+
**Purpose:** Task completion summaries documenting changes made during a task or conversation.
|
|
102
|
+
|
|
103
|
+
**When to write:** When a task has been completed and you want to summarize the changes made.
|
|
104
|
+
|
|
105
|
+
**Examples:**
|
|
106
|
+
- `20260403-14-task-system-improvements.md`
|
|
107
|
+
- `20260327-09-copy-feature-implementation.md`
|
|
108
|
+
- `20260320-16-subpath-support-added.md`
|
|
109
|
+
|
|
110
|
+
**Naming:** `YYYYMMDD-HH-descriptive-title.md` using GMT+8 timezone
|
|
111
|
+
|
|
112
|
+
**Structure:** Flat directory - no subdirectories
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Initiatives Directory (`local-file/initiatives/`)
|
|
117
|
+
|
|
118
|
+
Strategic work items and coordinated efforts that don't directly belong in the changelog or release cycle.
|
|
119
|
+
|
|
120
|
+
**For complete initiative format specification, see:** `local-file/agentic/specs/initiative-definition-spec.md`
|
|
121
|
+
|
|
122
|
+
This section provides a quick reference. The formal spec contains detailed guidelines on initiative structure, action item tracking, naming conventions, workflow, and best practices.
|
|
123
|
+
|
|
124
|
+
**Purpose:** Track promotional activities, infrastructure setup, meta-project work, and multi-step initiatives.
|
|
125
|
+
|
|
126
|
+
**What goes here:**
|
|
127
|
+
- Promotional activities (PyPI publishing, community sharing)
|
|
128
|
+
- Infrastructure setup (CI/CD, GitHub Actions)
|
|
129
|
+
- Meta-project work (documentation overhauls, branding)
|
|
130
|
+
- Multi-step initiatives spanning multiple actions
|
|
131
|
+
|
|
132
|
+
**What doesn't go here:**
|
|
133
|
+
- Feature development → `local-file/tasks/manual/`
|
|
134
|
+
- Bug fixes → `local-file/tasks/manual/`
|
|
135
|
+
- Code quality improvements → `local-file/tasks/manual/`
|
|
136
|
+
- Auto-review findings → `local-file/tasks/auto-review/`
|
|
137
|
+
|
|
138
|
+
### Initiative File Format
|
|
139
|
+
|
|
140
|
+
Each initiative file follows this structure:
|
|
141
|
+
|
|
142
|
+
**Header (Required):**
|
|
143
|
+
```markdown
|
|
144
|
+
# Initiative Title
|
|
145
|
+
|
|
146
|
+
**Goal:** One-sentence description of what this initiative aims to achieve.
|
|
147
|
+
**Status:** Planning | In Progress | Completed | On Hold
|
|
148
|
+
**Created:** YYYY-MM-DD
|
|
149
|
+
**Completed:** YYYY-MM-DD (only if status is Completed)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Overview Section (Required):**
|
|
153
|
+
Brief description of the initiative, its purpose, and expected impact.
|
|
154
|
+
|
|
155
|
+
**Action Items Table (Required):**
|
|
156
|
+
```markdown
|
|
157
|
+
| # | Action | Status | Related Task/Resource | Notes |
|
|
158
|
+
|---|--------|--------|----------------------|-------|
|
|
159
|
+
| 1 | [Action description] | Not Started | [Link to task](../tasks/manual/task.md) | Optional context |
|
|
160
|
+
| 2 | [Action description] | In Progress | [External link](https://...) | Optional context |
|
|
161
|
+
| 3 | [Action description] | Completed | — | Completed YYYY-MM-DD |
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The Action Items table is the centerpiece - it provides at-a-glance status tracking with:
|
|
165
|
+
- Sequential numbering for easy reference
|
|
166
|
+
- Clear action descriptions
|
|
167
|
+
- Status tracking (Not Started, In Progress, Completed, Blocked, Skipped)
|
|
168
|
+
- Links to related tasks or external resources
|
|
169
|
+
- Optional notes for context, completion dates, or blockers
|
|
170
|
+
|
|
171
|
+
**Detailed Sections (Optional):**
|
|
172
|
+
For complex actions requiring more explanation, add detailed sections after the Action Items table with prerequisites, steps, resources, and notes.
|
|
173
|
+
|
|
174
|
+
**Success Criteria (Recommended):**
|
|
175
|
+
Define measurable outcomes and specific deliverables that indicate initiative completion.
|
|
176
|
+
|
|
177
|
+
### Linking Between Initiatives and Tasks
|
|
178
|
+
|
|
179
|
+
**From Initiative to Task:**
|
|
180
|
+
```markdown
|
|
181
|
+
| 2 | Add --version option | Not Started | [Task](../tasks/manual/add-version-option.md) | Required before PyPI |
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**From Task to Initiative:**
|
|
185
|
+
```markdown
|
|
186
|
+
**Part of Initiative:** [Share & Prove Impact](../../initiatives/share-and-impact.md)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This creates bidirectional links showing how strategic goals connect to concrete work.
|
|
190
|
+
|
|
191
|
+
### Naming Conventions
|
|
192
|
+
|
|
193
|
+
- Use descriptive, goal-oriented names in kebab-case
|
|
194
|
+
- Avoid dates in filenames (initiatives are timeless)
|
|
195
|
+
- Examples: `share-and-impact.md`, `ci-cd-automation.md`, `documentation-overhaul.md`
|
|
196
|
+
|
|
197
|
+
**Structure:** Flat directory with markdown files describing goals, action items with status tracking, and context.
|
|
198
|
+
|
|
199
|
+
**Examples:**
|
|
200
|
+
- `share-and-impact.md` — Promoting the project through PyPI, README improvements, community engagement
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Task Tracking System (`local-file/tasks/`)
|
|
205
|
+
|
|
206
|
+
All project tasks are tracked under `local-file/tasks/` with task groups, indices, and individual task files.
|
|
207
|
+
|
|
208
|
+
**For complete task format specification, see:** `local-file/agentic/specs/task-definition-spec.md`
|
|
209
|
+
|
|
210
|
+
This section provides a quick reference. The formal spec contains detailed guidelines on task structure, naming conventions, workflow, and best practices.
|
|
211
|
+
|
|
212
|
+
### Structure
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
local-file/tasks/
|
|
216
|
+
├── index.md # Main hub linking to all task groups
|
|
217
|
+
├── manual/ # User-created tasks
|
|
218
|
+
│ ├── index.md # Manual tasks index
|
|
219
|
+
│ ├── README.md # Documentation
|
|
220
|
+
│ └── *.md # Individual task files
|
|
221
|
+
├── auto-review/ # Auto-generated review findings
|
|
222
|
+
│ ├── index.md # Auto-review tasks index
|
|
223
|
+
│ ├── simple_advices.md # One-sentence findings (running log)
|
|
224
|
+
│ ├── README.md # Documentation
|
|
225
|
+
│ └── *.md # Detailed auto-review task files
|
|
226
|
+
└── releases/ # Archived completed tasks by release
|
|
227
|
+
├── README.md # Documentation
|
|
228
|
+
└── v0.x.x/ # Example: tasks completed in v0.2.0
|
|
229
|
+
├── CHANGELOG.md # Formal changelog for this release
|
|
230
|
+
├── tasks/ # Archived completed tasks
|
|
231
|
+
│ ├── manual/ # Archived manual tasks
|
|
232
|
+
│ └── auto-review/ # Archived auto-review tasks
|
|
233
|
+
└── worklog/ # Archived agentic worklog files
|
|
234
|
+
├── analysis/ # Archived analysis files
|
|
235
|
+
├── drafts/ # Archived draft files
|
|
236
|
+
└── summaries/ # Archived summary files
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Task Groups
|
|
240
|
+
|
|
241
|
+
#### Manual Tasks (`local-file/tasks/manual/`)
|
|
242
|
+
User-created tasks for features, bugs, usability improvements, and documentation.
|
|
243
|
+
|
|
244
|
+
#### Auto-Review Tasks (`local-file/tasks/auto-review/`)
|
|
245
|
+
Automatically generated code review findings:
|
|
246
|
+
- `simple_advices.md` — One-sentence findings (🟡 Should Fix / 🔵 Consider), grouped by date
|
|
247
|
+
- Detailed task files — Complex findings requiring more context, impact analysis, or multiple solutions
|
|
248
|
+
|
|
249
|
+
### Task Lifecycle
|
|
250
|
+
|
|
251
|
+
#### 1. Creating a Manual Task
|
|
252
|
+
- Create a markdown file in `local-file/tasks/manual/{verb}-{slug}.md`
|
|
253
|
+
- Start with header: Title, Category, Status, Description
|
|
254
|
+
- Add core sections: Motivation, Current Behavior, Expected Behavior, Proposed Solution
|
|
255
|
+
- Add optional sections as needed (keep implementation details minimal)
|
|
256
|
+
- Add a checkbox entry in `local-file/tasks/manual/index.md` under the appropriate category
|
|
257
|
+
|
|
258
|
+
#### 2. Creating an Auto-Review Finding
|
|
259
|
+
For simple one-sentence findings:
|
|
260
|
+
- Append to `local-file/tasks/auto-review/simple_advices.md`
|
|
261
|
+
- Group by date, use 🟡 or 🔵 prefix
|
|
262
|
+
|
|
263
|
+
For complex findings:
|
|
264
|
+
- Create a detailed task file in `local-file/tasks/auto-review/`
|
|
265
|
+
- Add to `auto-review/index.md`
|
|
266
|
+
|
|
267
|
+
#### 3. Working on a Task
|
|
268
|
+
- Update the Status field in the task file header as work progresses
|
|
269
|
+
- Commit changes with descriptive messages
|
|
270
|
+
|
|
271
|
+
#### 4. Completing a Task
|
|
272
|
+
- Update Status to "Completed" in the task file header
|
|
273
|
+
- Mark checkbox with `[x]` in the appropriate index
|
|
274
|
+
- Add completion date: `— Completed: YYYY-MM-DD` (infer from git commit date if possible)
|
|
275
|
+
- Commit the completion
|
|
276
|
+
|
|
277
|
+
#### 5. Preparing a Release (Use Hook)
|
|
278
|
+
When ready to release, trigger the "Prepare Release" hook which will:
|
|
279
|
+
- Gather all completed manual tasks since last git tag
|
|
280
|
+
- Generate formal CHANGELOG.md entries
|
|
281
|
+
- Archive completed tasks to `local-file/tasks/releases/[version]/tasks/manual/` and `tasks/auto-review/`
|
|
282
|
+
- Archive agentic worklog files to `local-file/tasks/releases/[version]/worklog/analysis/`, `worklog/drafts/`, and `worklog/summaries/`
|
|
283
|
+
- Update manual task index to remove completed tasks
|
|
284
|
+
- Create a clean slate for the next development cycle
|
|
285
|
+
- Note: Simple advices are NOT archived — they remain as a running log
|
|
286
|
+
|
|
287
|
+
### Categories
|
|
288
|
+
|
|
289
|
+
- Features — New functionality
|
|
290
|
+
- Bugs — Known issues to fix
|
|
291
|
+
- Usability — CLI UX and output improvements
|
|
292
|
+
- Documentation — Docs and README updates
|
|
293
|
+
- Code Quality — Refactoring and technical debt
|
|
294
|
+
|
|
295
|
+
### Conventions
|
|
296
|
+
|
|
297
|
+
#### Task File Format
|
|
298
|
+
- Header first: Title, Category, Status, Description at the top
|
|
299
|
+
- Core sections: Motivation, Current Behavior, Expected Behavior, Proposed Solution
|
|
300
|
+
- Keep implementation details minimal — they become stale quickly
|
|
301
|
+
- Focus on "why" and "what", not detailed "how"
|
|
302
|
+
|
|
303
|
+
#### Naming
|
|
304
|
+
- Use format: `{verb}-{slug}.md` (e.g., `add-dry-run-mode.md`, `fix-path-resolution.md`)
|
|
305
|
+
- Link tasks from the appropriate group index
|
|
306
|
+
|
|
307
|
+
#### Auto-Review
|
|
308
|
+
- Simple one-sentence findings go in `simple_advices.md`
|
|
309
|
+
- Complex findings requiring detailed analysis get their own task files
|
|
310
|
+
- Simple advices are NOT archived — they remain as a continuous running log
|
|
311
|
+
|
|
312
|
+
#### Completion
|
|
313
|
+
- Infer completion dates from git commit history when possible
|
|
314
|
+
- Completed manual tasks remain in their group until the next release preparation
|
|
315
|
+
- Completed auto-review detailed tasks CAN be archived
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Notes
|
|
320
|
+
|
|
321
|
+
- All Kiro-generated content must be placed in the appropriate subdirectories
|
|
322
|
+
- Do not scatter files in the `local-file/` root directory
|
|
323
|
+
- Use descriptive filenames that clearly indicate content
|
|
324
|
+
- Follow naming conventions for consistency
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
inclusion: always
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Project Rules
|
|
6
|
+
|
|
7
|
+
## 1. Environment & Tooling
|
|
8
|
+
|
|
9
|
+
All Python development must use `uv` exclusively. No `pip`, `venv`, `poetry`, `conda`, or manual `python -m` calls.
|
|
10
|
+
|
|
11
|
+
Common commands:
|
|
12
|
+
- `uv add <package>` / `uv add --dev <package>`
|
|
13
|
+
- `uv run ruff check --fix .` / `uv run ruff format .`
|
|
14
|
+
- `uv run pytest`
|
|
15
|
+
- `uv run python script.py`
|
|
16
|
+
|
|
17
|
+
## 2. Code Quality
|
|
18
|
+
|
|
19
|
+
- Follow Martin Fowler's refactoring principles — small, safe, behavior-preserving changes.
|
|
20
|
+
- Keep code simple, readable, and self-documenting.
|
|
21
|
+
- Single responsibility for functions and classes.
|
|
22
|
+
- Avoid deep nesting, magic values, and unnecessary complexity.
|
|
23
|
+
|
|
24
|
+
## 3. Linting & Formatting
|
|
25
|
+
|
|
26
|
+
All code must pass Ruff with zero violations. Configuration lives in `pyproject.toml` under `[tool.ruff]`.
|
|
27
|
+
|
|
28
|
+
- Auto-fix: `uv run ruff check --fix .` then `uv run ruff format .`
|
|
29
|
+
- When suppressing a rule, add a comment explaining why (e.g. `# noqa: ANN001 -- click injects args at runtime`).
|
|
30
|
+
|
|
31
|
+
## 4. Language
|
|
32
|
+
|
|
33
|
+
All files — code, documentation, configuration, scripts, and any generated content — must be written in English unless the user explicitly requests Chinese.
|
|
34
|
+
|
|
35
|
+
## 5. Fixed Option Values
|
|
36
|
+
|
|
37
|
+
All fixed sets of option values (output formats, modes, strategies) must be defined as `StrEnum` members in `src/beyond_local_file/options.py`. No magic strings elsewhere.
|
|
38
|
+
|
|
39
|
+
- Use `[f.value for f in MyEnum]` for `click.Choice` lists.
|
|
40
|
+
- Coerce raw Click strings back to the enum at the CLI boundary: `MyEnum(raw_value)`.
|