Skip to content

[Change] Runtime adoption of safe artifact write policy #177

@djm81

Description

@djm81

Why

SpecFact bundle runtime code should normally keep its local state inside .specfact/ and avoid mutating user-owned repository artifacts. The original scope read like a repo-wide generic safe-write layer for all runtime writers, but the practical need is narrower: sanctioned external touchpoints outside .specfact should reuse the core safe-write contract, while managed artifacts inside .specfact need explicit ownership rules so user-tuned config survives and fully owned state remains deterministic.

What Changes

  • define a runtime artifact boundary policy that distinguishes sanctioned external user-owned artifacts outside .specfact from SpecFact-managed artifacts inside .specfact
  • reuse the paired core safe-write contract from specfact-cli only for sanctioned external touchpoints outside .specfact
  • define .specfact ownership classes so fully owned generated state can update deterministically while user-tuned config preserves unrelated keys or sections
  • narrow first-adopter scope to practical backlog bundle paths such as .specfact/backlog-config.yaml, mapping files under .specfact/templates/backlog/, and sync-managed state/output paths
  • document preservation guarantees for sanctioned external touchpoints and ownership semantics for .specfact artifacts

Acceptance Criteria

  • sanctioned runtime touchpoints outside .specfact reuse the paired core safe-write behavior instead of introducing a second generic modules-side abstraction
  • backlog config and mapping updates under .specfact preserve unrelated user-managed settings while updating only the targeted managed subtree
  • sync-managed artifacts distinguish fully owned .specfact state from explicit external output targets and do not silently overwrite user-owned paths
  • runtime tests cover preserved .specfact config content and fail-safe handling for explicit external targets

Dependencies

Related Issues/PRs

Additional Context

This sibling change now focuses on the practical boundary in the modules repo: user-owned files outside .specfact remain the exception path, and .specfact artifacts use ownership-aware runtime behavior rather than a broad generic safe-write framework.


OpenSpec Change Proposal: project-runtime-01-safe-artifact-write-policy

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions