Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
fa58883
Keep Vercel deployments resumable until provider settlement
Y1fe1Zh0u Aug 5, 2026
3ce7cfc
Make configured schedule timezones trustworthy
Y1fe1Zh0u Aug 5, 2026
ae86711
Preserve each scheduled occurrence across Trigger dispatch
Y1fe1Zh0u Aug 5, 2026
d576c58
Keep failed scheduled occurrences eligible within grace
Y1fe1Zh0u Aug 5, 2026
2c3b3ec
Keep invalid Cron edits out of scheduled evaluation
Y1fe1Zh0u Aug 5, 2026
bd98901
Keep displayed Agent timezones aligned with scheduling
Y1fe1Zh0u Aug 5, 2026
ae3eb9c
Keep the scheduling repair compatible with current main
Y1fe1Zh0u Aug 5, 2026
d5525db
Honor user deletion of default Agents
Y1fe1Zh0u Aug 6, 2026
328eaff
Keep every group mention candidate reachable
Y1fe1Zh0u Aug 10, 2026
be50d24
Exercise Vercel settlement behavior in the v1.11.4 candidate
Y1fe1Zh0u Aug 10, 2026
3179201
Exercise Trigger scheduling repairs in the v1.11.4 candidate
Y1fe1Zh0u Aug 10, 2026
e14fb89
Exercise default Agent seeding in the v1.11.4 candidate
Y1fe1Zh0u Aug 10, 2026
bb81d6d
Exercise group mention scrolling in the v1.11.4 candidate
Y1fe1Zh0u Aug 10, 2026
535cb53
Keep Direct Chat controls scoped to the selected session
Y1fe1Zh0u Aug 10, 2026
9a3e291
Keep the v1.11.4 candidate aligned with current main
Y1fe1Zh0u Aug 10, 2026
db1abc1
Make the v1.11.4 release gates cover every integrated repair
Y1fe1Zh0u Aug 10, 2026
cd2247d
Keep the v1.11.4 release gate honest about main migration failure
Y1fe1Zh0u Aug 10, 2026
1dbad6d
Keep accepted Tool calls stable across Runtime recovery
Y1fe1Zh0u Aug 11, 2026
26d357a
Keep v1.11.4 on one Tool Runtime migration head
Y1fe1Zh0u Aug 11, 2026
6f02c32
Make the Tool Runtime PR head reachable to target CI
Y1fe1Zh0u Aug 11, 2026
2724efa
Make fresh database upgrades tolerate current metadata
Y1fe1Zh0u Aug 11, 2026
403068d
Clear the fresh database blocker for v1.11.4
Y1fe1Zh0u Aug 11, 2026
8f11544
Preserve human mentions without waking a Runtime
Y1fe1Zh0u Aug 10, 2026
f3c6e29
Keep human mentions visible in the v1.11.4 Runtime
Y1fe1Zh0u Aug 11, 2026
3557908
Require receipt-bound chat consent for reimbursement approvals
Y1fe1Zh0u Aug 7, 2026
9313e5c
Make Feishu approval failures repairable without replay
Y1fe1Zh0u Aug 11, 2026
e830e24
Keep approval consent bound to v1.11.4 Tool receipts
Y1fe1Zh0u Aug 11, 2026
0381332
Give Tool repair paths one consistent retry ceiling
Y1fe1Zh0u Aug 11, 2026
d3aab8e
Carry the unified Tool retry ceiling into v1.11.4
Y1fe1Zh0u Aug 11, 2026
b8618d5
Keep Gemini tool results paired with their originating turn
Y1fe1Zh0u Aug 12, 2026
bed0797
Keep async Tool polls on their accepted contract
Y1fe1Zh0u Aug 12, 2026
0b9ecfc
Make Tool failures actionable to the model
Y1fe1Zh0u Aug 12, 2026
923232a
Keep MCP execution on the route selected by the model step
Y1fe1Zh0u Aug 12, 2026
795613c
Reject Tool arguments that violate advertised schemas
Y1fe1Zh0u Aug 12, 2026
3afdb79
Keep Runtime deadlines outside provider budgets
Y1fe1Zh0u Aug 12, 2026
dd2c445
Keep resolved Tool context across legacy waits
Y1fe1Zh0u Aug 12, 2026
6b5b97e
Give unknown MCP calls an explicit recovery path
Y1fe1Zh0u Aug 12, 2026
aa808a0
Keep v1.11.4 checks aligned with the Tool contract
Y1fe1Zh0u Aug 12, 2026
769e1c4
Keep Tool failures repairable across provider boundaries
Y1fe1Zh0u Aug 14, 2026
a8584cc
Keep v1.11.4 validation aligned with provider-safe schemas
Y1fe1Zh0u Aug 14, 2026
261e23c
Make the 3010 candidate identify as v1.11.4
Y1fe1Zh0u Aug 14, 2026
ffc81e6
feat: isolate sandbox session outputs and enforce tenant writes
yaojin3616 Aug 12, 2026
b14e2cc
fix: guide isolated sandbox output writes
yaojin3616 Aug 12, 2026
0848d08
fix: reuse isolated sandbox within agent loop
yaojin3616 Aug 13, 2026
708c7f0
fix: apply sandbox quotas only to output changes
yaojin3616 Aug 13, 2026
a82119b
fix: preserve legacy skill paths in isolated sandbox
yaojin3616 Aug 13, 2026
ef73227
refactor: use canonical sandbox skill paths
yaojin3616 Aug 13, 2026
b16e885
fix: surface sandbox pip failures
yaojin3616 Aug 13, 2026
4dfce2e
fix: reload tool history after run completion
yaojin3616 Aug 13, 2026
b699cc5
Keep sandbox policy tests aligned with Runtime bindings
Y1fe1Zh0u Aug 14, 2026
fccac94
Keep legacy Tool tests aware of sandbox publication
Y1fe1Zh0u Aug 14, 2026
585f2b3
Permit authorized native-group Agents to execute isolated code
Y1fe1Zh0u Aug 14, 2026
8e54467
Merge pull request #967 from dataelement/agent/fix-group-sandbox-sess…
Y1fe1Zh0u Aug 14, 2026
c9774e5
End unrecoverable tool repair loops visibly
Y1fe1Zh0u Aug 14, 2026
a0bc539
Merge pull request #969 from Y1fe1Zh0u/fix/tool-repair-limit-fails-run
Y1fe1Zh0u Aug 14, 2026
f79c210
Require evidence before accepting task completion
Y1fe1Zh0u Aug 14, 2026
453503a
Merge pull request #970 from dataelement/agent/completion-gate-v1.11.4
Y1fe1Zh0u Aug 14, 2026
e0545d9
fix: exempt isolated output from file count limits
yaojin3616 Aug 14, 2026
ab4b797
fix: allow identity-scoped tenant switching
yaojin3616 Aug 14, 2026
1aaf707
fix: replace isolated session output without CAS conflicts
yaojin3616 Aug 14, 2026
c647560
fix: reuse sandbox workspace for agent loop
yaojin3616 Aug 14, 2026
7731bc8
chore: retain workspace conflict diagnostics
yaojin3616 Aug 14, 2026
57779ac
fix: retry unknown model provider failures
yaojin3616 Aug 14, 2026
f25b81a
fix: authorize webhook trigger targets
Aug 6, 2026
56a4f9b
Restore tenant-visible tool history after completed runs
Y1fe1Zh0u Aug 14, 2026
796ec21
fix: unify agent-relative sandbox paths
yaojin3616 Aug 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .specify/init-options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ai": "codex",
"ai_commands_dir": null,
"ai_skills": true,
"branch_numbering": "sequential",
"here": true,
"offline": true,
"preset": null,
"script": "sh",
"speckit_version": "0.4.1"
}
72 changes: 72 additions & 0 deletions .specify/memory/constitution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!--
Sync Impact Report
- Version change: template -> 1.0.0
- Added principles: Evidence Before Claims; Minimal Scoped Changes; Contract and State Ownership;
Tests Prove Behavior; Preserve Existing Work
- Added sections: Project Constraints; Development Workflow
- Templates requiring updates:
- ✅ .specify/templates/plan-template.md (existing Constitution Check supports these gates)
- ✅ .specify/templates/spec-template.md (scope and measurable acceptance sections already present)
- ✅ .specify/templates/tasks-template.md (test-first and path-specific tasks already supported)
- Follow-up TODOs: none
-->
# Clawith Constitution

