Skip to content

Commit 041d931

Browse files
committed
release 2.1.0: added base slice context for fpf. Strict distinction between the methods (Plan, run time) and the work/validation (actual execution). Added formality tracking in hypotheses and novelty/complexity tags
1 parent 85f8a4e commit 041d931

File tree

9 files changed

+175
-39
lines changed

9 files changed

+175
-39
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,53 @@ All notable changes to Crucible Code will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2025-12-13
9+
10+
### Added
11+
12+
#### Repository Context
13+
14+
- **`.fpf/context.md`**: Created by `/fpf-0-init` to define the "Base Slice" (Tech Stack, Scale, Constraints).
15+
- **Context Awareness**: All commands (`hypothesize`, `research`, `test`) now read this file to ground decisions.
16+
- **CLAUDE.md Update**: Instructions for Claude to check `.fpf/context.md` first.
17+
18+
#### Enhanced Hypothesis Structure
19+
20+
- **Formality (F-Score)**: Added `formality: [0-9]` to hypothesis frontmatter.
21+
- **NQD Tags**: Added `novelty` and `complexity` to hypothesis frontmatter for diversity tracking.
22+
- **Strict Method/Work Split**: Hypothesis body restructured into "1. The Method (Design-Time)" and "2. The Validation (Run-Time)" to enforce A.15.
23+
24+
#### Documentation
25+
26+
- **F-Score Definitions**: Added explanation of F0-F9 ranges to README.
27+
- **TODOs**: Added roadmap items for deeper NQD and Method/Work integration.
28+
29+
## [2.1.0] - 2025-12-13
30+
31+
### Added
32+
33+
#### Agentic Initialization
34+
35+
- **Smart `/fpf-0-init`**: Now scans the repository (package.json, Dockerfile, etc.) to infer tech stack.
36+
- **Interactive Interview**: Asks the user clarifying questions about Scale, Budget, and Constraints to build a robust Context.
37+
- **`.fpf/context.md`**: New foundational file that grounds all reasoning in the project's specific reality.
38+
39+
#### Repository Context Integration
40+
41+
- **Context Awareness**: All commands (`hypothesize`, `research`, `test`) now read `.fpf/context.md` to make decisions relevant.
42+
- **CLAUDE.md Update**: Instructions for Claude to check `.fpf/context.md` first.
43+
44+
#### Enhanced Hypothesis Structure
45+
46+
- **Formality (F-Score)**: Added `formality: [0-9]` to hypothesis frontmatter.
47+
- **NQD Tags**: Added `novelty` and `complexity` to hypothesis frontmatter for diversity tracking.
48+
- **Strict Method/Work Split**: Hypothesis body restructured into "1. The Method (Design-Time)" and "2. The Validation (Run-Time)" to enforce A.15.
49+
50+
#### Documentation
51+
52+
- **F-Score Definitions**: Added explanation of F0-F9 ranges to README.
53+
- **Concepts**: Added simple explanations for NQD and Method vs. Work.
54+
855
## [2.0.0] - 2025-12-13
956

1057
### Added

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ When reasoning through problems, apply these principles:
6767

6868
### 2. Investigate the Codebase
6969

70-
- **Check `.fpf/knowledge/` first** — Project knowledge base with verified claims at different assurance levels
70+
- **Check `.fpf/context.md` first** — Project context, constraints, and tech stack
71+
- **Check `.fpf/knowledge/`** — Project knowledge base with verified claims at different assurance levels
7172
- **Check `.context/` directory** — Architectural documentation and design decisions
7273
- Use Task tool for broader/multi-file exploration (preferred for context efficiency)
7374
- Explore relevant files and directories

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ Problem Statement
171171
| **L2** | Verified | Empirically tested | `/fpf-3-test` or `/fpf-3-research` |
172172
| **Invalid** | Disproved | Was wrong — kept for learning | Failed at any stage |
173173

174+
### Formality (F-Score)
175+
176+
Rigor of expression (not truth, but precision).
177+
178+
- **F0-F2 (Sketch):** Rough ideas, whiteboard notes, vague constraints.
179+
- **F3-F5 (Structured):** Steps, clear constraints, executable code/tests.
180+
- **F6-F9 (Rigorous):** Formal proofs, math models, machine-checked invariants.
181+
182+
Most engineering work targets **F3-F5**.
183+
174184
### WLNK (Weakest Link)
175185

176186
**Critical rule:** Assurance = min(evidence), NEVER average.
@@ -185,6 +195,23 @@ Combined Assurance: R_eff = 0.65 (capped by weakest)
185195

186196
One weak piece of evidence caps your entire argument. If you want solid decisions, you need to strengthen — or acknowledge — your weakest link.
187197

198+
### NQD (Novelty, Quality, Diversity)
199+
200+
We track three metrics to ensure we aren't just guessing:
201+
202+
- **Novelty:** How new is this idea? (Conservative vs. Radical). We want a mix.
203+
- **Quality:** How likely is it to work? (High complexity = Higher risk).
204+
- **Diversity:** Are we exploring different *types* of solutions? (e.g. Architectural vs. Operational).
205+
206+
### Method vs. Work
207+
208+
Crucible Code strictly separates the **Plan** from the **Result**.
209+
210+
- **Method (Design-Time):** The recipe. The code you plan to write. The "How-To".
211+
- **Work (Run-Time):** The cooking. The test results. The logs. The "What Happened".
212+
213+
Hypotheses now define the **Method** (Plan) first, then outline the **Validation** (Work) needed to prove it.
214+
188215
### Congruence (for External Evidence)
189216

190217
External evidence may not apply to your context. Assess congruence:
@@ -379,10 +406,9 @@ The framework teaches itself through use. A few cycles and it clicks.
379406

380407
FPF belongs to Anatoly Levenchuk. This project inherits any FPF-associated licenses. No additional proprietary licenses imposed.
381408

409+
- Edge case handling
410+
- Documentation clarity
411+
382412
## Contributing
383413

384414
Issues and PRs welcome. Focus areas:
385-
386-
- Better examples
387-
- Edge case handling
388-
- Documentation clarity

commands/fpf-0-init.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,42 @@ mkdir -p .fpf/decisions
3333
mkdir -p .fpf/sessions
3434
```
3535

36-
### 3. Create Session File
36+
### 3. Create Context File (Agentic)
37+
38+
**Do not just create a blank file.**
39+
40+
1. **Investigate:** Scan the repository for technical signals.
41+
- Check `package.json`, `go.mod`, `Cargo.toml`, `requirements.txt`, `pom.xml`, `Gemfile`.
42+
- Check `Dockerfile`, `docker-compose.yml`, `k8s/`, `.github/workflows`.
43+
- Check `README.md` for architecture notes.
44+
45+
2. **Draft & Interview:**
46+
- Present what you found: "I detected Python 3.11 and Django..."
47+
- Ask **specific** questions for what you can't see (Scale, Budget, Constraints).
48+
- *Example:* "I see this is a web app. What is the target user scale? (<1k, >1M?)"
49+
50+
3. **Write `.fpf/context.md`:**
51+
- Combine your findings and the user's answers.
52+
53+
```markdown
54+
# Repository Context (A.2.6 Context Slice)
55+
56+
## Tech Stack (Inferred)
57+
- **Language:** [e.g. Python 3.11]
58+
- **Frameworks:** [e.g. Django 4.2]
59+
- **Infra:** [e.g. Docker, AWS]
60+
61+
## Scale & Performance (User-Defined)
62+
- **Users:** [Value]
63+
- **Traffic:** [Value]
64+
- **Latency Target:** [Value]
65+
66+
## Hard Constraints (User-Defined)
67+
- [Constraint 1]
68+
- [Constraint 2]
69+
```
70+
71+
### 4. Create Session File
3772

3873
Create `.fpf/session.md`:
3974

commands/fpf-1-hypothesize.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Problem: `$ARGUMENTS.problem`
4545
### 1. Load Context
4646

4747
- Read `.fpf/session.md` for any active context
48+
- Read `.fpf/context.md` for project context (Tech Stack, Scale, Constraints)
4849
- Read relevant project files to understand constraints
4950
- Check `.fpf/knowledge/L2/` for verified facts that constrain solution space
5051
- Check `.fpf/knowledge/invalid/` for approaches already disproven
@@ -94,6 +95,9 @@ type: hypothesis
9495
created: [timestamp]
9596
problem: [reference to problem]
9697
status: L0
98+
formality: [0-9] # F-Score (0=Sketch, 9=Proof)
99+
novelty: [Conservative|Novel|Radical]
100+
complexity: [Low|Medium|High]
97101
author: Claude (generated), Human (to review)
98102
scope:
99103
applies_to: "[conditions where this solution applies]"
@@ -103,13 +107,28 @@ scope:
103107

104108
# Hypothesis: [Clear one-line statement]
105109

106-
## Approach
110+
## 1. The Method (Design-Time)
111+
*This is the plan/recipe. (A.15 MethodDescription)*
112+
113+
### Proposed Approach
107114
[2-3 sentences: what this solution proposes]
108115

109-
## Rationale
116+
### Rationale
110117
[Why this might work — the abductive reasoning]
111118

112-
## Plausibility Assessment
119+
### Implementation Steps
120+
1. [Step 1]
121+
2. [Step 2]
122+
3. [Step 3]
123+
124+
### Expected Capability
125+
- [Capability Claim 1]
126+
- [Capability Claim 2]
127+
128+
## 2. The Validation (Run-Time)
129+
*This section tracks the Work performed to verify this.*
130+
131+
### Plausibility Assessment
113132

114133
| Filter | Score | Justification |
115134
|--------|-------|---------------|
@@ -120,21 +139,17 @@ scope:
120139

121140
**Plausibility Verdict:** [PLAUSIBLE / MARGINAL / IMPLAUSIBLE]
122141

123-
## Scope of Applicability
124-
125-
**This hypothesis applies when:**
126-
- [Condition 1]
127-
- [Condition 2]
128-
129-
**This hypothesis does NOT apply when:**
130-
- [Condition 1]
131-
- [Condition 2]
132-
133-
## Assumptions
142+
### Assumptions to Verify
134143
- [ ] [Assumption 1 — must be true for this to work]
135144
- [ ] [Assumption 2]
136145
- [ ] [Assumption 3]
137146

147+
### Required Evidence
148+
- [ ] **Internal Test:** [Verification test]
149+
- **Performer:** [Developer | AI Agent | CI Pipeline]
150+
- [ ] **Research:** [External validation]
151+
- **Performer:** [Developer | AI Agent]
152+
138153
## Falsification Criteria
139154
[What evidence would DISPROVE this hypothesis?]
140155
- If [X happens], this approach fails

commands/fpf-3-research.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ This phase answers: **"What does the outside world know about this?"**
7171
# Read hypothesis to research
7272
cat .fpf/knowledge/L1/[hypothesis].md
7373

74+
# Read project context for congruence assessment
75+
cat .fpf/context.md
76+
7477
# Extract assumptions needing external validation
7578
grep -A10 "Assumptions" .fpf/knowledge/L1/[hypothesis].md
7679

commands/fpf-3-test.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ This phase answers: **"Does this actually work in practice, in OUR context?"**
8585
# Read L1 hypotheses to test
8686
cat .fpf/knowledge/L1/*.md
8787

88+
# Read project context
89+
cat .fpf/context.md
90+
8891
# Check what assumptions need empirical verification
8992
grep -A10 "Assumptions" .fpf/knowledge/L1/*.md
9093

commands/fpf-status.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,27 @@ if [ ! -d ".fpf" ]; then
2020
fi
2121
```
2222

