The plaintiff ("the power company") owns a disused hydroelectric plant built in 1912. When functional the plant was powered by water from a canal, owned by the defendant ("the canal company"), that connects the plant to the Illinois River. A contract between the parties' predecessors required the owner of the plant to pay rent to the owner of the canal and required the latter to keep the canal in good repair. The requirement had no practical significance when the plant was not being used. But the current owner of the plant, that is, the power company, decided to put the plant back into service and so it became concerned about the state of the canal and in particular feared that the canal's wall was about to collapse. The canal company refused to repair it, and so the power company brought this suit to enforce the canal company's duty under the contract and moved for a preliminary injunction; but before the motion could be heard, the canal wall collapsed. The canal company counterclaimed for the rent due under the contract, rent that the power company refused to pay until the canal was repaired. After a bench trial, the judge awarded judgment for the power company both on its complaint and on the canal company's counterclaim. The judgment seems (the reason for this hedge will appear momentarily) to include an order injunctive in character that entitles the power company to enter upon the canal company's property for the purpose of repairing the canal wall and to obtain a lien on the property for the cost of the repair.

2

Before considering the issues presented by the appeal, we must satisfy ourselves that we have jurisdiction. Rule 65(d) of the Federal Rules of Civil Procedure requires that any injunction issued by a federal district court be detailed and specific (and also that it be a self-contained document, of which more shortly). The purpose is to provide a solid foundation for any subsequent efforts to enforce the injunction by contempt proceedings or otherwise. PMC, Inc. v. Sherwin-Williams Co.,151 F.3d 610, 619 (7th Cir.1998); Chicago & North Western Transportation Co. v. Railway Labor Executives' Ass'n,908 F.2d 144, 149 (7th Cir.1990). It is also to spare the courts and the litigants a struggle over the injunction's scope and meaning. Schmidt v. Lessard,414 U.S. 473, 476, 94 S.Ct. 713, 38 L.Ed.2d 661 (1974) (per curiam); Hispanics United of DuPage County v. Village of Addison,248 F.3d 617, 620 (7th Cir.2001). Some cases suggest, in the words of the Tenth Circuit, that prohibiting vague injunctions is also necessary to protect "those who are enjoined by informing them of the specific conduct regulated by the injunction and subject to contempt." Consumers Gas & Oil, Inc. v. Farmland Industries, Inc.,84 F.3d 367, 371 (10th Cir.1996). But this rationale is questionable because, if the injunction is vague, it is not enforceable by contempt.

3

