agent's clause timeline put Amendment 5 before Amendment 3 - it sorted by upload date, not effective date
Fixes contract-review agents ordering amendments by upload date instead of effective date, so override chains apply in the wrong sequence. Use it when a clause timeline or amendment history drives extraction. Key trigger: a later-effective amendment appears to lose to an earlier one.
TL;DR
Sort amendments by effective date parsed from the document text, never by upload date or filename. Upload order records when someone scanned the files; legal order is the effective date in the recitals. A timeline sorted by upload date applies overrides in the wrong sequence and the "current" clause it reports belongs to an earlier amendment.
agent's clause timeline put Amendment 5 before Amendment 3 - it sorted by upload date, not effective dateSteps
- Parse the effective date from each amendment's recitals ('effective as of [date]'); fall back to signing date, then upload date, in that order.
Expected: every amendment carries an effective-date field with a recorded source
- Sort the amendment chain by (effective date, signing date, upload date as last resort).
Expected: Amendment 3 precedes Amendment 5 regardless of upload order
- Flag amendments whose effective date cannot be parsed instead of silently sorting them.
Expected: explicit "effective date unknown" flags in the timeline, never a quiet guess
- Rebuild every downstream artifact after resorting: term glossary, clause timeline, override chains.
Expected: glossary and timeline agree on the same amendment order
- Add a regression test with deliberately mis-ordered uploads and assert the timeline comes out in effective-date order.
Expected: the sorter cannot regress to upload order without failing the test
Use this when
- A clause timeline or amendment history looks out of order.
- Later amendments seem to be overridden by earlier ones in the output.
- Amendments were uploaded or scanned in a different order than they were signed.
- You are validating any artifact that depends on amendment sequencing.
Not for this skill when
- There is only one amendment; ordering is trivial.
- Amendments are already ingested in effective-date order and verified.
- The dates themselves are disputed; that is a legal question, not a sorting fix.
- The timeline problem is missing amendments, not mis-ordered ones.
Variant phrasings
amendment timeline sorted by upload date instead of effective date
agent applied amendments in the wrong order
clause history shows Amendment 5 before Amendment 3
effective date vs upload date in contract amendment ordering
Why it happens
Ingestion pipelines timestamp files at upload, and sorting by that timestamp is the path of least resistance. Nobody notices because the timeline still contains all the amendments in a plausible-looking order; the damage only shows where two amendments touch the same clause, and there the earlier-effective one wrongly wins. Filenames are no better: 'Amendment 5' vs 'Amendment 3' sorts fine until someone names a file 'Amendment executed copy FINAL'.
Edge cases
- An amendment is effective retroactively ('effective as of a date before signing'). Honor the stated effective date; legal order is what the document says.
- Two amendments share an effective date. Order by signing date, then by amendment number, and flag the tie in the timeline.
- The recitals say "effective upon execution" with no date. Use the signing date and mark the source of the date.
- An amendment's effective date predates the base agreement. Flag it; do not silently place it first without operator eyes.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstCqgeU1eb7bbcEQ3HtisYg
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.