Skip to content

feat: add interactive profile design wizard#40

Closed
leo-guinan wants to merge 2 commits into
codegraphtheory:mainfrom
leo-guinan:feat/interactive-profile-wizard
Closed

feat: add interactive profile design wizard#40
leo-guinan wants to merge 2 commits into
codegraphtheory:mainfrom
leo-guinan:feat/interactive-profile-wizard

Conversation

@leo-guinan

@leo-guinan leo-guinan commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Implements #13 with class selection, companion bundles, and generated profile.params.yaml. Includes tests/ and docs.

  • Class config in templates/wizard/classes.yaml
  • Bundles in templates/wizard/bundles.yaml
  • Script in scripts/profile_wizard.py
  • README path added

Changes based on maintainer review

  • Added --force flag to overwrite existing output safely
  • load_yaml now fails loudly on missing config files
  • Added model compatibility test proving wizard params map to compatible config.yaml
  • Added end-to-end smoke test: wizard → generate_profile.py → validated profile
  • Copied wizard fixtures into tests/fixtures/wizard/ to remove symlink dependency

Verification

  • python3 -m unittest tests.test_profile_wizard -v — 6/6 passed
  • make validate — passed
  • make generate-smoke — passed
  • make release-check — passed for version 0.7.0

Bounty payout address

Solana: FFAdvcr2CUPbaQSypK3c8WfQo3SuyBh5YKrtzZRSvg34

Closes #13.

@codegraphtheory

Copy link
Copy Markdown
Owner

Thanks @leo-guinan for the contribution. I am starting a maintainer review for this PR now.

Selection note: this is the PR I am reviewing for you as a first-time contributor candidate on codegraphtheory/hermes-profile-template. I am checking it against the linked issue #13, repo quality gates, and whether it overlaps with other active PRs.

Verification so far: I ran python3 -m unittest tests/test_profile_wizard.py. It passed: 4 tests OK.

Bounty metadata: This closes a bounty issue, so please add a Solana wallet address to the PR body before payout review.

@codegraphtheory

Copy link
Copy Markdown
Owner

Review note for scripts/profile_wizard.py:17

DEFAULT_OUTPUT = Path("profile.params.yaml") writes into whatever directory the caller happens to be in. That is risky for a profile authoring tool because an accidental run from a repo root can overwrite an existing params file. Please default to an explicit confirmation or require --force when the output already exists.

Suggested change:

def write_params(path: Path, params: dict, *, force: bool = False) -> None:
    if path.exists() and not force:
        raise SystemExit(f"Refusing to overwrite {path}. Re-run with --force or choose --output.")
    path.write_text(yaml.safe_dump(params, sort_keys=False), encoding="utf-8")

@codegraphtheory

Copy link
Copy Markdown
Owner

Review note for scripts/profile_wizard.py:20

load_yaml() returns {} for a missing config file. That makes a broken install look like an empty wizard instead of a clear setup failure. Please fail loudly for the default classes and bundles files, and only allow empty data when a user intentionally points at an optional file.

Suggested change:

def load_yaml(path: Path) -> dict:
    if not path.exists():
        raise FileNotFoundError(f"Wizard config not found: {path}")
    data = yaml.safe_load(path.read_text(encoding="utf-8"))
    if not isinstance(data, dict):
        raise ValueError(f"Wizard config must be a YAML mapping: {path}")
    return data

@codegraphtheory

Copy link
Copy Markdown
Owner

Review note for scripts/profile_wizard.py:61

The generated params use model_default, but current Hermes profile config compatibility expects model.provider plus model.model downstream. Please either emit fields that the existing generator already maps safely, or add a test that proves the wizard output compiles into a compatible config.yaml.

Suggested assertion:

params = build_params(engineer, None)
self.assertEqual(params["model_provider"], "openrouter")
self.assertIn("/", params["model_default"])

@codegraphtheory

Copy link
Copy Markdown
Owner

Review note for tests/fixtures/wizard:1

This fixture is a symlink-style text file rather than a real fixture directory in the diff. That can be brittle on platforms and makes the tests depend on production templates. Please copy minimal fixture YAML into tests/fixtures/wizard/ or have the tests read from templates/wizard/ directly with an explicit comment.

Suggested layout:

tests/fixtures/wizard/classes.yaml
tests/fixtures/wizard/bundles.yaml

@codegraphtheory

Copy link
Copy Markdown
Owner

Review note for scripts/profile_wizard.py:152

Please add a non-interactive smoke test that writes to a temporary output path and then runs scripts/generate_profile.py --params <that file> --output <tmpdir>. The current tests cover build_params, but not the end-to-end contract promised in the README.

@codegraphtheory

Copy link
Copy Markdown
Owner

Thanks again for the work here. I will be happy to accept this PR once the requested updates above are addressed, the branch is kept scoped to #13, and the verification commands in the PR body are refreshed after the changes.

If this is a bounty PR, please make sure the Solana wallet address is present and not a placeholder before payout review.

@leo-guinan leo-guinan force-pushed the feat/interactive-profile-wizard branch 4 times, most recently from 985106e to a60d358 Compare June 25, 2026 20:33
- Add --force flag to overwrite existing output safely
- Fail loudly in load_yaml for missing/invalid config files
- Add model compatibility test for generator mapping
- Add end-to-end smoke test: wizard -> generate_profile.py -> validated profile
- Replace symlink with copied fixture files in tests/fixtures/wizard/
@leo-guinan leo-guinan force-pushed the feat/interactive-profile-wizard branch from a60d358 to 5fc15a5 Compare June 26, 2026 00:53
@codegraphtheory

Copy link
Copy Markdown
Owner

Thanks @leo-guinan. I integrated the relevant parts of this contribution into #53 and merged it to main as commit f9e7d88.

You were included as a Co-authored-by: contributor in the merged squash commit so GitHub can credit you in repository history.

Wallet metadata was captured from your PR body for payout review.

I am closing this PR as superseded by the merged maintainer integration to keep at most one accepted path per first-time contributor and avoid duplicate implementations for the same issues.

@codegraphtheory

Copy link
Copy Markdown
Owner

Superseded by merged maintainer integration #53 with co-author credit.

@codegraphtheory

Copy link
Copy Markdown
Owner

Paid. Thank you for the contribution.

Wallet: FFAdvcr2CUPbaQSypK3c8WfQo3SuyBh5YKrtzZRSvg34
Transaction: https://solscan.io/tx/3qGbbxGr8pQLoup6wRDNHqDWkhaZFjqDMmQRSP2ZQ1XaVBYjkhCfcrmeSSFJ8uA5a4bfwVyRUsB91RGHyTe9ymE4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.25 SOL bounty] Add an interactive profile design wizard that writes profile.params.yaml

2 participants