hast 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hast-0.1.0/.ai/config.yaml +2 -0
- hast-0.1.0/.ai/feedback/backlog.yaml +16 -0
- hast-0.1.0/.ai/feedback/notes.jsonl +3 -0
- hast-0.1.0/.ai/goals.yaml +28 -0
- hast-0.1.0/.ai/handoffs/2026-02-10_150000.md +39 -0
- hast-0.1.0/.ai/handoffs/2026-02-10_181051.md +24 -0
- hast-0.1.0/.ai/plan_note.md +72 -0
- hast-0.1.0/.ai/policies/execution_queue_policy.yaml +4 -0
- hast-0.1.0/.ai/policies/feedback_policy.yaml +18 -0
- hast-0.1.0/.ai/policies/model_routing.yaml +9 -0
- hast-0.1.0/.ai/policies/observability_policy.yaml +8 -0
- hast-0.1.0/.ai/policies/retry_policy.yaml +13 -0
- hast-0.1.0/.ai/policies/risk_policy.yaml +32 -0
- hast-0.1.0/.ai/policies/security_policy.yaml +19 -0
- hast-0.1.0/.ai/policies/spike_policy.yaml +4 -0
- hast-0.1.0/.ai/policies/transition_policy.yaml +7 -0
- hast-0.1.0/.ai/rules.md +9 -0
- hast-0.1.0/.ai/schemas/decision_evidence.schema.yaml +31 -0
- hast-0.1.0/.ai/sessions/20260215T173031+0900_codex_V1.1.brief.md +17 -0
- hast-0.1.0/.ai/sessions/20260215T173031+0900_codex_V1.1.prompt.txt +1439 -0
- hast-0.1.0/.ai/templates/decision_ticket.yaml +44 -0
- hast-0.1.0/.claude/settings.local.json +51 -0
- hast-0.1.0/.github/workflows/docs-generate.yml +49 -0
- hast-0.1.0/.github/workflows/quality-gates.yml +33 -0
- hast-0.1.0/.gitignore +19 -0
- hast-0.1.0/.pre-commit-config.yaml +52 -0
- hast-0.1.0/AGENTS.md +5 -0
- hast-0.1.0/LICENSE +21 -0
- hast-0.1.0/PKG-INFO +259 -0
- hast-0.1.0/README.md +224 -0
- hast-0.1.0/docs/100x-roadmap.md +104 -0
- hast-0.1.0/docs/ARCHITECTURE.md +234 -0
- hast-0.1.0/docs/SCENARIO_DEMO.md +33 -0
- hast-0.1.0/docs/auto-handoff.md +60 -0
- hast-0.1.0/docs/being-integration-guide.md +197 -0
- hast-0.1.0/docs/being-integration-roadmap.md +173 -0
- hast-0.1.0/docs/benchmarks/goal-context-experiment-2026-02-14.md +80 -0
- hast-0.1.0/docs/benchmarks/real-llm-worker-goal-experiment-2026-02-14.md +87 -0
- hast-0.1.0/docs/benchmarks/realworld-eval-2026-02-14.md +90 -0
- hast-0.1.0/docs/core-quality-bdd-plan.md +54 -0
- hast-0.1.0/docs/decision-validation-parallel-plan.md +33 -0
- hast-0.1.0/docs/design.md +1002 -0
- hast-0.1.0/docs/ideas/companion_tools.md +24 -0
- hast-0.1.0/docs/opus-alignment-review.md +33 -0
- hast-0.1.0/docs/opus_guide.md +135 -0
- hast-0.1.0/docs/oss-integration-plan.md +512 -0
- hast-0.1.0/docs/pain-points-and-desired-tools.md +397 -0
- hast-0.1.0/docs/plans/2026-02-16-mvp-programmatic-api-design.md +142 -0
- hast-0.1.0/docs/plans/2026-02-16-mvp-programmatic-api.md +697 -0
- hast-0.1.0/docs/plans/improvement-plan-for-rhiza-integration.md +105 -0
- hast-0.1.0/docs/python-rust-support-plan.md +58 -0
- hast-0.1.0/docs/roadmap.md +380 -0
- hast-0.1.0/docs/token-efficiency.md +231 -0
- hast-0.1.0/pyproject.toml +64 -0
- hast-0.1.0/src/hast/__init__.py +18 -0
- hast-0.1.0/src/hast/__main__.py +5 -0
- hast-0.1.0/src/hast/cli.py +2966 -0
- hast-0.1.0/src/hast/core/__init__.py +0 -0
- hast-0.1.0/src/hast/core/admission.py +387 -0
- hast-0.1.0/src/hast/core/admission_policy.py +100 -0
- hast-0.1.0/src/hast/core/analysis.py +162 -0
- hast-0.1.0/src/hast/core/architect.py +241 -0
- hast-0.1.0/src/hast/core/attempt.py +89 -0
- hast-0.1.0/src/hast/core/auto.py +3072 -0
- hast-0.1.0/src/hast/core/auto_summary.py +81 -0
- hast-0.1.0/src/hast/core/config.py +516 -0
- hast-0.1.0/src/hast/core/consumer_roles.py +105 -0
- hast-0.1.0/src/hast/core/context.py +878 -0
- hast-0.1.0/src/hast/core/contract.py +153 -0
- hast-0.1.0/src/hast/core/control_plane_contract.py +89 -0
- hast-0.1.0/src/hast/core/decision.py +330 -0
- hast-0.1.0/src/hast/core/docgen.py +436 -0
- hast-0.1.0/src/hast/core/docs_policy.py +89 -0
- hast-0.1.0/src/hast/core/doctor.py +625 -0
- hast-0.1.0/src/hast/core/errors.py +6 -0
- hast-0.1.0/src/hast/core/event_bus.py +384 -0
- hast-0.1.0/src/hast/core/evidence.py +64 -0
- hast-0.1.0/src/hast/core/execution_queue.py +726 -0
- hast-0.1.0/src/hast/core/explore.py +337 -0
- hast-0.1.0/src/hast/core/feedback.py +282 -0
- hast-0.1.0/src/hast/core/feedback_infer.py +250 -0
- hast-0.1.0/src/hast/core/feedback_policy.py +128 -0
- hast-0.1.0/src/hast/core/feedback_publish.py +247 -0
- hast-0.1.0/src/hast/core/gate.py +678 -0
- hast-0.1.0/src/hast/core/goals.py +413 -0
- hast-0.1.0/src/hast/core/handoff.py +288 -0
- hast-0.1.0/src/hast/core/immune_policy.py +296 -0
- hast-0.1.0/src/hast/core/init_project.py +673 -0
- hast-0.1.0/src/hast/core/languages.py +251 -0
- hast-0.1.0/src/hast/core/mermaid.py +183 -0
- hast-0.1.0/src/hast/core/metrics.py +163 -0
- hast-0.1.0/src/hast/core/observability.py +313 -0
- hast-0.1.0/src/hast/core/operator_inbox.py +363 -0
- hast-0.1.0/src/hast/core/orchestrator.py +275 -0
- hast-0.1.0/src/hast/core/phase.py +92 -0
- hast-0.1.0/src/hast/core/policies.py +28 -0
- hast-0.1.0/src/hast/core/proposals.py +193 -0
- hast-0.1.0/src/hast/core/protocol_adapters.py +508 -0
- hast-0.1.0/src/hast/core/replan.py +136 -0
- hast-0.1.0/src/hast/core/result.py +89 -0
- hast-0.1.0/src/hast/core/retry_policy.py +104 -0
- hast-0.1.0/src/hast/core/risk_policy.py +164 -0
- hast-0.1.0/src/hast/core/runner.py +41 -0
- hast-0.1.0/src/hast/core/runners/llm.py +163 -0
- hast-0.1.0/src/hast/core/runners/local.py +98 -0
- hast-0.1.0/src/hast/core/runners/protocol.py +88 -0
- hast-0.1.0/src/hast/core/scheduler.py +59 -0
- hast-0.1.0/src/hast/core/security_policy.py +123 -0
- hast-0.1.0/src/hast/core/session.py +175 -0
- hast-0.1.0/src/hast/core/sim.py +460 -0
- hast-0.1.0/src/hast/core/spike.py +650 -0
- hast-0.1.0/src/hast/core/spike_policy.py +51 -0
- hast-0.1.0/src/hast/core/state_policy.py +52 -0
- hast-0.1.0/src/hast/core/triage.py +58 -0
- hast-0.1.0/src/hast/core/vault.py +655 -0
- hast-0.1.0/src/hast/utils/__init__.py +0 -0
- hast-0.1.0/src/hast/utils/codetools.py +459 -0
- hast-0.1.0/src/hast/utils/coverage.py +123 -0
- hast-0.1.0/src/hast/utils/file_parser.py +95 -0
- hast-0.1.0/src/hast/utils/fs.py +50 -0
- hast-0.1.0/src/hast/utils/git.py +282 -0
- hast-0.1.0/src/hast/utils/rotation.py +116 -0
- hast-0.1.0/src/hast_lab/__init__.py +2 -0
- hast-0.1.0/src/hast_lab/cli.py +598 -0
- hast-0.1.0/tests/__init__.py +0 -0
- hast-0.1.0/tests/conftest.py +43 -0
- hast-0.1.0/tests/test_admission.py +122 -0
- hast-0.1.0/tests/test_admission_policy.py +57 -0
- hast-0.1.0/tests/test_architect.py +176 -0
- hast-0.1.0/tests/test_attempt.py +83 -0
- hast-0.1.0/tests/test_auto.py +1199 -0
- hast-0.1.0/tests/test_auto_hard_policy.py +82 -0
- hast-0.1.0/tests/test_auto_parallel.py +85 -0
- hast-0.1.0/tests/test_auto_quality.py +500 -0
- hast-0.1.0/tests/test_auto_replan.py +84 -0
- hast-0.1.0/tests/test_auto_risk_merge.py +203 -0
- hast-0.1.0/tests/test_auto_runner_selection.py +39 -0
- hast-0.1.0/tests/test_auto_summary.py +83 -0
- hast-0.1.0/tests/test_cli_auto.py +34 -0
- hast-0.1.0/tests/test_cli_decision.py +534 -0
- hast-0.1.0/tests/test_cli_docs.py +253 -0
- hast-0.1.0/tests/test_cli_doctor.py +71 -0
- hast-0.1.0/tests/test_cli_events.py +70 -0
- hast-0.1.0/tests/test_cli_explore.py +58 -0
- hast-0.1.0/tests/test_cli_feedback.py +217 -0
- hast-0.1.0/tests/test_cli_focus.py +85 -0
- hast-0.1.0/tests/test_cli_immune.py +67 -0
- hast-0.1.0/tests/test_cli_inbox.py +106 -0
- hast-0.1.0/tests/test_cli_metrics.py +137 -0
- hast-0.1.0/tests/test_cli_observe.py +76 -0
- hast-0.1.0/tests/test_cli_orchestrate.py +212 -0
- hast-0.1.0/tests/test_cli_propose.py +148 -0
- hast-0.1.0/tests/test_cli_protocol.py +84 -0
- hast-0.1.0/tests/test_cli_queue.py +176 -0
- hast-0.1.0/tests/test_cli_retry.py +129 -0
- hast-0.1.0/tests/test_cli_sim.py +74 -0
- hast-0.1.0/tests/test_codetools.py +209 -0
- hast-0.1.0/tests/test_config.py +383 -0
- hast-0.1.0/tests/test_consumer_roles.py +46 -0
- hast-0.1.0/tests/test_context.py +544 -0
- hast-0.1.0/tests/test_contract.py +119 -0
- hast-0.1.0/tests/test_control_plane_contract.py +91 -0
- hast-0.1.0/tests/test_coverage_measure.py +82 -0
- hast-0.1.0/tests/test_dead_code.py +552 -0
- hast-0.1.0/tests/test_decision.py +109 -0
- hast-0.1.0/tests/test_devf_lab_cli.py +138 -0
- hast-0.1.0/tests/test_docs.py +213 -0
- hast-0.1.0/tests/test_docs_policy.py +49 -0
- hast-0.1.0/tests/test_env_vars.py +46 -0
- hast-0.1.0/tests/test_event_bus.py +168 -0
- hast-0.1.0/tests/test_evidence_bdd.py +187 -0
- hast-0.1.0/tests/test_execution_queue.py +252 -0
- hast-0.1.0/tests/test_explore.py +60 -0
- hast-0.1.0/tests/test_feedback.py +115 -0
- hast-0.1.0/tests/test_feedback_infer.py +78 -0
- hast-0.1.0/tests/test_feedback_policy.py +60 -0
- hast-0.1.0/tests/test_feedback_publish.py +144 -0
- hast-0.1.0/tests/test_gate.py +643 -0
- hast-0.1.0/tests/test_git.py +100 -0
- hast-0.1.0/tests/test_goals.py +485 -0
- hast-0.1.0/tests/test_handoff.py +200 -0
- hast-0.1.0/tests/test_handoff_gen.py +262 -0
- hast-0.1.0/tests/test_immune_policy.py +95 -0
- hast-0.1.0/tests/test_init.py +289 -0
- hast-0.1.0/tests/test_languages.py +48 -0
- hast-0.1.0/tests/test_llm_runner.py +69 -0
- hast-0.1.0/tests/test_mermaid.py +97 -0
- hast-0.1.0/tests/test_metrics.py +137 -0
- hast-0.1.0/tests/test_observability.py +206 -0
- hast-0.1.0/tests/test_operator_inbox.py +133 -0
- hast-0.1.0/tests/test_orchestrator.py +264 -0
- hast-0.1.0/tests/test_phase.py +127 -0
- hast-0.1.0/tests/test_policy_engine.py +187 -0
- hast-0.1.0/tests/test_proposals.py +86 -0
- hast-0.1.0/tests/test_protocol_adapters.py +145 -0
- hast-0.1.0/tests/test_protocol_runner.py +116 -0
- hast-0.1.0/tests/test_replan.py +106 -0
- hast-0.1.0/tests/test_result.py +90 -0
- hast-0.1.0/tests/test_rotation.py +81 -0
- hast-0.1.0/tests/test_scenario_demo.py +238 -0
- hast-0.1.0/tests/test_scheduler.py +65 -0
- hast-0.1.0/tests/test_security_policy.py +68 -0
- hast-0.1.0/tests/test_session.py +161 -0
- hast-0.1.0/tests/test_sim.py +101 -0
- hast-0.1.0/tests/test_spike.py +204 -0
- hast-0.1.0/tests/test_state_policy.py +25 -0
- hast-0.1.0/tests/test_vault.py +99 -0
- hast-0.1.0/tests/test_worktree.py +109 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
items:
|
|
2
|
+
- feedback_key: 2adc859ed77bff5f500920bc
|
|
3
|
+
title: '[workflow_friction] single command should convert feedback into executable
|
|
4
|
+
goals'
|
|
5
|
+
summary: manager has to run analyze/backlog/publish and then manually rewrite goals
|
|
6
|
+
first_seen: '2026-02-14T20:20:25.225068+09:00'
|
|
7
|
+
last_seen: '2026-02-14T20:20:25.225068+09:00'
|
|
8
|
+
count: 1
|
|
9
|
+
max_impact: high
|
|
10
|
+
avg_confidence: 0.9
|
|
11
|
+
sample_note_ids:
|
|
12
|
+
- note-20260214T202025225081+0900-2adc859e
|
|
13
|
+
status: accepted
|
|
14
|
+
decision_reason: meets gate (count=1, max_impact=high, avg_confidence=0.9)
|
|
15
|
+
recommended_change: Add automation to remove manual workaround.
|
|
16
|
+
owner: manager
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{"actual": "manager has to run analyze/backlog/publish and then manually rewrite goals", "category": "workflow_friction", "confidence": 0.9, "evidence_ids": [], "expected": "single command should convert feedback into executable goals", "fingerprint": "2adc859ed77bff5f500920bc", "goal_id": "V1", "impact": "high", "note_id": "note-20260214T202025225081+0900-2adc859e", "phase": "plan", "run_id": null, "source": "worker_explicit", "timestamp": "2026-02-14T20:20:25.225068+09:00", "tool_name": null, "workaround": "manual multi-step loop"}
|
|
2
|
+
{"actual": "auto reported generic allowed-scope error without file list", "category": "workflow_friction", "confidence": 0.9, "evidence_ids": [], "expected": "scope failure should show violating files immediately", "fingerprint": "5c02e0c339dfa34e5bdac1d8", "goal_id": null, "impact": "high", "note_id": "note-20260215T173540555707+0900-5c02e0c3", "phase": null, "run_id": null, "source": "worker_explicit", "timestamp": "2026-02-15T17:35:40.555694+09:00", "tool_name": "codex", "workaround": "open attempt yaml manually to find offending files"}
|
|
3
|
+
{"actual": "dry-run emits very large context pack with full source, causing token/cognitive overload", "category": "workflow_friction", "confidence": 0.86, "evidence_ids": [], "expected": "dry-run should be concise by default", "fingerprint": "3fa8e47b9d83c432599abbab", "goal_id": null, "impact": "medium", "note_id": "note-20260215T174800305531+0900-3fa8e47b", "phase": null, "run_id": null, "source": "worker_explicit", "timestamp": "2026-02-15T17:48:00.305516+09:00", "tool_name": "codex", "workaround": "use head/sed to trim output manually"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
goals:
|
|
2
|
+
- id: V1
|
|
3
|
+
title: Dogfooding & Polish
|
|
4
|
+
status: active
|
|
5
|
+
children:
|
|
6
|
+
- id: V1.1
|
|
7
|
+
title: Improve dry-run mode
|
|
8
|
+
status: active
|
|
9
|
+
notes: dry-run은 파일을 수정하지 않으므로 dirty tree와 lock check를 건너뛰어야 함
|
|
10
|
+
test_files:
|
|
11
|
+
- tests/test_auto.py
|
|
12
|
+
allowed_changes:
|
|
13
|
+
- src/hast/core/auto.py
|
|
14
|
+
- id: PX_2X
|
|
15
|
+
title: Productivity 2X Program
|
|
16
|
+
status: active
|
|
17
|
+
notes: Auto-generated by hast orchestrate.
|
|
18
|
+
children:
|
|
19
|
+
- id: PX_2X.1
|
|
20
|
+
title: Resolve [workflow_friction] single command should convert feedback into
|
|
21
|
+
executable goals
|
|
22
|
+
status: active
|
|
23
|
+
phase: plan
|
|
24
|
+
owner_agent: architect
|
|
25
|
+
feedback_key: 2adc859ed77bff5f500920bc
|
|
26
|
+
notes: 'feedback_key: 2adc859ed77bff5f500920bc\nsummary: manager has to run analyze/backlog/publish
|
|
27
|
+
and then manually rewrite goals\nrecommended_change: Add automation to remove
|
|
28
|
+
manual workaround.'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
timestamp: "2026-02-10T15:00:00+09:00"
|
|
3
|
+
status: complete
|
|
4
|
+
goal_id: "V1"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Done
|
|
8
|
+
- hast context에 git 변경 요약(Recent Changes), 코드 구조(Code Overview) 섹션 추가
|
|
9
|
+
- AST 기반 코드 분석 모듈(codetools.py): 구조 스냅샷, import 맵, impact 분석, 복잡도 체크
|
|
10
|
+
- auto 프롬프트에 핸드오프 템플릿 pre-fill (goal_id, timestamp, 섹션 구조)
|
|
11
|
+
- evaluate()에 복잡도 경고 (파일 400줄, 클래스 15메서드, __init__ 20속성)
|
|
12
|
+
- hast init으로 프로젝트에 .ai/ 세팅, goals.yaml 작성
|
|
13
|
+
|
|
14
|
+
## Key Decisions
|
|
15
|
+
- code_overview는 max_context_bytes 트리밍 시 가장 먼저 제거 (참조 정보이므로)
|
|
16
|
+
- 복잡도 위반은 경고만 (stderr), 실패 처리 아님
|
|
17
|
+
- git_summary에 since_commit 없으면 최근 10개 커밋 표시
|
|
18
|
+
- codetools는 Python AST만 지원 (언어 무관 설계이지만 시작은 Python)
|
|
19
|
+
|
|
20
|
+
## Changed Files
|
|
21
|
+
- src/hast/utils/codetools.py (신규, +206)
|
|
22
|
+
- src/hast/utils/git.py (+51)
|
|
23
|
+
- src/hast/core/context.py (+69)
|
|
24
|
+
- src/hast/core/auto.py (+35)
|
|
25
|
+
- tests/test_codetools.py (신규, +173)
|
|
26
|
+
- tests/test_context.py (+75)
|
|
27
|
+
- tests/test_auto.py (+45)
|
|
28
|
+
|
|
29
|
+
## Next
|
|
30
|
+
dogfooding에서 발견된 이슈 수정:
|
|
31
|
+
1. Code Overview에서 test 파일 제외 (소스만 표시)
|
|
32
|
+
2. dataclass를 "(0 methods)" 대신 fields 표시
|
|
33
|
+
3. hast auto --dry-run이 dirty tree에서도 동작하도록
|
|
34
|
+
4. context.py 452줄 → 리팩토링으로 400줄 이하로
|
|
35
|
+
|
|
36
|
+
## Context Files
|
|
37
|
+
1. src/hast/utils/codetools.py
|
|
38
|
+
2. src/hast/core/context.py
|
|
39
|
+
3. src/hast/core/auto.py
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
timestamp: "2026-02-10T18:10:51+0900"
|
|
3
|
+
status: complete
|
|
4
|
+
goal_id: "V1.2"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Done
|
|
8
|
+
dry-run 모드가 dirty tree에서도 에러 없이 동작하도록 수정. run_auto()에서 dry_run일 때 _acquire_lock() 호출 전에 분기하여 프롬프트만 출력하고 리턴.
|
|
9
|
+
|
|
10
|
+
## Key Decisions
|
|
11
|
+
- dry_run 분기를 lock 취득 전으로 이동: dry-run은 읽기 전용이므로 lock도 dirty check도 불필요
|
|
12
|
+
- goal 로딩과 선택은 dry_run에서도 필요하므로 lock 밖으로 추출
|
|
13
|
+
- 기존 non-dry-run 경로는 변경 없음 (lock + dirty check 유지)
|
|
14
|
+
|
|
15
|
+
## Changed Files
|
|
16
|
+
src/hast/core/auto.py | 19 +++++++++++--------
|
|
17
|
+
tests/test_auto.py | 37 +++++++++++++++++++++++++++++++++++++
|
|
18
|
+
|
|
19
|
+
## Next
|
|
20
|
+
V1.3 또는 다음 active goal 진행
|
|
21
|
+
|
|
22
|
+
## Context Files
|
|
23
|
+
- src/hast/core/auto.py
|
|
24
|
+
- tests/test_auto.py
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Codex Tool-Improvement Plan Note
|
|
2
|
+
|
|
3
|
+
## Intent
|
|
4
|
+
- Primary objective of this Codex session: improve hast itself for LLM operators.
|
|
5
|
+
- If a task does not improve operator throughput, safety, or cognitive load, deprioritize it.
|
|
6
|
+
- Interpersonal preference: call assistant "Frost" and use informal Korean tone (banmal) by default.
|
|
7
|
+
|
|
8
|
+
## Session Start Protocol (always)
|
|
9
|
+
- Step 0: Read this note first.
|
|
10
|
+
- Step 1: Inspect latest friction signals (.ai/feedback/backlog.yaml, recent no-progress attempts, scope violations).
|
|
11
|
+
- Step 2: Pick one smallest high-leverage fix that can be validated by tests.
|
|
12
|
+
- Step 3: Ship the fix with explicit guardrails and low-risk rollout.
|
|
13
|
+
|
|
14
|
+
## Improvement Priorities
|
|
15
|
+
- P1: Question queue + resume loop (workers ask instead of repeating no-progress retries).
|
|
16
|
+
- P2: Strict write boundary enforcement with narrow generated-file exceptions only.
|
|
17
|
+
- P3: Retry strategy by failure class (scope/env/spec/test) instead of blind retries.
|
|
18
|
+
- P4: Low-token session handoff format (focus pack + JSON outputs + explicit next action).
|
|
19
|
+
- P5: Telemetry -> backlog -> publish pipeline with explicit human/manager trigger.
|
|
20
|
+
|
|
21
|
+
## Decision Heuristics
|
|
22
|
+
- Prefer smaller diff with clear verification over broad refactor.
|
|
23
|
+
- If ambiguity blocks progress, ask a concrete multiple-choice question.
|
|
24
|
+
- Keep safety invariants stronger than speed.
|
|
25
|
+
|
|
26
|
+
## Claude Code Friction Log
|
|
27
|
+
- [High] Scope exceptions for auto-generated files are too manual.
|
|
28
|
+
- Symptom: pre-commit updates (docs/ARCHITECTURE.md, core/protocols.py, .codemap.json) trigger out-of-scope failures.
|
|
29
|
+
- Direction: keep global allowlist in config (always_allow_changes) with narrow patterns.
|
|
30
|
+
- [High] Scope failure diagnosis is not explicit enough.
|
|
31
|
+
- Symptom: "changes outside allowed scope" without immediate violating-file list in operator-facing output.
|
|
32
|
+
- Direction: print violating file paths directly in failure reason/summary.
|
|
33
|
+
- [Medium] Clean-tree enforcement is too strict for .ai operational artifacts.
|
|
34
|
+
- Symptom: init/run artifacts create dirty state and force extra commit churn.
|
|
35
|
+
- Direction: treat operational .ai generated files as ignored/non-blocking by default where safe.
|
|
36
|
+
- [Medium] Recovery after failed attempt is too manual.
|
|
37
|
+
- Symptom: blocked -> re-activate -> commit hygiene -> rerun is multi-step.
|
|
38
|
+
- Direction: add one-command recovery path (scope fix + retry flow).
|
|
39
|
+
- [Low] Non-interactive runs still produce clarification questions from worker model.
|
|
40
|
+
- Symptom: worker asks questions and makes no edits -> no-progress.
|
|
41
|
+
- Direction: strengthen non-interactive execution contract in context/prompt and add ask-via-queue behavior.
|
|
42
|
+
|
|
43
|
+
## Claude Design-Support Ideas (Classified)
|
|
44
|
+
- [Accepted / Done] Global generated-file exceptions.
|
|
45
|
+
- Idea: config-level always-allowed list for pre-commit generated files.
|
|
46
|
+
- Decision: completed via `always_allow_changes` + gate/auto integration.
|
|
47
|
+
- [Accepted / Next] `hast explore` for design-question analysis.
|
|
48
|
+
- Idea: codebase impact map + candidate approaches + trade-off report before auto.
|
|
49
|
+
- Why accepted: expands hast from "mechanical execution" to "design support".
|
|
50
|
+
- Guardrail: read-only command, no file writes by default.
|
|
51
|
+
- [Accepted / Next] plan intelligence for decision-aware decomposition.
|
|
52
|
+
- Idea: classify goals into `auto_eligible` vs `decision_required`, mark blocked_by decision.
|
|
53
|
+
- Why accepted: lowers operator cognitive load and prevents blind auto retries.
|
|
54
|
+
- [Accepted / Next] failure -> learning assist loop.
|
|
55
|
+
- Idea: on failure, suggest decision ticket creation and prerequisite-goal insertion.
|
|
56
|
+
- Why accepted: converts dead-end failures into explicit next actions.
|
|
57
|
+
- Guardrail: suggestion-first; no automatic mutation of goal graph without confirmation.
|
|
58
|
+
- [Accepted with Constraints / Later] stronger decision spike with code-level prototypes.
|
|
59
|
+
- Idea: compare alternatives by real diffs/tests/impact in structured table.
|
|
60
|
+
- Why partially deferred: high implementation/safety cost without strict isolation.
|
|
61
|
+
- Prerequisite: robust per-alternative sandbox/worktree isolation and deterministic scoring.
|
|
62
|
+
|
|
63
|
+
## Execution Queue (Design Support Track)
|
|
64
|
+
- [Done] Q1: Add `hast explore` (read-only) with JSON + markdown report output.
|
|
65
|
+
- [Done] Q2: Extend `hast plan` with `auto_eligible`, `decision_required`, `blocked_by` annotations.
|
|
66
|
+
- [Done] Q3: Add failure-assist prompts in auto (`create decision?`, `add prerequisite goal?`).
|
|
67
|
+
- [Done] Q4: Upgrade decision spike comparator with diff-aware ranking and surfaced metrics.
|
|
68
|
+
- [Done] Q5: Add spike comparator policy (`spike_policy.yaml`) for deterministic defaults + optional duration tie-break.
|
|
69
|
+
- [Done] Q5.1: Add one-line winner explanation surfaced in spike summary/CLI/JSON/evidence.
|
|
70
|
+
- [Done] Q5.2: Keep default reason short (`why:<code>`) and expose structured comparison + opt-in `--explain` detail.
|
|
71
|
+
- [Done] Q6: Add guarded auto-accept for decision spike (`--accept-if-*`) with conservative checks and explicit skip reasons.
|
|
72
|
+
- [Done] Q7: Add bundled security gate policy (`security_policy.yaml`) with gitleaks/semgrep/trivy|grype checks and missing-tool policy.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: v1
|
|
2
|
+
enabled: true
|
|
3
|
+
promotion:
|
|
4
|
+
min_frequency: 3
|
|
5
|
+
min_confidence: 0.6
|
|
6
|
+
auto_promote_impact: high
|
|
7
|
+
dedup:
|
|
8
|
+
strategy: fingerprint_v1
|
|
9
|
+
publish:
|
|
10
|
+
enabled: false
|
|
11
|
+
backend: codeberg
|
|
12
|
+
repository: ""
|
|
13
|
+
token_env: CODEBERG_TOKEN
|
|
14
|
+
base_url: https://codeberg.org
|
|
15
|
+
labels:
|
|
16
|
+
- bot-reported
|
|
17
|
+
- hast-feedback
|
|
18
|
+
min_status: accepted
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: v1
|
|
2
|
+
default_max_retries: 3
|
|
3
|
+
no_repeat_same_classification: true
|
|
4
|
+
max_retries_by_classification:
|
|
5
|
+
spec-ambiguous: 1
|
|
6
|
+
test-defect: 2
|
|
7
|
+
impl-defect: 3
|
|
8
|
+
env-flaky: 2
|
|
9
|
+
dep-build: 1
|
|
10
|
+
security: 0
|
|
11
|
+
actions:
|
|
12
|
+
exceed_limit: block
|
|
13
|
+
no_repeat_same: escalate
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: v1
|
|
2
|
+
max_score: 100
|
|
3
|
+
success_base_score: 15
|
|
4
|
+
sensitive_path_weight: 20
|
|
5
|
+
security_failed_check_bonus: 15
|
|
6
|
+
security_missing_tool_bonus: 5
|
|
7
|
+
security_expired_ignore_bonus: 10
|
|
8
|
+
security_force_block_on_failed_checks: true
|
|
9
|
+
security_force_block_on_missing_tools: false
|
|
10
|
+
block_threshold: 95
|
|
11
|
+
rollback_threshold: 80
|
|
12
|
+
base_score_by_classification:
|
|
13
|
+
spec-ambiguous: 55
|
|
14
|
+
test-defect: 45
|
|
15
|
+
impl-defect: 40
|
|
16
|
+
env-flaky: 35
|
|
17
|
+
dep-build: 70
|
|
18
|
+
security: 90
|
|
19
|
+
phase_weights:
|
|
20
|
+
plan: 5
|
|
21
|
+
implement: 10
|
|
22
|
+
bdd-red: 10
|
|
23
|
+
bdd-green: 15
|
|
24
|
+
gate: 20
|
|
25
|
+
merge: 25
|
|
26
|
+
legacy: 10
|
|
27
|
+
sensitive_path_patterns:
|
|
28
|
+
- "src/**/auth*.py"
|
|
29
|
+
- "src/**/security*.py"
|
|
30
|
+
- ".github/workflows/*"
|
|
31
|
+
- "pyproject.toml"
|
|
32
|
+
- "requirements*.txt"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: v1
|
|
2
|
+
enabled: false
|
|
3
|
+
fail_on_missing_tools: false
|
|
4
|
+
audit_file: ".ai/security/audit.jsonl"
|
|
5
|
+
dependency_scanner_mode: either
|
|
6
|
+
gitleaks_enabled: true
|
|
7
|
+
gitleaks_command: "gitleaks detect --no-git --source ."
|
|
8
|
+
semgrep_enabled: true
|
|
9
|
+
semgrep_command: "semgrep scan --config auto --error"
|
|
10
|
+
trivy_enabled: true
|
|
11
|
+
trivy_command: "trivy fs --severity HIGH,CRITICAL --exit-code 1 ."
|
|
12
|
+
grype_enabled: true
|
|
13
|
+
grype_command: "grype . --fail-on high"
|
|
14
|
+
# ignore_rules:
|
|
15
|
+
# - id: "SG-001"
|
|
16
|
+
# checks: ["semgrep"]
|
|
17
|
+
# pattern: "known false positive pattern"
|
|
18
|
+
# reason: "tracked in SEC-123"
|
|
19
|
+
# expires_on: "2026-12-31"
|
hast-0.1.0/.ai/rules.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: decision_evidence.v1
|
|
2
|
+
type: jsonl_row
|
|
3
|
+
required:
|
|
4
|
+
- timestamp
|
|
5
|
+
- event_type
|
|
6
|
+
- decision_id
|
|
7
|
+
- goal_id
|
|
8
|
+
- winner_id
|
|
9
|
+
- winner_eligible
|
|
10
|
+
- winner_score
|
|
11
|
+
- ranking
|
|
12
|
+
- classification
|
|
13
|
+
- action_taken
|
|
14
|
+
properties:
|
|
15
|
+
timestamp: "ISO-8601 datetime string"
|
|
16
|
+
event_type: "decision_evaluation"
|
|
17
|
+
decision_id: "Decision ticket id"
|
|
18
|
+
goal_id: "Related goal id"
|
|
19
|
+
decision_file: "Path to decision file"
|
|
20
|
+
question: "Decision question text"
|
|
21
|
+
winner_id: "Selected alternative id"
|
|
22
|
+
winner_eligible: "Boolean threshold pass/fail"
|
|
23
|
+
winner_score: "Weighted score (0-100)"
|
|
24
|
+
ranking: "List of alternatives with score/eligibility"
|
|
25
|
+
status: "Decision status at logging time"
|
|
26
|
+
classification: "decision-accepted | decision-blocked"
|
|
27
|
+
action_taken: "advance | escalate"
|
|
28
|
+
actor: "Who evaluated the decision"
|
|
29
|
+
run_id: "Optional .ai/runs/<run_id> link"
|
|
30
|
+
evidence_refs: "Optional refs to spike/test evidence"
|
|
31
|
+
schema_version: "decision_evidence.v1"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Focus Brief (codex)
|
|
2
|
+
|
|
3
|
+
## Launch
|
|
4
|
+
`codex exec .ai/sessions/20260215T173031+0900_codex_V1.1.prompt.txt`
|
|
5
|
+
|
|
6
|
+
## Prompt File
|
|
7
|
+
`.ai/sessions/20260215T173031+0900_codex_V1.1.prompt.txt`
|
|
8
|
+
|
|
9
|
+
## Goal
|
|
10
|
+
- id: `V1.1`
|
|
11
|
+
- title: Improve dry-run mode
|
|
12
|
+
- phase: `legacy`
|
|
13
|
+
- uncertainty: `unknown`
|
|
14
|
+
- allowed changes:
|
|
15
|
+
- `src/hast/core/auto.py`
|
|
16
|
+
- test files:
|
|
17
|
+
- `tests/test_auto.py`
|