Mohamed Ashraf
0acb2c944d
docs: update Java documentation to match actual implementation
...
Java docs incorrectly referenced codeflash.toml (which doesn't exist) and
omitted Java from several pages despite being fully implemented.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 11:10:03 +00:00
Kevin Turcios
14d81ec3f7
fix: make post-edit lint hook surface real errors
...
The hook was silently swallowing all prek failures with || true,
including actual lint errors. Now it re-runs prek after the first
pass auto-fixes formatting — only real lint errors block.
2026-03-27 18:01:16 -05:00
Kevin Turcios
2e9ce93324
chore: reorganize Claude rules and add workflow guidelines
...
Move pre-commit/pre-push prek rules from code-style.md to git.md,
deduplicate pipeline docs in CLAUDE.md, and add shared workflow rules.
2026-03-27 09:43:53 -05:00
Kevin Turcios
c2e37fceb0
feat: add Claude Code post-edit lint hook using prek
...
Automatically runs `uv run prek` on Python files after Edit/Write
tool usage to catch lint and formatting issues at edit time.
2026-03-27 08:25:36 -05:00
Kevin Turcios
e5a487c608
docs: strengthen Claude rules based on eval results
...
Eval showed docstrings, tmp_path, and .resolve() rules were being
ignored. Made phrasing more explicit and added concrete examples.
2026-03-16 21:48:53 -06:00
Kevin Turcios
46dd0be9a7
docs: improve Claude rules based on eval results
...
Expanded bug fix workflow to explicit 5-step sequence with subagent delegation, aligned type annotation rule with codebase conventions, simplified verification rule to reference prek, and expanded git/PR guidelines.
2026-03-16 20:45:32 -06:00
Mohamed Ashraf
fa9d32f1c4
Merge branch 'main' into omni-java
...
Resolve 7 merge conflicts from main's modular refactoring + JS improvements:
- aiservice.py: combine multi-language metadata (omni-java) with main's structure
- cmd_init.py: adopt main's modular split (init_config, init_auth, github_workflow) + add Java import
- code_replacer.py: main's clean early-return style + omni-java's non-Python single-block fallback
- version.py, test_support_dispatch.py, test_javascript_test_runner.py: take main's versions
- uv.lock: regenerated
Port Java into main's modular structure:
- Fix init_java.py lazy imports to point to new modules (init_config, init_auth, github_workflow)
- Add Java workflow support to github_workflow.py (detection, template, customization)
- Fix broken Java imports (function_optimizer, line_profiler) after main's module moves
Add safety tests for merge-critical functions:
- test_add_language_metadata.py: 10 tests covering per-language payload correctness
- test_code_replacer_matching.py: 8 tests covering fallback chain
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:15:19 +00:00
Kevin Turcios
f43ee06859
refactor: restructure codebase for locality and faster CLI startup
...
Move files closer to their consumers:
- function_context.py merged into code_context_extractor.py
- FunctionOptimizer base class to languages/function_optimizer.py
- test_runner, instrument_codeflash_capture, parse_line_profile to languages/python/
- oauth_handler.py to cli_cmds/
Split cmd_init.py (1993 lines) into focused modules:
- init_config.py: config types, validation, writing, shared UI
- init_auth.py: API key management + GitHub app installation
- github_workflow.py: GitHub Actions workflow generation
- cmd_init.py: init orchestrator + Python setup (639 lines)
Defer heavy imports (cmd_init, posthog, sentry) from module-level to
usage sites, reducing CLI startup from ~600ms to ~250ms. Replace
set_defaults(func=) with direct args.command dispatch in main().
2026-03-07 08:21:27 -05:00
Kevin Turcios
eceac13fc3
Merge remote-tracking branch 'origin/main' into omni-java
...
# Conflicts:
# .claude/rules/architecture.md
# .claude/rules/code-style.md
# .github/workflows/claude.yml
# .github/workflows/duplicate-code-detector.yml
# codeflash/api/aiservice.py
# codeflash/cli_cmds/console.py
# codeflash/cli_cmds/logging_config.py
# codeflash/code_utils/deduplicate_code.py
# codeflash/discovery/discover_unit_tests.py
# codeflash/languages/base.py
# codeflash/languages/code_replacer.py
# codeflash/languages/javascript/mocha_runner.py
# codeflash/languages/javascript/support.py
# codeflash/languages/python/support.py
# codeflash/optimization/function_optimizer.py
# codeflash/verification/parse_test_output.py
# codeflash/verification/verification_utils.py
# codeflash/verification/verifier.py
# packages/codeflash/package-lock.json
# packages/codeflash/package.json
# tests/languages/javascript/test_support_dispatch.py
# tests/test_codeflash_capture.py
# tests/test_languages/test_javascript_test_runner.py
# tests/test_multi_file_code_replacement.py
2026-03-04 01:52:32 -05:00
Kevin Turcios
2fb0145895
Merge remote-tracking branch 'origin/omni-java' into merge/misc-fixes-into-omni-java
...
# Conflicts:
# codeflash/api/aiservice.py
# codeflash/languages/base.py
# codeflash/languages/java/support.py
# codeflash/languages/javascript/support.py
# codeflash/languages/python/support.py
# codeflash/verification/verifier.py
2026-03-04 01:23:39 -05:00
HeshamHM28
8287f96f05
Merge pull request #1680 from codeflash-ai/feat/java/wire-language-version
...
feat: add language version support across multiple language implement…
2026-03-03 22:12:54 -08:00
Kevin Turcios
c2fe5261a3
chore: add pre-push prek rule to match CI behavior
2026-03-03 21:02:44 -05:00
Kevin Turcios
074cce821e
chore: add pre-commit rule from main
...
Port the prek pre-commit rule to omni-java branch.
2026-03-03 20:31:53 -05:00
Ubuntu
1b3fa91a5c
feat: Java testgen class name fix, remove per-test @Timeout, and wire language_version
...
- Add class_name and qualified_name to /testgen API payload so the backend
has explicit access to computed FunctionToOptimize properties
- Add client-side _fix_java_test_class_name() to correct wrong class name
references in LLM-generated Java test code
- Remove per-test @Timeout annotation from Java instrumentation (causes
timing instability on CI runners; Maven Surefire handles timeouts)
- Remove redundant default_language_version, use language_version as canonical
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:06:37 +00:00
Kevin Turcios
dee1175acd
chore: remove simplify step from Claude PR review and add prek rule
...
Drop the /simplify step that caused unprompted refactors and scope
creep in PR reviews. Also add prek pre-commit rule to project config
so the PR bot and all contributors see it.
2026-03-03 20:02:22 -05:00
Kevin Turcios
08dad4e6a4
chore: sync docs, rules, and workflows from main
2026-03-02 22:48:28 -05:00
Kevin Turcios
a538722ff7
chore: sync docs, CI, config, and rules from main
...
Pulls latest changes for .claude/rules/, .github/workflows/, CLAUDE.md,
and docs/ — all main-only changes with no omni-java overlap.
2026-03-02 14:56:26 -05:00
Kevin Turcios
38444462f3
docs: document LanguageSupport protocol methods in architecture.md
2026-03-02 07:07:47 -05:00
Kevin Turcios
341c622d40
docs: update rules and architecture for new language structure
...
- Add JS optimizer, normalizer, and support files to architecture tree
- Update key entry points table for per-function optimization and test execution
- Add protocol dispatch preference to language-patterns rules
- Fix stale context path in optimization-patterns
- Add explicit utf-8 encoding rule scoped to new/changed code
2026-03-02 06:10:12 -05:00
claude[bot]
1f914c58e3
docs: update architecture.md with new Python optimizer files
...
Add languages/python/function_optimizer.py and languages/python/optimizer.py
to the directory tree and Key Entry Points table.
Co-authored-by: Kevin Turcios <KRRT7@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 05:44:02 +00:00
Kevin Turcios
0c786840e7
rework duplicate-code-detector a bit.
2026-02-23 08:16:43 -05:00
Kevin Turcios
9961a02411
docs: add new-branch-from-main rule to git guidelines
2026-02-14 18:27:21 -05:00
Kevin Turcios
0650973d8c
refactor: restructure CLAUDE.md for effective context usage
...
- Remove commands block from CLAUDE.md (standard tool usage Claude knows)
- Remove dead @AGENTS.md reference
- Add optimization pipeline overview with module pointers
- Add domain glossary (optimization candidate, addressable time, candidate
forest, replay test, tracer, worktree mode)
- Extract mypy workflow to .claude/skills/fix-mypy.md (on-demand)
- Create .claude/skills/fix-prek.md for prek workflow (on-demand)
- Add key entry points table to architecture.md
- Create path-scoped rules: optimization-patterns.md, language-patterns.md
- Remove redundancy from source-code.md and across rules files
- Move "never use pip" convention to code-style.md
2026-02-14 17:37:51 -05:00
Kevin Turcios
308507c7c8
cleanup
2026-02-06 02:18:43 -05:00
Kevin Turcios
ee5871d3d3
feat: add modular Claude Code rules in .claude/rules/
...
Split monolithic CLAUDE.md instructions into focused, topic-specific
rule files. Path-scoped rules for source code and tests only load when
working with matching files.
2026-02-06 02:12:27 -05:00