Portfolio Engineering Skill
Solve portfolio-mix, SLA-aging, and release-readiness assessment tasks against a shared API environment containing work items, targets, policies, releases, milestones, blockers, and dependencies.
Entry Checklist
Before building an answer, read these three inputs:
- Task prompt (
input/prompt.txt) — scope, domain, target date or quarter, the specific question to answer. - Answer template (
input/payloads/answer_template.json) — the exact JSON schema the answer must match. Everyrequiredfield must be present. Everyenumorconstmust be respected. Sort orders, rounding rules, and field descriptions in the schema are binding. - Environment access (
environment_access.mdat the project root) — base URL, available endpoints, any required headers or tokens.
Environment and Data Sources
All tasks share a REST API at the base URL from the environment access file. Use only the endpoints listed there. The data model includes these entities:
| Endpoint | Returns |
|---|---|
GET /api/work-items |
All work items with their full record |
GET /api/mix-targets |
Target portfolio-mix percentages per scope |
GET /api/sla-policy |
SLA days-to-due by severity band |
GET /api/releases |
All releases |
GET /api/releases/{id} |
One release with its milestones and blockers |
GET /api/milestones |
All milestones |
GET /api/dependencies |
All dependency relationships |
GET /api/blockers |
All blocker records |
POST /api/query |
Restricted SQL query (requires token) |
Work Item Fields (authoritative)
| Field | Meaning |
|---|---|
id |
Unique work item identifier |
status |
Authoritative lifecycle state: Backlog, In Progress, Review, Done, Verified, Deployed, Closed, Duplicate, Cancelled, Reopened |
work_type |
Primary work classification: Feature, Enhancement, Refactor, Chore, Dependency, Bug, Incident, Reliability, Security, Compliance |
labels |
Array of tag strings (e.g. ["security","cve","rollout"]) |
title |
Human-readable summary — may contain hints when labels are stale |
team |
Owning engineering team |
product_area |
Owning product area |
closed_at |
ISO date when item reached a terminal state; null if still open |
due_at |
SLA deadline date |
created_at |
Creation date |
severity |
S1, S2, S3, or S4 |
owner |
Assigned person; null means unassigned |
duplicate_of |
If set, this item is a duplicate of the referenced primary item |
milestone_id |
Milestone this item belongs to |
release_id |
Release this item belongs to |
mirror_status |
Stale mirror/export status — ignore this field |
legacy_category |
Pre-portfolio classification — ignore this field |
Key Status Groups
- Complete / Closed (terminal):
Done,Verified,Deployed,Closed - Not complete:
Backlog,In Progress,Review,Reopened - Excluded from primary counts:
Duplicate,Cancelled
Portfolio Category Classification
Every work item must be assigned to exactly one of four portfolio categories: NewFeature, TechDebt, Reliability, Security. Use the work-type-first with label overrides convention:
Step 1 — Security override always wins
If "security" is in the item's labels array, classify as Security.
If work_type is "Security", classify as Security.
Step 2 — Map by work_type
| work_type | Default category |
|---|---|
Feature, Enhancement |
NewFeature |
Refactor, Chore, Dependency |
TechDebt |
Bug, Incident, Reliability |
Reliability |
Compliance |
Security if "security" in labels, else TechDebt |
Step 3 — Label overrides for TechDebt types
For items whose work_type would default to TechDebt:
- If labels contain
"reliability", reclassify as Reliability.
Resolving conflicting signals
When labels and work_type point in different directions, the priority order is:
"security"in labels → Security (highest priority)"reliability"in labels AND work_type is Refactor/Chore/Dependency → Reliability- Otherwise, work_type determines the category
The title field may contain hints like "with stale security label" — use these to confirm when a label should be disregarded, but do not base primary classification on title alone.
Task Type 1 — Portfolio Mix Review
Goal: Compare the actual category mix of closed work items against a target mix, identify under-invested categories, and recommend a rebalance action.
Scope
Find the target mix row whose scope_id matches the task's scope. The target row provides percentage targets for each category.
Filtering work items
- Team and product area: Filter by the team and product_area values specified in the task scope. When the scope names multiple teams or product areas (e.g. "Atlas Backend + Identity"), match items where
teamis in the team set ANDproduct_areais in the area set. - Quarter filter: Keep only items whose
closed_atfalls within the calendar quarter. Q4 2025 = 2025-10-01 through 2025-12-31. - Exclude non-closed: Keep only items whose
statusis in the Complete/Closed group. - Exclude distractor records: Remove items with
status="Duplicate",status="Cancelled", or a non-nullduplicate_offield. These go into the exclusion lists.
Computing the mix
- Count items in each of the four categories.
- Divide each count by total included items to get actual percentages.
- Round all percentages to 1 decimal place.
gap_pct = actual_pct − target_pct(both in percentage points).
Under-invested categories
Categories where gap_pct < 0, sorted from most negative gap to least negative.
Follow-up action
REBALANCE_CAPACITYwhen under-invested categories exist.primary_categoryis the largest-deficit category,secondary_categorythe next,rationale_code="LARGEST_NEGATIVE_GAP".MAINTAIN_CURRENT_MIXwhen no negative gaps exist.
Exclusion flags
excluded_duplicate_ids: items in scope withstatus = "Duplicate"OR a non-nullduplicate_of.excluded_cancelled_ids: items in scope withstatus = "Cancelled".ignored_mirror_status_and_legacy_category: alwaystrue— mirror_status and legacy_category are stale and must not influence decisions.
Sorting within the answer
included_work_item_ids: sort byclosed_atascending, then byidascending.- Exclusion list IDs: sort lexicographically.
gap_tablerows: always in order NewFeature, TechDebt, Reliability, Security.- Team and product area arrays: sort alphabetically.
Task Type 2 — SLA Aging Audit
Goal: Review the SLA status of reliability and security work items, identify overdue items, compute aging distribution and breach rate, and report duplicate clusters.
SLA Policy
The SLA policy maps severity to allowed days-to-due:
| Severity | Days to Due |
|---|---|
| S1 | 3 |
| S2 | 10 |
| S3 | 21 |
| S4 | 45 |
An item's due_at field is authoritative for determining whether SLA was met. Do not recalculate due_at from created_at and the policy; use due_at as given.
Scoping the population
- Filter work items by the specified team(s).
- Classify each item using the portfolio category convention — keep only those classified as Security or Reliability.
- Separate primary from duplicate: items with
status = "Duplicate"or a non-nullduplicate_ofare not primary.
Included primary IDs
The primary SLA population consists of all Security/Reliability items in scope that are not duplicates. Sort lexicographically.
Overdue determination
An item is overdue when:
due_at<as_ofdate (the SLA deadline has passed), AND- The item is not yet closed as of the as_of date (i.e.
closed_atisnullorclosed_at>as_of).
Items already closed before their due date are not overdue. Items closed after their due date but before the as_of date are late closures — include them as overdue.
Aging buckets
For each overdue item, calculate aging_days = as_of − due_at (for open items) or aging_days = closed_at − due_at (for closed-late items). Bucket into:
| Bucket | Days past due |
|---|---|
| 0-3 | 0–3 |
| 4-7 | 4–7 |
| 8-14 | 8–14 |
| 15-30 | 15–30 |
| 31+ | ≥31 |
Overdue by team and hotspot
- Count overdue items per team. List teams alphabetically.
- Find the
(team, owner)pair with the most overdue items. If owner isnull, use"UNASSIGNED".
Duplicate clusters
For every primary item that has duplicates, report a cluster with:
primary_id: the canonical work item IDduplicate_ids: the duplicate item IDs sorted lexicographically
Sort clusters by primary_id.
Missing owners
IDs of primary items where owner is null, sorted lexicographically.
Breach rate
breach_rate = overdue_count / included_primary_count, rounded to 3 decimal places.
Escalation queue
When the answer template requires an escalation queue, sort overdue primary items by priority order:
- Severity (S1 first, then S2, S3, S4)
- Then by
due_atascending (earliest deadline first)
Task Type 3 — Release Readiness Assessment
Goal: Evaluate whether a release is ready to ship by examining milestone completion, gating work items, unresolved blockers, and critical dependency chains.
Data sources for a release
- Fetch the release by ID (
GET /api/releases/{id}) — this returns the release record plus its milestones and blockers. - Fetch all work items and filter to those with
release_idmatching the target release. - Fetch all dependencies.
Milestone completion
For each milestone in the release (sorted by milestone_id ascending):
- Count work items assigned to that milestone.
- Exclude items with
status = "Duplicate"from the primary count. complete_primary= count of primary items with status in{Done, Verified, Deployed}.primary_total= total primary items in the milestone.completion_pct=(complete_primary / primary_total) × 100, rounded to 1 decimal place.
Gating work item IDs
Non-complete, non-duplicate release work items, sorted ascending with no duplicates. An item gates readiness if its status is not in the Complete set.
Blocker cause counts
Consider only blockers for the target release. A blocker is counted when:
severityis"Critical"or"High"(high-impact), ANDstatusis not"Resolved"(still open or in monitoring).
Count by exact cause string.
Critical dependency chains
Look at all dependencies where relation = "blocks-release-readiness". For each such dependency where the blocked work item is a release work item and the depends-on work item is not complete, report the chain as [blocked_id, depends_on_id].
Sort chains lexicographically by the full path.
A dependency is satisfied (not critical) when the depends-on item has a Complete status.
Readiness score
readiness_score = completed_primary_count / primary_total, where:
- Primary items = all release work items excluding those with
status = "Duplicate" - Completed = items with status in
{Done, Verified, Deployed} - Round to 3 decimal places.
Ship decision
Use the readiness score together with blocker severity:
NO_SHIPwhen unresolved Critical or High blockers exist, or readiness is critically low.SHIP_WITH_WATCHwhen readiness is moderate and no Critical blockers are open.SHIPwhen all milestones are complete and no unresolved blockers exist.
Validation Before Submitting
Run these checks against every answer before finalizing:
- Schema compliance: Every
requiredfield present. Everyconstvalue matches. NoadditionalPropertiesviolations. - Rounding: Percentages to 1 decimal place. Rates/scores to 3 decimal places.
- Sort order: IDs and strings sorted as specified in the answer template (lexicographic, ascending, or by a date-then-id compound key).
- No duplicates: ID arrays contain each ID at most once.
- Counts sum correctly: Category counts sum to
total_included. Percentages sum to approximately 100%. - Duplicate handling: No item appears in both
includedandexcludedlists. Items withduplicate_ofset should be in the duplicate exclusion list, not the included set. - Status authority: Use
statusfield, notmirror_status, for all state decisions. - Category authority: Use the portfolio classification convention; do not use
legacy_category.
Common Pitfalls
- Stale mirror_status: The
mirror_statusfield can disagree withstatus. Always usestatusas the authoritative field. - Duplicate but not marked: Some items have
status = "Duplicate"without aduplicate_ofreference. They are still duplicates and should be excluded from primary counts. - Closed after due date but before as_of: These items were late (breached SLA) and should be counted as overdue.
- Quarter boundary precision: Q4 = October through December. An item closed on September 30 is Q3, not Q4. An item closed on January 1 is Q1 of the next year.
- Dependencies outside the release: When tracing dependency chains, the depends-on item may belong to a different release or no release at all. Check its status from the global work items list.
- Cancelled items: Even if
closed_atfalls in the target quarter, Cancelled items are never included in primary counts. - Compliance work_type with security label: Classify as Security, not TechDebt.
- Incident with feature label: Classify as Reliability (Incident trumps feature label). Use the work_type, not the label, for Bug/Incident.