CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/intent-integrity-kit

Closing the intent-to-code chasm - specification-driven development with BDD verification chain

86

1.82x
Quality

92%

Does it follow best practices?

Impact

86%

1.82x

Average score across 14 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-8/

Update Technical Design: File Upload Feature

Problem/Feature Description

A document management team has been working on a file upload feature. They have an existing technical plan from a previous planning session, but the product requirements have changed significantly: the original spec only described basic file storage, but new requirements now call for virus scanning, file type validation, and a size quota per user. A backend engineer has already updated the spec.md with these new requirements.

Your task is to re-run the planning process on the updated spec. Write your analysis in specs/003-file-upload/planning-notes.md.

Output Specification

  • specs/003-file-upload/plan.md — updated technical design
  • specs/003-file-upload/research.md — updated technology decisions
  • specs/003-file-upload/data-model.md — updated data model
  • specs/003-file-upload/planning-notes.md — your analysis notes

Input Files

The following files are provided as inputs. Extract them before beginning.

=============== FILE: specs/003-file-upload/spec.md ===============

Feature Spec: File Upload Service

Branch: 003-file-upload | Date: 2026-02-01 | Status: specified

User Stories

US1: Upload a file

As a user, I want to upload a document so that I can store and access it later.

Acceptance Scenarios:

  • Given a valid file under the size limit, when uploaded, then the file is stored and a download URL is returned
  • Given a file that fails virus scanning, when uploaded, then the upload is rejected with an error
  • Given a file type not in the allowlist, when uploaded, then the upload is rejected

US2: Manage storage quota

As an admin, I want each user to have a configurable storage quota so that storage costs are controlled.

Acceptance Scenarios:

  • Given a user at 90% of their quota, when they upload a file that would exceed the quota, then the upload is rejected with a quota error
  • Given an admin, when they update a user's quota, then subsequent uploads respect the new limit

Functional Requirements

  • FR-001: The system MUST accept file uploads up to [NEEDS CLARIFICATION: max file size TBD by ops team]
  • FR-002: Every uploaded file MUST be scanned for malware before being stored
  • FR-003: The system MUST reject files with extensions not in the configured allowlist (.pdf, .docx, .xlsx, .png, .jpg)
  • FR-004: Each user MUST have a configurable storage quota enforced at upload time
  • FR-005: The system MUST return a pre-signed download URL valid for [NEEDS CLARIFICATION: URL expiry duration TBD] after successful upload
  • FR-006: Upload progress MUST be trackable by the client

Success Criteria

  • SC-001: File uploads complete without errors for valid files
  • SC-002: Virus-infected files are rejected before storage
  • SC-003: Users cannot exceed their storage quota
  • SC-004: Pre-signed URLs are returned after successful upload

=============== FILE: specs/003-file-upload/plan.md ===============

Implementation Plan: File Upload Service

Branch: 003-file-upload | Date: 2026-01-10 | Spec: specs/003-file-upload/spec.md

Summary

Basic file upload to cloud storage with user authentication check.

Technical Context

Language/Version: Python 3.11 Primary Dependencies: FastAPI, boto3 Storage: AWS S3 Testing: pytest Target Platform: Linux server Project Type: single Performance Goals: NEEDS CLARIFICATION Constraints: NEEDS CLARIFICATION Scale/Scope: NEEDS CLARIFICATION

Constitution Check

No constitution violations.

Project Structure

Documentation (this feature)

specs/003-file-upload/
  plan.md
  research.md
  data-model.md
  quickstart.md
  contracts/
  tasks.md

Source Code

src/
  api/
    upload.py
  storage/
    s3_client.py
  models/
    file.py

tests/
  unit/
  integration/

Architecture

Simple two-tier:

[Client] --> [Upload API] --> [S3]

Implementation Phases

Phase 0: Setup

  • Configure AWS credentials and S3 bucket
  • Set up FastAPI project skeleton

Phase 1: Core Upload

  • Implement upload endpoint
  • Add S3 integration

Phase 2: Auth

  • Add user authentication check

evals

README.md

tile.json