Neither party has mentioned Rule 65(d) even though the "injunction" (essentially against the canal company's interfering with the power company's entering the canal company's property to repair the canal) violates it blatantly. Buried in the district judge's oral opinion terminating the case (the judgment order merely announces that judgment is for the power company, and thus violates the precept that "the judgment should award the relief to which the prevailing party is entitled, not simply announce an entitlement," American Inter-Fidelity Exchange v. American Re-Insurance Co.,17 F.3d 1018, 1020 (7th Cir.1994) (emphasis in original)), the "injunction" consists of a statement that "the plaintiff is entitled to enter upon the defendant's property in order to repair the wall in accordance with" a repair plan that had been submitted to the court, and of little more. Crucial details, such as the power company's duty to purchase insurance against damage to the canal company's property from the repair activity, are omitted. The reference to the repair plan does not cure the deficiency, not only because the plan also lacks such crucial details as insurance but also because Rule 65(d) requires that the injunction be self-contained; its terms may not be filled out by reference to another document.

4

So the "injunction" does not satisfy Rule 65(d). The rule is not jurisdictional, however, and thus the repair plan incorporated by reference may be looked to for assistance in deciding whether the injunction is sufficiently definite to be enforceable by means of a contempt proceeding. Chathas v. Local 134 International Brotherhood of Electrical Workers,233 F.3d 508, 513 (7th Cir.2000). That is an inquiry of jurisdictional significance because if the injunction is not at least that definite the canal company can disobey it with impunity and thus, not being hurt by it, would lack standing to challenge it, United States v. Board of Education, 11 F.3d 668, 672 (7th Cir.1993); Original Great American Chocolate Chip Cookie Co. v. River Valley Cookies, Ltd.,970 F.2d 273, 276 (7th Cir.1992); Chicago & North Western Transportation Co. v. Railway Labor Executives' Ass'n, supra, 908 F.2d at 149; see also Henrietta D. v. Giuliani,246 F.3d 176, 182 (2d Cir.2001), since an unenforceable order is no order at all. But the order in this case is that definite, at least. Although there are a number of open issues, there is a core of ascertainable duty imposed by the injunction. If the canal company flatly refused without excuse to allow the power company onto its property for the purpose of formulating a definite plan of repair, it would be punishable for contempt.

5

It does not follow from the fact that the canal company has standing to appeal from the injunction that there is no remedy for the district court's violation of Rule 65(d). True, neither party has cited the rule; but because injunctions impose continuing responsibilities on courts and frequently have effects on third parties, courts have an independent responsibility for assuring the ready administrability of injunctions. So we could, as in PMC, Inc. v. Sherwin-Williams Co., supra, 151 F.3d at 619-20, remand for the redrafting of the injunction. But there is more to the appeal. For in addition to seeking an injunction, the power company sought and, in the same oral opinion, obtained a declaration of its right to go on the canal company's property and repair the canal. Rule 65 does not apply to declaratory judgments, Metzl v. Leininger,57 F.3d 618, 619 (7th Cir.1995), and such judgments are appealable, Gjertsen v. Board of Election Commissioners,751 F.2d 199, 201 (7th Cir. 1984), even though, if they are disobeyed, they provide merely a platform for seeking further relief. Another of the federal civil rules is violated by this declaratory "judgment," however (and by the "injunction" as well, for that matter) — Rule 58, which requires that a final judgment, including a final declaratory judgment, be set forth in a separate document from the opinion. Metzl v. Leininger, supra, 57 F.3d at 619; American Inter-Fidelity Exchange v. American Re-Insurance Co., supra, 17 F.3d at 1020. But a final judgment is appealable even if it does not comply with Rule 58. Bankers Trust Co. v. Mallis,435 U.S. 381, 385-86, 98 S.Ct. 1117, 55 L.Ed.2d 357 (1978) (per curiam).

6

So we have jurisdiction and can proceed to the merits of the appeal, where the canal company's principal argument, and the only one we strictly need to consider, is that it was entitled to a jury trial. Rule 38(b) of the civil rules gives a party only ten days "after the service of the last pleading directed to the issue" (that is, "any issue triable of right by a jury," id.) to demand a jury trial on that issue. The canal company filed its demand within ten days after serving on the power company its counterclaim demanding payment of the rent specified in the contract for the use of the canal, which the power company had decided to withhold until the canal was repaired. The district judge thought the demand had come too late, because the rent issue was clearly flagged in the power company's complaint; part of the declaratory judgment sought was a declaration that the power company owed no rent until the canal was back in working order.

7

The power company and the judge were confused by the word "issue" in Rule 38(b). They think it means that if an issue could give rise to a claim for damages, either party can demand that it be tried to a jury. That is not correct. If the only relief sought is equitable, such as an injunction or specific performance (a type of affirmative injunction), neither the party seeking that relief nor the party opposing it is entitled to a jury trial. United States v. Louisiana,339 U.S. 699, 706, 70 S.Ct. 914, 94 L.Ed. 1216 (1950); Great American Federal Savings & Loan Ass'n v. Novotny,442 U.S. 366, 374-75, 99 S.Ct. 2345, 60 L.Ed.2d 957 (1979); Townsend v. Indiana University,995 F.2d 691, 693 (7th Cir.1993); Lac Du Flambeau Band of Lake Superior Chippewa Indians v. Stop Treaty Abuse-Wisconsin, Inc.,991 F.2d 1249, 1254 (7th Cir.1993); 9 Charles Alan Wright and Arthur R. Miller, Federal Practice and Procedure § 2308, pp. 79-80, § 2309, p. 85 (2d ed.1995); cf. Spinelli v. Gaughan,12 F.3d 853 (9th Cir.1993). Rule 38(a), so far as applicable to this case, creates a right to a jury trial merely coextensive with the Seventh Amendment, which in turn confines that right to "Suits at common law." A suit seeking only equitable relief is not a suit at common law, regardless of the nature of the issues likely or even certain to arise in the case, Atlas Roofing Co. v. Occupational Safety & Health Review Comm'n,430 U.S. 442, 459, 97 S.Ct. 1261, 51 L.Ed.2d 464 (1977); City of Monterey v. Del Monte Dunes at Monterey, Ltd., 526 U.S. 687, 726 n. 1, 119 S.Ct. 1624, 143 L.Ed.2d 882 (1999) (concurring opinion), most of which indeed might be legal, such as (see Atlas) whether the canal company broke its contract with the power company, an issue normally determined by the common law of contracts rather than by some principle of equity jurisprudence.

8

We state this proposition (that a suit for equitable relief is not a suit at common law regardless of the nature of the issues in the case) with confidence though mindful of the statement in Chauffeurs, Teamsters & Helpers Local No. 391 v. Terry,494 U.S. 558, 565, 110 S.Ct. 1339, 108 L.Ed.2d 519 (1990) (a plurality opinion, but the statement in question was agreed to by a majority of the Justices), that "to determine whether a particular action will resolve legal rights, and therefore give rise to a jury trial right, we examine both the nature of the issues involved and the remedy sought. First, we compare the statutory action to 18th-century actions brought in the courts of England prior to the merger of the courts of law and equity. Second, we examine the remedy sought and determine whether it is legal or equitable in nature. The second inquiry is the more important in our analysis." This formula for guiding the Seventh Amendment inquiry has been repeated frequently by lower courts, e.g., Lebow v. American Trans Air, Inc.,86 F.3d 661, 668 (7th Cir.1996); Brown v. Sandimo Materials,250 F.3d 120, 126 (2d Cir.2001); Spinelli v. Gaughan, supra, 12 F.3d at 855-56; Ramos v. Roche Products, Inc.,936 F.2d 43, 50 (1st Cir.1991), though criticized in Crocker v. Piedmont Aviation, Inc.,49 F.3d 735 (D.C.Cir.1995): "Where the right at issue is a creature of recent statute, the search for an 18th-century English analog typically yields no clear answer. Given the radical difference between mid-20th-century American ideas of the proper role of the state and the ideas prevailing in 18th-century England, this difficulty is hardly surprising; it is certainly present here. Moreover, as the focus of the inquiry is on whether the `issue to be tried' was analogous to one characteristically dealt with in equity or at common law, and as most traditional issues could be tried in both contexts (albeit leading to different remedies), inconclusive results seem foreordained." Id. at 745 (emphasis in original). But the historical inquiry, and the criticism of it, are not about unsettling the principle that there is no right to a jury trial when the plaintiff is seeking only equitable relief; that principle is firm; the inquiry is to determine whether a modern legal right has a sufficient analogy to a right enforced by common law courts in the eighteenth century to be enforceable by "a suit at common law" within the meaning of the Seventh Amendment. Tull v. United States,481 U.S. 412, 420, 107 S.Ct. 1831, 95 L.Ed.2d 365 (1987); City of Monterey v. Del Monte Dunes at Monterey, Ltd., supra, 526 U.S. at 726 n. 1, 119 S.Ct. 1624 (concurring opinion); Lebow v. American Trans Air, Inc., supra, 86 F.3d at 668; 8 Moore's Federal Practice § 38.10[4][a], p. 38-49 (3d ed.1997).

9

The complaint in this case sought an injunction against the canal company's preventing the power company from going on the canal company's land to repair the canal at the latter's expense, as well as specific performance (the granting of a lien), also a form of equitable relief. If that were all, then, as if we have just seen, it would be clear that there was no right to a jury trial. But declaratory relief was also sought. Despite the equitable origins of such relief, Edwin Borchard, Declaratory Judgments 399 (2d ed.1941), the Supreme Court has said that actions for declaratory judgments are "neither legal nor equitable." Gulfstream Aerospace Corp. v. Mayacamas Corp.,485 U.S. 271, 284, 108 S.Ct. 1133, 99 L.Ed.2d 296 (1988); see also Moretrench American Corp. v. S.J. Groves & Sons Co.,839 F.2d 1284, 1286 (7th Cir.1988); Hartford Financial Systems, Inc. v. Florida Software Services, Inc.,712 F.2d 724, 727 (1st Cir.1983). (So much for the historical test for Seventh Amendment rights.) Rule 57 of the civil rules provides that "the procedure for obtaining a declaratory judgment pursuant to [the Declaratory Judgment Act, 28 U.S.C. § 2201] shall be in accordance with these rules, and the right to trial by jury may be demanded under the circumstances and in the manner provided in Rules 38 and 39." In other words, casting one's suit in the form of a suit for a declaratory judgment, or adding a claim for a declaratory judgment to one's other claim or claims for relief, does not create a right to a jury trial. Rather, as the Third Circuit put it nicely in Owens-Illinois, Inc. v. Lake Shore Land Co.,610 F.2d 1185, 1189 (3d Cir.1979), "If the declaratory judgment action does not fit into one of the existing equitable patterns but is essentially an inverted law suit — an action brought by one who would have been a defendant at common law — then the parties have a right to a jury. But if the action is the counterpart of a suit in equity, there is no such right." See also Beacon Theatres, Inc. v. Westover,359 U.S. 500, 504, 79 S.Ct. 948, 3 L.Ed.2d 988 (1959); James v. Pennsylvania General Ins. Co.,349 F.2d 228, 230 (D.C.Cir.1965). (And here it is the latter.) We prefer the formulation that we just quoted from Owens-Illinois to that in Petition of Rosenman & Colin,850 F.2d 57, 60 (2d Cir.1988): "the nature of the underlying dispute determines whether a jury trial is available." The "nature of the underlying dispute" here is breach of contract, but a plaintiff who is seeking equitable relief and not damages cannot wrest an entitlement to a jury trial by the facile expedient of attaching a claim for declaratory judgment. Otherwise anyone seeking an injunction could obtain a jury trial.

10

So neither the power company nor the canal company had a right to demand a jury trial on the basis of the complaint. Any such right would have had to arise later. It did arise later; it arose when the canal company counterclaimed for the withheld rent. Founded on an alleged breach of contract by the power company, the counterclaim was a claim for damages and hence — despite its being a counterclaim rather than a free-standing lawsuit, since a counterclaim is a suit, only joined for economy with an existing suit — it was a suit at common law within the meaning of the Seventh Amendment. Beacon Theatres v. Westover, supra, 359 U.S. at 504, 508, 510, 79 S.Ct. 948; Lee Pharmaceuticals v. Mishler, 526 F.2d 1115, 1116 (2d Cir.1975) (per curiam). The canal company's demand for a jury, filed within ten days after the counterclaim, was the earliest either party could have demanded a jury trial. At that point the fact that there was a common issue underlying both the equitable and the legal claims, namely the duty if any of the power company to pay rent, and under that issue perhaps the deeper issue of which party had actually broken the contract, became significant. Common issues, if triable at all in the sense that their resolution requires resolving a material dispute of fact, as was the case here, must be tried to a jury in order to prevent a judge's determination from foreclosing a party's right to have the issues in a common law suit tried by a jury. Dairy Queen, Inc. v. Wood,369 U.S. 469, 472-73, 479, 82 S.Ct. 894, 8 L.Ed.2d 44 (1962); Wade v. Orange County Sheriff's Office,844 F.2d 951, 954 (2d Cir.1988). So the demand for a jury trial was timely and its rejection error; and until the jury trial to which the canal company is entitled is completed issuance of an injunction is premature.

11

We need to address two other issues presented by the appeal in order to guide the proceedings on remand. (It is of course implicit in our earlier discussion that if the power company prevails at the jury trial and again seeks and obtains an injunction, the injunction is to comply with Rules 58 and 65(d).) The first is whether the district judge erred in refusing to allow the canal company to file a third-party complaint under Fed.R.Civ.P. 14(a) against Illinois Power Company (a former owner of the hydroelectric plant), which the canal company's expert thought may have contributed to the collapse of the canal wall by planting utility poles too near the edge of the canal. The judge thought the canal company had waited too long to file the third-party complaint, but that is clearly wrong. The suit was filed in February 2000; in June the canal company filed its counterclaim and moved to file the third-party complaint against Illinois Power. We cannot for the life of us see what procedural economy could be gained by forcing the canal company to sue Illinois Power in a separate action or how the plaintiff could be prejudiced. "As long as a third-party action falls within the general contours limned by Rule 14(a), does not contravene customary jurisdictional and venue requirements, and will not work unfair prejudice, a district court should not preclude its prosecution." Lehman v. Revolution Portfolio L.L.C.,166 F.3d 389, 395 (1st Cir.1999). These conditions are so manifestly satisfied here that we are constrained to deem the judge's denial of the canal company's motion an abuse of discretion. Ford Motor Co. v. Milby,210 F.2d 137, 138-39 (4th Cir.1954) (per curiam).

12

The second issue arises from the fact that the power company will have to obtain a license from the Federal Energy Regulatory Commission to put its hydroelectric plant back into service. To the canal company's argument that the question of what is to be done about the collapsed wall of the canal is, by virtue of the license requirement, within FERC's primary jurisdiction, the district judge replied that it is no business of the canal company whether the power company is ever allowed to generate electricity at its plant because the power company is entitled under the contract to a supply of water regardless. We do not agree. It would be inequitable and indeed extortionate for a court to issue an order that allowed the power company to repair the canal at the canal company's expense if the repair would confer no value on the power company (or, so far as appears, anyone else) because it was denied a hydroelectric license and as a result had no use for the water. The power company would in that event merely threaten to repair the canal in order to induce a monetary settlement, that is, a payment by the canal company to dissuade the power company from carrying out its threat. Suppose it would cost $500,000 to repair the canal. The power company, if the repair would be worthless to it, would be happy to accept payment from the canal company to give up its right; at any settlement amount between $0 and $500,000, both parties would be better off. To issue an injunction in order to arm a plaintiff to obtain such a windfall would be a perverse exercise of judicial power. See Youngs v. Old Ben Coal Co.,243 F.3d 387, 393 (7th Cir.2001); Northern Indiana Public Service Co. v. Carbon County Coal Co.,799 F.2d 265, 279-80 (7th Cir.1986); Odetics, Inc. v. Storage Technology Corp.,185 F.3d 1259, 1273-74 (Fed. Cir.1999); Foster v. American Machine & Foundry Co.,492 F.2d 1317, 1324 (2d Cir. 1974); Edwards v. Allouez Mining Co., 38 Mich. 46, 48-51 (1878); see generally Ian Ayres & Kristin Madison, "Threatening Inefficient Performance of Injunctions and Contracts," 148 U.Pa.L.Rev. 45, 47-53 (1999).

13

But there may be more to the matter than this. The power company may reasonably want to repair the canal wall forthwith so that it can begin generating power as soon as it obtains its license, assuming that happy outcome is likely (which we do not know). And, realistically, since the canal company's finances are distinctly shaky, repair at the canal company's expense may mean simply that the power company will apply to the cost of repairing the canal the rental payments that it would otherwise owe the canal company under their contract.

14

Application of the doctrine of primary jurisdiction would be premature, moreover. The doctrine comes into play when an issue arising in a lawsuit is one that the legislature has confided for determination to an administrative agency, such as FERC. United States v. Western Pacific R.R.,352 U.S. 59, 63-64, 77 S.Ct. 161, 1 L.Ed.2d 126 (1956); Arsberry v. Illinois,244 F.3d 558, 563 (7th Cir.2001). When properly invoked, as these cases and many others we could cite explain, the doctrine requires that the suit be stayed until the agency resolves the issue, whereupon the lawsuit resumes if the agency's resolution (assuming it survives review by whatever court has jurisdiction to review the agency's decisions) has not resolved the entire controversy. See also 2 Kenneth Culp Davis & Richard J. Pierce, Jr., Administrative Law Treatise § 14.1, pp. 271-73 (3d ed.1994). This case, at least at its present stage, lies outside the heartland of the doctrine. Remember that it is a contract dispute. No issue concerning the parties' respective rights and duties under the contract is within FERC's jurisdiction, primary or otherwise. FERC comes into the picture in two ways. First, if it never grants the power company a license to operate the hydroelectric plant, the company will not be entitled to the relief it is seeking against the canal company, although it may, for all we know, be entitled to other relief, such as abatement of the rent. Second, FERC may have its own ideas about how best to repair the canal wall, and it can condition the license it issues to the power company, if it does issue a license, on the company's implementing those ideas, provided only that they are reasonable. See 16 U.S.C. §§ 799, 803(a)(1), (c), (g); 18 C.F.R. § 12.4(b)(2); David B. Spence, "Managing Delegation Ex Ante: Using Law to Steer Administrative Agencies," 28 J. Legal Stud. 413, 420-21 (1999); cf. Midwestern Gas Transmission Co. v. McCarty, 270 F.3d 536, 538 (7th Cir.2001). FERC orders issuing licenses for hydroelectric generation often reserve regulatory control over the construction plan, including the waterway, see, e.g., Midwest Hydraulic Co., 79 F.E.R.C. ¶ 62,101 (1997); J & T Hydro Co., 66 F.E.R.C. ¶ 62,138 (1994) — including even repairs to the waterway, as in Windsor Locks Canal Co. & Windsor Locks Hydroelectric Limited Partnership, 49 F.E.R.C. ¶ 62,300 (1989); see also Seneca Falls Power Corp., 84 F.E.R.C. ¶ 61,005 (1998), just like the present case.