## Core Principles

### I. Evidence Before Claims
Current behavior MUST be established from source code, migrations, tests, or runtime evidence before
changes are designed. Provider facts, Runtime facts, Model output, and hypotheses MUST remain
separate. Point-in-time facts such as branches, versions, ports, commits, and deployment state MUST
be rechecked before they are reported.

### II. Minimal Scoped Changes
Every implementation MUST stay inside the user-approved scope and use the smallest reversible diff
that fixes the demonstrated behavior. Existing utilities and contracts MUST be reused before new
abstractions are introduced. Adjacent refactors, new dependencies, and speculative hardening are
forbidden unless explicitly approved.

### III. Contract and State Ownership
Each fact MUST have one authoritative owner. Provider-specific adapters own mapping external business
states into typed outcomes; Runtime owns Tool receipts, scheduling, waiting, settlement, and resume;
the Model owns intent and user-facing content. Consumers MUST use the structured contract rather than
re-deriving state from summaries or prose.

### IV. Tests Prove Behavior
Bug fixes MUST include regression coverage for the failing path and its terminal outcomes. Tests MUST
prove both the desired result and prohibited side effects, such as duplicate external writes. Scoped
tests and relevant static checks MUST pass before completion is claimed; live verification MUST be
reported separately from local automated evidence.

### V. Preserve Existing Work
Unrelated dirty-worktree changes belong to the user and MUST NOT be reverted, overwritten, or folded
into the feature. Files ignored by Git MUST be verified through direct filesystem inspection. Agents
MUST avoid destructive commands and MUST report unavoidable ownership conflicts before proceeding.

## Project Constraints

- Backend Runtime work uses the existing Python, FastAPI, SQLAlchemy, LangGraph, and pytest stack.
- No dependency may be added without explicit user approval.
- Documentation may describe historical intent, but implementation claims MUST be checked against
current source.
- Public Tool behavior and internal Runtime behavior MUST not be broadened merely to simplify one fix.
- External writes MUST remain exactly-once where the existing Tool policy requires it.

## Development Workflow

1. Define the observed failure, authoritative fact, consumer, and approved boundary.
2. Write a testable specification and identify prohibited changes.
3. Add or update scoped regression tests before the implementation when practical.
4. Implement the smallest contract-preserving change.
5. Run scoped pytest and Ruff checks, then inspect the final diff for unrelated changes.
6. Report changed files, verification evidence, and remaining risks without overstating live status.

## Governance

This constitution governs Spec Kit artifacts for Clawith and is subordinate only to explicit user
instructions and the repository `AGENTS.md`. Amendments require a documented rationale, semantic
version update, date update, and consistency review of dependent Spec Kit templates. Every feature
plan MUST evaluate these principles before design and again before implementation. Any exception MUST
be explicit in the plan's Complexity Tracking section and approved before code changes begin.

**Version**: 1.0.0 | **Ratified**: 2026-08-05 | **Last Amended**: 2026-08-05
190 changes: 190 additions & 0 deletions .specify/scripts/bash/check-prerequisites.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
#!/usr/bin/env bash

# Consolidated prerequisite checking script
#
# This script provides unified prerequisite checking for Spec-Driven Development workflow.
# It replaces the functionality previously spread across multiple scripts.
#
# Usage: ./check-prerequisites.sh [OPTIONS]
#
# OPTIONS:
# --json Output in JSON format
# --require-tasks Require tasks.md to exist (for implementation phase)
# --include-tasks Include tasks.md in AVAILABLE_DOCS list
# --paths-only Only output path variables (no validation)
# --help, -h Show help message
#
# OUTPUTS:
# JSON mode: {"FEATURE_DIR":"...", "AVAILABLE_DOCS":["..."]}
# Text mode: FEATURE_DIR:... \n AVAILABLE_DOCS: \n ✓/✗ file.md
# Paths only: REPO_ROOT: ... \n BRANCH: ... \n FEATURE_DIR: ... etc.

set -e

# Parse command line arguments
JSON_MODE=false
REQUIRE_TASKS=false
INCLUDE_TASKS=false
PATHS_ONLY=false

for arg in "$@"; do
case "$arg" in
--json)
JSON_MODE=true
;;
--require-tasks)
REQUIRE_TASKS=true
;;
--include-tasks)
INCLUDE_TASKS=true
;;
--paths-only)
PATHS_ONLY=true
;;
--help|-h)
cat << 'EOF'
Usage: check-prerequisites.sh [OPTIONS]

Consolidated prerequisite checking for Spec-Driven Development workflow.

OPTIONS:
--json Output in JSON format
--require-tasks Require tasks.md to exist (for implementation phase)
--include-tasks Include tasks.md in AVAILABLE_DOCS list
--paths-only Only output path variables (no prerequisite validation)
--help, -h Show this help message

EXAMPLES:
# Check task prerequisites (plan.md required)
./check-prerequisites.sh --json

# Check implementation prerequisites (plan.md + tasks.md required)
./check-prerequisites.sh --json --require-tasks --include-tasks

# Get feature paths only (no validation)
./check-prerequisites.sh --paths-only

EOF
exit 0
;;
*)
echo "ERROR: Unknown option '$arg'. Use --help for usage information." >&2
exit 1
;;
esac
done

# Source common functions
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"

# Get feature paths and validate branch
_paths_output=$(get_feature_paths) || { echo "ERROR: Failed to resolve feature paths" >&2; exit 1; }
eval "$_paths_output"
unset _paths_output
check_feature_branch "$CURRENT_BRANCH" "$HAS_GIT" || exit 1

# If paths-only mode, output paths and exit (support JSON + paths-only combined)
if $PATHS_ONLY; then
if $JSON_MODE; then
# Minimal JSON paths payload (no validation performed)
if has_jq; then
jq -cn \
--arg repo_root "$REPO_ROOT" \
--arg branch "$CURRENT_BRANCH" \
--arg feature_dir "$FEATURE_DIR" \
--arg feature_spec "$FEATURE_SPEC" \
--arg impl_plan "$IMPL_PLAN" \
--arg tasks "$TASKS" \
'{REPO_ROOT:$repo_root,BRANCH:$branch,FEATURE_DIR:$feature_dir,FEATURE_SPEC:$feature_spec,IMPL_PLAN:$impl_plan,TASKS:$tasks}'
else
printf '{"REPO_ROOT":"%s","BRANCH":"%s","FEATURE_DIR":"%s","FEATURE_SPEC":"%s","IMPL_PLAN":"%s","TASKS":"%s"}\n' \
"$(json_escape "$REPO_ROOT")" "$(json_escape "$CURRENT_BRANCH")" "$(json_escape "$FEATURE_DIR")" "$(json_escape "$FEATURE_SPEC")" "$(json_escape "$IMPL_PLAN")" "$(json_escape "$TASKS")"
fi
else
echo "REPO_ROOT: $REPO_ROOT"
echo "BRANCH: $CURRENT_BRANCH"
echo "FEATURE_DIR: $FEATURE_DIR"
echo "FEATURE_SPEC: $FEATURE_SPEC"
echo "IMPL_PLAN: $IMPL_PLAN"
echo "TASKS: $TASKS"
fi
exit 0
fi

# Validate required directories and files
if [[ ! -d "$FEATURE_DIR" ]]; then
echo "ERROR: Feature directory not found: $FEATURE_DIR" >&2
echo "Run /speckit.specify first to create the feature structure." >&2
exit 1
fi

if [[ ! -f "$IMPL_PLAN" ]]; then
echo "ERROR: plan.md not found in $FEATURE_DIR" >&2
echo "Run /speckit.plan first to create the implementation plan." >&2
exit 1
fi

# Check for tasks.md if required
if $REQUIRE_TASKS && [[ ! -f "$TASKS" ]]; then
echo "ERROR: tasks.md not found in $FEATURE_DIR" >&2
echo "Run /speckit.tasks first to create the task list." >&2
exit 1
fi

# Build list of available documents
docs=()

# Always check these optional docs
[[ -f "$RESEARCH" ]] && docs+=("research.md")
[[ -f "$DATA_MODEL" ]] && docs+=("data-model.md")

# Check contracts directory (only if it exists and has files)
if [[ -d "$CONTRACTS_DIR" ]] && [[ -n "$(ls -A "$CONTRACTS_DIR" 2>/dev/null)" ]]; then
docs+=("contracts/")
fi

[[ -f "$QUICKSTART" ]] && docs+=("quickstart.md")

# Include tasks.md if requested and it exists
if $INCLUDE_TASKS && [[ -f "$TASKS" ]]; then
docs+=("tasks.md")
fi

# Output results
if $JSON_MODE; then
# Build JSON array of documents
if has_jq; then
if [[ ${#docs[@]} -eq 0 ]]; then
json_docs="[]"
else
json_docs=$(printf '%s\n' "${docs[@]}" | jq -R . | jq -s .)
fi
jq -cn \
--arg feature_dir "$FEATURE_DIR" \
--argjson docs "$json_docs" \
'{FEATURE_DIR:$feature_dir,AVAILABLE_DOCS:$docs}'
else
if [[ ${#docs[@]} -eq 0 ]]; then
json_docs="[]"
else
json_docs=$(for d in "${docs[@]}"; do printf '"%s",' "$(json_escape "$d")"; done)
json_docs="[${json_docs%,}]"
fi
printf '{"FEATURE_DIR":"%s","AVAILABLE_DOCS":%s}\n' "$(json_escape "$FEATURE_DIR")" "$json_docs"
fi
else
# Text output
echo "FEATURE_DIR:$FEATURE_DIR"
echo "AVAILABLE_DOCS:"

# Show status of each potential document
check_file "$RESEARCH" "research.md"
check_file "$DATA_MODEL" "data-model.md"
check_dir "$CONTRACTS_DIR" "contracts/"
check_file "$QUICKSTART" "quickstart.md"

if $INCLUDE_TASKS; then
check_file "$TASKS" "tasks.md"
fi
fi
Loading