Skip to content

refactor: master tracking issue — code review & simplify all modules #60

@thomaschristory

Description

@thomaschristory

Overview

Full codebase review + simplify pass. Each child issue is scoped to one module area. Work is organised in three waves based on dependency order — agents working on later waves must wait for earlier waves to stabilise.


Coordination protocol (agents: read this)

Before starting any child issue:

  1. Check this issue's comments — if another agent claimed the issue within the last 24 h and has not posted a blocker/handoff, stop and surface the conflict.
  2. Post a claim comment on the child issue stating: what you are doing, which branch you are on, expected scope.
  3. Post milestone updates on the child issue: branch pushed, PR opened, CI green.
  4. Post a completion comment when merged or abandoned.

Keep comments to 1–3 lines. Do not spam.


Wave 1 — leaf/core modules (fully parallel, no dependencies)

These are safe to run simultaneously. They do not depend on each other.

Issue Scope Lines
#58 nsc/schema/ parsing layer (models, loader, hashing) ~180
#59 Foundation layer: model/command_model.py, aliases/resolver.py, auth/verify.py ~380
#55 nsc/config/ package (writer, loader, models, settings) ~420
#57 nsc/output/ package (errors, explain, table, render, csv_) ~640
#50 nsc/http/ package (client, audit, retry, errors) ~750
#52 nsc/cache/store.py + nsc/schema/source.py ~584

Start Wave 2 only after all Wave 1 PRs are merged to main.


Wave 2 — builder + CLI core (run after Wave 1)

These consume model/, output/, or http/ and must see the stabilised versions.

Issue Scope Lines
#49 nsc/builder/build.py 514
#51 nsc/cli/writes/ pipeline (input, bulk, preflight, apply, confirmation) ~1 044
#47 nsc/cli/handlers.py 660
#48 nsc/cli/registration.py 465

Start Wave 3 only after all Wave 2 PRs are merged to main.


Wave 3 — CLI sub-commands (run after Wave 2)

These sit on top of handlers + registration and must see the stabilised CLI core.

Issue Scope Lines
#53 CLI entry-points: app.py, runtime.py, login_commands.py ~933
#54 CLI management commands: aliases, profiles, skill ~765
#56 CLI utility commands: config, cache, init ~420

What each agent should do

  1. Pick an unstarted issue in the current wave.
  2. Run just lint and just test on the unmodified code first to establish a baseline.
  3. Review the files listed in the issue for: dead branches, over-defensive conditionals, logic in the wrong layer, loose type annotations, and what-comments (remove them).
  4. Simplify. Keep all behaviour identical. Do not add features.
  5. Run just lint and just test again — both must be green before opening a PR.
  6. Open a PR against main, squash-merge after CI passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode cleanup, simplification, review

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions