Collection of engineering calculation projects (Python + Typst), each with input, calc script, tests, results, and generated PDF where available.
69 lines
5.2 KiB
Markdown
69 lines
5.2 KiB
Markdown
# Task 005 — Reviewer pass on the whole calculation
|
||
|
||
## Goal
|
||
|
||
Verify engineering correctness, deterministic evidence, and documentation for the concentric footing analysis before marking the project done.
|
||
|
||
## Background
|
||
|
||
This task is reviewer-local (reasoning) with simplify skill pass. It must not modify source except via review report; if issues are found the orchestrator will send them back to the builder. The reviewer must check ACI 318-19 clause references, units, applicability limits, benchmark tolerances, and that the Typst sheet presents only (no recomputation) per PROJECT_STATE.md.
|
||
|
||
## Files to Modify
|
||
|
||
No files to modify in this task. The reviewer writes a review note (verbal output) and runs the simplify skill as part of the standard review pass. If STATUS: FAIL, the orchestrator updates TASKS.md and re-delegates.
|
||
|
||
If the reviewer finds fixable issues, they must be reported as a structured list with file and line references.
|
||
|
||
## Implementation
|
||
|
||
Reviewer steps (read-only, then run commands via delegation tool if needed — but orchestrator handles command execution; reviewer describes what to run and checks output):
|
||
|
||
1. Read `PROJECT_STATE.md`, `TASKS.md`, `calcs/concentric-footing/calc.py`, `input.yaml`, `results.json`, `footing.typ`, `test_concentric_footing.py`, `README.md`, `codemap.md`, and `CONCENTRIC-FOOTING.pdf`.
|
||
2. Verify engineering spec. Formula → code-section map (all in `calc.py:compute()`):
|
||
- Soil bearing `q=Ps/Af`, `qu=Pu/Af`: Pressures block → `q_psf`, `qu_psf`.
|
||
- One-way shear `Vc=2·λ·√fc·B·d`, `Vu=qu·B·L1`: One-way shear block → `L1_in`, `Vu_one_way_kip`, `Vc_one_way_kip`, `phiVc_one_way_kip`.
|
||
- Two-way shear `bo=4(c+d)`, `vc=min(4,2+4/β,2+α·d/bo)·λ·√fc`, `Vu=qu·(Af-(c+d)²)`: Two-way shear block → `bo_in`, `vc_psi`, `Vu_two_way_kip`, `Vc_two_way_kip`, `phiVn_two_way_kip`.
|
||
- Flexure `Mu=qu·B·Lc²/2`, `a=As·fy/(0.85·fc·B)`, `Mn=As·fy·(d-a/2)`: Flexure block → `Lc_in`, `Mu_kipft`, `a_in`, `beta1`, `Mn_kipft`, `phiMn_kipft`.
|
||
- Bearing `Bn=0.85·fc·A1·min(√(A2/A1),2)`: Concrete bearing block → `A1_in2`, `A2_in2`, `sqrt_ratio`, `Bn_kip`, `phiBn_kip`.
|
||
- Soil bearing `q=Ps/Af` and `qu=Pu/Af` correctly use Af=Bf^2 in ft2, Ps/Pu in kip, qa in psf, D/C correct.
|
||
- One-way shear Vc=2*lambda*sqrt(fc)*B*d with phi 0.75, L1 = (B-c)/2 - d, Vu = qu*B*L1, correct unit conversion lbf->kip, handles L1<=0 edge.
|
||
- Two-way shear bo=4*(c+d), vc=min(4,2+4/beta,2+alpha*d/bo)*lambda*sqrt(fc) with alpha 40 interior, beta 1, phi 0.75, Vu=qu*(Af - (c+d)^2), bo correction documented.
|
||
- Flexure Mu=qu*B*Lc^2/2, a=As*fy/(0.85*fc*B), Mn=As*fy*(d-a/2), phi 0.9, beta1 formula per ACI, rho vs 0.0018.
|
||
- Bearing Bn=0.85*fc*A1*min(sqrt(A2/A1),2), phi 0.65, A1=bp^2, A2=Bf^2, sqrt cap.
|
||
- d = Df - cover to centroid, validation, lambda bounds, rebar area from #size.
|
||
3. Verify deterministic evidence:
|
||
- Run `python -m pytest calcs/concentric-footing/test_concentric_footing.py -v` and confirm 12 passed, no skipped.
|
||
- Run `python calcs/concentric-footing/calc.py --stdout | python -m json.tool` and confirm idempotent vs results.json (diff empty).
|
||
- Run `typst compile --root . calcs/concentric-footing/footing.typ calcs/concentric-footing/generated/footing.pdf` and confirm PDF exists and size >50KB.
|
||
- Run Typst queries for `<concentric-footing-loads>` and `<concentric-footing-results>` and confirm reconciliation within tolerances.
|
||
4. Check scope/limitations note in footing.typ mentions square only, interior only, gross pressure, no moment, bo correction, plate clarification, d definition, and that existing calc files were not touched.
|
||
5. Run simplify skill pass on the diff (calc.py + footing.typ + test file) for readability, no behavior change.
|
||
6. Return STATUS: PASS if all 8 checks below are satisfied, else STATUS: FAIL with enumerated issues.
|
||
|
||
## Acceptance Criteria (all must be true for PASS)
|
||
|
||
1. All six checks pass for default input; D/C values within expected ranges (soil ~0.82, one-way ~0.05, two-way ~0.11, flexure ~0.12, bearing ~0.22).
|
||
2. Corrected punching perimeter bo=92in is used; review notes the PDF's 68in deviation and that the sheet's Scope documents it.
|
||
3. Bearing plate vs column clarified (A1=36in2, A2=1296in2, Bn 183.6kip); alternative use of column size would be noted.
|
||
4. Pint unit conversions tested (alternate units test passes) and wrong-dimension guards raise ValueError with field name.
|
||
5. Effective depth d = Df - cover correctly validated; zero/negative d raises ValueError.
|
||
6. Typst sheet presents only (no capacity recomputation), derives loads inline, emits both `<concentric-footing-loads>` and `<concentric-footing-results>` metadata, and compiles.
|
||
7. README and codemap refreshed and list the new calculation; no existing calc files were modified (git diff or file timestamps check).
|
||
8. Pytest 12 passed, PDF compiles, results.json idempotent, simplify pass clean (no behavior change).
|
||
|
||
## Tests
|
||
|
||
Reviewer (via orchestrator delegation) runs:
|
||
|
||
```
|
||
python -m pip install -r requirements.txt
|
||
python -m pytest calcs/concentric-footing/test_concentric_footing.py -v
|
||
python calcs/concentric-footing/calc.py --stdout
|
||
typst compile --root . calcs/concentric-footing/footing.typ calcs/concentric-footing/generated/footing.pdf
|
||
```
|
||
|
||
All succeed; 12 passed.
|
||
|
||
## Dependencies
|
||
|
||
Task 004 must be DONE.
|