You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Implement align subcommand for automated remediation (Issue #14) (#34)
* feat: implement align subcommand for automated remediation
- Add Fix data models (FileCreationFix, FileModificationFix, CommandFix, MultiStepFix)
- Implement BaseFixer abstract class for fixer strategy pattern
- Create concrete fixers:
- CLAUDEmdFixer: Generate CLAUDE.md from template
- GitignoreFixer: Add recommended patterns to .gitignore
- PrecommitHooksFixer: Create .pre-commit-config.yaml and install hooks
- Implement FixerService for orchestrating fixes and score projection
- Add align CLI command with --dry-run, --interactive, --attributes options
- Create Jinja2 templates for CLAUDE.md and gitignore patterns
- Add comprehensive unit tests (10 tests, all passing)
The align command:
1. Runs assessment to identify failing attributes
2. Generates fixes for fixable failures
3. Projects score improvement before applying
4. Supports dry-run mode for previewing changes
5. Supports interactive mode for confirming each fix
6. Shows certification level changes (Bronze → Silver → Gold → Platinum)
Usage:
agentready align . # Apply all fixes
agentready align . --dry-run # Preview without applying
agentready align . --interactive # Confirm each fix
agentready align . --attributes claude_md_file,gitignore_completeness
Implements Issue #14
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: apply black formatting to pass CI checks
- Reformat backlog_to_issues.py (quotes, line breaks)
- Reformat demo.py (ternary operator line break)
- Reformat test_fixers.py (function signature line break)
Fixes CI black --check failures
* fix: add ruff to dev dependencies for CI
- Add ruff>=0.1.0 to dev dependencies in pyproject.toml
- Fixes 'ruff: command not found' error in CI pipeline
The CI workflow runs ruff check but ruff was missing from dependencies
* fix: resolve ruff linting issues across codebase
- Remove unused imports (F401) from assessors and test files
- Remove extraneous f-string prefixes (F541) in CLI and scripts
- Remove unused exception variables (F841)
Auto-fixed with: ruff check --fix .
All 36 issues resolved
* fix: handle detached HEAD state in repository scanner
- Wrap repo.active_branch.name in try/except
- Fallback to 'HEAD' when in detached HEAD state
- Fixes CI failure where GitHub Actions checks out in detached HEAD
Error: TypeError: HEAD is a detached symbolic reference
Occurs in CI environments during git checkout
* fix: reformat files after ruff import cleanup
- Reformat 5 files that had imports removed by ruff
- structure.py, documentation.py, testing.py, stub_assessors.py
- test_assessors_structure.py
Black formatting required after ruff --fix removed unused imports
* fix: sort imports in test files after ruff cleanup
- Fix isort errors in test_scan_workflow.py and test_security.py
- These files had imports removed by ruff but weren't re-sorted
* fix: fix RepomixConfigAssessor to use proper Finding constructor
- Replace non-existent Finding.create_pass/create_fail methods with proper Finding() constructor
- Add missing Remediation and Citation imports
- Fix Repository initialization in tests with all required fields (.git, name, url, branch, commit_hash, total_files, total_lines)
- Fix assertion in test_check_freshness_no_files to match actual error message ("files found" instead of "not found")
- Fix assertion in test_assess_config_but_no_output with same correction
All 21 repomix tests now passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
# Extract description (first paragraph after Priority)
246
-
lines=item.content.split('\n')
247
+
lines=item.content.split("\n")
247
248
in_description=False
248
249
description_lines= []
249
250
250
251
forlineinlines:
251
-
if'**Description**:'inline:
252
+
if"**Description**:"inline:
252
253
in_description=True
253
254
continue
254
255
ifin_description:
255
-
ifline.startswith('**') and':'inline:
256
+
ifline.startswith("**") and":"inline:
256
257
break
257
258
description_lines.append(line)
258
259
259
260
ifdescription_lines:
260
261
body_parts.append("## Description\n")
261
-
body_parts.append('\n'.join(description_lines))
262
+
body_parts.append("\n".join(description_lines))
262
263
263
264
# Add link to full context
264
265
body_parts.append("\n\n## Full Context\n")
265
-
body_parts.append(f"See [BACKLOG.md](https://github.com/{repo_context['owner']}/{repo_context['repo']}/blob/main/BACKLOG.md) for complete requirements.\n")
266
+
body_parts.append(
267
+
f"See [BACKLOG.md](https://github.com/{repo_context['owner']}/{repo_context['repo']}/blob/main/BACKLOG.md) for complete requirements.\n"
0 commit comments