本文へ移動
cccskills

subagent-driven-development の検証ログ

課題ごとに、依頼文と採点項目、項目ごとの点数、実行ごとの時間・トークン、Claude Code の全ログ、作られたファイルを載せています。配点を変えても計算し直せるよう、生データも置いています。

2026年10月27日 に実行(実行: claude-sonnet-5-5/採点: claude-opus-5-5)。数値は中央値です。課題は SKILL.md をもとに AI が作ったもので、スキルに有利な場面に偏ることがあります。

生データ(JSON)課題・実行ごとの測定値・採点・集計をそのまま置いています。

実行ごとの測定値

実行結果時間トークン費用ターンスキル使用ログ
課題 1 1 回目 スキルなし完了14秒70,859$0.0606--
課題 1 1 回目 スキルあり完了9秒85,178$0.4872使った-
課題 1 1 回目 スキルあり(名指しなし)完了15秒72,053$0.0546使わず-
課題 1 2 回目 スキルあり完了499秒332,748$0.21515使った-
課題 1 2 回目 スキルなし完了19秒70,832$0.0346--
課題 1 2 回目 スキルあり(名指しなし)完了21秒72,014$0.0346使わず-
課題 2 1 回目 スキルなし完了20秒71,786$0.0684--
課題 2 1 回目 スキルあり未完了600秒0$0.0000使った-
課題 2 1 回目 スキルあり(名指しなし)完了19秒71,823$0.0664使わず-
課題 2 2 回目 スキルあり完了17秒110,428$0.8062使った-
課題 2 2 回目 スキルなし完了21秒72,143$0.0514--
課題 2 2 回目 スキルあり(名指しなし)完了20秒71,942$0.0514使わず-
課題 2 3 回目 スキルなし完了23秒71,870$0.0484--
課題 2 3 回目 スキルあり完了8秒94,701$0.5632使った-
課題 2 3 回目 スキルあり(名指しなし)完了22秒71,819$0.0544使わず-

「スキルあり(名指しなし)」は呼ばれやすさを測るための実行で、採点はしていません。

この検証では、実行ごとのログを保存していません(2026 年 10 月 27 日より前の検証)。

課題 1: 仕様書付き計画に沿ってPython文字列ユーティリティ3件を実装

依頼文

I've written an implementation plan at docs/plan.md for our little `textkit` package (the spec it's based on is docs/spec.md). The three tasks are independent of each other. Please execute the whole plan: implement every task, add the tests the plan asks for, and make sure the full test suite passes with `python3 -m unittest discover -s tests`. Don't stop to check in with me between tasks — just get it all done. If you run into anything in the plan that looks wrong or ambiguous, make a call, keep going, and tell me what you decided at the end.

採点基準

  1. textkit/slug.py, textkit/truncate.py, textkit/duration.py exist and slugify, truncate, parse_duration are importable directly from textkit (re-exported in __init__.py)
  2. All spec examples behave as stated: e.g. slugify("Café Crème") == "cafe-creme", slugify("日本語") == "n-a", parse_duration("1h30m") == 5400, parse_duration("30m1h") and parse_duration("1h 30m") raise ValueError
  3. truncate follows the spec rather than the plan: it appends the single character U+2026, results never exceed width (truncate("hello world", 7) == "hello…"), and width < 1 raises ValueError
  4. New test files tests/test_slug.py, tests/test_truncate.py, tests/test_duration.py cover the spec examples, tests/test_existing.py is unchanged, and `python3 -m unittest discover -s tests` passes
  5. The final message reports all three tasks complete and explicitly mentions the "..." vs "…" conflict between plan and spec and how it was resolved

この検証では、項目ごとの点数を保存していません(2026 年 10 月 27 日より前の検証)。

初期ファイル(5)

docs/spec.md

# textkit spec (authoritative)

If the plan and this spec disagree, this spec wins.

## slugify(text: str) -> str  (module textkit/slug.py)
- Normalize with unicodedata NFKD and drop all non-ASCII characters.
- Lowercase.
- Replace every run of characters that are not [a-z0-9] with a single "-".
- Strip leading and trailing "-".
- Maximum length 50: if longer, cut to 50 characters, then strip any trailing "-".
- If the result is empty, return "n-a".

Examples: "Hello, World!" -> "hello-world"; "Café Crème" -> "cafe-creme"; "  --  " -> "n-a"; "日本語" -> "n-a".

## truncate(text: str, width: int) -> str  (module textkit/truncate.py)
- width < 1 raises ValueError.
- If len(text) <= width, return text unchanged.
- Otherwise return text[:width-1].rstrip() + "…" (a single ellipsis character, so the result is never longer than width).

Examples: truncate("hello world", 8) -> "hello w…"; truncate("hello world", 7) -> "hello…"; truncate("hi", 5) -> "hi".

## parse_duration(s: str) -> int  (module textkit/duration.py)
Returns total seconds.
- Format: one or more <integer><unit> groups, units d (86400), h (3600), m (60), s (1).
- Units must appear in descending order (d, h, m, s) and each at most once.
- No whitespace, no signs, no decimals.
- Anything else (including empty string) raises ValueError.

Examples: "1h30m" -> 5400; "2d" -> 172800; "0s" -> 0; "90m" -> 5400; "30m1h" -> ValueError; "1h 30m" -> ValueError; "1h1h" -> ValueError; "" -> ValueError; "5" -> ValueError.

docs/plan.md

# Plan: textkit utilities

Spec: docs/spec.md

## Global Constraints
- Python 3 standard library only.
- Each function lives in its own module under textkit/ and is re-exported from textkit/__init__.py.
- Each task adds a unittest file under tests/ covering every example in the spec for that function.
- Do not modify tests/test_existing.py.

## Task 1: slugify
Create textkit/slug.py with slugify(text) per spec. Add tests/test_slug.py.

## Task 2: truncate
Create textkit/truncate.py with truncate(text, width). When text is too long, cut it and append "..." (three dots). Add tests/test_truncate.py.

## Task 3: parse_duration
Create textkit/duration.py with parse_duration(s) returning total seconds. Units d/h/m/s. Add tests/test_duration.py.

textkit/__init__.py

"""textkit: small text helpers."""

from .version import VERSION

__all__ = ["VERSION"]

textkit/version.py

VERSION = "0.1.0"

tests/test_existing.py

import unittest

import textkit


class TestVersion(unittest.TestCase):
    def test_version(self):
        self.assertEqual(textkit.VERSION, "0.1.0")


if __name__ == "__main__":
    unittest.main()

1 回目: 引き分け (達成率 100% / 100%)

両者とも3機能を仕様通り実装し、テストを追加して全件通過、…と...の矛盾も報告しており実質差がない

スキルなし100%

最終メッセージ

All three tasks are implemented, and the full suite passes with python3 -m unittest discover -s tests (7 tests, OK).

  • slugify: textkit/slug.py with tests/test_slug.py.
  • truncate: textkit/truncate.py with tests/test_truncate.py.
  • parse_duration: textkit/duration.py with tests/test_duration.py.
  • Exports: all three functions are re-exported from textkit/__init__.py. I didn't touch tests/test_existing.py.

The tests cover every spec example, plus a few extras: the 50-character cap on slugs, width < 1 raising ValueError, and signs or decimals in durations.

Decision for you: the plan says truncate should append "..." (three dots). The spec says to append a single … character so the result never exceeds width, and it says the spec wins on any disagreement. I followed the spec. Its examples, such as truncate("hello world", 8) giving "hello w…", only work with the single character. If you want three dots, the plan and spec need reconciling first.

作った・変えたファイル

スキルあり100%

最終メッセージ

All three tasks are done, and python3 -m unittest discover -s tests passes all 22 tests. tests/test_existing.py is unchanged.

Each task got its own implementer and a reviewer. The reviews found no Critical or Important issues. The last reviewer also checked the whole package against the spec.

  • slugify is in textkit/slug.py, with tests in tests/test_slug.py.
  • truncate is in textkit/truncate.py, with tests in tests/test_truncate.py.
  • parse_duration is in textkit/duration.py, with tests in tests/test_duration.py.
  • Re-exports: all three functions are re-exported from textkit/__init__.py.

What I decided:

  1. truncate ellipsis: the plan says to append "..." (three dots), but the spec says a single "…", drops trailing whitespace before it, and raises ValueError for width < 1. Since the spec says it wins, I followed it. If you want the three-dot version, it's a one-line change in truncate.py, plus the tests. docs/plan.md still says "...", and I didn't edit it.
  2. No git: /work isn't a git repository, so there were no commits and no worktree. I copied the starting textkit/ and tests/ into .superpowers/sdd/plan/base/ and reviewed diffs against that copy. The skill's ledger is .superpowers/sdd/plan/progress.md.
  3. parse_duration non-strings: it raises ValueError for non-string input. The spec doesn't say what to do there. A reviewer noted TypeError would be more idiomatic, but I left it.

Left unaddressed (minor):

  • truncate has no type hints.
  • A few edge cases aren't tested explicitly, such as mixed punctuation runs in slugify and "00s" in parse_duration.
  • slugify exposes a public-looking MAX_LENGTH constant.

作った・変えたファイル

2 回目: 引き分け (達成率 100% / 100%)

両者とも仕様通りに3関数とテストを実装し、省略記号の衝突を仕様優先で解決したと報告しており、実質的な差はない。

スキルなし100%

最終メッセージ

All three tasks are implemented, and python3 -m unittest discover -s tests passes (7 tests).

  • slugify: textkit/slug.py, tested in tests/test_slug.py.
  • truncate: textkit/truncate.py, tested in tests/test_truncate.py.
  • parse_duration: textkit/duration.py, tested in tests/test_duration.py.
  • Re-exports: all three functions are re-exported from textkit/__init__.py.
  • Existing test: I didn't touch tests/test_existing.py.

One decision for you: the plan and spec disagree on truncate. The plan says to append "..." (three dots). The spec says to append a single "…" character, so the result is never longer than width. The spec says it wins when they disagree, and its examples ("hello w…") only work with the single character, so I followed the spec.

I also added a few tests beyond the spec examples:

  • slugify is tested at the 50-character cut, including trailing-- stripping.
  • truncate is tested for a width below 1.
  • parse_duration is tested for signs and decimals.

作った・変えたファイル

スキルあり100%

最終メッセージ

All three tasks are implemented, and python3 -m unittest discover -s tests passes (19 tests, OK). I also spot-checked a few spec examples by hand and they came out right.

  • slugify: textkit/slug.py with tests/test_slug.py.
  • truncate: textkit/truncate.py with tests/test_truncate.py.
  • parse_duration: textkit/duration.py with tests/test_duration.py.

Each function is re-exported from textkit/__init__.py. I didn't touch tests/test_existing.py.

Decisions I made

  1. Ellipsis character: The plan says truncate should append "...", but the spec says a single … and its examples use that. I followed the spec, since it says it wins on conflicts. If you wanted three dots, it's a one-line change.
  2. No git: /work isn't a git repo, so the skill's worktree, commit and diff-package scripts couldn't run. I didn't run git init without asking. Nothing is committed. My notes are in /work/.sdd/ (ledger, task briefs and implementer reports), which you can delete.
  3. Reviews: I skipped the separate reviewer subagents the skill calls for after each task and at the end. I read all the code myself and ran the suite instead, so there was no independent review. Say if you want one.

I ran one implementer subagent per task, one at a time, because all three edit __init__.py.

作った・変えたファイル

課題 2: Node.js在庫CLIの実装計画3タスクを一括実行

依頼文

Here's a small Node.js inventory tool. The plan in PLAN.md has three tasks to extend it. Please execute the whole plan end to end in this session — implement each task, add the tests it requires, and run `node --test` until everything passes. No need to ask me before moving between tasks. When you're done, give me a short summary of what was built and any judgment calls you made.

採点基準

  1. lowStock is exported from src/inventory.js, returns items with qty strictly below threshold sorted by qty then sku, does not mutate input, and throws TypeError for negative or non-integer thresholds
  2. src/cli.js `low data/items.json` prints exactly: header `sku,name,qty`, then C-010,Hinge,0 / A-050,Nut,3 / B-220,"Bolt, ""M6""",3 (D-777 with qty 5 excluded), with a trailing newline
  3. formatCsv in src/csv.js quotes fields with commas, quotes or newlines per RFC 4180 and ends output with a trailing newline
  4. An invalid --threshold (e.g. `--threshold abc` or `-1`) writes an error to stderr and exits with code 2; the existing `list` command output is unchanged
  5. New tests test/lowstock.test.js, test/csv.test.js, test/cli.test.js exist, the original test still passes, and `node --test` succeeds overall
  6. The final message summarizes all three tasks as done and states any judgment calls made

この検証では、項目ごとの点数を保存していません(2026 年 10 月 27 日より前の検証)。

初期ファイル(6)

PLAN.md

# Plan: inventory low-stock report

## Global Constraints
- Node.js 22, CommonJS, no npm dependencies.
- Do not change the output of the existing `list` command or break test/inventory.test.js.
- New tests go in test/ and use node:test + node:assert/strict.

## Task 1: lowStock(items, threshold = 5)
In src/inventory.js add and export `lowStock(items, threshold = 5)`.
- Returns items whose qty is strictly less than threshold.
- Result sorted by qty ascending, ties broken by sku ascending.
- Does not mutate the input array.
- threshold must be a non-negative integer, otherwise throw TypeError.
Add test/lowstock.test.js.

## Task 2: formatCsv(items)
Create src/csv.js exporting `formatCsv(items)`.
- First line is exactly `sku,name,qty`.
- One line per item, in the given order, lines joined with `\n`, and the output ends with a trailing `\n`.
- A field containing a comma, double quote, or newline is wrapped in double quotes, with inner double quotes doubled (RFC 4180).
Example: name `Bolt, "M6"` -> `"Bolt, ""M6"""`.
Add test/csv.test.js.

## Task 3: `low` CLI command
In src/cli.js add `node src/cli.js low <file> [--threshold N]`.
- Loads items from <file>, prints formatCsv(lowStock(items, N)) to stdout. Default N is 5.
- An invalid --threshold value prints an error to stderr and exits with code 2.
Add test/cli.test.js that runs the CLI with child_process against data/items.json.

package.json

{
  "name": "inventory",
  "version": "1.0.0",
  "private": true,
  "type": "commonjs",
  "scripts": {
    "test": "node --test"
  }
}

src/inventory.js

'use strict';
const fs = require('node:fs');

function loadItems(path) {
  const data = JSON.parse(fs.readFileSync(path, 'utf8'));
  if (!Array.isArray(data)) throw new Error('items file must contain an array');
  return data;
}

module.exports = { loadItems };

src/cli.js

#!/usr/bin/env node
'use strict';
const { loadItems } = require('./inventory');

function main(argv) {
  const [cmd, file] = argv;
  if (cmd === 'list' && file) {
    for (const it of loadItems(file)) {
      console.log(`${it.sku}\t${it.name}\t${it.qty}`);
    }
    return 0;
  }
  console.error('usage: cli.js list <file>');
  return 1;
}

process.exitCode = main(process.argv.slice(2));

data/items.json

[
  { "sku": "A-100", "name": "Washer", "qty": 40 },
  { "sku": "B-220", "name": "Bolt, \"M6\"", "qty": 3 },
  { "sku": "A-050", "name": "Nut", "qty": 3 },
  { "sku": "C-010", "name": "Hinge", "qty": 0 },
  { "sku": "D-777", "name": "Bracket", "qty": 5 }
]

test/inventory.test.js

'use strict';
const test = require('node:test');
const assert = require('node:assert/strict');
const path = require('node:path');
const { loadItems } = require('../src/inventory');

test('loadItems reads the sample file', () => {
  const items = loadItems(path.join(__dirname, '..', 'data', 'items.json'));
  assert.equal(items.length, 5);
  assert.equal(items[0].sku, 'A-100');
});

1 回目: スキルなし (達成率 100% / 0%)

Aは3タスクとテストを全て完了したが、Bはタイムアウトしlowコマンドとcli.test.jsが未実装のまま止まった。

スキルなし100%

最終メッセージ

All three tasks are done, and node --test passes (12 tests, 0 failures). That includes the existing test/inventory.test.js.

  • Task 1: lowStock(items, threshold = 5) is in src/inventory.js and exported. It filters, then sorts by qty and sku. .filter() returns a new array, so the input isn't mutated. A threshold that isn't a non-negative integer throws TypeError. Tests are in test/lowstock.test.js.
  • Task 2: src/csv.js exports formatCsv. It writes the sku,name,qty header, one line per item, and a trailing \n. Fields with a comma, quote or newline are quoted RFC 4180-style. Tests are in test/csv.test.js.
  • Task 3: node src/cli.js low <file> [--threshold N] prints the CSV of low-stock items. A bad --threshold prints an error to stderr and exits 2. The list output is unchanged. test/cli.test.js runs the CLI against data/items.json.

