Human Backlog
Spec: Human Backlog
Context
Business requesters and product owners at a client track business requests and
release status in the client's Azure DevOps project, the Human Backlog.
They do not read the Core Backlog (Linear or GitHub, written only by
write-backlog). Giovanni's five Azure DevOps skills and his ado.py helper
work today for one client only (org, project and tenant are fixed).
This spec makes those skills generic, ships them from ci-app as
@collective-intelligence/backlog, installs them in HI repos through the
ci-solutions Pack, adds the humanBacklog setting, adds
setup-human-backlog with an Eject for clients, and lets write-backlog write
the late Human States from Core Backlog delivery evidence.
Canonical terms: Human Backlog Glossary. Decision trail: grill log. Design: architecture.
| Human State | Writer | Trigger |
|---|---|---|
| Received | create-business-request | item created (initial state) |
| In analysis | analyze-business-request | first Feature link |
| Planned | plan-sprint | first linked Feature gets a sprint |
| In progress | write-backlog | first work-started fact in the Fog scope |
| On staging | write-backlog | staging evidence for every Story and Task |
| Live | write-backlog | Fog completes (production evidence) |
| Rejected | a person, or update-business-request on request | business decision |
| Withdrawn | a person, update-business-request on request, or write-backlog for a Cancelled Fog | business decision |
Non-Goals
- A delivery step that records staging or production evidence. Until one exists, only In progress is written automatically (Q19).
- Configurable write language or sprint length (Q5, Q6).
- Client changes to work-item types, fields or states (Q4).
- Creating the Azure DevOps process through its API (Q37).
- An HI-required
aztool or any provider-specific HI tool (Q27). - Python tests run by HI (Q26).
- Choosing the client's harness; caching, staging retirement, BI metadata, document procedures, development-side skills.
Requirements and Outcomes
OUT-001: Business Requests follow the fixed Human State lifecycle
Each Human State has the writer and trigger in the Context table. Revision
eligibility of update-business-request uses the new state names.
Architecture: OUT-001 in #spec-traceability; ARC-001, FLOW-001.
OUT-002: Automated Human State writes are forward-only and safe to repeat
ado.py set-state is the only automated way to change a Business Request
state.
Architecture: OUT-002 in #spec-traceability; ARC-003, Models.
OUT-003: write-backlog writes late Human States from Core Backlog evidence
When humanBacklog is configured and a Fog links a Business Request,
write-backlog writes In progress, On staging, Live, and Withdrawn for a
Cancelled Fog. A Human Backlog problem never blocks delivery.
Architecture: OUT-003 in #spec-traceability; ARC-006, FLOW-002.
OUT-004: A Fog and its Business Request link to each other
Architecture: OUT-004 in #spec-traceability; ARC-008.
OUT-005: The Human Backlog skills and ado.py work for any client
Architecture: OUT-005 in #spec-traceability; ARC-003, FLOW-005.
OUT-006: ci-app publishes @collective-intelligence/backlog
Architecture: OUT-006 in #spec-traceability; ARC-002, FLOW-004.
OUT-007: HI installs the Human Backlog skills through the ci-solutions Pack
Architecture: OUT-007 in #spec-traceability; ARC-004, FLOW-004.
OUT-008: HI declares and validates the humanBacklog setting
Architecture: OUT-008 in #spec-traceability; ARC-005.
OUT-009: setup-human-backlog writes and proves a Human Backlog Config
Architecture: OUT-009 in #spec-traceability; ARC-007, FLOW-003.
OUT-010: An Eject gives a client a self-contained, reproducible zip
Architecture: OUT-010 in #spec-traceability; FLOW-003.
Acceptance Criteria
Every criterion maps in the architecture's #spec-traceability table under its own code.
- AC-001:
create-business-requestcreates a Business Request that reads back in Received, and its create payload has no State field.- Covers: OUT-001
- Architecture: FLOW-001-STEP-001, ARC-003
- AC-002: When
analyze-business-requestadds the first Feature link to a Received request, it callsado.py set-state <id> "In analysis", and the request reads back In analysis.- Covers: OUT-001
- Architecture: FLOW-001-STEP-002
- AC-003: When
plan-sprintassigns a sprint to the first linked Feature of a request, it callsado.py set-state <id> Planned, and the request reads back Planned.- Covers: OUT-001
- Architecture: FLOW-001-STEP-003
- AC-004:
update-business-requestwrites Rejected or Withdrawn only when the user asks for that state.- Covers: OUT-001
- Architecture: FLOW-001-STEP-004
- AC-005:
revision-checkallows free edit only for Received with no linked Feature, allows cascade only for In analysis or Planned with every linked Feature New or Planned, and blocks every other case with zero writes.- Covers: OUT-001
- Architecture: FLOW-001-STEP-005
- AC-006:
ado.py set-staterefuses a target earlier in Received → In analysis → Planned → In progress → On staging → Live, and refuses any target when the current state is Live, Rejected or Withdrawn; a refusal makes no write and exits nonzero. Rejected and Withdrawn are allowed from every non-final state.- Covers: OUT-002
- Architecture: ARC-003, Models
- AC-007:
ado.py set-statewith the current state makes no write and exits 0.- Covers: OUT-002
- Architecture: ARC-003
- AC-008:
ado.py set-statepatches State with a JSON Patch revision test and adds exactly one comment from--comment; a stale--expected-revfails before any write.- Covers: OUT-002
- Architecture: ARC-003, FLOW-002-STEP-004
- AC-009: With
humanBacklogset and a linked Business Request,write-backlogwrites In progress at the first work-started fact in the Fog scope, On staging when every Story and Task has staging evidence, Live when the Fog completes, Withdrawn when the Fog becomes Cancelled, and nothing when the Fog becomes Superseded.- Covers: OUT-003
- Architecture: FLOW-002-STEP-003
- AC-010: The owed Human State is the highest state that all recorded evidence
for the Fog scope supports; a later fact for an earlier state never lowers it.
- Covers: OUT-003
- Architecture: FLOW-002-STEP-003, Models
- AC-011: Without
humanBacklog, without a linked Business Request, or for work with no Fog,write-backlogmakes zero Human Backlog writes and reports no failure.- Covers: OUT-003
- Architecture: FLOW-002-STEP-003
- AC-012: When
humanBacklogis set and.agents/skills/human-backlog-ado/scripts/ado.pyis absent,write-backlogreturns setup guidance, makes zero Human Backlog writes, and completes its Core Backlog writes.- Covers: OUT-003
- Architecture: FLOW-002-STEP-004
- AC-013: When a Human State write fails, the Core Backlog writes of that run
stay applied, the failed write appears in the residual delta, and the next
delivery event retries it.
- Covers: OUT-003
- Architecture: FLOW-002-STEP-002, FLOW-002-STEP-005
- AC-014: Each Human State change by
write-backlogadds one comment in the request's language with the date and, when known, the release name, and no technical link.- Covers: OUT-003
- Architecture: FLOW-002-STEP-004
- AC-015: The
write-backlogchange is one newreferences/human-backlog.mdplus one pointer line inSKILL.mdstep 9; the provider references,fog-intake.mdanddelivery-status.mdare unchanged.- Covers: OUT-003
- Architecture: ARC-006
- AC-016: A linked Fog carries one Business Request link (Linear: attachment
link; GitHub: body line
Business Request: <url>), and the Business Request carries a back link to the Fog;write-backlogwrites both at Fog intake when a request URL is supplied, or later on an explicit link instruction.- Covers: OUT-004
- Architecture: ARC-008
- AC-017: When
write-backlogrecords a Fog as Superseded, both links move to the successor Fog in the same run, and no Fog links more than one Business Request.- Covers: OUT-004
- Architecture: ARC-008, FLOW-002-STEP-003
- AC-018: No shipped skill file or
ado.pycontainsemera-group,Collective-Intelligence, the tenantb60db498-a991-498d-bfb5-7f0657f02891ordefinitionId=1.- Covers: OUT-005
- Architecture: ARC-003
- AC-019:
ado.pyresolves config fromADO_*env vars, thenhumanBacklogin the nearest.devpunks/settings.jsonabove the working directory, thenconfig.jsonbesideado.py; it derives org and project fromprojectUrl; a missingprovider,projectUrlortenantstops with the key name before any network call;ado.py --helpruns with no config.- Covers: OUT-005
- Architecture: FLOW-005-STEP-001, FLOW-005-STEP-002, FLOW-005-STEP-003
- AC-020:
ado.pygets its token only fromaz account get-access-token --tenant <tenant>; whenazis missing or not logged in it stops before any network call and tells the user to install the Azure CLI and runaz login --tenant <tenant>.- Covers: OUT-005
- Architecture: FLOW-005-STEP-004
- AC-021: Skill files are English; each skill tells the agent to write saved
content in the user's language and to keep an existing item's language when
editing it.
- Covers: OUT-005
- Architecture: ARC-003
- AC-022:
ado.py planning-checkstill accepts only iterations of exactly two configured working weeks.- Covers: OUT-005
- Architecture: ARC-003
- AC-023: The published
@collective-intelligence/backlogtarball root is exactlyREADME.md,package.jsonandskills;skillsholds exactlyhuman-backlog-ado,create-business-request,analyze-business-request,update-business-request,plan-sprint,create-bugandsetup-human-backlog; no test file is in the tarball.- Covers: OUT-006
- Architecture: ARC-002
- AC-024: ci-app CI runs
python3 -m unittest discover -s testsforpackages/public/backlogthroughtest:pack, and the run passes.- Covers: OUT-006
- Architecture: ARC-002
- AC-025:
package-skills.tsexportspackageSkillSourceswith the lint and backlog sources;sync:package-skillscopies both intoapps/cli/skills/npm/<directory>/; the receipt.devpunks-cache/package-skills-sync.jsonholds one entry per package name; the lint source behavior is unchanged.- Covers: OUT-007
- Architecture: ARC-004, FLOW-004-STEP-003
- AC-026:
skills.tshas the seven entries withtier: "framework",framework: "ci-solutions",language: nullandrequiresTools: ["python3"]; theci-solutionsPack lists them; the tool catalog has noazentry.- Covers: OUT-007
- Architecture: ARC-004
- AC-027:
hi updatein a repo that depends on a CI SDK installs the seven skills under.agents/skills/.- Covers: OUT-007
- Architecture: FLOW-004-STEP-005
- AC-028:
SettingsDocumentacceptshumanBacklogwith providerazure-devops, ahttps://dev.azure.com/{org}/{project}URL, a UUID tenant and an optional httpsratingsPipelineUrl; it rejects any other provider, URL host or tenant shape;hi checkthen fails with.devpunks/settings.json: <error>.- Covers: OUT-008
- Architecture: ARC-005
- AC-029:
hi initasks nohumanBacklogquestion, andhi updatekeeps an existinghumanBacklogvalue unchanged.- Covers: OUT-008
- Architecture: ARC-005, FLOW-003-STEP-002
- AC-030:
setup-human-backlogwriteshumanBacklog, then runsado.py doctor; it returnsreadyonly when every doctor check passes and otherwiseblockedwith the full mismatch list;doctormakes no write.- Covers: OUT-009
- Architecture: FLOW-003-STEP-002, FLOW-003-STEP-003
- AC-031:
setup-human-backlog/references/process.mdlists the five work-item types, every field the skills use, and the eight Human States.- Covers: OUT-009
- Architecture: ARC-001, ARC-007
- AC-032:
ado.py ejectfails without--out; with--outit writes one zip that holds the sibling skill folders without tests,config.jsonwith the Human Backlog Config, andMANIFEST.jsonwith package name, skill-tree sha256, config sha256 and date; the same installed tree gives the same skill-tree sha256.- Covers: OUT-010
- Architecture: FLOW-003-STEP-004
Spec Invariants
| INV | Rule | Source (Q anchor) | Form | Pattern | Seam | Model |
|---|---|---|---|---|---|---|
| INV-001 | Automated writers move a Business Request forward only; Live, Rejected and Withdrawn stay final; a repeated write changes nothing | Q34, Q36, Glossary Q49 | stateful-property | stateful command sequence | ado.py set-state | models/human-state.proof.ts |
| INV-002 | ado.py doctor reports ready only when every check passes; otherwise it reports blocked and writes nothing | Q32, Glossary Q49 | property | security gate | ado.py doctor | none |
Constraints
- The team owns the Human Backlog process. Clients change only the Human Backlog Config (Q4, Q7).
- Human State names are exactly Received, In analysis, Planned, In progress, On staging, Live, Rejected, Withdrawn; no mapping layer (Q2, Q3).
- A Business Request has one active Fog; a Fog has at most one Business Request (Q21).
- Merge is never staging; staging is never production (S10).
- HI requires no provider-specific tool (Q27).
- Sprints are two working weeks (Q5).
write-backlogstays the only Core Backlog writer; the skills repo takes no dependency on ci-app other than the helper path (Q25).
Dependency Readiness
Ready.
- HI package skills sync and
ci-solutionsPack: landed inwearedevpunks/harness-intelligence886966be721e65c0d48d33c22046234af6f2e847(#288). - ci-app public package release by glob and staged first publish: present at
collective-intelligence-platform/ci-appd34b4b06bb(.github/scripts/npm_release.py:137-144,:617-621). - Effect
Schema.isPatternandSchema.isUUID: Effect 4.1.0packages/effect/src/Schema.tslines 6889 and 7013. tsprover@0.0.2for the Human State Model.
Branch/Base Intent
wearedevpunks/harness-intelligence: branchteam/stefan/backlog-for-humans-skill-pack, based onorigin/main886966be7; it already carries this spec and its architecture.wearedevpunks/skills: the checked-outmainonly, per the repository's shared-skills rule (rootCLAUDE.md); thenbun run sync:skillsin HI.collective-intelligence-platform/ci-app: no accepted branch intent; the plan chooses one feature branch frommain.
Architecture Source
- URL: https://github.com/wearedevpunks/harness-intelligence/blob/41368d2660f27b299ba62bf45f76fe6e12512b47/apps/wiki/content/docs/project/specs/cli/human-backlog/ARCHITECTURE.md
- Commit:
41368d2660f27b299ba62bf45f76fe6e12512b47 - Path:
apps/wiki/content/docs/project/specs/cli/human-backlog/ARCHITECTURE.md - Content identity: git blob
2c48097c9284ce97df82e93edf876558f0f7a695 - Source identities it records: grill status blob
aac707a2…, grill log blob25562f67…, glossary blobbf6b170a….
Accepted Technical Decisions
- ci-app package (Q39, Q42, Q48):
packages/public/backlog/, name@collective-intelligence/backlog,files: ["README.md", "skills"],publishConfig.access: public, no build, no TypeScript sources;testrunspython3 -m unittest discover -s tests;test:packchecks the tarball root and the seven skills, then runstest; tests live inpackages/public/backlog/tests/. First publish needs one manual staged release run. - Helper (Q24, Q45): one catalogued unit
human-backlog-adowithSKILL.md(helper reference for sibling skills) andscripts/ado.pyas one file. Sibling skills call../human-backlog-ado/scripts/ado.py. ado.py(Q28, Q36, Q41, Q45): lazyload_config()replaces theORG/PROJECT/TENANTconstants;BR_FLOW = ("Received", "In analysis", "Planned", "In progress", "On staging", "Live"),BR_FINAL = {"Live", "Rejected", "Withdrawn"}; new commandsdoctor,set-state ID STATE --comment TEXT [--expected-rev N] [--dry-run],eject --out PATH;revision-checkuses the new names;createsets no State; the existing commands stay.- HI catalog (Q43, Q27):
collectiveIntelligenceBacklogVersion,collectiveIntelligenceBacklogSkills(directory: "collective-intelligence-backlog",tarballEnv: "HI_CI_BACKLOG_TARBALL"),packageSkillSources = [lint, backlog];sync-package-skills.mjsiterates the list; receipt keyed by package name; sevenskills.tsentries withrequiresTools: ["python3"];ci-solutionsgains the seven skills and onepromptDetailsline. - Settings (Q31, Q44):
HumanBacklogSettings = Schema.Struct({ provider: Schema.Literal("azure-devops"), projectUrl: Schema.String.check(Schema.isPattern(/^https:\/\/dev\.azure\.com\/[^/]+\/[^/]+\/?$/u)), tenant: Schema.String.check(Schema.isUUID()), ratingsPipelineUrl: Schema.optional(<https URL>) });SettingsDocument.humanBacklog: Schema.optional(HumanBacklogSettings);decodeCheckSettingsreads it; noProjectIntentfield. write-backlog(Q25, Q29, Q46): newreferences/human-backlog.md; one pointer line inSKILL.mdstep 9; calls.agents/skills/human-backlog-ado/scripts/ado.py set-state.- Eject (Q33, Q47):
--outrequired; zip holds sibling skill folders without tests,config.json,MANIFEST.json; no version in the filename. - Language (Q6, Q22): skill files English; saved content in the user's language; edits keep the item's language.
Accepted Testing Decisions
- Giovanni's 72 offline
unittesttests move topackages/public/backlog/tests/, adapted to the generic helper; new tests cover config resolution,set-state,doctorandeject(Q45). - ci-app CI runs them through
test:pack; HI runs no Python tests and trusts the pinned published version (Q26, Q42). - The Human State Model
models/human-state.proof.tspassestsprover@0.0.2with 153 distinct states; its four Sensitivity Proof mutants fail as recorded in the architecture Models section. INV-001 replays it as a stateful property overset-state. - HI catalog, sync and settings changes are tested with the existing Vitest
suites around
syncPackageSkills(tarball override) and settings decoding.
Verification Seams
ado.pyCLI commands, driven against an in-memory Azure DevOps fake as in Giovanni's tests; no live work item is created to test a skill.syncPackageSkillswithHI_CI_BACKLOG_TARBALLpointing at a packed local tarball.SettingsDocumentdecoding andhi checkon a fixture settings file.hi updateon a fixture repo that depends on a CI SDK.write-backlogand the five Markdown skills: their reference text and theado.pycommands they call; no automated test drives a skill prompt.
Parked Decisions
| Item | Owner | Resume trigger |
|---|---|---|
| Delivery step that records staging and production evidence | not recorded | When a delivery caller can observe deployments |
Giovanni confirmations: one script; state rename; Feature Ratings Sync use of ado.py | Stefan with Giovanni | Joint review before the first publish of @collective-intelligence/backlog |
Decision Log
| Decision | Evidence | Rationale |
|---|---|---|
Skills ship from ci-app through ci-solutions, not a new Pack | Q38 | Reuses the #288 mechanism |
Keep ado.py, generic, az-only | Q10, Q41 | One enforced write path; keeps Giovanni's setup |
Fixed Human State names, forward-only in set-state | Q3, Q36 | No mapping layer; one rule for every writer |
Fog ↔ Business Request, written by write-backlog | Q13, Q14, Q15 | Fog completion already uses production evidence |
| Owed state derived from all evidence | Architecture Models finding; Q19 | "Last event wins" loses Live |
humanBacklog validated in SettingsDocument | Q31, Q44 | Documented settings contract |
| Eject identified by skill-tree hash | Q47 | An installed skill cannot read its npm version |