Artifact Inventory

This document catalogs all artifacts produced and consumed by DIDP, their purposes, locations, and lifecycle.

Core Artifacts

iteration_state.yaml

Purpose: Single source of truth for iteration progress

Location: Project root or .didp/iteration_state.yaml

Lifecycle: Created at iteration start, updated throughout, archived at completion

Contents:

iteration:
  id: "unique-iteration-id"
  goal: "What we're trying to achieve"
  created_at: "2025-01-01"

phase:
  name: "planning|analysis|spec_lock|implementation|testing|archive|merge|complete"
  entered_at: "2025-01-01"
  auto_advance: true|false
  locked: true|false

exit_criteria:
  - criterion: "Description of requirement"
    satisfied: true|false

artifacts:
  - path: "path/to/artifact"
    type: "spec|plan|code|test|doc"
    status: "draft|review|approved|frozen"

handoff_notes:
  summary: "What happened this session"
  decisions_made: []
  risks_identified: []
  next_recommended_action: "What to do next"

Authority: Highest in source-of-truth hierarchy


workflow_contract.md

Purpose: Agent constitution governing development behavior

Location: docs/workflow_contract.md or project docs

Lifecycle: Created once, rarely modified, versioned with protocol

Contents:

  • Purpose and authority statement
  • Source of truth hierarchy
  • Session bootstrap requirements
  • Phase obedience rules
  • Conversational mode by phase
  • Replan protocol
  • Error handling guidance

Authority: Second only to iteration_state.yaml


Bootstrap Prompt

Purpose: Initialize new sessions with minimal context

Location: prompts/bootstrap_prompt_minimal.txt

Variants:

VariantSizeUse Case
bootstrap_prompt_minimal.txt~500 tokensStandard initialization
bootstrap_prompt_ultra_minimal.txt~200 tokensExtremely constrained contexts

Contents:

You are operating under DIDP (Deterministic Iterative Development Protocol).

MANDATORY FIRST ACTIONS:
1. Read docs/workflow_contract.md
2. Read iteration_state.yaml
3. Identify current phase
4. Resume from handoff_notes.next_recommended_action

If any document is missing or inconsistent, STOP and report.

Do not proceed with any work until these documents are loaded.

Specification Artifacts

Protocol Specification

Purpose: Normative definition of a protocol

Location: spec/<name>/v<major>/index.md

Required Frontmatter:

---
title: "Protocol Name"
version: "1.0"
status: "draft|review|published|deprecated"
owner: "owner@example.com"
published: "2025-01-01"  # if published
---

Lifecycle:

  1. Draft: Initial creation, open to changes
  2. Review: Seeking feedback, structural changes discouraged
  3. Published: Frozen, only errata allowed
  4. Deprecated: Superseded by newer version

JSON Schema

Purpose: Machine-readable validation for YAML artifacts

Location: schemas/<artifact>.schema.json

Example: schemas/iteration_state.schema.json

Usage:

# Validate iteration state
ajv validate -s schemas/iteration_state.schema.json -d iteration_state.yaml

Phase Artifacts

Planning Phase

ArtifactPurposeFormat
Goals documentDefine iteration objectivesMarkdown
Scope statementBoundaries of workSection in iteration_state
Initial requirementsRaw requirements gatheringMarkdown list

Analysis Phase

ArtifactPurposeFormat
Analysis reportFindings from investigationMarkdown
Risk registerIdentified risks and mitigationsYAML or table
Feasibility assessmentCan we do this?Markdown

Spec Lock Phase

ArtifactPurposeFormat
Frozen specificationImmutable requirementsMarkdown
Implementation planHow to build itMarkdown
Test planHow to verify itMarkdown

Implementation Phase

ArtifactPurposeFormat
Source codeThe thing being builtVarious
Unit testsCode-level verificationVarious
Progress logWhat was doneIn iteration_state

Testing Phase

ArtifactPurposeFormat
Test resultsPass/fail outcomesVarious
Defect logIssues foundMarkdown or YAML
Coverage reportWhat was testedVarious

Archive Phase

ArtifactPurposeFormat
Archive bundlePreserved iteration stateZip or directory
RetrospectiveLessons learnedMarkdown

Artifact Locations

Standard Directory Structure

project/
├── .didp/
│   ├── iteration_state.yaml    # Current state
│   └── archive/                # Past iterations
├── docs/
│   ├── workflow_contract.md    # Agent constitution
│   └── ...                     # Other documentation
├── spec/
│   └── <name>/v<version>/      # Published specs
├── schemas/
│   └── *.schema.json           # Validation schemas
├── prompts/
│   └── bootstrap_*.txt         # Session prompts
└── src/                        # Source code (if applicable)

Artifact Authority Hierarchy

When artifacts conflict, authority is resolved in this order:

  1. iteration_state.yaml (highest)
  2. workflow_contract.md
  3. Phase artifacts (specs, plans)
  4. Git repository state
  5. Conversational context (lowest)

Artifact Versioning

Specifications

  • Major version in URL path
  • Minor/patch in frontmatter
  • Immutable once published

Iteration State

  • Not versioned (current state only)
  • History in git commits
  • Archived iterations preserved

Supporting Documents

  • Version in frontmatter metadata
  • Can evolve freely
  • Track changes in git

Artifact Validation

Required Validations

ArtifactValidation
iteration_state.yamlJSON Schema, phase transition rules
Specification frontmatterRequired fields present
Bootstrap promptContains mandatory sections
# Example CI validation
validate:
  - ajv validate -s schemas/iteration_state.schema.json -d iteration_state.yaml
  - check-frontmatter spec/**/*.md
  - lint-markdown docs/**/*.md