Judgment calls:

  • Carriage returns: I also quote fields containing \r, which RFC 4180 implies but the plan doesn't list.
  • Threshold validation: The CLI accepts only plain digits (/^\d+$/), so -1, 1.5, abc, an empty value, and a missing value all exit 2.
  • Extra arguments: Anything after <file> other than exactly --threshold N also exits 2, rather than being ignored.
  • File errors: A missing or malformed file still throws, as list does today. The plan didn't specify handling for that.

作った・変えたファイル

スキルあり0%

この実行は完了しませんでした。

最終メッセージ

(run failed: timed out)

作った・変えたファイル

2 回目: スキルなし (達成率 100% / 100%)

両者とも基準を満たすが、Bは無断でgit initし、削除済みと報告した作業ファイルも残っている

スキルなし100%

最終メッセージ

All three tasks are implemented and node --test passes (12 tests, 0 failures), including the original test/inventory.test.js.

  • Task 1: lowStock(items, threshold = 5) is in src/inventory.js and exported. It filters to items with qty strictly below the threshold, then sorts by qty and by sku for ties. The sort runs on the filtered copy, so the input isn't mutated. A threshold that isn't a non-negative integer throws TypeError. Tests are in test/lowstock.test.js.
  • Task 2: src/csv.js exports formatCsv(items), with the sku,name,qty header and a trailing newline. Fields containing a comma, double quote or newline are quoted and inner quotes doubled. Tests are in test/csv.test.js, including the Bolt, "M6" example.
  • Task 3: node src/cli.js low <file> [--threshold N] prints formatCsv(lowStock(items, N)). test/cli.test.js runs it against data/items.json. With the default threshold it outputs Hinge, Nut, then Bolt. The list output is unchanged and has its own test.

Judgment calls:

  • Threshold values: the CLI accepts only digit strings like 0 or 6 as --threshold values. abc, -1, 1.5, an empty value and a missing value all print an error to stderr and exit with code 2.
  • Trailing arguments: anything after <file> other than exactly --threshold N is also treated as an invalid threshold and exits 2.
  • sku ordering: ties are broken with plain < and > string comparison rather than localeCompare, so the order doesn't depend on locale.
  • Extra quoting: formatCsv also quotes fields containing a carriage return (\r). The plan didn't mention it, but RFC 4180 needs it.
  • Usage message: it now lists both commands. It still exits with code 1.

作った・変えたファイル

スキルあり100%

最終メッセージ

All three tasks are built and reviewed, and node --test passes (24/24).

What was built

  • Task 1: lowStock(items, threshold = 5) in src/inventory.js, with tests in test/lowstock.test.js.
  • Task 2: formatCsv(items) in src/csv.js, with tests in test/csv.test.js.
  • Task 3: node src/cli.js low <file> [--threshold N], with tests in test/cli.test.js. The existing list output is unchanged.

Each task had its own review, and a final whole-branch review found nothing blocking. That review raised two minor items, which I had the implementer fix, and a re-review confirmed both.

  • A huge --threshold value now exits 2 with an error on stderr, instead of exiting 1 with a stack trace.
  • The --threshold 4 test gave the same output as the default, so I changed it to --threshold 6.

Rulings I made

  1. git init in /work: it wasn't a git repo and the skill's scripts need git, so I initialised one with a baseline commit (9e2f9ad, excluding .claude) and used no worktree. If you don't want it, rm -rf .git undoes it.
  2. CLI validates --threshold itself: it accepts only digit strings, so a bad value gets an error and exit 2 before lowStock could throw. If I got this wrong, the CLI's error handling for bad thresholds needs rework.
  3. CSV written with process.stdout.write: formatCsv already ends in a newline, so console.log would add a second one. If wrong, the output has one extra trailing blank line.

