-
Notifications
You must be signed in to change notification settings - Fork 12
docs: reconcile maintenance and specification guidance #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,25 +59,13 @@ ALWAYS open and follow `{cf-studio-path}/config/rules/anti-patterns.md` WHEN rev | |
|
|
||
| NEVER edit files inside `{cf-studio-path}/.core/` or `{cf-studio-path}/.gen/` directly — they are read-only copies. ALWAYS edit the canonical source files under project root (`skills/`, `kits/`, `schemas/`, etc.) and then run `cfs update --source . --force` to sync changes into `{cf-studio-path}/`. | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropping mandatory spec validation before code changesNon-blocking review challenge -- [product] The old workflow made Why this is worth asking |
||
| ### Specs-First Development Workflow | ||
| ### Code and specification changes | ||
|
|
||
| ALWAYS update specs and documentation in `architecture/` FIRST BEFORE writing any code. | ||
| Follow [Making Changes](../../../CONTRIBUTING.md#making-changes) for maintenance of Constructor Studio itself. Edit canonical source files directly when implementing or repairing behavior already described by the specifications. Preserve the applicable traceability markers; do not require an unrelated specification edit merely to change code. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Fix the relative From 🤖 Prompt for AI Agents |
||
|
|
||
|
ainetx marked this conversation as resolved.
|
||
| **Mandatory sequence for any code change**: | ||
| When the requested change alters requirements, architecture, or a specified contract, update the affected artifacts in `architecture/` before implementing the changed contract. Validate affected specifications and traceability with the checks described in CONTRIBUTING.md. | ||
|
|
||
| 1. **Update specs** — modify or create relevant artifacts in `architecture/`: | ||
| - `architecture/PRD.md` — for new requirements or use cases | ||
| - `architecture/DESIGN.md` — for architectural changes or new components | ||
| - `architecture/DECOMPOSITION.md` — for new features or work breakdown | ||
| - `architecture/features/*.md` — for feature-level specs | ||
| - `architecture/specs/*.md` — for technical specs (CDSL, CLISPEC, etc.) | ||
| - `architecture/ADR/*.md` — for architecture decisions | ||
|
|
||
| 2. **Validate specs** — run `cfs validate` to ensure artifact integrity | ||
|
|
||
| 3. **Generate code via Constructor Studio** — use `/cf-generate` workflow to implement code from specs with traceability markers | ||
|
|
||
| NEVER write code directly without first updating the corresponding specs. This ensures design-to-code traceability and prevents implementation drift from design intent. | ||
| Use `/cf-generate` when the selected workflow calls for generation from specifications. Its prerequisites belong to that workflow; it is not a prerequisite for every maintenance edit. | ||
|
|
||
| --- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,7 +108,7 @@ studio/ # Project root | |
|
|
||
| ### Critical Rule | ||
|
|
||
| > **Do not edit files under `.bootstrap/` directly when contributing.** | ||
| > **Do not edit generated mirrors under `.bootstrap/.core/` or `.bootstrap/.gen/` directly when contributing.** | ||
| > In this self-hosted repo, `.bootstrap/` is a bootstrap copy of a Constructor Studio version used | ||
| > to develop Constructor Studio itself — similar to bootstrapping a compiler. | ||
| > This is a repo-specific self-hosted setup, not the general user-project layout described in the README. | ||
|
|
@@ -120,6 +120,8 @@ studio/ # Project root | |
| > whenever you need to refresh the local bootstrap for manual verification, but do not commit | ||
| > `.bootstrap/.core/`, `.bootstrap/.gen/`, or generated host integration files. | ||
|
|
||
| The tracked `.bootstrap/config/AGENTS.md` and `.bootstrap/config/SKILL.md` are user-editable instructions for this repository. Edit them directly when changing local workflow guidance; they are not source-code mirrors. Generated kit outputs under `.bootstrap/config/kits/` still come from their canonical kit sources. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Narrowed Critical Rule no longer covers generated.bootstrap/config/kits/Severity: Minor Problem Reproduction, impact, suggested fix, verificationHow to reproduce
Expected behavior Actual behavior Impact Suggested correction How to verify
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-verified against the current code -- this write-up has been updated. WhyProblem (was): The Critical Rule was changed from banning all of Problem (now): CONTRIBUTING.md's Critical Rule was narrowed from banning direct edits under all of '.bootstrap/' to banning them only under '.bootstrap/.core/' and '.bootstrap/.gen/'. The newly added paragraph acknowledges '.bootstrap/config/kits/' is also generated output ('come from their canonical kit sources') but does not add it to the prohibited paths. |
||
|
|
||
| The `make update` command runs `cfs update --source . --force`, which: | ||
| 1. Copies canonical sources into `.bootstrap/.core/` | ||
| 2. Regenerates `.bootstrap/.gen/` aggregates | ||
|
|
@@ -385,6 +387,8 @@ list. | |
|
|
||
| ### Code Changes | ||
|
|
||
| For maintenance that preserves an existing specified contract, edit the canonical code directly and preserve its traceability markers. If requirements, architecture, or a specified contract change, update the affected specifications first. `/cf-generate` applies when the selected workflow calls for generation, rather than to every code edit. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Changes numbered list still bans direct.bootstrap/ edits, contradicting the new config/ carve-outSeverity: Minor Problem Reproduction, impact, suggested fix, verificationHow to reproduce
Expected behavior Actual behavior Impact Suggested correction How to verify
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-verified against the current code -- this write-up has been updated. WhyProblem (was): CONTRIBUTING.md's Critical Rule was narrowed to '.bootstrap/.core/ or.bootstrap/.gen/' and a new paragraph explicitly says.bootstrap/config/AGENTS.md and SKILL.md are user-editable and should be edited directly. But the numbered 'Code Changes' list's step 2, left untouched by this diff, still reads 'Do not patch mirrored files under Problem (now): The diff narrows the Critical Rule (CONTRIBUTING.md:109) to '.bootstrap/.core/ or.bootstrap/.gen/' and adds a new paragraph (CONTRIBUTING.md:123) explicitly saying.bootstrap/config/AGENTS.md and SKILL.md are user-editable and should be edited directly. But the pre-existing, unmodified numbered 'Code Changes' checklist item 2 still reads 'Do not patch mirrored files under |
||
|
|
||
| 1. Edit canonical files under `skills/studio/scripts/studio/` (skill engine), `src/studio_proxy/` (CLI proxy), or other project-root source directories | ||
| 2. Do not patch mirrored files under `.bootstrap/` directly | ||
| 3. If you need a live manual check against the bootstrap copy, run `make update`, perform the test, and then revert `.bootstrap/` back to the previous state before opening the PR | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed AGENTS.md artifact-to-change-type mapping is not restored in CONTRIBUTING.mdSeverity: Minor Problem Reproduction, impact, suggested fix, verificationHow to reproduce
Expected behavior Actual behavior Impact Suggested correction How to verify
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-verified against the current code -- this write-up has been updated. WhyProblem (was): The old AGENTS.md text enumerated 6 artifact types (PRD.md, DESIGN.md, DECOMPOSITION.md, features/.md, specs/.md, ADR/.md) each mapped to a change type. The diff replaces this with generic text pointing to CONTRIBUTING.md's 'Making Changes' section for guidance on which artifacts to update. However, CONTRIBUTING.md's 'Architecture / Spec Changes' section (unchanged by this diff) only says 'Edit files under architecture/ (PRD, DESIGN, DECOMPOSITION, features)' — it omits ADR/.md and specs/*.md entirely. Problem (now): The diff deletes the 5-line mapping in.bootstrap/config/AGENTS.md that told contributors which architecture/ file to update for which kind of change (PRD.md, DESIGN.md, DECOMPOSITION.md, features/.md, specs/.md, ADR/.md), replacing it with generic prose ('update the affected artifacts in architecture/'). CONTRIBUTING.md's 'Architecture / Spec Changes' section (referenced by the new AGENTS.md text) is not shown to enumerate ADR/.md or specs/*.md, only PRD/DESIGN/DECOMPOSITION/features per its table of contents and prior consistent multi-reviewer confirmation.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bootstrap-revert instruction conflicts with newly authorized direct config editsSeverity: Major Problem Reproduction, impact, suggested fix, verificationHow to reproduce
Expected behavior Actual behavior Impact Suggested correction How to verify
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-verified against the current code -- this write-up has been updated. WhyProblem (was): CONTRIBUTING.md's Code Changes step 3 (unchanged by this diff) instructs contributors to run make update, test, then 'revert.bootstrap/ back to the previous state before opening the PR.' The same diff adds a paragraph declaring.bootstrap/config/AGENTS.md and SKILL.md as tracked, user-editable files meant to be edited directly and committed. No text excludes these two files from the blanket 'revert.bootstrap/' instruction. Problem (now): CONTRIBUTING.md's Code Changes step 3 (unchanged by this diff) says: 'run make update, perform the test, and then revert.bootstrap/ back to the previous state before opening the PR.' This diff simultaneously adds a paragraph stating '.bootstrap/config/AGENTS.md and.bootstrap/config/SKILL.md are user-editable instructions... Edit them directly.' If a contributor runs make update for manual verification after (or interleaved with) editing AGENTS.md/SKILL.md, following step 3 literally would revert those intentional edits along with the rest of.bootstrap/. |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No CI check enforces the new AGENTS.md ↔ CONTRIBUTING.md cross-reference
Severity: Minor
Problem
AGENTS.md now links to CONTRIBUTING.md's 'Making Changes' heading and depends on its prose staying compatible (workflow-precondition and file-editability claims), but no job in.github/workflows/ci.yml lints markdown links/anchors or diffs these two files for consistency.
Reproduction, impact, suggested fix, verification
How to reproduce
Expected behavior
A drift in CONTRIBUTING.md that breaks the AGENTS.md cross-reference should fail some deterministic CI check.
Actual behavior
No such check exists; the two files can silently diverge with all CI jobs still passing.
Impact
Future edits to CONTRIBUTING.md's Making Changes section (or AGENTS.md's link) can silently break the newly-introduced cross-reference/coupling with no automated signal.
Suggested correction
Add a lightweight markdown-link-checker step (or a small script asserting the referenced heading/anchor exists) to CI, or fold the check into an existing doc-consistency job.
How to verify
Confirm a new CI step fails when the CONTRIBUTING.md heading anchor referenced from AGENTS.md is renamed/removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-verified against the current code -- this write-up has been updated.
Why
Problem (was): The diff replaces a self-contained, fully-enumerated workflow section in.bootstrap/config/AGENTS.md with a relative markdown link and prose that depends on CONTRIBUTING.md's '#making-changes' anchor and its 'Code Changes' section content staying accurate. Reviewing the Makefile (targets: test, validate, validate-kits, spec-coverage, check-versions, lint-ci, vulture, pylint, ci, etc.) shows no target that lints markdown links/anchors, and lint-ci only runs actionlint against GitHub Actions workflow files, not documentation cross-references.
Problem (now): AGENTS.md now links to CONTRIBUTING.md's 'Making Changes' heading and depends on its prose staying compatible (workflow-precondition and file-editability claims), but no job in.github/workflows/ci.yml lints markdown links/anchors or diffs these two files for consistency.