Skip to content

feat(setup): implement robust artifact inference and state priority table#137

Merged
moisgobg merged 3 commits intomainfrom
feat/setup-state-management
Mar 4, 2026
Merged

feat(setup): implement robust artifact inference and state priority table#137
moisgobg merged 3 commits intomainfrom
feat/setup-state-management

Conversation

@moisgobg
Copy link
Contributor

This PR replaces the imperative setup_state.json management with a declarative "Artifact Audit" in the setup command.

Key Changes:

  • State Inference: Replaced procedural state-checking with a declarative Priority Table that maps physical artifacts (product.md, workflow.md, etc.) to specific setup sections.
  • Project Maturity: Refined Greenfield/Brownfield detection to be "Conductor-aware." It now correctly ignores the conductor/ directory and empty/newly initialized .git repos when determining if a project exists.
  • Fast-Forward Logic: Introduced a context-establishment step that determines project maturity before jumping directly to the target resume section, ensuring the agent doesn't ask redundant questions.
  • Self-Healing: Added a pre-requisite cleanup step to Section 3.0 to handle interrupted track generations by wiping incomplete folders and restarting cleanly.
  • Token Efficiency: Significantly reduced prompt logic size and eliminated redundant file-write tool calls.

Related Issue: fixes #136

…cases

- Make Brownfield/Greenfield classification Conductor-aware.

- Implement fast-forward logic to preserve maturity state during resumes.

- Add self-healing cleanup step for interrupted track generations.

- Streamline artifact definitions in the shallow audit table.

- Require agent to explain maturity classification decisions.
@moisgobg moisgobg self-assigned this Feb 27, 2026
@moisgobg moisgobg added feature New feature or request discussion Proposals or architectural changes that require consensus or further research. area:setup Related to conductor:setup command maintainer only Reserved for project maintainers. Not open for external contributions labels Feb 27, 2026
Copy link
Contributor

@hminooei hminooei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that a .md file exists but it's incomplete?

@moisgobg moisgobg marked this pull request as draft March 2, 2026 16:29
@moisgobg
Copy link
Contributor Author

moisgobg commented Mar 2, 2026

Is it possible that a .md file exists but it's incomplete?

Good question, this just swaps out the setup file with a shallow inference. The next step is doing a deep inference to check file format and content, and add a self-healing process.

@moisgobg moisgobg marked this pull request as ready for review March 2, 2026 21:45
@moisgobg moisgobg merged commit d90aa64 into main Mar 4, 2026
2 checks passed
@moisgobg moisgobg deleted the feat/setup-state-management branch March 4, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:setup Related to conductor:setup command discussion Proposals or architectural changes that require consensus or further research. feature New feature or request maintainer only Reserved for project maintainers. Not open for external contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Replace brittle JSON state with robust artifact inference in setup

2 participants