15

This discussion shows that it would be premature to refer any issue to FERC until the relief stage of this litigation is reached. Only if the power company again prevails and again obtains an injunction entitling it to repair the canal might it be necessary to adjust the terms of the injunction to make sure that the company is not allowed to do anything contrary to whatever conditions FERC imposes on plans for repairing the canal wall. But though there is no issue to refer to the FERC at the present time it might be a good idea for the district court to stay the lawsuit until the FERC proceeding concludes, since that proceeding may quite possibly either render the lawsuit moot (if the license is denied) except for the matter of unpaid rent, or require significant changes in the equitable relief ordered should the power company succeed in proving its case. Rohr Industries, Inc. v. Washington Metropolitan Area Transit Authority,720 F.2d 1319, 1324-25 (D.C.Cir.1983); Leyva v. Certified Grocers of California, Ltd.,593 F.2d 857, 863-64 (9th Cir.1979). The question whether to stay the suit is something for the district court to decide in the first instance.

16

We trust that in the further proceedings that we are ordering the lawyers will be less insouciant about rules and procedures; for they are courting sanctions. Neither party seems to have been aware of Fed. R.Civ.P. 65. The power company seems not to have heard of the Seventh Amendment either. The canal company's brief makes a hash of the jurisdictional statement (thus violating 7th Cir.R. 28(a)(1); see Meyerson v. Harrah's East Chicago Casino,299 F.3d 616 (7th Cir.2002) (per curiam), and cases cited there), alleging that the power company's principal place of business is in Illinois, which if true (it is false) would destroy diversity, and failing to allege the state of citizenship of the members of the power company, a limited liability company, so that the relevant citizenship for diversity purposes is that of the members, not of the company. Cosgrove v. Bartolotta,150 F.3d 729, 731 (7th Cir.1998). The canal company's brief omits the statement of the standard of appellate review required of appellants, Fed.R.App.P. 28(a)(9)(B), while the power company's brief states the standard incorrectly.

17

It says that procedural rulings are reviewed for abuse of discretion and substantive rulings (because this is a diversity case) for clear error. Some procedural rulings are reviewed for abuse of discretion, others not, while in diversity as in other cases findings of fact are reviewed for clear error but rulings of law, whether substantive or procedural, are subject to plenary review.