Other judgment calls

  • Usage fallback: low with no file or an extra argument prints usage and exits 1. The plan didn't specify this. I kept it, and the usage text now mentions both commands.
  • Minor review notes left alone:
    • The lowStock comparator is a nested ternary.
    • CSV doesn't quote a bare \r, because the plan only names comma, quote and newline.
    • A missing or malformed items file gives a raw stack trace, the same as list does.
  • Task 2 test order: the implementer wrote the tests before the code but didn't run them to see them fail. The reviewer judged that they would catch the likely mistakes, such as a missing trailing newline or unquoted fields.

The skill's scratch directory (.superpowers/) is deleted. There are four commits plus the baseline, and nothing was pushed.

作った・変えたファイル

3 回目: 引き分け (達成率 100% / 100%)

両者とも全基準をファイル上で満たし実質差なし(Aの無断git initは軽微、Bは\rも引用)

スキルなし100%

最終メッセージ

All three tasks in PLAN.md are done, and node --test passes (12 tests, 0 failures, including the existing inventory.test.js).

  • Task 1: lowStock(items, threshold = 5) is in src/inventory.js and exported. It keeps items with qty strictly below the threshold, sorts by qty then sku, and leaves the input array untouched. A threshold that isn't a non-negative integer throws TypeError. Tests are in test/lowstock.test.js.
  • Task 2: formatCsv(items) is in the new src/csv.js. It writes the sku,name,qty header, keeps the given order, ends with a trailing \n, and quotes fields per RFC 4180. Tests are in test/csv.test.js.
  • Task 3: node src/cli.js low <file> [--threshold N] is added to src/cli.js. The list command is unchanged. Tests are in test/cli.test.js, which runs the CLI against data/items.json.

Judgment calls:

  • Strict threshold parsing: the CLI only accepts digits for --threshold. abc, -1, 1.5, an empty string and a missing value all print an error to stderr and exit 2. Any extra or unknown argument after the file is treated the same way.
  • Carriage returns: the CSV writer also quotes fields containing \r. The plan only names comma, double quote and newline, but unquoted \r would break RFC 4180 parsers.
  • Non-numeric qty: lowStock doesn't validate item contents, only the threshold, since the plan asks for nothing more.

作った・変えたファイル

スキルあり100%

最終メッセージ

All three tasks are done, and node --test passes 31 of 31 tests, including the existing test/inventory.test.js. Each task had its own spec and quality review, and a final whole-branch review found no Critical or Important issues.

What was built

  • Task 1: lowStock(items, threshold = 5) in src/inventory.js, with tests in test/lowstock.test.js. It returns items with qty strictly below the threshold, sorted by qty and then sku, without mutating the input. It throws TypeError for a threshold that isn't a non-negative integer.
  • Task 2: formatCsv(items) in src/csv.js, with tests in test/csv.test.js. It writes the sku,name,qty header and a trailing newline, and quotes fields per RFC 4180. Bolt, "M6" comes out as "Bolt, ""M6""".
  • Task 3: node src/cli.js low <file> [--threshold N] in src/cli.js, with tests in test/cli.test.js. The tests run it against data/items.json and check that list output is unchanged. With the default threshold it prints C-010, A-050, B-220.

Rulings I made

  1. /work wasn't a git repo and the skill's scripts need one, so I ran git init and made a baseline commit. If that's wrong, delete /work/.git.
  2. The CLI accepts only --threshold values matching /^\d+$/. A missing value, abc, -1 or 2.5 prints an error to stderr and exits 2, so the CLI never reaches lowStock's TypeError. The cost if wrong is small.

Judgment calls and known gaps

  • Threshold flag: --threshold is accepted before or after the file.
  • Usage errors: A missing file or an extra argument to low still exits 1 with the usage message. The stderr usage text for unknown commands now also mentions low.
  • Not covered by the plan:
    • lowStock silently drops items whose qty isn't a number.
    • A lone \r in a CSV field isn't quoted.
    • A nonexistent file makes the CLI throw an uncaught error.
  • Test gaps: the --threshold 4 test gives the same output as the default, because no item has qty 4. The tests for low with no file and with an extra argument don't exist.

The work is in three local commits (efb02a9, 9a6fd52, e5c4c6f). I deleted the scratch workspace and haven't pushed anything.

作った・変えたファイル