Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
feat(view): a new item from the view can carry a brief [N27]
Corey Olson89e85e98b5c4
diff --git a/src/cockpit.js b/src/cockpit.jsindex ec86005c..d4d22be9 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -123,7 +123,7 @@ main { padding: 16px 18px 28px; }.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }.toolbar input { flex: 1 1 200px; }-input, select { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 9px; min-width: 0; }+input, select, textarea { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 9px; min-width: 0; }.go { border: 0; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }.go:hover { background: var(--accent-strong); color: var(--on-accent); }.ghost { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 5px 10px; cursor: pointer; }@@ -186,7 +186,8 @@ input, select { border: 1px solid var(--line-strong); background: var(--surface).panel-form { display: grid; gap: 10px; }.panel-form label, .inline label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-muted); }-.panel-form input, .panel-form select, .inline input, .inline select { width: 100%; }+.panel-form input, .panel-form select, .panel-form textarea, .inline input, .inline select { width: 100%; }+.panel-form textarea { resize: vertical; }.actions { display: flex; gap: 8px; } .actions .go { flex: 1; }.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; padding: 10px; }.inline label { flex: 1 1 150px; min-width: 0; }@@ -274,6 +275,7 @@ input, select { border: 1px solid var(--line-strong); background: var(--surface)<label>Title<input id="add-title" required placeholder="What to build"></label><label>Criterion<input id="add-criterion" placeholder="How a verifier knows it is done"></label><label>Spec rows<input id="add-specs" placeholder="G1,G2"></label>+ <label>Brief<textarea id="add-brief" rows="4" placeholder="How to build it: the files, the change, the test"></textarea></label><div class="actions"><button class="go" type="submit">Add item</button><button class="ghost" id="add-cancel" type="button">Cancel</button></div></form></aside>@@ -736,10 +738,11 @@ $('q').addEventListener('input', search);$('lane-filter').addEventListener('change', () => render());$('add-form').addEventListener('submit', async (event) => {event.preventDefault();- if (await act('add', { lane: $('add-lane').value, title: $('add-title').value, criterion: $('add-criterion').value, specs: $('add-specs').value })) {+ if (await act('add', { lane: $('add-lane').value, title: $('add-title').value, criterion: $('add-criterion').value, specs: $('add-specs').value, brief: $('add-brief').value })) {$('add-title').value = '';$('add-criterion').value = '';$('add-specs').value = '';+ $('add-brief').value = '';}});$('shout-form').addEventListener('submit', async (event) => {diff --git a/src/serve.js b/src/serve.jsindex ec9f7078..4a0dcadf 100644--- a/src/serve.js+++ b/src/serve.js@@ -136,7 +136,7 @@ export function projectState(root) {export function actionArgs(command, args = {}) {const text = (value) => String(value ?? '').trim();if (command === 'add') {- return ['add', text(args.lane), text(args.title), ...(text(args.criterion) ? ['--criterion', text(args.criterion)] : []), ...(text(args.specs) ? ['--specs', text(args.specs)] : [])];+ return ['add', text(args.lane), text(args.title), ...(text(args.criterion) ? ['--criterion', text(args.criterion)] : []), ...(text(args.specs) ? ['--specs', text(args.specs)] : []), ...(text(args.brief) ? ['--brief', text(args.brief)] : [])];}if (command === 'shout') return ['shout', text(args.to), text(args.text)];if (command === 'hold') return ['hold', text(args.lane), '--reason', text(args.reason)];diff --git a/test/cockpit.test.js b/test/cockpit.test.jsindex 903773a7..88e378ce 100644--- a/test/cockpit.test.js+++ b/test/cockpit.test.js@@ -784,6 +784,34 @@ test('the detail opens on the top item, not a blank form [N26]', async () => {}});+test('a new item from the view can carry a brief [N27]', async () => {+ const box = machine();+ const alpha = project(box, 'alpha');+ const view = await startView(box);+ try {+ const page = await openPage(view);+ const add = async (fields) => {+ await page.fire('new-item', 'click');+ for (const [id, value] of Object.entries(fields)) page.element(id).value = value;+ await page.fire('add-form', 'submit');+ return page.element('console').textContent;+ };+ const stored = (id) => JSON.parse(box.run(alpha.repo, 'show', String(id), '--json')).item_brief;++ const brief = 'Files: web/greeting.html\nTest: the page says hello';+ const ran = await add({ 'add-lane': 'web', 'add-title': 'Greeting', 'add-specs': 'G1', 'add-brief': brief });+ assert.ok(ran.startsWith(`$ pullboard add web Greeting --specs G1 --brief ${brief}\n`), ran);+ assert.equal(stored(1), brief, 'the brief reaches the board as written, its line break kept');+ assert.equal(page.element('add-brief').value, '', 'a successful add clears it');++ const plain = await add({ 'add-lane': 'web', 'add-title': 'Farewell', 'add-specs': 'G2', 'add-brief': ' ' });+ assert.ok(plain.startsWith('$ pullboard add web Farewell --specs G2\n'), plain);+ assert.ok(!stored(2), 'left empty, the item gets no brief');+ assert.match(page.html, /<label>Brief<textarea id="add-brief"/, 'the field is in the form, not built by the script');+ } finally {+ await view.stop();+ }+});test('times say which day they were [N26]', async () => {const box = machine();const alpha = project(box, 'alpha');