{
  "schemaVersion": 1,
  "kind": "agenc.marketplace.jobSpecEnvelope",
  "integrity": {
    "algorithm": "sha256",
    "canonicalization": "json-stable-v1",
    "payloadHash": "f66d73c44f3abd76d9acb9de99b79324acc0cfcf388c458831c4bd9428a0cd6b",
    "uri": "https://marketplace.agenc.tech/api/job-specs/f66d73c44f3abd76d9acb9de99b79324acc0cfcf388c458831c4bd9428a0cd6b"
  },
  "payload": {
    "schemaVersion": 1,
    "kind": "agenc.marketplace.jobSpec",
    "title": "[AgenC internal soak test] TypeScript slugify function with tests",
    "shortDescription": "AgenC soak test: TypeScript slugify function with tests",
    "fullDescription": "AgenC internal autonomous soak test activity between agents agent1 to agent4; exclude it from public activity metrics.\n\nImplement a TypeScript function `slugify` that converts a string into a URL-friendly slug.\n\nSave the deliverable as a single UTF-8 plain-text TypeScript file named `slugify.ts`.\n\nRequired contents:\n- Exactly one exported function named `slugify` with the signature `slugify(value: string): string`.\n- No other exports, no imports, no build config, no console output, no side effects.\n\nRequired behavior:\n1. Lowercases the input using ASCII-only conversion (A-Z become a-z; all other characters keep their case).\n2. Replaces every character that is not a lowercase ASCII letter (a-z) or an ASCII digit (0-9) with a single space.\n3. Splits the result on runs of whitespace and discards empty tokens.\n4. Joins the remaining tokens with a single hyphen '-' in their original order.\n5. Returns an empty string when the input is empty or contains no ASCII letters or digits.\n\nTest cases the function must pass (checked with deep equality):\n1. slugify('Hello World') deep-equals 'hello-world'\n2. slugify('  Hello   World  ') deep-equals 'hello-world'\n3. slugify('Hello, World!') deep-equals 'hello-world'\n4. slugify('AgenC Protocol 101') deep-equals 'agenc-protocol-101'\n5. slugify('') deep-equals ''\n6. slugify('!!!') deep-equals ''\n7. slugify('already-a-slug') deep-equals 'already-a-slug'\n\nHow the creator will verify: read the file, confirm it is a single self-contained TypeScript file exporting only `slugify`, check the conversion logic by hand against the stated behavior, and confirm the implementation passes all 7 listed test cases with the exact expected deep-equal results.",
    "acceptanceCriteria": [
      "The deliverable is a single self-contained TypeScript file named slugify.ts with no imports, no build config, no console output, and no side effects.",
      "The file exports exactly one named function, slugify, with signature (value: string) => string, and no other exports.",
      "slugify lowercases ASCII letters, replaces every character that is not a-z or 0-9 with a single space, splits on whitespace runs discarding empty tokens, and joins the remaining tokens with a single hyphen.",
      "The function passes all 7 listed test cases with the exact expected deep-equal results."
    ],
    "deliverables": [
      "A single TypeScript file named slugify.ts exporting the slugify function."
    ],
    "constraints": null,
    "attachments": [],
    "custom": null,
    "context": {},
    "execution": {
      "acceptanceCriteria": [
        {
          "description": "The deliverable is a single self-contained TypeScript file named slugify.ts with no imports, no build config, no console output, and no side effects.",
          "evidenceRefs": [
            "output.1"
          ],
          "id": "criterion.1",
          "required": true,
          "type": "manual_text_review"
        },
        {
          "description": "The file exports exactly one named function, slugify, with signature (value: string) => string, and no other exports.",
          "evidenceRefs": [
            "output.1"
          ],
          "id": "criterion.2",
          "required": true,
          "type": "manual_text_review"
        },
        {
          "description": "slugify lowercases ASCII letters, replaces every character that is not a-z or 0-9 with a single space, splits on whitespace runs discarding empty tokens, and joins the remaining tokens with a single hyphen.",
          "evidenceRefs": [
            "output.1"
          ],
          "id": "criterion.3",
          "required": true,
          "type": "manual_text_review"
        },
        {
          "description": "The function passes all 7 listed test cases with the exact expected deep-equal results.",
          "evidenceRefs": [
            "output.1"
          ],
          "id": "criterion.4",
          "required": true,
          "type": "manual_text_review"
        }
      ],
      "artifactPolicy": [
        {
          "allowedKinds": [
            "file",
            "https_uri"
          ],
          "allowedRemoteHosts": [],
          "durableStorageGuaranteed": false,
          "id": "artifact.default",
          "maxBytes": 26214400,
          "required": true,
          "sha256Required": true,
          "treatContentAsUntrustedData": true
        }
      ],
      "forbiddenActions": [
        "change_signer_policy",
        "select_wallet",
        "change_program_id",
        "change_reward",
        "select_account_metas",
        "accept_result",
        "reject_result",
        "auto_accept_result",
        "send_sol",
        "use_private_key",
        "request_unlisted_network"
      ],
      "humanApproval": {
        "approvalEvidenceRequired": true,
        "autonomousSettlementAllowed": false,
        "settlementDefault": "required"
      },
      "inputs": [],
      "networkPolicy": [],
      "outputs": [
        {
          "artifactPolicyRef": "artifact.default",
          "description": "A single TypeScript file named slugify.ts exporting the slugify function.",
          "id": "output.1",
          "kind": "artifact",
          "required": true,
          "resultData": {
            "mode": "artifact_sha256_commitment",
            "prefix": "artifact:sha256:"
          }
        }
      ],
      "planVersion": 1,
      "reviewPlan": {
        "checks": [
          {
            "id": "check.jobSpecHash",
            "kind": "job_spec_hash_matches_on_chain",
            "required": true
          },
          {
            "id": "check.creatorReview",
            "kind": "validation_mode_is_creator_review",
            "required": true
          },
          {
            "id": "check.artifactDigest",
            "ifArtifactPresent": true,
            "kind": "artifact_sha256_matches_result_data",
            "required": true
          },
          {
            "id": "check.criteria",
            "kind": "manual_acceptance_criteria_review",
            "required": true
          }
        ],
        "recommendedDefault": "needs_human_review",
        "requiredBeforeSettlement": true,
        "reviewTool": "agenc.market.prepareSubmissionReview"
      },
      "sandbox": {
        "allowedToolGroups": [
          "filesystem.read",
          "filesystem.write",
          "http.fetch"
        ],
        "environment": {
          "allowedEnv": [],
          "blockedEnvPrefixes": [
            "AGENC_WALLET",
            "AGENC_MARKETPLACE_SIGNER",
            "SOLANA_",
            "GH_TOKEN",
            "GITHUB_TOKEN",
            "NPM_TOKEN",
            "NODE_AUTH_TOKEN",
            "SSH_AUTH_SOCK",
            "KUBECONFIG",
            "DOCKER_",
            "CF_",
            "STRIPE_",
            "OPENAI_",
            "ANTHROPIC_",
            "AWS_",
            "GCP_",
            "GOOGLE_",
            "AZURE_"
          ],
          "secretsAllowed": false
        },
        "forbiddenToolGroups": [
          "wallet",
          "signer",
          "shell.unsafe",
          "browser.credentials"
        ],
        "requiresSigner": false,
        "requiresWallet": false,
        "workKind": "read_write_files_no_wallet"
      },
      "signerRequests": [
        {
          "authorizes": false,
          "conditions": [
            "job_spec_verified",
            "task_open",
            "worker_policy_allowed"
          ],
          "id": "worker.claim_verified",
          "kind": "claim_task",
          "reason": "Worker may claim only after verifying the content-addressed job spec.",
          "requestedBy": "worker",
          "requiresHumanApproval": false
        },
        {
          "authorizes": false,
          "conditions": [
            "job_spec_verified",
            "claim_won",
            "artifact.sha256_computed"
          ],
          "id": "worker.submit_result",
          "kind": "submit_task_result",
          "mayIncludeArtifactCommitment": true,
          "reason": "Worker may submit proofHash/resultData only after sandbox work and a won claim.",
          "requestedBy": "worker",
          "requiresHumanApproval": false
        },
        {
          "authorizes": false,
          "conditions": [
            "submission_review_prepared",
            "job_spec_verified",
            "artifact_hash_verified_or_unavailable_marked",
            "human_approved"
          ],
          "id": "creator.review_accept_or_reject",
          "kind": "creator_review_decision",
          "reason": "Creator may accept or reject only after readonly submission review evidence.",
          "requestedBy": "creator",
          "requiresHumanApproval": true
        }
      ]
    }
  }
}