23-
### 2. Gather Statistics
23+
### 2. Gather Statistics (Agentic)
2424

25-
```bash
26-
# Count knowledge at each level
27-
L0_COUNT=$(find .fpf/knowledge/L0 -name "*.md" 2>/dev/null | wc -l)
28-
L1_COUNT=$(find .fpf/knowledge/L1 -name "*.md" 2>/dev/null | wc -l)
29-
L2_COUNT=$(find .fpf/knowledge/L2 -name "*.md" 2>/dev/null | wc -l)
30-
INVALID_COUNT=$(find .fpf/knowledge/invalid -name "*.md" 2>/dev/null | wc -l)
31-
32-
# Count artifacts
33-
EVIDENCE_COUNT=$(find .fpf/evidence -name "*.md" 2>/dev/null | wc -l)
34-
DRR_COUNT=$(find .fpf/decisions -name "DRR-*.md" 2>/dev/null | wc -l)
35-
SESSIONS_COUNT=$(find .fpf/sessions -name "*.md" 2>/dev/null | wc -l)
36-
```
25+
**Do not run a complex shell script.** Use your tools to gather data and compute metrics internally.
3726

38-
### 3. Read Session State
27+
1. **Count Files:**
28+
- List files in `.fpf/knowledge/L0/`, `L1/`, `L2/`, `invalid/` to get counts.
29+
- List files in `.fpf/evidence/`, `.fpf/decisions/`, `.fpf/sessions/`.
3930

40-
```bash
41-
cat .fpf/session.md
42-
```
31+
2. **Analyze Health & Formality:**
32+
- **Read Frontmatter:** Read the first 10 lines of all active hypothesis files (L0, L1, L2) and evidence files.
33+
- **Compute Internally:**
34+
- **Formality Range:** Find the `formality:` value in hypotheses. Record Min and Max.
35+
- **Trust Index:** Count total evidence files. Count how many have `valid_until` dates in the future.
36+
- `Trust Index = Valid Evidence / Total Evidence`
37+
- **Drift:** Identify L2 hypotheses. Check if their linked evidence files are expired.
38+
- `Drift = L2 Hypotheses with Expired Evidence / Total L2 Hypotheses`
4339

44-
Extract: `Phase:`, `Problem:`, Active hypotheses, Last transition
40+
3. **Read Session State:**
41+
- Read `.fpf/session.md` to get the current Phase, Problem, and active hypothesis list.
4542

46-
### 4. Check for Issues
43+
### 3. Check for Issues
4744

4845
Scan for:
4946
- Expired evidence (check `valid_until` dates)
@@ -64,6 +61,15 @@ Scan for:
6461
| **Started** | [timestamp] |
6562
| **Last Activity** | [timestamp] |
6663

64+
### Project Health (Current Session)
65+
66+
| Metric | Value |
67+
|--------|-------|
68+
| **Min Formality** | [MIN_FORMALITY] |
69+
| **Max Formality** | [MAX_FORMALITY] |
70+
| **Trust Index (Fresh Evidence)** | [TRUST_INDEX] (Valid: [VALID_EVIDENCE_COUNT]/[EVIDENCE_COUNT]) |
71+
| **Drift (L2 Expired Evidence)** | [DRIFT] (L2 Hypotheses with expired evidence: [L2_HYPS_WITH_EXPIRED_EVIDENCE]/[L2_COUNT]) |
72+
6773
### Knowledge Base
6874

6975
| Level | Count | Description |

install.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)